Frame 1
function gotoMySite() {
getURL ("http://www.playerthree.net", "_top");
}
function onEnterFrame() {
var _local2 = Math.round((this.getBytesLoaded() / this.getBytesTotal()) * 300);
preloader_mc.tanks_mc.gotoAndStop(_local2);
preloader_mc.perc_txt.text = Math.round(_local2 / 3) + "%";
if (_local2 >= 300) {
delete onEnterFrame;
play();
}
}
stop();
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var siteLink = new ContextMenuItem("Created by Playerthree", gotoMySite);
myMenu.customItems.push(siteLink);
_root.menu = myMenu;
Frame 3
Globals.gUrl = _root.gUrl;
trace("root URL : " + _root.gUrl);
if ((_root.gUrl == undefined) || (_root.gUrl == "undefined")) {
Globals.gUrl = "http://uat.topgear.com/uk/topgear-games/rocket-robin";
} else {
trace("root URL : " + _root.gUrl);
}
trace("gUrl : " + Globals.gUrl);
Globals.soundClip = this.createEmptyMovieClip("sounds", 999999);
Frame 4
function moveOn() {
play();
}
Globals.blackout = blackout_mc;
blackout_mc.assocFunc(moveOn);
blackout_mc.fadeOut();
SoundManager.go().setChannels(4);
stop();
Frame 5
Globals.sendToFriend = sendToFriend_mc;
Globals.endGame = endGame_mc;
Globals.highscores = highscores_mc;
Globals.credits = credits_mc;
stop();
com.playerthree.game.SoundManager.go().oneShot("loophifi.wav", 1, 9999, true);
blackout_mc.fadeIn();
Frame 15
stop();
Symbol 7 MovieClip [RemotingDebugClasses] Frame 1
#initclip 1
Object.registerClass("RemotingDebugClasses", mx.remoting.DebugClasses);
#endinitclip
preview._visible = false;
stop();
Symbol 52 MovieClip [RemotingClasses] Frame 1
#initclip 2
Object.registerClass("RemotingClasses", mx.remoting.ApiClasses);
#endinitclip
preview._visible = false;
stop();
Symbol 122 MovieClip Frame 1
stop();
Symbol 127 MovieClip [mc.explosion] Frame 51
stop();
Symbol 129 MovieClip [mc.firepuff] Frame 30
stop();
Symbol 133 MovieClip [mc.debugButton] Frame 1
tf.autoSize = "center";
tf.text = this._name.substr(0, this._name.length - 4);
bg._width = tf._width + 4;
Symbol 139 MovieClip [main] Frame 1
#initclip 120
Object.registerClass("main", Main);
#endinitclip
Symbol 428 MovieClip [mc.glider] Frame 1
stop();
Symbol 445 MovieClip Frame 1
stop();
Symbol 447 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 1
stop();
Symbol 451 MovieClip Frame 1
stop();
Symbol 461 Button
on (rollOver) {
_parent.cursor_mc.gotoAndStop("hand");
}
on (rollOut) {
_parent.cursor_mc.gotoAndStop("arrow");
}
on (releaseOutside) {
_parent.cursor_mc.gotoAndStop("arrow");
}
on (release) {
_parent.cursor_mc.gotoAndStop("arrow");
getURL ("http://www.playerthree.net", "_blank");
}
Symbol 471 MovieClip Frame 44
stop();
Symbol 475 Button
on (release) {
play();
}
Symbol 476 MovieClip Frame 1
stop();
Symbol 476 MovieClip Frame 21
stop();
Symbol 477 MovieClip [mc.menu] Frame 1
#initclip 118
Object.registerClass("mc.menu", Menu);
#endinitclip
Symbol 483 MovieClip [mc.puff] Frame 30
stop();
Symbol 484 MovieClip [mc.puff2] Frame 32
stop();
Symbol 508 MovieClip [mc.testParticle] Frame 40
stop();
Symbol 513 MovieClip Frame 1
stop();
Symbol 515 MovieClip Frame 1
stop();
Symbol 522 MovieClip Frame 1
stop();
Symbol 522 MovieClip Frame 2
stop();
Symbol 542 MovieClip Frame 1
stop();
Symbol 543 MovieClip Frame 1
stop();
Symbol 543 MovieClip Frame 27
gotoAndPlay ("flash");
Symbol 567 MovieClip [mc.UI] Frame 1
#initclip 119
Object.registerClass("mc.UI", UI);
#endinitclip
Symbol 585 MovieClip Frame 9
gotoAndPlay (1);
Symbol 586 MovieClip Frame 13
gotoAndPlay (1);
Symbol 587 MovieClip Frame 23
gotoAndPlay (1);
Symbol 588 MovieClip Frame 35
gotoAndPlay (1);
Symbol 589 MovieClip Frame 81
gotoAndPlay (1);
Symbol 590 MovieClip [mc.windsocks] Frame 1
stop();
Symbol 620 MovieClip Frame 1
stop();
Symbol 678 MovieClip [__Packages.Menu] Frame 0
class Menu extends MovieClip
{
var takeOff_mc, scores_mc, instructions_mc, mail_mc, credits_mc, gotoAndStop, instructionsCard_mc, _parent;
function Menu () {
super();
takeOff_mc.onRollOver = rollOverButton;
scores_mc.onRollOver = rollOverButton;
instructions_mc.onRollOver = rollOverButton;
mail_mc.onRollOver = rollOverButton;
credits_mc.onRollOver = rollOverButton;
takeOff_mc.onReleaseOutside = (takeOff_mc.onRollOut = rollOutButton);
scores_mc.onReleaseOutside = (scores_mc.onRollOut = rollOutButton);
instructions_mc.onReleaseOutside = (instructions_mc.onRollOut = rollOutButton);
mail_mc.onReleaseOutside = (mail_mc.onRollOut = rollOutButton);
credits_mc.onReleaseOutside = (credits_mc.onRollOut = rollOutButton);
takeOff_mc.onRelease = com.playerthree.utils.EventDelegate.create(this, buttonActions, "takeOff");
scores_mc.onRelease = com.playerthree.utils.EventDelegate.create(this, buttonActions, "scores");
instructions_mc.onRelease = com.playerthree.utils.EventDelegate.create(this, buttonActions, "instructions");
mail_mc.onRelease = com.playerthree.utils.EventDelegate.create(this, buttonActions, "mail");
credits_mc.onRelease = com.playerthree.utils.EventDelegate.create(this, buttonActions, "credits");
}
function rollOverButton() {
com.playerthree.game.SoundManager.go().oneShot("rollover_switch.aif", 1, 0, true);
gotoAndStop(2);
}
function rollOutButton() {
gotoAndStop(1);
}
function buttonActions(action) {
com.playerthree.game.SoundManager.go().oneShot("press_switch.aif", 1, 0, true);
switch (action) {
case "takeOff" :
stopAllSounds();
com.playerthree.game.SoundManager.go().oneShot("scratch.aif", 1, 0, true);
Globals.blackout.fadeOut();
Globals.blackout.assocFunc(fadeInToGame);
break;
case "instructions" :
instructionsCard_mc.play();
break;
case "mail" :
Globals.sendToFriend.show();
disableButtons();
break;
case "scores" :
Globals.highscores.show();
disableButtons();
break;
case "credits" :
Globals.credits.show();
disableButtons();
}
}
function disableButtons() {
takeOff_mc.enabled = (scores_mc.enabled = (instructions_mc.enabled = (mail_mc.enabled = (credits_mc.enabled = false))));
}
function enableButtons() {
takeOff_mc.enabled = (scores_mc.enabled = (instructions_mc.enabled = (mail_mc.enabled = (credits_mc.enabled = true))));
takeOff_mc.gotoAndStop(1);
scores_mc.gotoAndStop(1);
instructions_mc.gotoAndStop(1);
mail_mc.gotoAndStop(1);
credits_mc.gotoAndStop(1);
}
function fadeInToGame() {
_parent.gotoAndPlay("game");
Globals.blackout.fadeIn();
}
}
Symbol 679 MovieClip [__Packages.com.playerthree.utils.EventDelegate] Frame 0
class com.playerthree.utils.EventDelegate
{
function EventDelegate () {
}
static function create(scope, method) {
var params = arguments.splice(2, arguments.length - 2);
var _local2 = function () {
method.apply(scope, arguments.concat(params));
};
return(_local2);
}
}
Symbol 680 MovieClip [__Packages.com.playerthree.game.SoundManager] Frame 0
class com.playerthree.game.SoundManager
{
static var sounds;
var target, numOfChannels, soundArrays, channels, controls, soundsArray;
function SoundManager (target, numChannels) {
this.target = target;
setChannels(numChannels);
}
static function go() {
if (sounds == null) {
sounds = new com.playerthree.game.SoundManager(_root, 4);
}
return(sounds);
}
function setChannels(num) {
if ((numOfChannels == undefined) || (numOfChannels != num)) {
numOfChannels = num;
soundArrays = new Object();
channels.swapDepths(9999999);
channels.removeMovieClip();
channels = target.createEmptyMovieClip("channels", -16384);
controls = new Object();
var _local2 = 1;
while (_local2 <= numOfChannels) {
soundArrays["sounds" + _local2] = new Array();
var _local3 = channels.createEmptyMovieClip("channel" + _local2, _local2);
controls["control" + _local2] = new Sound(_local3);
_local2++;
}
soundsArray = new Array();
}
}
function fadeOut(channel, speed, fadeTo) {
if (fadeTo == undefined) {
fadeTo = 0;
}
channels["channel" + channel].onEnterFrame = com.playerthree.utils.EventDelegate.create(this, faderMove, channel, -speed, 100, fadeTo);
}
function fadeIn(channel, speed, fadeTo) {
if (fadeTo == undefined) {
fadeTo = 100;
}
channels["channel" + channel].onEnterFrame = com.playerthree.utils.EventDelegate.create(this, faderMove, channel, speed, fadeTo, 0);
}
function oneShot(soundName, channel, loops, skipCheck, soundComplete) {
if (skipCheck != true) {
var _local3 = soundArrays["sounds" + channel];
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] == soundName) {
return(null);
}
_local2++;
}
}
var _local5 = new Sound(channels["channel" + channel]);
_local5.attachSound(soundName);
if (loops == undefined) {
loops = 0;
}
_local5.start(0, loops);
if (skipCheck != true) {
soundsArray.push(_local5);
}
soundArrays["sounds" + channel].push(soundName);
_local5.onSoundComplete = com.playerthree.utils.EventDelegate.create(this, soundFinished, soundName, _local5, soundComplete);
return(_local5);
}
function stopSound(soundName, channel) {
var _local3 = soundArrays["sounds" + channel];
var _local4 = false;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] == soundName) {
_local4 = true;
}
_local2++;
}
if (_local4) {
var _local6 = new Sound(channels["channel" + channel]);
_local6.stop(soundName);
soundFinished(soundName);
}
}
function stopAllSounds(channel) {
var _local3 = soundArrays["sounds" + channel];
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2];
_local2++;
}
}
function destroy() {
var _local2;
_local2 = 1;
while (_local2 <= numOfChannels) {
var _local3 = soundArrays["sounds" + _local2];
_local3.splice(0);
_local2++;
}
sounds = null;
soundArrays = null;
controls = null;
delete sounds;
delete controls;
delete soundArrays;
_local2 = 0;
while (_local2 < soundsArray.length) {
soundsArray.splice(0);
_local2++;
}
channels.swapDepths(9999999);
channels.removeMovieClip();
channels = null;
soundsArray = null;
delete channels;
delete soundsArray;
}
function channelVolume(channel, volume) {
controls["control" + channel].setVolume(volume);
}
function getVolume(channel) {
return(controls["control" + channel].getVolume());
}
function changePan(channel, pan) {
controls["control" + channel].setPan(pan);
}
function faderMove(channel, speed, maxVol, minVol) {
var _local2 = getVolume(channel) + speed;
controls["control" + channel].setVolume(_local2);
if ((_local2 <= minVol) || (_local2 >= maxVol)) {
if (_local2 < minVol) {
_local2 = minVol;
}
if (_local2 > maxVol) {
_local2 = maxVol;
}
controls["control" + channel].setVolume(_local2);
delete channels["channel" + channel].onEnterFrame;
}
}
function soundFinished(name, sound, nowWhat) {
if (nowWhat != null) {
nowWhat();
}
var _local4 = 1;
while (_local4 <= numOfChannels) {
var _local3 = soundArrays["sounds" + _local4];
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] == name) {
soundArrays["sounds" + _local4].splice(_local2, 1);
}
_local2++;
}
_local4++;
}
_local4 = 0;
while (_local4 < soundsArray.length) {
if (soundsArray[_local4] == sound) {
soundsArray.splice(_local4, 1);
}
_local4++;
}
}
function delegate(scope, method) {
var params = arguments.splice(2, arguments.length - 2);
var _local2 = function () {
method.apply(scope, arguments.concat(params));
};
return(_local2);
}
}
Symbol 681 MovieClip [__Packages.Globals] Frame 0
class Globals
{
function Globals () {
}
static var gameButtons = true;
static var yourId = null;
}
Symbol 682 MovieClip [__Packages.UI] Frame 0
class UI extends MovieClip
{
function UI () {
super();
trace("hi");
Globals.ui = this;
}
}
Symbol 683 MovieClip [__Packages.Main] Frame 0
class Main extends MovieClip
{
static var safeLanding, zoomMode;
var world, windSpeed, particles, leftPower, rightPower, shuttle, windsock, timerEnt, explosionDebris, leftFuelBar, rightFuelBar, mainFuelBar, tempBar, mode, _parent, prevCount, particleDepth, landed, tempWarningOn, rocketL, rocketR, rocketFuel, glider, particleLayer, createEmptyMovieClip, modeFromPause, attachMovie;
function Main () {
super();
Globals.main = this;
world = new com.playerthree.game.platform.World(this, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, 0, 0, 0.15, 1.2, false, true, false, false);
world.camera().changeViewPort(Stage.width - 120, Stage.height);
windSpeed = -0.05;
setupWorld();
var _local3 = new Sound();
_local3.setVolume(100);
particles = new ParticleManager();
leftPower = new PowerBar(Globals.ui.power_mc.lPower_mc);
rightPower = new PowerBar(Globals.ui.power_mc.rPower_mc);
shuttle = new Shuttle(attach("mc.shuttle"), 0, 6);
windsock = world.addStaticEntity("mc.windsocks", -200, 0);
world.camera().addObject(shuttle);
var _local4 = attach("mc.grass1", 90000);
world.addLooper(_local4, 0, 0, 1600, 1.3);
var _local5 = attach("mc.timer", 90001);
timerEnt = world.addStaticEntity(_local5, 100, 0);
timerEnt.getTarget().gotoAndStop(1);
shuttle.reset();
addSomeClouds();
explosionDebris = new Array();
com.playerthree.game.platform.World.cam.track(shuttle, true, true);
com.playerthree.game.platform.World.physics.setDamping(0.999);
com.playerthree.game.platform.World.physics.setGravity(0, 0.7008);
com.playerthree.game.platform.World.physics.setSurfaceBounce(0.1);
com.playerthree.game.platform.World.physics.setSurfaceFriction(0.1);
Globals.ui.reset_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, reset);
Globals.ui.menu_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, backToMenu);
Globals.ui.sound_mc.onRelease = com.playerthree.utils.EventDelegate.create(this, soundToggle);
leftFuelBar = new UIBar(Globals.ui.fuelLeft_mc, 96);
rightFuelBar = new UIBar(Globals.ui.fuelRight_mc, 96);
mainFuelBar = new UIBar(Globals.ui.fuelMain_mc, 96);
tempBar = new UIBar(Globals.ui.temp_mc, 138);
mode = Modes.COUNTDOWN;
reset();
}
function soundToggle() {
if (soundOn) {
soundOn = false;
Globals.ui.sound_mc.gotoAndStop(2);
var _local2 = new Sound();
_local2.setVolume(0);
} else {
soundOn = true;
Globals.ui.sound_mc.gotoAndStop(1);
var _local3 = new Sound();
_local3.setVolume(100);
com.playerthree.game.SoundManager.go().oneShot("press_switch.aif", 1, 0, true);
}
}
function backToMenu() {
com.playerthree.game.SoundManager.go().oneShot("press_switch.aif", 1, 0, true);
if (Globals.gameButtons) {
Globals.blackout.fadeOut();
Globals.blackout.assocFunc(gameToMenu);
}
}
function gameToMenu() {
stopAllSounds();
_parent.gotoAndStop("menu");
Globals.endGame.hide();
Globals.highscores.hide();
Globals.blackout.fadeIn();
}
function changeWindSpeed(newWindSpeed) {
if (newWindSpeed == null) {
newWindSpeed = 0.1 - (Math.random() * 0.2);
}
windSpeed = newWindSpeed;
trace("New wind speed : " + windSpeed);
var _local3 = Math.ceil(((newWindSpeed * 100) + 10) / 2);
windsock.getTarget().gotoAndStop(_local3);
}
function reset() {
if (Globals.gameButtons) {
trace("reset");
Globals.highscores.hide();
Globals.endGame.hide();
firstTry = true;
countdown = (prevCount = 5);
particleDepth = 1;
explodeTimer = 0;
timerEnt.getTarget().gotoAndStop(1);
stopAllSounds();
safeLanding = false;
landed = false;
Globals.ui.stage_mc.stage1_mc.gotoAndStop("on");
Globals.ui.stage_mc.stage2_mc.gotoAndStop("off");
Globals.ui.stage_mc.stage3_mc.gotoAndStop("off");
tempWarningOn = false;
Globals.ui.temp_mc.light_mc._visible = false;
explodeTimer = 0;
leftFuel = (rightFuel = (mainFuel = 100));
temp = 0;
maxHeight = 0;
curHeight = 0;
world.camera().zoomTo(0.2);
world.camera().smoothZoom(1, 30, 20, com.robertpenner.easing.Expo);
mode = Modes.COUNTDOWN;
shuttleStage = 0;
leftPower.unlock();
changeWindSpeed();
com.playerthree.game.platform.World.physics.setGravity(0, 0.7008);
rightPower.unlock();
shuttle.reset();
var _local2 = 0;
while (_local2 < explosionDebris.length) {
explosionDebris[_local2].destroy();
_local2++;
}
rocketL.destroy();
rocketR.destroy();
rocketFuel.destroy();
glider.destroy();
world.removeEntity(rocketFuel);
world.removeEntity(rocketR);
world.removeEntity(rocketL);
resetAltMeter();
explosionDebris.splice(0);
zoomMode = "zoomedIn";
shuttle.getTarget()._visible = true;
com.playerthree.game.platform.World.cam.track(shuttle, true, true);
}
}
function resetAltMeter() {
Globals.ui.h1.text = "0";
Globals.ui.h2.text = "0";
Globals.ui.h3.text = "0";
Globals.ui.h4.text = "0";
Globals.ui.h5.text = "0";
Globals.ui.h6.text = "0";
}
function addSomeClouds() {
world.addLooper2D("mc.scrollingclouds", 0, 0, 3888.4, 3518.3, 1);
}
function smallBang(mag, debris) {
com.playerthree.game.platform.World.shakeCamera(30, 15, 2);
var _local4;
if (shuttleStage == 2) {
_local4 = new flash.geom.Point(glider.getX(), glider.getY());
} else {
_local4 = new flash.geom.Point(shuttle.getX(), shuttle.getY());
}
var _local2 = 0;
while (_local2 < debris) {
var _local3 = new Debris(attach("mc.debrisTest"), _local4.x, _local4.y, mag);
explosionDebris.push(_local3);
_local2++;
}
}
function gliderDebres(amount) {
var _local2 = 0;
while (_local2 < amount) {
var _local3 = new Debris(attach("mc.debrisTest"), glider.getX(), glider.getY(), glider.getSpeed());
explosionDebris.push(_local3);
_local2++;
}
}
function explode(mag, debris) {
trace("current mode : " + mode);
zoomMode = "explosion";
if (shuttleStage != 2) {
shuttle.explode();
} else {
glider.explode();
}
com.playerthree.game.SoundManager.go().oneShot("explode_big_02.aif", 1, 0, true);
com.playerthree.game.SoundManager.go().oneShot("explosionreverb2.aif", 1, 0, true);
com.playerthree.game.platform.World.shakeCamera(30, 30, 1);
com.playerthree.game.platform.World.cam.smoothZoom(0.29, 40, 1, com.robertpenner.easing.Quad);
if (shuttleStage != 2) {
com.playerthree.game.platform.World.cam.track(world.addSimpleMover(null, shuttle.getX(), shuttle.getY(), 0, 10, false), true, true);
world.addStaticEntity("mc.explosion", shuttle.getX(), shuttle.getY());
} else {
com.playerthree.game.platform.World.cam.track(world.addSimpleMover(null, glider.getX(), glider.getY(), 0, 10, false), true, true);
world.addStaticEntity("mc.explosion", glider.getX(), glider.getY());
}
leftPower.unlock();
rightPower.unlock();
var _local7;
if (shuttleStage == 2) {
_local7 = new flash.geom.Point(glider.getX(), glider.getY());
} else {
_local7 = new flash.geom.Point(shuttle.getX(), shuttle.getY());
}
var _local2 = 0;
while (_local2 < debris) {
if (shuttleStage != 2) {
var _local3 = new Debris(attach("mc.debrisTest"), shuttle.getX(), shuttle.getY(), mag);
explosionDebris.push(_local3);
} else {
var _local4 = new Debris(attach("mc.debrisTest"), glider.getX(), glider.getY(), mag);
explosionDebris.push(_local4);
}
_local2++;
}
}
function setupWorld() {
world.destroy();
world.addLooper("mc.ground", 0, 0, 4408, 1);
world.addLooper("mc.cloudBlanket", 0, -250, 2204, 1);
particleLayer = createEmptyMovieClip("particles", world.depth());
var _local2 = new org.cove.flade.surfaces.RectangleTile(0, 970, Number.POSITIVE_INFINITY, 2000);
_local2.onContact = com.playerthree.utils.EventDelegate.create(this, floorCollision);
com.playerthree.game.platform.World.physics.addSurface(_local2);
}
function floorCollision(id) {
var _local3 = new Array("small_crash_land.aif", "small_crash_land2.aif", "small_crash_land3.aif", "small_crash_land4.aif", "small_crash_land5.aif");
var _local4 = new Array("big_crash_land.aif", "med_crash_land.aif");
if (((id == 16) || (id == 17)) || (id == 18)) {
var _local2 = glider.getTarget()._currentframe;
if (!landed) {
switch (true) {
case glider.getSpeed() > 100 :
if (((_local2 > 28) && (_local2 < 43)) || ((_local2 > 101) && (_local2 < 116))) {
trace("safe landing (ish)");
} else {
landed = true;
explode(50, 10);
}
com.playerthree.game.SoundManager.go().oneShot(_local4[random(_local4.length)], 1);
break;
case glider.getSpeed() > 30 :
com.playerthree.game.SoundManager.go().oneShot(_local3[random(_local3.length)], 1);
break;
case glider.getSpeed() < 30 :
com.playerthree.game.SoundManager.go().oneShot("land_stop.aif", 1);
safeLanding = true;
landed = true;
}
}
}
}
function nextStage() {
if ((shuttleStage != 1) || (Math.random() < 0.5)) {
shuttleStage++;
if (shuttleStage > 3) {
shuttleStage = 3;
}
shuttle.nextStage();
com.playerthree.game.SoundManager.go().oneShot("rocket_offload.wav", 1, 0, true);
com.playerthree.game.SoundManager.go().oneShot("rocket_offload2.aif", 1, 0, true);
switch (shuttleStage) {
case 1 :
if (shuttle.getHeight() > 800) {
com.playerthree.game.SoundManager.go().oneShot("cheer1.wav", 1, 0, true);
}
Globals.ui.stage_mc.stage2_mc.gotoAndStop("on");
rocketL = new Rocket(attach("mc.rocket1"), shuttle.getRightEnginePoint().x, shuttle.getRightEnginePoint().y, shuttle.getAngle(), shuttle.getVel(), shuttle.vX, shuttle.vY, "left", leftFuel, leftFuelBurn);
rocketR = new Rocket(attach("mc.rocket1"), shuttle.getLeftEnginePoint().x, shuttle.getLeftEnginePoint().y, shuttle.getAngle(), shuttle.getVel(), shuttle.vX, shuttle.vY, "right", rightFuel, rightFuelBurn);
world.camera().addObject(rocketL);
world.camera().addObject(rocketR);
break;
case 2 :
Globals.ui.stage_mc.stage3_mc.gotoAndStop("on");
var _local2 = flash.geom.Point.interpolate(shuttle.getLeftEnginePoint(), shuttle.getRightEnginePoint(), 0.5);
rocketFuel = new Rocket(attach("mc.rocket2"), _local2.x, _local2.y, shuttle.getAngle(), shuttle.getVel(), shuttle.vX, shuttle.vY, "middle", 1, 0.2);
world.camera().addObject(rocketFuel);
glider = new Glider(attach("mc.glider"), shuttle.getX(), shuttle.getY(), shuttle.c1, shuttle.c2, shuttle.c0, shuttle.getAngle());
world.camera().addObject(glider);
world.camera().track(glider, true, true);
shuttle.destroyMe = true;
shuttle.destroy();
}
} else {
com.playerthree.game.SoundManager.go().oneShot("clunk.wav", 1, 0, false);
if (firstTry) {
firstTry = false;
com.playerthree.game.SoundManager.go().oneShot("seperate.wav", 1, 0);
}
}
}
function attachSmoke(type) {
if (type == 1) {
return(particleLayer.attachMovie("mc.puff", "puff" + particleDepth, particleDepth++));
}
return(particleLayer.attachMovie("mc.puff2", "puff" + particleDepth, particleDepth++));
}
function onEnterFrame() {
var _local7 = com.playerthree.game.CursorKeys.check(true);
if (_local7 & com.playerthree.game.CursorKeys.P) {
if (mode != Modes.PAUSED) {
modeFromPause = mode;
mode = Modes.PAUSED;
} else {
mode = modeFromPause;
}
}
if (mode != Modes.PAUSED) {
particles.render();
var _local2 = 0;
while (_local2 < explosionDebris.length) {
if (explosionDebris[_local2].renderOn) {
var _local4 = new com.playerthree.game.platform.entities.Particle(attachSmoke(1), explosionDebris[_local2].getX(), explosionDebris[_local2].getY(), 25, 50, puff1DeleteFrame);
particles.addParticle(_local4);
}
explosionDebris[_local2].render();
if (explosionDebris[_local2].destroyMe) {
explosionDebris[_local2].destroy();
explosionDebris.splice(_local2, 1);
}
_local2++;
}
Globals.ui.debug_txt.text = (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((("MODE : " + mode) + newline) + "countdown : ") + toFixed(2, countdown)) + newline) + "CAMERA DEBUG : \n") + "x: ") + toFixed(2, com.playerthree.game.platform.Camera.x)) + newline) + "y: ") + toFixed(2, com.playerthree.game.platform.Camera.y)) + newline) + "farX: ") + toFixed(2, com.playerthree.game.platform.Camera.farX)) + newline) + "farY: ") + toFixed(2, com.playerthree.game.platform.Camera.farY)) + newline) + "zoom: ") + toFixed(2, com.playerthree.game.platform.Camera.zoomLevel)) + "\n\n") + "ROCKET DEBUG :") + newline) + "STAGE : ") + shuttleStage) + newline) + "X : ") + shuttle.getX()) + newline) + "Y : ") + shuttle.getY()) + newline) + "SPEED : ") + toFixed(2, shuttle.getSpeed())) + newline) + "HEIGHT : ") + toFixed(2, shuttle.getHeight())) + newline) + "vX : ") + shuttle.vX) + newline) + "vY : ") + shuttle.vY) + "\n\n") + "VARS : \n") + "leftFuel : ") + leftFuel) + newline) + "rightFuel : ") + rightFuel) + newline) + "mainFuel : ") + mainFuel) + newline) + "temp : ") + temp) + newline) + "GLIDER DEBUG : ") + newline) + "FRAME : ") + glider.getTarget()._currentframe;
if (maxHeight < 1) {
maxHeight = 0;
}
var _local17 = String(Number(toFixed(2, maxHeight) * 100));
var _local6 = _local17.split("");
var _local5 = 6;
while (_local6.length > 0) {
var _local3 = String(_local6.pop());
Globals.ui["h" + _local5].text = _local3;
_local5--;
}
if (shuttleStage == 1) {
if (mainFuel < 20) {
com.playerthree.game.SoundManager.go().oneShot("fuel_warning.aif", 1);
}
if ((mainFuel <= 1) && (mainFuel > 0)) {
Globals.ui.stage_mc.stage3_mc.gotoAndPlay("flash");
}
}
switch (mode) {
case Modes.COUNTDOWN :
if (_local7 & com.playerthree.game.CursorKeys.LEFT) {
leftPower.boost();
}
if (_local7 & com.playerthree.game.CursorKeys.RIGHT) {
rightPower.boost();
}
if (leftPower.getPower() > 123) {
leftFuel = leftFuel - 0.1;
}
if (rightPower.getPower() > 123) {
rightFuel = rightFuel - 0.1;
}
countdown = countdown - frameTime;
if (prevCount > Math.ceil(countdown)) {
prevCount = Math.ceil(countdown);
timerEnt.getTarget().nextFrame();
}
Globals.ui.count_txt.text = String(Math.ceil(countdown));
if (countdown <= 0) {
leftPower.lock();
rightPower.lock();
shuttle.launch(Math.min(leftPower.getPower() / 78, 1.7), Math.min(rightPower.getPower() / 78, 1.7));
trace((("launching with : " + (leftPower.getPower() / 78)) + " / ") + (rightPower.getPower() / 78));
leftFuelBurn = leftPower.getPower() / 980;
rightFuelBurn = rightPower.getPower() / 980;
mainFuelBurn = (leftFuelBurn + rightFuelBurn) / 2;
mode = Modes.FLIGHT;
if (((leftPower.getPower() / 78) > 0.6) && ((rightPower.getPower() / 78) > 0.6)) {
com.playerthree.game.platform.World.physics.setGravity(windSpeed, 0.7008);
}
}
break;
case Modes.FLIGHT :
checkHeight();
if (shuttle.getY() > -120) {
mode = Modes.EXPLODE;
com.playerthree.game.SoundManager.go().oneShot("explode_onground2.aif", 1, 0, true);
com.playerthree.game.SoundManager.go().oneShot("explode_onground.aif", 1, 0, true);
if (zoomMode != "explosion") {
explode(75, 20);
}
}
temp = temp + (0.05 * mainFuelBurn);
temp = temp + (0.00445 * shuttle.getSpeed());
mainFuel = mainFuel - mainFuelBurn;
rightFuel = rightFuel - rightFuelBurn;
leftFuel = leftFuel - leftFuelBurn;
shuttle.setFuel(mainFuel);
if ((shuttleStage != 2) && (temp > 80)) {
com.playerthree.game.SoundManager.go().oneShot("temperature_warning2.aif", 1);
if (!tempWarningOn) {
tempWarningOn = true;
Globals.ui.temp_mc.light_mc._visible = true;
}
}
switch (shuttleStage) {
case 0 :
if ((shuttle.getFuel() > 0) && (shuttle.getSpeed() > 0.01)) {
var _local10 = shuttle.getLeftEnginePoint();
var _local8 = shuttle.getRightEnginePoint();
if (leftFuel > 0) {
if (leftFuel < 1) {
Globals.ui.stage_mc.stage2_mc.gotoAndPlay("flash");
}
var _local16 = new com.playerthree.game.platform.entities.Particle(attachSmoke(2), _local10.x, _local10.y, 25, 50, puff2DeleteFrame);
particles.addParticle(_local16);
}
if (rightFuel > 0) {
if (rightFuel < 1) {
Globals.ui.stage_mc.stage2_mc.gotoAndPlay("flash");
}
var _local13 = new com.playerthree.game.platform.entities.Particle(attachSmoke(2), _local8.x, _local8.y, 25, 50, puff2DeleteFrame);
particles.addParticle(_local13);
}
if (leftRocketOn) {
shuttle.getTarget().flickerRight_mc._visible = true;
} else {
shuttle.getTarget().flickerRight_mc._visible = false;
}
if (rightRocketOn) {
shuttle.getTarget().flickerLeft_mc._visible = true;
} else {
shuttle.getTarget().flickerLeft_mc._visible = false;
}
if ((leftFuel < 15) || (rightFuel < 15)) {
com.playerthree.game.SoundManager.go().oneShot("fuel_warning.aif", 1);
}
if (((_local7 & com.playerthree.game.CursorKeys.LEFT) && (shuttle.getStage() == 0)) && (leftFuel > 0)) {
shuttle.boostLeft();
temp = temp + 0.1;
leftFuel = leftFuel - (leftFuelBurn * 3);
leftRocketOn = true;
} else {
leftRocketOn = false;
}
if (((_local7 & com.playerthree.game.CursorKeys.RIGHT) && (shuttle.getStage() == 0)) && (rightFuel > 0)) {
shuttle.boostRight();
temp = temp + 0.1;
rightRocketOn = true;
rightFuel = rightFuel - (rightFuelBurn * 3);
} else {
rightRocketOn = false;
}
}
case 1 :
case 2 :
if (_local7 & com.playerthree.game.CursorKeys.LEFT) {
if (shuttleStage == 1) {
shuttle.stage2Left();
} else if (shuttleStage == 2) {
glider.changeAngle(0.15);
}
}
if (_local7 & com.playerthree.game.CursorKeys.RIGHT) {
if (shuttleStage == 1) {
shuttle.stage2Right();
} else if (shuttleStage == 2) {
glider.changeAngle(-0.15);
}
}
if (((rocketL.getSpeed() > 0.1) && (rocketL.getRender())) && (leftFuel > 0)) {
var _local12 = new com.playerthree.game.platform.entities.Particle(attachSmoke(2), rocketL.getX(), rocketL.getY(), 25, 50, puff2DeleteFrame);
particles.addParticle(_local12);
}
if (((rocketR.getSpeed() > 0.1) && (rocketR.getRender())) && (rightFuel > 0)) {
var _local19 = new com.playerthree.game.platform.entities.Particle(attachSmoke(2), rocketR.getX(), rocketR.getY(), 25, 50, puff2DeleteFrame);
particles.addParticle(_local19);
}
if (shuttleStage != 1) {
break;
}
if (!(((rocketFuel.getSpeed() > 0.1) && (rocketFuel.getRender())) && (shuttle.getFuel() > 0))) {
break;
}
var _local18 = new com.playerthree.game.platform.entities.Particle(attachSmoke(2), rocketFuel.getX(), rocketFuel.getY(), 25, 50, puff2DeleteFrame);
particles.addParticle(_local18);
}
if (((mainFuel > 0) && (shuttle.getSpeed() > 0.01)) && (shuttleStage < 2)) {
var _local9 = flash.geom.Point.interpolate(shuttle.getLeftEnginePoint(), shuttle.getLeftEnginePoint(), 0.5);
var _local14 = new com.playerthree.game.platform.entities.Particle(attachSmoke(2), _local9.x, _local9.y, 25, 50, puff2DeleteFrame);
particles.addParticle(_local14);
}
if (((_local7 & com.playerthree.game.CursorKeys.SPACE) && (!spaceDown)) && (shuttleStage != 2)) {
spaceDown = true;
nextStage();
}
if ((((_local7 & com.playerthree.game.CursorKeys.SPACE) && (!spaceDown)) && (shuttleStage == 2)) && (!Globals.endGame._visible)) {
spaceDown = true;
if (Math.random() < 0.7) {
explode(75, 20);
}
}
if (!(_local7 & com.playerthree.game.CursorKeys.SPACE)) {
spaceDown = false;
}
if ((shuttleStage != 2) && ((shuttle.getSpeed() <= 0.01) || (temp > 100))) {
explodeTimer++;
if (explodeTimer >= 60) {
mode = Modes.EXPLODE;
if (zoomMode != "explosion") {
explode(75, 20);
}
}
}
break;
case Modes.EXPLODE :
Globals.endGame.show(maxHeight);
mode = Modes.FINISHED;
}
var _local15 = -954 + ((com.playerthree.game.platform.Camera.y / 30000) * 954);
_parent.sky_mc._y = Math.min(0, _local15);
if ((zoomMode != "explosion") && (zoomMode != "zoomedIn")) {
zoomMode = "zoomedIn";
}
world.update();
if (zoomMode == "zoomedIn") {
var _local11 = 1 - (0.85 * (Math.min(curHeight, 1200) / 1200));
com.playerthree.game.platform.World.cam.zoomTo(_local11);
if (shuttleStage != 2) {
com.playerthree.game.platform.World.shakeCamera(4 - (_local11 * 4), 1, 0);
}
}
temp = temp - 0.11;
leftFuel = leftFuel - (leftPower.getPower() / 5000);
rightFuel = rightFuel - (rightPower.getPower() / 5000);
if (temp < 0) {
temp = 0;
}
if (temp > 101) {
temp = 101;
}
if (mainFuel < 0) {
mainFuel = 0;
}
if (rightFuel < 0) {
rightFuel = 0;
}
if (leftFuel < 0) {
leftFuel = 0;
}
Globals.ui.speed_mc.needle_mc._rotation = 25 + ((shuttle.getSpeed() / 100) * 360);
Globals.ui.temp_mc.needle_mc._rotation = -34 + ((temp / 100) * 60);
leftFuelBar.setLevel(leftFuel);
rightFuelBar.setLevel(rightFuel);
mainFuelBar.setLevel(mainFuel);
}
}
function checkHeight() {
if (shuttleStage != 2) {
curHeight = shuttle.getHeight();
} else {
curHeight = glider.getHeight();
}
if (curHeight > maxHeight) {
maxHeight = curHeight;
}
}
function changeCamera() {
if (trackingShuttle) {
com.playerthree.game.platform.World.cam.track(rocketL, true, true);
trackingShuttle = false;
} else {
com.playerthree.game.platform.World.cam.track(shuttle, true, true);
trackingShuttle = true;
}
}
function toFixed(dp, num) {
var _local2 = 1;
var _local1 = 0;
while (_local1 < dp) {
_local2 = _local2 * 0.1;
_local1++;
}
return(num - (num % _local2));
}
function attach(linkage, d) {
if (d == null) {
d = world.depth();
}
return(attachMovie(linkage, linkage + d, d));
}
var puff1DeleteFrame = 30;
var puff2DeleteFrame = 32;
var countdown = 5;
var frameTime = 0.0333333333333333;
var rightRocketOn = true;
var leftRocketOn = true;
var explodeTimer = 0;
var shuttleStage = 0;
var spaceDown = false;
var trackingShuttle = true;
var leftFuel = 100;
var rightFuel = 100;
var mainFuel = 100;
var temp = 0;
var leftFuelBurn = 0.1;
var rightFuelBurn = 0.1;
var mainFuelBurn = 0.1;
var maxHeight = 0;
var curHeight = 0;
var soundOn = true;
var firstTry = true;
}
Symbol 684 MovieClip [__Packages.com.playerthree.game.platform.World] Frame 0
class com.playerthree.game.platform.World
{
static var entityList, entityHeights, entityWidths, world, sound, physics, cam, levelWidth, levelHeight;
var physics_mc, debugFlade, visConstraints;
function World (mc, worldWidth, worldHeight, startX, startY, minZoom, maxZoom, infiniteVPlane, infiniteHPlane, debug, debug2) {
if (arguments.length < 3) {
trace("World : Error : Please provide at least 3 arguments (mc, worldWidth, worldHeight)");
} else {
trace("**********************************\n**** AS2 PLATFORM ENGINE v1.0 ****\n*** \u00A9 2007 WWW.PLAYERTHREE.NET ***\n**********************************\n***** PHYSICS BASED ON FLADE *****\n**** \u00A9 ALEC COVE WWW.COVE.ORG ****\n**********************************\n-\n\nPlatform : Init : World Initialised");
}
if (startX == null) {
startX = 0;
}
if (startY == null) {
startY = 0;
}
if (minZoom == null) {
minZoom = 0.3;
}
if (maxZoom == null) {
maxZoom = 1;
}
entityList = new Array();
entityHeights = new Array();
entityWidths = new Array();
world = mc;
physics_mc = world.createEmptyMovieClip("physics_mc", 1048000);
trace("Platform : Init : Physics Engine initialised");
sound = new com.playerthree.game.platform.SoundManager(world);
trace("Platform : Init : SoundManager initialised");
var _local10 = new com.playerthree.game.platform.entities.StaticEntity(physics_mc, 0, 0);
physics = new org.cove.flade.DynamicsEngine(physics_mc);
var _local3;
var _local4;
var _local6;
var _local5;
if (infiniteVPlane) {
_local3 = Number.POSITIVE_INFINITY;
_local4 = Number.NEGATIVE_INFINITY;
} else {
_local3 = worldHeight;
_local4 = 0;
}
if (infiniteHPlane) {
_local6 = Number.NEGATIVE_INFINITY;
_local5 = Number.POSITIVE_INFINITY;
} else {
_local6 = 0;
_local5 = worldWidth;
}
cam = new com.playerthree.game.platform.Camera(world, startX, startY, _local6, _local5, _local3, _local4, 1, null, null, minZoom, maxZoom);
trace("Platform : Init : Camera initialised\n");
cam.addObject(_local10);
if (debug) {
debugFlade = true;
}
if (debug2) {
visConstraints = true;
}
}
function addScenicEntity(mc, x, y, persistent) {
var _local3 = makeEntMovieClip(mc);
var _local2 = new com.playerthree.game.platform.entities.StaticEntity(_local3, x, y);
if (persistent != true) {
addEnt(_local2);
}
cam.addObject(_local2);
return(_local2);
}
function camera() {
return(cam);
}
function removeEntity(ent) {
ent.kill();
var _local1 = 0;
while (_local1 < entityList.length) {
if (entityList[_local1] == ent) {
cam.removeObject(ent);
entityList.splice(_local1, 1);
entityHeights.splice(_local1, 1);
entityWidths.splice(_local1, 1);
}
_local1++;
}
}
function addLooper(mc, x, y, width, z) {
var _local3 = makeEntMovieClip(mc);
var _local2 = new com.playerthree.game.platform.entities.Looper(_local3, x, y, width, z);
cam.addObject(_local2);
return(_local2);
}
function addLooper2D(mc, x, y, width, height, z) {
var _local3 = makeEntMovieClip(mc);
var _local2 = new com.playerthree.game.platform.entities.Looper2D(_local3, x, y, width, height, z);
cam.addObject(_local2);
return(_local2);
}
function addStaticEntity(mc, x, y, persistent, collision, collide, z) {
var _local3 = makeEntMovieClip(mc);
var _local2 = new com.playerthree.game.platform.entities.StaticEntity(_local3, x, y, z);
if (collision != null) {
addCollider(collision, _local2, x, y, collide);
}
if (persistent != true) {
addEnt(_local2);
}
cam.addObject(_local2);
return(_local2);
}
function addSimpleMover(mc, x, y, speedX, speedY, persistent, collision, collide) {
var _local3 = makeEntMovieClip(mc);
var _local2 = new com.playerthree.game.platform.entities.SimpleMover(_local3, x, y, speedX, speedY);
if (collision != null) {
addCollider(collision, _local2, x, y, collide);
}
if (persistent != true) {
addEnt(_local2);
}
cam.addObject(_local2);
return(_local2);
}
function addCustomMover(mc, type, x, y, speedX, speedY, persistent, collision, z) {
var _local3 = makeEntMovieClip(mc);
var _local2 = new type[undefined](_local3, x, y, speedX, speedY, z);
if (collision != null) {
addCollider(collision, _local2, x, y);
}
if (persistent != true) {
addEnt(_local2);
}
cam.addObject(_local2);
return(_local2);
}
static function shakeCamera(mag, time, fade) {
cam.shake(mag, time, fade);
}
function update() {
var _local2 = 0;
while (_local2 < entityList.length) {
if (((((entityList[_local2].getX() + entityWidths[_local2]) >= com.playerthree.game.platform.Camera.x) && ((entityList[_local2].getX() - entityWidths[_local2]) <= com.playerthree.game.platform.Camera.farX)) && ((-(entityList[_local2].getY() - entityHeights[_local2])) >= com.playerthree.game.platform.Camera.y)) && ((-(entityList[_local2].getY() + entityHeights[_local2])) <= com.playerthree.game.platform.Camera.farY)) {
entityList[_local2].setRender(true);
} else {
entityList[_local2].setRender(false);
}
_local2++;
}
cam.update();
physics.timeStep();
sound.step();
if (visConstraints) {
physics.paintConstraints();
}
if (debugFlade) {
physics.paintSurfaces();
physics.paintPrimitives();
}
}
function destroy() {
cam.purge();
entityList.splice(0);
entityHeights.splice(0);
entityWidths.splice(0);
var _local2 = 0;
for (var _local3 in physics_mc) {
_local2++;
physics_mc[_local3].removeMovieClip();
}
trace(("Physics : Purge : " + _local2) + " Entites Removed");
_local2 = 0;
for (var _local3 in world) {
if (((world[_local3]._name != "physics_mc") && (world[_local3]._name != "soundManager")) && (typeof(world[_local3]) == "movieclip")) {
_local2++;
world[_local3].removeMovieClip();
}
}
trace(("World : Purge : " + _local2) + " Entites Removed");
physics.destroy();
}
function addEnt(ent) {
entityList.push(ent);
entityHeights.push(ent.getTarget()._height);
entityWidths.push(ent.getTarget()._width);
}
function depth() {
depthNum++;
return(depthNum);
}
function rehashMesh(entity, fn) {
entity.clearSurfaceGroup();
addCollider("mesh", entity, entity.getX(), entity.getY(), fn);
}
function refreshDimensions(entity) {
var _local1 = 0;
while (_local1 < entityList.length) {
if (entity == entityList[_local1]) {
entityWidths[_local1] = entity.getTarget()._width;
entityHeights[_local1] = entity.getTarget()._height;
}
_local1++;
}
}
function changeSize(newWidth, newHeight) {
levelWidth = newWidth;
levelHeight = newHeight;
cam.setBounds(0, newWidth, newHeight, 0);
}
function changePhysicsDepth(newDepth) {
physics_mc.swapDepths(newDepth);
}
function makeEntMovieClip(mc) {
var _local3;
if (typeof(mc) == "string") {
_local3 = world.attachMovie(String(mc), String(mc) + depth(), depth());
} else if (typeof(mc) == "movieclip") {
_local3 = MovieClip(mc);
} else {
_local3 = null;
trace(("World : Error : mc " + mc) + " is not a string or movieClip");
}
return(_local3);
}
function addCollider(collision, entity, x, y, fn) {
if (!(collision === "mesh")) {
} else {
var _local3 = new Array();
var _local15 = new Array();
var _local14 = new Array();
var _local12 = new com.playerthree.game.platform.SurfaceGroup();
var _local1 = entity.getTarget().collision;
_local1._alpha = 0;
for (var _local4 in _local1) {
if (_local1[_local4]._name.indexOf("l") != -1) {
_local3.push(_local1[_local4]);
} else if (_local1[_local4]._name.indexOf("c") != -1) {
_local15.push(_local1[_local4]);
} else if (_local1[_local4]._name.indexOf("r") != -1) {
_local14.push(_local1[_local4]);
}
}
var _local4 = 0;
while (_local4 < (_local3.length - 1)) {
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2]._name.indexOf(_local4) != -1) {
var _local6 = ((_local3[_local2]._name.indexOf("t") != -1) ? "lt" : "l");
}
if (_local3[_local2]._name.indexOf(_local4 + 1) != -1) {
var _local5 = ((_local3[_local2]._name.indexOf("t") != -1) ? "lt" : "l");
}
_local2++;
}
var _local11 = new org.cove.flade.surfaces.LineSurface(_local1[_local6 + _local4]._x + x, _local1[_local6 + _local4]._y + y, _local1[_local5 + (_local4 + 1)]._x + x, _local1[_local5 + (_local4 + 1)]._y + y);
_local11.onContact = fn;
_local12.addSurface(_local11);
if (_local5 == "lt") {
_local4++;
}
_local4++;
}
_local4 = 0;
while (_local4 < _local15.length) {
var _local7 = new org.cove.flade.surfaces.CircleTile(_local1["c" + _local4]._x + x, _local1["c" + _local4]._y + y, _local1["c" + _local4]._width / 2);
_local7.onContact = fn;
_local12.addSurface(_local7);
_local4++;
}
_local4 = 0;
while (_local4 < _local14.length) {
var _local8 = new org.cove.flade.surfaces.RectangleTile(_local1["r" + _local4]._x + x, _local1["r" + _local4]._y + y, _local1["r" + _local4]._width, _local1["r" + _local4]._height);
_local8.onContact = fn;
_local12.addSurface(_local8);
_local4++;
}
entity.setSurfaceGroup(_local12);
}
}
var depthNum = 1;
}
Symbol 685 MovieClip [__Packages.com.playerthree.game.platform.Camera] Frame 0
class com.playerthree.game.platform.Camera
{
static var x, y, boundB, boundL, boundR, boundT, zoomLevel, farX, farY;
var worldClip, viewWidth, viewHeight, entList, trackingMode, trackX, trackTarget, trackY, zoomInt, zoomChange, zoomBegin, zoomTime, zoomDur, zoomType, jumpInt, jumpChangeX, jumpBeginX, jumpChangeY, jumpBeginY, jumpTime, jumpDur, jumpType;
function Camera (world, startX, startY, l, r, t, b, zoomInit, height, width, farZoom, closeZoom) {
if (width == null) {
width = Stage.width;
}
if (height == null) {
height = Stage.height;
}
if (zoomInit == null) {
zoomInit = 1;
}
if (farZoom == null) {
farZoom = 0.3;
}
worldClip = world;
x = startX;
y = startY;
boundB = b;
boundL = l;
boundR = r;
boundT = t;
zoomLevel = zoomInit;
viewWidth = width;
viewHeight = height;
minZoom = farZoom;
maxZoom = closeZoom;
entList = new Array();
}
function update() {
var _local2 = 0;
while (_local2 < entList.length) {
entList[_local2].update();
_local2++;
}
if (trackingMode) {
var _local4;
var _local3;
_local4 = (trackX ? (trackTarget.getX() - ((viewWidth / zoomLevel) / 2)) : null);
_local3 = (trackY ? ((-trackTarget.getY()) - ((viewHeight / zoomLevel) / 2)) : null);
jump(_local4, _local3);
}
worldClip._xscale = zoomLevel * 100;
worldClip._yscale = zoomLevel * 100;
if (x < boundL) {
x = boundL;
}
if (y < boundB) {
y = boundB;
}
farX = x + (viewWidth / zoomLevel);
farY = y + (viewHeight / zoomLevel);
if (farX > boundR) {
farX = boundR;
x = farX - (viewWidth / zoomLevel);
}
if (farY > boundT) {
farY = boundT;
y = farY - (viewHeight / zoomLevel);
}
}
function changeViewPort(width, height) {
viewWidth = width;
viewHeight = height;
}
function pan(xAmount, yAmount) {
if (((farX + xAmount) < boundR) && ((x + xAmount) > boundL)) {
x = x + (xAmount * zoomLevel);
}
if (((farY + yAmount) < boundT) && ((y + yAmount) > boundB)) {
y = y + (yAmount * zoomLevel);
}
}
function setBounds(left, right, top, bottom) {
if (left != null) {
boundL = left;
}
if (right != null) {
boundR = right;
}
if (top != null) {
boundT = top;
}
if (bottom != null) {
boundB = bottom;
}
}
function addObject(ent) {
entList.push(ent);
}
function shake(mag, time, fade) {
shakeTime = getTimer() + (time * 1000);
shakeMag = mag / zoomLevel;
shakeDir = 1;
shakeMulti = 1;
if (fade == null) {
fade = 0.5;
}
shakeFade = fade;
clearInterval(shakeInt);
shakeInt = setInterval(this, "screenShake", 10);
}
function removeObject(ent) {
var _local2 = 0;
while (_local2 < entList.length) {
if (ent == entList[_local2]) {
entList.splice(_local2, 1);
return(undefined);
}
_local2++;
}
trace("Camera Says : Warning : Unable to remove object, didn't exist");
}
function zoom(amount) {
zoomLevel = zoomLevel + amount;
if (zoomLevel > maxZoom) {
zoomLevel = maxZoom;
}
if (zoomLevel < minZoom) {
zoomLevel = minZoom;
}
}
function zoomTo(focus) {
zoomLevel = focus;
if (zoomLevel > maxZoom) {
zoomLevel = maxZoom;
}
if (zoomLevel < minZoom) {
zoomLevel = minZoom;
}
}
function smoothZoom(targetFocus, duration, speed, motionType) {
clearInterval(zoomInt);
zoomChange = targetFocus - zoomLevel;
zoomBegin = zoomLevel;
zoomTime = 0;
zoomDur = duration;
zoomType = motionType;
zoomInt = setInterval(this, "smoothZoomer", speed);
}
function smoothZoomer() {
zoomTo(zoomType.easeInOut(zoomTime++, zoomBegin, zoomChange, zoomDur));
if (zoomTime > zoomDur) {
clearInterval(zoomInt);
}
}
function track(ent, xTrack, yTrack) {
clearInterval(jumpInt);
if ((ent == undefined) && (trackTarget == null)) {
trace("Camera : Warning : Please specify a target to track");
return(undefined);
}
if (ent != undefined) {
trackTarget = ent;
}
if (xTrack == null) {
xTrack = true;
}
if (yTrack == null) {
yTrack = true;
}
trackY = yTrack;
trackX = xTrack;
trackingMode = true;
trace("Camera : Tracking entity : " + trackTarget.toString());
}
function stopTracking() {
trackingMode = false;
trackTarget = null;
}
function jump(newX, newY) {
if (newX != null) {
if (newX > boundR) {
x = boundR - viewWidth;
} else if (newX < boundL) {
x = boundL;
} else {
x = newX;
}
}
if (newY != null) {
if (newY > boundT) {
y = boundT;
} else if (newY < boundB) {
y = boundB - viewHeight;
} else {
y = newY;
}
}
}
function tracking() {
return(trackingMode);
}
function purge() {
trace(("Camera : Purge : " + (entList.length - 1)) + " Entities Removed");
var _local2 = entList.length - 1;
while (_local2 >= 0) {
if (entList[_local2].getTarget()._name != "physics_mc") {
entList.splice(_local2, 1);
}
_local2--;
}
}
function screenShake() {
if (shakeDir == 1) {
x = x + (random(shakeMag) / shakeMulti);
y = y + (random(shakeMag) / shakeMulti);
shakeDir = 0;
} else {
x = x - (random(shakeMag) / shakeMulti);
y = y - (random(shakeMag) / shakeMulti);
shakeDir = 1;
}
shakeMulti = shakeMulti + shakeFade;
if (getTimer() >= shakeTime) {
clearInterval(shakeInt);
}
}
function changeZooms(newMin, newMax) {
minZoom = newMin;
maxZoom = newMax;
}
function smoothJump(targetX, targetY, duration, speed, motionType) {
clearInterval(jumpInt);
if (targetX != null) {
jumpChangeX = targetX - x;
jumpBeginX = x;
} else {
jumpChangeX = null;
}
if (targetY != null) {
jumpChangeY = targetY - y;
jumpBeginY = y;
} else {
jumpChangeY = null;
}
jumpTime = 0;
jumpDur = duration;
jumpType = motionType;
jumpInt = setInterval(this, "smoothJumper", speed);
}
function smoothJumper() {
var _local2 = ((jumpChangeX != null) ? (jumpType.easeInOut(jumpTime, jumpBeginX, jumpChangeX, jumpDur)) : null);
var _local3 = ((jumpChangeY != null) ? (jumpType.easeInOut(jumpTime, jumpBeginY, jumpChangeY, jumpDur)) : null);
jump(_local2, _local3);
jumpTime++;
if (jumpTime > jumpDur) {
clearInterval(jumpInt);
}
}
var minZoom = 0.3;
var maxZoom = 1;
var shakeInt = 0;
var shakeMag = 0;
var shakeTime = 0;
var shakeStart = 0;
var shakeDir = 0;
var shakeMulti = 0;
var shakeFade = 0;
}
Symbol 686 MovieClip [__Packages.com.playerthree.game.platform.entities.Entity] Frame 0
interface com.playerthree.game.platform.entities.Entity
{
}
Symbol 687 MovieClip [__Packages.com.playerthree.game.platform.SurfaceGroup] Frame 0
class com.playerthree.game.platform.SurfaceGroup
{
var surfaces, active;
function SurfaceGroup () {
surfaces = new Array();
active = false;
}
function addSurface(s) {
surfaces.push(s);
}
function removeSurface(s) {
var _local2 = 0;
while (_local2 < surfaces.length) {
if (s == surfaces[_local2]) {
surfaces.splice(_local2, 1);
return(undefined);
}
_local2++;
}
trace("SurfaceGroup Says : Cannot remove surface : Not Found");
}
function activateGroup() {
if (!active) {
var _local2 = 0;
while (_local2 < surfaces.length) {
com.playerthree.game.platform.World.physics.addSurface(surfaces[_local2]);
_local2++;
}
active = true;
}
}
function purgeGroup() {
if (active) {
var _local2 = 0;
while (_local2 < surfaces.length) {
com.playerthree.game.platform.World.physics.removeSurface(surfaces[_local2]);
_local2++;
}
active = false;
}
}
function move(x, y) {
var _local2 = 0;
while (_local2 < surfaces.length) {
surfaces[_local2].move(x, y);
_local2++;
}
}
}
Symbol 688 MovieClip [__Packages.org.cove.flade.surfaces.AbstractTile] Frame 0
class org.cove.flade.surfaces.AbstractTile
{
var center, verts, normal, isVisible, isActivated, dmc, id, minX, maxX, minY, maxY;
function AbstractTile (cx, cy) {
center = new org.cove.flade.util.Vector(cx, cy);
verts = new Array();
normal = new org.cove.flade.util.Vector(0, 0);
isVisible = true;
isActivated = true;
initializeContainer();
}
function initializeContainer() {
var _local2 = org.cove.flade.DynamicsEngine.target.getNextHighestDepth();
var _local3 = "_" + _local2;
dmc = org.cove.flade.DynamicsEngine.target.createEmptyMovieClip(_local3, _local2);
}
function setID(n) {
id = n;
}
function setVisible(v) {
isVisible = v;
}
function clear() {
org.cove.flade.graphics.Graphics.clearGraphics(dmc);
}
function setActiveState(a) {
isActivated = a;
}
function getActiveState() {
return(isActivated);
}
function createBoundingRect(rw, rh) {
var _local2 = center.y - (rh / 2);
var _local3 = center.y + (rh / 2);
var _local5 = center.x - (rw / 2);
var _local4 = center.x + (rw / 2);
verts.push(new org.cove.flade.util.Vector(_local4, _local3));
verts.push(new org.cove.flade.util.Vector(_local4, _local2));
verts.push(new org.cove.flade.util.Vector(_local5, _local2));
verts.push(new org.cove.flade.util.Vector(_local5, _local3));
setCardProjections();
}
function testIntervals(boxMin, boxMax, tileMin, tileMax) {
if (boxMax < tileMin) {
return(0);
}
if (tileMax < boxMin) {
return(0);
}
var _local2 = tileMax - boxMin;
var _local1 = tileMin - boxMax;
if (Math.abs(_local2) < Math.abs(_local1)) {
return(_local2);
}
return(_local1);
}
function setCardProjections() {
getCardXProjection();
getCardYProjection();
}
function getCardXProjection() {
minX = verts[0].x;
var _local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].x < minX) {
minX = verts[_local2].x;
}
_local2++;
}
maxX = verts[0].x;
_local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].x > maxX) {
maxX = verts[_local2].x;
}
_local2++;
}
}
function getCardYProjection() {
minY = verts[0].y;
var _local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].y < minY) {
minY = verts[_local2].y;
}
_local2++;
}
maxY = verts[0].y;
_local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].y > maxY) {
maxY = verts[_local2].y;
}
_local2++;
}
}
function onContact(particleID) {
}
var type = "Surface";
}
Symbol 689 MovieClip [__Packages.org.cove.flade.util.Vector] Frame 0
class org.cove.flade.util.Vector
{
var x, y;
function Vector (px, py) {
x = px;
y = py;
}
function setTo(px, py) {
x = px;
y = py;
}
function copy(v) {
x = v.x;
y = v.y;
}
function dot(v) {
return((x * v.x) + (y * v.y));
}
function cross(v) {
return((x * v.y) - (y * v.x));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
return(this);
}
function plusNew(v) {
return(new org.cove.flade.util.Vector(x + v.x, y + v.y));
}
function minus(v) {
x = x - v.x;
y = y - v.y;
return(this);
}
function minusNew(v) {
return(new org.cove.flade.util.Vector(x - v.x, y - v.y));
}
function mult(s) {
x = x * s;
y = y * s;
return(this);
}
function multNew(s) {
return(new org.cove.flade.util.Vector(x * s, y * s));
}
function distance(v) {
var _local3 = x - v.x;
var _local2 = y - v.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function normalize() {
var _local2 = Math.sqrt((x * x) + (y * y));
x = x / _local2;
y = y / _local2;
return(this);
}
function magnitude() {
return(Math.sqrt((x * x) + (y * y)));
}
function project(b) {
var _local5 = dot(b);
var _local4 = (b.x * b.x) + (b.y * b.y);
var _local3 = new org.cove.flade.util.Vector(0, 0);
_local3.x = (_local5 / _local4) * b.x;
_local3.y = (_local5 / _local4) * b.y;
return(_local3);
}
}
Symbol 690 MovieClip [__Packages.org.cove.flade.DynamicsEngine] Frame 0
class org.cove.flade.DynamicsEngine
{
static var target;
var primitives, surfaces, constraints, gravity, coeffRest, coeffFric, coeffDamp;
function DynamicsEngine (mc) {
if (mc == null) {
mc = _root;
}
target = mc;
primitives = new Array();
surfaces = new Array();
constraints = new Array();
gravity = new org.cove.flade.util.Vector(0, 1);
coeffRest = 1.5;
coeffFric = 0.01;
coeffDamp = 0.99;
}
function addPrimitive(p) {
p.id = ++pID;
primitives.push(p);
}
function addSurface(s) {
surfaces.push(s);
}
function addConstraint(c) {
constraints.push(c);
}
function removePrimitive(p) {
var _local2 = 0;
while (_local2 < primitives.length) {
if (p == primitives[_local2]) {
primitives.splice(_local2, 1);
}
_local2++;
}
p.clear();
}
function removeSurface(s) {
var _local2 = 0;
while (_local2 < surfaces.length) {
if (s == surfaces[_local2]) {
surfaces.splice(_local2, 1);
}
_local2++;
}
s.clear();
}
function getPrimitiveFromId(id) {
var _local2 = 0;
while (_local2 < primitives.length) {
if (primitives[_local2].id == id) {
return(primitives[_local2]);
}
_local2++;
}
trace("Couldn't find primitive with ID : " + id);
}
function removeConstraint(c) {
var _local2 = 0;
while (_local2 < constraints.length) {
if (c == constraints[_local2]) {
constraints.splice(_local2, 1);
}
_local2++;
}
c.clear();
}
function paintSurfaces() {
var _local2 = 0;
while (_local2 < surfaces.length) {
surfaces[_local2].paint();
_local2++;
}
}
function paintPrimitives() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].paint();
_local2++;
}
}
function paintConstraints() {
var _local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].paint();
_local2++;
}
}
function timeStep() {
verlet();
satisfyConstraints();
checkCollisions();
}
function setSurfaceBounce(kfr) {
coeffRest = 1 + kfr;
}
function setSurfaceFriction(f) {
coeffFric = f;
}
function setDamping(d) {
coeffDamp = d;
}
function setGravity(gx, gy) {
gravity.x = gx;
gravity.y = gy;
}
function surfaceCount() {
return(surfaces.length);
}
function primitiveCount() {
return(primitives.length);
}
function constraintsCount() {
return(constraints.length);
}
function destroy() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].clear();
_local2++;
}
primitives.splice(0);
_local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].clear();
_local2++;
}
constraints.splice(0);
_local2 = 0;
while (_local2 < surfaces.length) {
surfaces[_local2].clear();
_local2++;
}
surfaces.splice(0);
}
function verlet() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].verlet(this);
_local2++;
}
}
function satisfyConstraints() {
var _local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].resolve();
_local2++;
}
}
function checkCollisions() {
var _local4 = 0;
while (_local4 < surfaces.length) {
var _local3 = surfaces[_local4];
if (_local3.getActiveState()) {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].checkCollision(_local3, this);
_local2++;
}
}
_local4++;
}
}
static var pID = 0;
}
Symbol 691 MovieClip [__Packages.org.cove.flade.primitives.Particle] Frame 0
class org.cove.flade.primitives.Particle
{
var init, curr, prev, temp, extents, bmin, bmax, mtd, isVisible, dmc;
function Particle (posX, posY) {
init = new org.cove.flade.util.Vector(posX, posY);
curr = new org.cove.flade.util.Vector(posX, posY);
prev = new org.cove.flade.util.Vector(posX, posY);
temp = new org.cove.flade.util.Vector(0, 0);
extents = new org.cove.flade.util.Vector(0, 0);
bmin = 0;
bmax = 0;
mtd = new org.cove.flade.util.Vector(0, 0);
initializeContainer();
isVisible = true;
}
function initializeContainer() {
var _local2 = org.cove.flade.DynamicsEngine.target.getNextHighestDepth();
var _local3 = "_" + _local2;
dmc = org.cove.flade.DynamicsEngine.target.createEmptyMovieClip(_local3, _local2);
}
function setVisible(v) {
isVisible = v;
}
function verlet(sysObj) {
temp.x = curr.x;
temp.y = curr.y;
curr.x = curr.x + ((sysObj.coeffDamp * (curr.x - prev.x)) + sysObj.gravity.x);
curr.y = curr.y + ((sysObj.coeffDamp * (curr.y - prev.y)) + sysObj.gravity.y);
prev.x = temp.x;
prev.y = temp.y;
}
function pin() {
curr.x = init.x;
curr.y = init.y;
prev.x = init.x;
prev.y = init.y;
}
function setPos(px, py) {
curr.x = px;
curr.y = py;
prev.x = px;
prev.y = py;
}
function getXVel() {
return(curr.x - prev.x);
}
function getYVel() {
return(curr.y - prev.y);
}
function getCardXProjection() {
bmin = curr.x - extents.x;
bmax = curr.x + extents.x;
}
function getCardYProjection() {
bmin = curr.y - extents.y;
bmax = curr.y + extents.y;
}
function getAxisProjection(axis) {
var _local5 = new org.cove.flade.util.Vector(Math.abs(axis.x), Math.abs(axis.y));
var _local2 = curr.dot(axis);
var _local3 = extents.dot(_local5);
bmin = _local2 - _local3;
bmax = _local2 + _local3;
}
function setMTD(depthX, depthY, depthN, surfNormal) {
var _local4 = Math.abs(depthX);
var _local3 = Math.abs(depthY);
var _local2 = Math.abs(depthN);
if ((_local4 < _local3) && (_local4 < _local2)) {
mtd.setTo(depthX, 0);
} else if ((_local3 < _local4) && (_local3 < _local2)) {
mtd.setTo(0, depthY);
} else if ((_local2 < _local4) && (_local2 < _local3)) {
mtd = surfNormal.multNew(depthN);
}
}
function setXYMTD(depthX, depthY) {
var _local3 = Math.abs(depthX);
var _local2 = Math.abs(depthY);
if (_local3 < _local2) {
mtd.setTo(depthX, 0);
} else {
mtd.setTo(0, depthY);
}
}
function resolveCollision(normal, sysObj) {
var _local2 = curr.minusNew(prev);
var _local3 = normal.dot(_local2);
var _local8 = _local2.minusNew(normal.multNew(_local3));
var _local4 = _local8.multNew(sysObj.coeffFric);
var _local5 = normal.multNew(_local3 * sysObj.coeffRest);
var _local6 = _local5.plusNew(_local4);
var _local7 = _local2.minusNew(_local6);
curr.plus(mtd);
prev = curr.minusNew(_local7);
}
function paint() {
}
function clear() {
org.cove.flade.graphics.Graphics.clearGraphics(dmc);
}
function checkCollision(surface, sysObj) {
}
var type = "Particle";
}
Symbol 692 MovieClip [__Packages.org.cove.flade.graphics.Graphics] Frame 0
class org.cove.flade.graphics.Graphics
{
function Graphics () {
}
static function paintLine(dmc, x0, y0, x1, y1) {
dmc.moveTo(x0, y0);
dmc.lineTo(x1, y1);
}
static function paintCircle(dmc, x, y, r) {
var mtp8r = (0.414213562373095 * r);
var msp4r = (0.707106781186547 * r);
with (dmc) {
moveTo(x + r, y);
curveTo(r + x, mtp8r + y, msp4r + x, msp4r + y);
curveTo(mtp8r + x, r + y, x, r + y);
curveTo((-mtp8r) + x, r + y, (-msp4r) + x, msp4r + y);
curveTo((-r) + x, mtp8r + y, (-r) + x, y);
curveTo((-r) + x, (-mtp8r) + y, (-msp4r) + x, (-msp4r) + y);
curveTo((-mtp8r) + x, (-r) + y, x, (-r) + y);
curveTo(mtp8r + x, (-r) + y, msp4r + x, (-msp4r) + y);
curveTo(r + x, (-mtp8r) + y, r + x, y);
}
}
static function paintRectangle(dmc, x, y, w, h) {
var w2 = (w / 2);
var h2 = (h / 2);
with (dmc) {
moveTo(x - w2, y - h2);
lineTo(x + w2, y - h2);
lineTo(x + w2, y + h2);
lineTo(x - w2, y + h2);
lineTo(x - w2, y - h2);
}
}
static function clearGraphics(dmc) {
dmc.clear();
}
}
Symbol 693 MovieClip [__Packages.org.cove.flade.surfaces.Surface] Frame 0
interface org.cove.flade.surfaces.Surface
{
}
Symbol 694 MovieClip [__Packages.org.cove.flade.primitives.CircleParticle] Frame 0
class org.cove.flade.primitives.CircleParticle extends org.cove.flade.primitives.Particle
{
var radius, contactRadius, extents, closestPoint, dmc, curr;
function CircleParticle (px, py, r) {
super(px, py);
radius = r;
contactRadius = r;
extents = new org.cove.flade.util.Vector(r, r);
closestPoint = new org.cove.flade.util.Vector(0, 0);
}
function paint() {
dmc.clear();
dmc.lineStyle(0, 6710886, 100);
org.cove.flade.graphics.Graphics.paintCircle(dmc, curr.x, curr.y, radius);
}
function checkCollision(surface, sysObj) {
surface.resolveCircleCollision(this, sysObj);
}
}
Symbol 695 MovieClip [__Packages.org.cove.flade.primitives.RectangleParticle] Frame 0
class org.cove.flade.primitives.RectangleParticle extends org.cove.flade.primitives.Particle
{
var width, height, vertex, extents, isVisible, dmc, curr;
function RectangleParticle (px, py, w, h) {
super(px, py);
width = w;
height = h;
vertex = new org.cove.flade.util.Vector(0, 0);
extents = new org.cove.flade.util.Vector(w / 2, h / 2);
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(2, 6710886, 100);
org.cove.flade.graphics.Graphics.paintRectangle(dmc, curr.x, curr.y, width, height);
}
}
function checkCollision(surface, sysObj) {
surface.resolveRectangleCollision(this, sysObj);
}
}
Symbol 696 MovieClip [__Packages.org.cove.flade.constraints.Constraint] Frame 0
interface org.cove.flade.constraints.Constraint
{
}
Symbol 697 MovieClip [__Packages.com.playerthree.game.platform.SoundManager] Frame 0
class com.playerthree.game.platform.SoundManager
{
var target, globalSound, freeChannels, globalChannels, globalArrays, freeArrays, freeMC, globalMC, freeControls, globalControls, soundsArray;
function SoundManager (mc) {
target = mc;
setChannels(2, 2);
globalSound = new Sound();
}
function setChannels(free, global) {
freeChannels = free;
globalChannels = global;
globalArrays = new Object();
freeArrays = new Object();
freeMC.removeMovieClip();
globalMC.removeMovieClip();
var _local7 = target.createEmptyMovieClip("soundManager", -16384);
freeMC = _local7.createEmptyMovieClip("freeMC", 1);
globalMC = _local7.createEmptyMovieClip("globalMC", 2);
freeControls = new Object();
globalControls = new Object();
var _local2 = 1;
while (_local2 <= free) {
freeArrays["sounds" + _local2] = new Array();
var _local3 = freeMC.createEmptyMovieClip("channel" + _local2, _local2);
freeControls["control" + _local2] = new Sound(_local3);
_local2++;
}
_local2 = 0;
while (_local2 < global) {
globalArrays["sounds" + _local2] = new Array();
var _local4 = globalMC.createEmptyMovieClip("channel" + _local2, _local2);
globalControls["control" + _local2] = new Sound(_local4);
_local2++;
}
soundsArray = new Array();
}
function playFreeSound(soundName, channel, loops, skipCheck, soundComplete) {
if (skipCheck != true) {
var _local4 = freeArrays["sounds" + channel];
var _local2 = 0;
while (_local2 < _local4.length) {
if (_local4[_local2] == soundName) {
trace(soundName + " is already playing");
return(null);
}
_local2++;
}
}
var _local5 = new Sound(freeChannels["channel" + channel]);
_local5.attachSound(soundName);
if (loops == undefined) {
loops = 0;
}
trace(soundName);
_local5.start(0, loops);
if (skipCheck != true) {
}
soundsArray.push(_local5);
freeArrays["sounds" + channel].push(soundName);
trace("Total sounds playing = " + soundsArray.length);
_local5.onSoundComplete = com.playerthree.utils.EventDelegate.create(this, soundFinished, soundName, _local5, channel, "free", soundComplete);
return(_local5);
}
function playGlobalSound(soundName, channel, loops, skipCheck, soundComplete) {
if (skipCheck != true) {
var _local4 = globalArrays["sounds" + channel];
var _local2 = 0;
while (_local2 < _local4.length) {
if (_local4[_local2] == soundName) {
trace(soundName + " is already playing");
return(null);
}
_local2++;
}
}
var _local5 = new Sound(globalChannels["channel" + channel]);
_local5.attachSound(soundName);
if (loops == undefined) {
loops = 0;
}
trace(soundName);
_local5.start(0, loops);
if (skipCheck != true) {
globalArrays.push(_local5);
}
globalChannels["sounds" + channel].push(soundName);
_local5.onSoundComplete = com.playerthree.utils.EventDelegate.create(this, soundFinished, soundName, _local5, channel, "global", soundComplete);
return(_local5);
}
function soundFinished(name, sound, chanEnt, type, nowWhat) {
trace(name + " says : ok I've finished ");
if (nowWhat != null) {
nowWhat();
}
var _local4;
if (type == "global") {
_local4 = globalArrays["sounds" + chanEnt];
} else if (type == "free") {
_local4 = freeArrays["sounds" + chanEnt];
}
var _local2 = 0;
while (_local2 < _local4.length) {
if (_local4[_local2] == name) {
if (type == "global") {
globalArrays["sounds" + chanEnt].splice(_local2, 1);
} else if (type == "free") {
freeArrays["sounds" + chanEnt].splice(_local2, 1);
}
}
_local2++;
}
var _local3 = 0;
while (_local3 < soundsArray.length) {
if (soundsArray[_local3] == sound) {
soundsArray.splice(_local3, 1);
}
_local3++;
}
trace("Total sounds playing = " + soundsArray.length);
}
function step() {
}
}
Symbol 698 MovieClip [__Packages.com.playerthree.game.platform.entities.StaticEntity] Frame 0
class com.playerthree.game.platform.entities.StaticEntity implements com.playerthree.game.platform.entities.Entity
{
var target, renderOn, myWidth, myZ, myX, myY, surfaces;
function StaticEntity (mc, startX, startY, zDepth) {
target = mc;
renderOn = true;
myWidth = mc._width;
if (zDepth == null) {
zDepth = 1;
}
myZ = zDepth;
myX = startX / myZ;
myY = startY / myZ;
}
function move(xAmount, yAmount) {
myX = myX + xAmount;
myY = myY + yAmount;
if (surfaces != null) {
surfaces.move(xAmount, yAmount);
}
}
function moveTo(x, y) {
myX = x;
myY = y;
}
function update() {
render();
}
function getX() {
return(myX);
}
function getY() {
return(myY);
}
function getWidth() {
return(myWidth);
}
function onScreen() {
return(renderOn);
}
function setRender(render) {
renderOn = render;
}
function toString() {
return(target._name);
}
function render() {
if (renderOn) {
target._visible = true;
target._x = (myX - com.playerthree.game.platform.Camera.x) * myZ;
target._y = (myY + com.playerthree.game.platform.Camera.y) * myZ;
if (myZ != 1) {
target._xscale = (target._yscale = 100 + (((1 - com.playerthree.game.platform.Camera.zoomLevel) / myZ) * 3));
}
if ((!surfaces.active) && (surfaces != null)) {
surfaces.activateGroup();
}
} else {
target._visible = false;
if (surfaces.active && (surfaces != null)) {
surfaces.purgeGroup();
}
}
}
function getTarget() {
return(target);
}
function getScreenX() {
return((myX - com.playerthree.game.platform.Camera.x) * myZ);
}
function getScreenY() {
return((myY + com.playerthree.game.platform.Camera.y) * myZ);
}
function setSurfaceGroup(sg) {
surfaces = sg;
}
function clearSurfaceGroup() {
surfaces.purgeGroup();
surfaces = null;
}
function setX(newX) {
myX = newX;
}
function setY(newY) {
myY = newY;
}
function kill() {
surfaces.purgeGroup();
target.removeMovieClip();
}
function changeDepth(newDepth) {
target.swapDepths(newDepth);
trace((target._name + " changed depth to ") + target.getDepth());
}
var destroyMe = false;
}
Symbol 699 MovieClip [__Packages.com.playerthree.game.platform.entities.Looper] Frame 0
class com.playerthree.game.platform.entities.Looper extends com.playerthree.game.platform.entities.StaticEntity
{
var myWidth, zDepth, myX, target, myY;
function Looper (mc, startX, startY, width, z) {
super(mc, startX, startY);
myWidth = width;
zDepth = z;
}
function render() {
target._x = ((myX - com.playerthree.game.platform.Camera.x) * zDepth) % myWidth;
target._y = myY + com.playerthree.game.platform.Camera.y;
}
}
Symbol 700 MovieClip [__Packages.com.playerthree.game.platform.entities.Looper2D] Frame 0
class com.playerthree.game.platform.entities.Looper2D extends com.playerthree.game.platform.entities.StaticEntity
{
var myWidth, myHeight, zDepth, myX, target, myY;
function Looper2D (mc, startX, startY, width, height, z) {
super(mc, startX, startY);
myWidth = width;
myHeight = -height;
zDepth = z;
}
function render() {
target._x = com.playerthree.math.MathX.niceMod((myX - com.playerthree.game.platform.Camera.x) * zDepth, myWidth);
target._y = com.playerthree.math.MathX.niceMod((myY + com.playerthree.game.platform.Camera.y) * zDepth, myHeight);
}
}
Symbol 701 MovieClip [__Packages.com.playerthree.math.MathX] Frame 0
class com.playerthree.math.MathX
{
function MathX () {
}
static function niceMod(i, m) {
i = i / m;
if (i < 0) {
return(m * (1 - (Math.abs(i) % 1)));
}
return(m * (i % 1));
}
}
Symbol 702 MovieClip [__Packages.com.playerthree.game.platform.entities.SimpleMover] Frame 0
class com.playerthree.game.platform.entities.SimpleMover extends com.playerthree.game.platform.entities.StaticEntity
{
var move;
function SimpleMover (mc, startX, startY, xSpeed, ySpeed, zDepth) {
super(mc, startX, startY, zDepth);
if (xSpeed != null) {
_xSpeed = xSpeed;
}
if (ySpeed != null) {
_ySpeed = ySpeed;
}
}
function changeSpeed(newXSpeed, newYSpeed) {
if (newXSpeed != null) {
_xSpeed = newXSpeed;
}
if (newYSpeed != null) {
_ySpeed = newYSpeed;
}
}
function addSpeed(xAmount, yAmount) {
if (xAmount != null) {
_xSpeed = _xSpeed + xAmount;
}
if (yAmount != null) {
_ySpeed = _ySpeed + yAmount;
}
}
function reverseDirection() {
_xSpeed = -_xSpeed;
_ySpeed = -_ySpeed;
}
function update() {
super.update();
move(_xSpeed, _ySpeed);
}
var _ySpeed = 0;
var _xSpeed = 0;
}
Symbol 703 MovieClip [__Packages.org.cove.flade.surfaces.LineSurface] Frame 0
class org.cove.flade.surfaces.LineSurface extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var p1, p2, collNormal, isVisible, dmc, onContact, faceNormal, collisionDepth, testIntervals, minY, maxY, minX, maxX, sideNormal, minS, maxS, minF, maxF, rise, run, sign, slope, invB, setCardProjections, p3, p4, verts;
function LineSurface (p1x, p1y, p2x, p2y) {
super(0, 0);
p1 = new org.cove.flade.util.Vector(p1x, p1y);
p2 = new org.cove.flade.util.Vector(p2x, p2y);
calcFaceNormal();
collNormal = new org.cove.flade.util.Vector(0, 0);
setCollisionDepth(30);
}
function move(xAmount, yAmount) {
p1.x = p1.x + xAmount;
p2.x = p2.x + xAmount;
p1.y = p1.y + yAmount;
p2.y = p2.y + yAmount;
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintLine(dmc, p1.x, p1.y, p2.x, p2.y);
}
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact(p.id);
p.resolveCollision(faceNormal, sysObj);
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact(p.id);
p.resolveCollision(collNormal, sysObj);
}
}
function setCollisionDepth(d) {
collisionDepth = d;
precalculate();
}
function isCircleColliding(p) {
findClosestPoint(p.curr, p.closestPoint);
var _local3 = p.closestPoint.minusNew(p.curr);
_local3.normalize();
if (inequality(p.curr)) {
var _local5 = Math.abs(_local3.x);
_local3.x = ((faceNormal.x < 0) ? (_local5) : (-_local5));
_local3.y = Math.abs(_local3.y);
}
var _local4 = p.curr.plusNew(_local3.mult(p.radius));
if (segmentInequality(_local4)) {
if (_local4.distance(p.closestPoint) > collisionDepth) {
return(false);
}
var _local7 = _local4.x - p.closestPoint.x;
var _local6 = _local4.y - p.closestPoint.y;
p.mtd.setTo(-_local7, -_local6);
return(true);
}
return(false);
}
function isRectangleColliding(p) {
p.getCardYProjection();
var _local7 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local7 == 0) {
return(false);
}
p.getCardXProjection();
var _local8 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local8 == 0) {
return(false);
}
p.getAxisProjection(sideNormal);
var _local10 = testIntervals(p.bmin, p.bmax, minS, maxS);
if (_local10 == 0) {
return(false);
}
p.getAxisProjection(faceNormal);
var _local9 = testIntervals(p.bmin, p.bmax, minF, maxF);
if (_local9 == 0) {
return(false);
}
var _local4 = Math.abs(_local8);
var _local3 = Math.abs(_local7);
var _local6 = Math.abs(_local10);
var _local5 = Math.abs(_local9);
if (((_local4 <= _local3) && (_local4 <= _local6)) && (_local4 <= _local5)) {
p.mtd.setTo(_local8, 0);
collNormal.setTo(p.mtd.x / _local4, 0);
} else if (((_local3 <= _local4) && (_local3 <= _local6)) && (_local3 <= _local5)) {
p.mtd.setTo(0, _local7);
collNormal.setTo(0, p.mtd.y / _local3);
} else if (((_local5 <= _local4) && (_local5 <= _local3)) && (_local5 <= _local6)) {
p.mtd = faceNormal.multNew(_local9);
collNormal.copy(faceNormal);
} else if (((_local6 <= _local4) && (_local6 <= _local3)) && (_local6 <= _local5)) {
p.mtd = sideNormal.multNew(_local10);
collNormal.copy(sideNormal);
}
return(true);
}
function precalculate() {
rise = p2.y - p1.y;
run = p2.x - p1.x;
sign = ((run >= 0) ? 1 : -1);
slope = rise / run;
invB = 1 / ((run * run) + (rise * rise));
createRectangle();
calcSideNormal();
setCardProjections();
setAxisProjections();
}
function calcFaceNormal() {
faceNormal = new org.cove.flade.util.Vector(0, 0);
var _local3 = p2.x - p1.x;
var _local2 = p2.y - p1.y;
faceNormal.setTo(_local2, -_local3);
faceNormal.normalize();
}
function segmentInequality(toPoint) {
var _local2 = findU(toPoint);
var _local3 = inequality(toPoint);
return(((_local2 >= 0) && (_local2 <= 1)) && (_local3));
}
function inequality(toPoint) {
var _local2 = ((slope * (toPoint.x - p1.x)) + (p1.y - toPoint.y)) * sign;
return(_local2 <= 0);
}
function findClosestPoint(toPoint, returnVect) {
var _local2 = findU(toPoint);
if (_local2 <= 0) {
returnVect.copy(p1);
return(undefined);
}
if (_local2 >= 1) {
returnVect.copy(p2);
return(undefined);
}
var _local5 = p1.x + (_local2 * (p2.x - p1.x));
var _local4 = p1.y + (_local2 * (p2.y - p1.y));
returnVect.setTo(_local5, _local4);
}
function findU(p) {
var _local2 = ((p.x - p1.x) * run) + ((p.y - p1.y) * rise);
return(_local2 * invB);
}
function createRectangle() {
var _local5 = p2.x + ((-faceNormal.x) * collisionDepth);
var _local3 = p2.y + ((-faceNormal.y) * collisionDepth);
var _local4 = p1.x + ((-faceNormal.x) * collisionDepth);
var _local2 = p1.y + ((-faceNormal.y) * collisionDepth);
p3 = new org.cove.flade.util.Vector(_local5, _local3);
p4 = new org.cove.flade.util.Vector(_local4, _local2);
verts.push(p1);
verts.push(p2);
verts.push(p3);
verts.push(p4);
}
function setAxisProjections() {
var _local2;
minF = p2.dot(faceNormal);
maxF = p3.dot(faceNormal);
if (minF > maxF) {
_local2 = minF;
minF = maxF;
maxF = _local2;
}
minS = p1.dot(sideNormal);
maxS = p2.dot(sideNormal);
if (minS > maxS) {
_local2 = minS;
minS = maxS;
maxS = _local2;
}
}
function calcSideNormal() {
sideNormal = new org.cove.flade.util.Vector(0, 0);
var _local3 = p3.x - p2.x;
var _local2 = p3.y - p2.y;
sideNormal.setTo(_local2, -_local3);
sideNormal.normalize();
}
var type = "line";
}
Symbol 704 MovieClip [__Packages.org.cove.flade.surfaces.CircleTile] Frame 0
class org.cove.flade.surfaces.CircleTile extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var createBoundingRect, radius, isVisible, dmc, center, verts, onContact, normal, testIntervals, minX, maxX, minY, maxY;
function CircleTile (cx, cy, r) {
super(cx, cy);
createBoundingRect(r * 2, r * 2);
radius = r;
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintCircle(dmc, center.x, center.y, radius);
}
}
function move(xAmount, yAmount) {
center.x = center.x + xAmount;
center.y = center.y + yAmount;
verts.splice(0, verts.length - 1);
createBoundingRect(radius * 2, radius * 2);
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact(p.id);
p.resolveCollision(normal, sysObj);
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact(p.id);
p.resolveCollision(normal, sysObj);
}
}
function isCircleColliding(p) {
p.getCardXProjection();
var _local8 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local8 == 0) {
return(false);
}
p.getCardYProjection();
var _local7 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local7 == 0) {
return(false);
}
var _local4 = center.x - p.curr.x;
var _local3 = center.y - p.curr.y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6 = (p.radius + radius) - _local5;
if (_local6 > 0) {
_local4 = _local4 / _local5;
_local3 = _local3 / _local5;
p.mtd.setTo((-_local4) * _local6, (-_local3) * _local6);
normal.setTo(-_local4, -_local3);
return(true);
}
return(false);
}
function isRectangleColliding(p) {
p.getCardXProjection();
var _local6 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local6 == 0) {
return(false);
}
p.getCardYProjection();
var _local5 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local5 == 0) {
return(false);
}
var _local11 = Math.abs(_local6) < radius;
var _local12 = Math.abs(_local5) < radius;
if (_local11 && (_local12)) {
var _local10 = p.curr.x + (sign(center.x - p.curr.x) * (p.width / 2));
var _local9 = p.curr.y + (sign(center.y - p.curr.y) * (p.height / 2));
p.vertex.setTo(_local10, _local9);
var _local4 = p.vertex.x - center.x;
var _local3 = p.vertex.y - center.y;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = radius - _local8;
if (_local7 > 0) {
_local4 = _local4 / _local8;
_local3 = _local3 / _local8;
p.mtd.setTo(_local4 * _local7, _local3 * _local7);
normal.setTo(_local4, _local3);
return(true);
}
return(false);
}
p.setXYMTD(_local6, _local5);
normal.setTo(p.mtd.x / Math.abs(_local6), p.mtd.y / Math.abs(_local5));
return(true);
}
function sign(val) {
if (val < 0) {
return(-1);
}
if (val > 0) {
return(1);
}
}
}
Symbol 705 MovieClip [__Packages.org.cove.flade.surfaces.RectangleTile] Frame 0
class org.cove.flade.surfaces.RectangleTile extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var rectWidth, rectHeight, createBoundingRect, center, verts, isVisible, dmc, onContact, normal, testIntervals, minX, maxX, minY, maxY;
function RectangleTile (cx, cy, rw, rh) {
super(cx, cy);
rectWidth = rw;
rectHeight = rh;
createBoundingRect(rw, rh);
}
function move(xAmount, yAmount) {
center.x = center.x + xAmount;
center.y = center.y + yAmount;
verts.splice(0, verts.length - 1);
createBoundingRect(rectWidth, rectHeight);
}
function moveTo(x, y) {
center.x = x;
center.y = y;
verts.splice(0, verts.length - 1);
createBoundingRect(rectWidth, rectHeight);
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintRectangle(dmc, center.x, center.y, rectWidth, rectHeight);
}
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact(p.id);
p.resolveCollision(normal, sysObj);
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact(p.id);
p.resolveCollision(normal, sysObj);
}
}
function isCircleColliding(p) {
p.getCardXProjection();
var _local6 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local6 == 0) {
return(false);
}
p.getCardYProjection();
var _local5 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local5 == 0) {
return(false);
}
var _local11 = Math.abs(_local6) < p.radius;
var _local12 = Math.abs(_local5) < p.radius;
if (_local11 && (_local12)) {
var _local10 = center.x + (sign(p.curr.x - center.x) * (rectWidth / 2));
var _local9 = center.y + (sign(p.curr.y - center.y) * (rectHeight / 2));
var _local4 = p.curr.x - _local10;
var _local3 = p.curr.y - _local9;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = p.radius - _local8;
if (_local7 > 0) {
_local4 = _local4 / _local8;
_local3 = _local3 / _local8;
p.mtd.setTo(_local4 * _local7, _local3 * _local7);
normal.setTo(_local4, _local3);
return(true);
}
return(false);
}
p.setXYMTD(_local6, _local5);
normal.setTo(p.mtd.x / Math.abs(_local6), p.mtd.y / Math.abs(_local5));
return(true);
}
function isRectangleColliding(p) {
p.getCardXProjection();
var _local4 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local4 == 0) {
return(false);
}
p.getCardYProjection();
var _local3 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local3 == 0) {
return(false);
}
p.setXYMTD(_local4, _local3);
normal.setTo(p.mtd.x / Math.abs(_local4), p.mtd.y / Math.abs(_local3));
return(true);
}
function sign(val) {
if (val < 0) {
return(-1);
}
if (val > 0) {
return(1);
}
}
}
Symbol 706 MovieClip [__Packages.Shuttle] Frame 0
class Shuttle extends com.playerthree.game.platform.entities.StaticEntity
{
var target, state, freefall, takeOffSound, c0, myX, myY, c1, c2, s2, s0, s1, thrustPower, vY, vX, leftVelocity, rightVelocity, actualSpeed, leftAccel, rightAccel, acceleration, shuttleAngle, height, render, fly0Sound, fly1Sound, fly2Sound, fly3Sound, fly4Sound, fly5Sound;
function Shuttle (mc, initX, initY) {
super(mc, initX, initY);
target._xscale = -100;
var _local3 = 0;
while (_local3 < 6) {
var _local4 = Globals.soundClip.createEmptyMovieClip("flySound" + _local3, 999 + _local3);
this[("fly" + _local3) + "Sound"] = new Sound(_local4);
this[("fly" + _local3) + "Sound"].attachSound(("rocket fly_" + _local3) + ".wav");
_local3++;
}
buildShuttle();
state = "landed";
freefall = new Sound(Globals.soundClip.createEmptyMovieClip("freefallSound", 99998));
freefall.attachSound("rocket_off.wav");
var _local5 = Globals.soundClip.createEmptyMovieClip("takeOffSound", 99999);
takeOffSound = new Sound(_local5);
takeOffSound.attachSound("long_powerup.aif");
}
function buildShuttle() {
c0 = new org.cove.flade.primitives.CircleParticle(myX, myY - 50, 15);
com.playerthree.game.platform.World.physics.addPrimitive(c0);
c1 = new org.cove.flade.primitives.CircleParticle(myX - 30, myY + 90, 15);
com.playerthree.game.platform.World.physics.addPrimitive(c1);
c2 = new org.cove.flade.primitives.CircleParticle(myX + 30, myY + 90, 15);
com.playerthree.game.platform.World.physics.addPrimitive(c2);
s2 = new org.cove.flade.constraints.SpringConstraint(c1, c2);
com.playerthree.game.platform.World.physics.addConstraint(s2);
s0 = new org.cove.flade.constraints.SpringConstraint(c1, c0);
com.playerthree.game.platform.World.physics.addConstraint(s0);
s1 = new org.cove.flade.constraints.SpringConstraint(c2, c0);
com.playerthree.game.platform.World.physics.addConstraint(s1);
}
function boostRight() {
c2.curr.y = c2.curr.y + (vY * thrustPower);
c2.curr.x = c2.curr.x + (vX * thrustPower);
}
function boostLeft() {
c1.curr.y = c1.curr.y + (vY * thrustPower);
c1.curr.x = c1.curr.x + (vX * thrustPower);
}
function getLeftEnginePoint() {
return(new flash.geom.Point(c1.curr.x, c1.curr.y));
}
function getRightEnginePoint() {
return(new flash.geom.Point(c2.curr.x, c2.curr.y));
}
function launch(lPower, rPower, fuelBurn) {
if ((lPower <= 0.6) && (rPower <= 0.6)) {
takeOffSound.stop();
com.playerthree.game.SoundManager.go().oneShot("rocket_powerdown.wav", 1, 0, true, tooSlow);
} else {
launched = true;
leftVelocity = lPower;
rightVelocity = rPower;
takeOffSound.stop();
com.playerthree.game.SoundManager.go().oneShot("rockettakeoff.wav", 1, 0, true);
startFlySounds();
takeOffVelocity = lPower + rPower;
state = "flying";
}
}
function tooSlow() {
Globals.main.explode(75, 20);
}
function explode() {
fuel = 0;
com.playerthree.game.SoundManager.go().oneShot("explosion.wav", 1, 0, true);
state = "exploded";
target._visible = false;
}
function setFuel(f) {
fuel = f;
}
function destroy() {
com.playerthree.game.platform.World.physics.removeConstraint(s0);
com.playerthree.game.platform.World.physics.removeConstraint(s1);
com.playerthree.game.platform.World.physics.removeConstraint(s2);
com.playerthree.game.platform.World.physics.removePrimitive(c0);
com.playerthree.game.platform.World.physics.removePrimitive(c1);
com.playerthree.game.platform.World.physics.removePrimitive(c2);
}
function update() {
var _local2 = actualSpeed / topSpeed;
if (_local2 >= 1) {
_local2 = 1;
}
leftAccel = leftVelocity * Math.pow(1 - _local2, 0.333333333333333);
rightAccel = rightVelocity * Math.pow(1 - _local2, 0.333333333333333);
acceleration = takeOffVelocity * Math.pow(1 - _local2, 0.333333333333333);
thrustPower = 0.1 * acceleration;
shuttleAngle = com.playerthree.utils.Trig.getAngle(c2.curr.x, c2.curr.y, c1.curr.x, c1.curr.y);
vX = Math.sin(shuttleAngle);
vY = -Math.cos(shuttleAngle);
actualSpeed = Math.sqrt((c0.getYVel() * c0.getYVel()) + (c0.getXVel() * c0.getXVel()));
var _local3 = 1 + ((72 + Math.round((180 + target._rotation) / 2.5)) % 144);
target.gotoAndStop(_local3);
target.clear();
target.moveTo(0, 0);
target.lineStyle(8, 16776960, 1);
target.lineTo(25 * vX, 25 * vY);
switch (stage) {
case 0 :
target.rocket1A_mc._visible = true;
target.rocket1B_mc._visible = true;
target.rocket2_mc._visible = true;
flySounds();
break;
case 1 :
target.rocket2_mc._visible = true;
target.rocket1A_mc._visible = false;
target.rocket1B_mc._visible = false;
flySounds();
break;
case 2 :
var _local4 = fadeOutEngines();
freefall.setVolume(Math.max(0, 40 - _local4));
target.rocket1A_mc._visible = false;
target.rocket1B_mc._visible = false;
target.rocket2_mc._visible = false;
target._visible = false;
}
if ((fuel > 0) && (stage != 2)) {
c1.curr.y = c1.curr.y + (vY * leftAccel);
c1.curr.x = c1.curr.x + (vX * leftAccel);
c2.curr.y = c2.curr.y + (vY * rightAccel);
c2.curr.x = c2.curr.x + (vX * rightAccel);
}
target._rotation = shuttleAngle * com.playerthree.utils.Trig.RADDEG;
myX = c0.curr.x;
myY = c0.curr.y;
height = (-(myY - 100)) / 10;
if ((state != "exploded") && (stage != 2)) {
render();
}
if (state == "exploded") {
muteEngines();
}
}
function muteEngines() {
var _local2 = 0;
while (_local2 < 6) {
this[("fly" + _local2) + "Sound"].setVolume(0);
_local2++;
}
fly0Sound.stop();
fly1Sound.stop();
fly2Sound.stop();
fly3Sound.stop();
fly4Sound.stop();
fly5Sound.stop();
sound0 = (sound1 = (sound2 = (sound3 = (sound4 = (sound5 = false)))));
freefall.setVolume(5);
}
function stage2Right() {
c1.curr.y = c1.curr.y + (vY * 0.1);
c1.curr.x = c1.curr.x + (vX * 0.1);
}
function stage2Left() {
c2.curr.y = c2.curr.y + (vY * 0.1);
c2.curr.x = c2.curr.x + (vX * 0.1);
}
function reset() {
destroy();
launched = false;
muteEngines();
takeOffSound.start(0, 0);
buildShuttle();
state = "landed";
leftVelocity = (rightVelocity = (takeOffVelocity = 0));
stage = 0;
target.gotoAndStop(1);
fuel = 100;
myX = 0;
myY = -105;
c1.setPos(myX - 30, myY + 50);
c2.setPos(myX + 30, myY + 50);
c0.setPos(myX, myY - 90);
}
function startFlySounds() {
fly0Sound.setVolume(0);
fly1Sound.setVolume(0);
fly2Sound.setVolume(0);
fly3Sound.setVolume(0);
fly4Sound.setVolume(0);
fly5Sound.setVolume(0);
freefall.setVolume(0);
freefall.start(0, 9999);
}
function fadeOutEngines() {
var _local4 = 0;
var _local2 = 0;
while (_local2 < 6) {
var _local3 = this[("fly" + _local2) + "Sound"].getVolume();
if (_local3 > 0) {
if (_local3 > _local4) {
_local4 = _local3;
}
this[("fly" + _local2) + "Sound"].setVolume(_local3 - 1);
} else {
this[("fly" + _local2) + "Sound"].setVolume(0);
}
_local2++;
}
return(_local4);
}
function flySounds() {
if (launched) {
var _local4 = Math.min(Math.floor(getHeight() / 600), 5);
var _local2 = 0;
while (_local2 < 6) {
if ((_local2 > (_local4 + 1)) || (_local2 < _local4)) {
if (this["sound" + _local2]) {
this[("fly" + _local2) + "Sound"].stop();
this[("fly" + _local2) + "Sound"].setVolume(0);
this["sound" + _local2] = false;
}
} else {
var _local3 = com.playerthree.utils.Trig.getDistance(getHeight(), 0, _local2 * 600, 0);
if (!this["sound" + _local2]) {
this[("fly" + _local2) + "Sound"].start(0, 9999);
this["sound" + _local2] = true;
}
this[("fly" + _local2) + "Sound"].setVolume(((600 - _local3) / 600) * 75);
}
_local2++;
}
}
}
function getSpeed() {
return(actualSpeed);
}
function getHeight() {
return(height - 29.42);
}
function getStage() {
return(stage);
}
function getAngle() {
return(shuttleAngle);
}
function nextStage() {
stage++;
if (stage > 2) {
stage = 2;
}
}
function getLeftVel() {
return(leftVelocity);
}
function getRightVel() {
return(rightVelocity);
}
function getVel() {
return(takeOffVelocity);
}
function getFuel() {
return(fuel);
}
function getEndPoint() {
return(new flash.geom.Point(c0.curr.x, c0.curr.y));
}
var fullOutAt = 55;
var takeOffVelocity = 0;
var topSpeed = 150;
var stage = 0;
var fuel = 100;
var sound0 = false;
var sound1 = false;
var sound2 = false;
var sound3 = false;
var sound4 = false;
var sound5 = false;
var launched = false;
}
Symbol 707 MovieClip [__Packages.org.cove.flade.constraints.SpringConstraint] Frame 0
class org.cove.flade.constraints.SpringConstraint implements org.cove.flade.constraints.Constraint
{
static var color;
var p1, p2, restLength, stiffness, isVisible, dmc;
function SpringConstraint (p1, p2, visible) {
if (visible == null) {
visible = true;
}
this.p1 = p1;
this.p2 = p2;
restLength = p1.curr.distance(p2.curr);
stiffness = 0.55;
color = 3481875 /* 0x352113 */;
initializeContainer();
isVisible = visible;
}
function initializeContainer() {
var _local2 = org.cove.flade.DynamicsEngine.target.getNextHighestDepth();
var _local3 = "_" + _local2;
dmc = org.cove.flade.DynamicsEngine.target.createEmptyMovieClip(_local3, _local2);
}
function resolve() {
var _local5 = p1.curr.minusNew(p2.curr);
var _local3 = p1.curr.distance(p2.curr);
var _local4 = (_local3 - restLength) / _local3;
var _local2 = _local5.mult(_local4 * stiffness);
p1.curr.minus(_local2);
p2.curr.plus(_local2);
}
function setRestLength(r) {
restLength = r;
}
function setStiffness(s) {
stiffness = s;
}
function setVisible(v) {
isVisible = v;
org.cove.flade.graphics.Graphics.clearGraphics(dmc);
}
function clear() {
org.cove.flade.graphics.Graphics.clearGraphics(dmc);
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(thickness, color, 100);
org.cove.flade.graphics.Graphics.paintLine(dmc, p1.curr.x, p1.curr.y, p2.curr.x, p2.curr.y);
}
}
static function changeColor(newColor) {
color = newColor;
}
static var thickness = 2;
}
Symbol 708 MovieClip [__Packages.com.playerthree.utils.Trig] Frame 0
class com.playerthree.utils.Trig
{
function Trig () {
}
static function getDistance(x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
static function getAngle(x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Math.atan2(_local1, _local2));
}
static function rad2Deg(radians) {
return(57.2957795130823 * radians);
}
static function deg2Rad(degrees) {
return((Math.PI/180) * degrees);
}
static var RADDEG = 57.2957795;
}
Symbol 709 MovieClip [__Packages.Sky] Frame 0
class Sky
{
var target;
function Sky (mc) {
target = mc;
drawSky(13421823);
}
function drawSky(color) {
target.moveTo(0, 0);
target.beginFill(color, 1);
target.lineTo(Stage.width, 0);
target.lineTo(Stage.width, Stage.height);
target.lineTo(0, Stage.height);
target.lineTo(0, 0);
target.endFill();
}
}
Symbol 710 MovieClip [__Packages.PowerBar] Frame 0
class PowerBar
{
var target;
function PowerBar (mc) {
target = mc;
target.onEnterFrame = com.playerthree.utils.EventDelegate.create(this, step);
}
function boost() {
curPower = curPower + (4 + (Math.random() * 4));
}
function step() {
if (!locked) {
curPower = curPower - 3;
if (curPower < 0) {
curPower = 0;
}
if (curPower > maxPower) {
curPower = maxPower;
}
target.needle_mc._y = -curPower;
}
}
function lock() {
locked = true;
}
function unlock() {
locked = false;
}
function getPower() {
return(curPower);
}
var curPower = 0;
var maxPower = 143;
var locked = false;
}
Symbol 711 MovieClip [__Packages.UIBar] Frame 0
class UIBar
{
var target, _length;
function UIBar (mc, length) {
target = mc;
_length = length;
}
function setLevel(num) {
target.meter_mc._y = -((num / 100) * _length);
}
}
Symbol 712 MovieClip [__Packages.ParticleManager] Frame 0
class ParticleManager
{
var particles;
function ParticleManager () {
particles = new Array();
}
function addParticle(p) {
particles.push(p);
}
function render() {
var _local2 = 0;
while (_local2 < particles.length) {
if (particles[_local2].destroyMe) {
particles[_local2].getTarget().removeMovieClip();
particles.splice(_local2, 1);
} else {
particles[_local2].render();
}
_local2++;
}
}
}
Symbol 713 MovieClip [__Packages.com.playerthree.game.platform.entities.Particle] Frame 0
class com.playerthree.game.platform.entities.Particle
{
var frame, target, myX, myY, scale, rot;
function Particle (mc, x, y, randomFactor, scaleRandom, removeAtFrame) {
frame = removeAtFrame;
target = mc;
myX = ((-(randomFactor * 0.5)) + (Math.random() * randomFactor)) + x;
myY = ((-(randomFactor * 0.5)) + (Math.random() * randomFactor)) + y;
target._x = myX - com.playerthree.game.platform.Camera.x;
target._y = myY + com.playerthree.game.platform.Camera.y;
scale = ((-(scaleRandom * 0.5)) + (Math.random() * scaleRandom)) + 100;
target._rotation = (-(scaleRandom * 0.5)) + (Math.random() * scaleRandom);
rot = Math.random() * 10;
}
function getTarget() {
return(target);
}
function getX() {
return(myX);
}
function getY() {
return(myY);
}
function render() {
target._x = myX - com.playerthree.game.platform.Camera.x;
target._y = myY + com.playerthree.game.platform.Camera.y;
target._xscale = (target._yscale = scale);
target._rotation = target._rotation + rot;
if (target._currentframe == frame) {
destroyMe = true;
}
}
var destroyMe = false;
}
Symbol 714 MovieClip [__Packages.Rocket] Frame 0
class Rocket extends com.playerthree.game.platform.entities.StaticEntity
{
var target, fuel, accel, fuelBurnRate, c0, c1, s0, angle, vX, vY, actualSpeed, myX, myY, renderOn;
function Rocket (mc, initX, initY, angle, speed, vX, vY, type, fuelLeft, fuelBurn) {
super(mc, initX, initY);
target._x = -10000;
angle = angle - (Math.PI/2);
fuel = fuelLeft;
accel = speed;
fuelBurnRate = fuelBurn;
c0 = new org.cove.flade.primitives.CircleParticle(initX, initY, 15);
c1 = new org.cove.flade.primitives.CircleParticle(initX + (200 * Math.cos(angle)), initY + (200 * Math.sin(angle)), 15);
s0 = new org.cove.flade.constraints.SpringConstraint(c0, c1, false);
c0.prev.x = c0.curr.x - (vX * speed);
c0.prev.y = c0.curr.y + (vY * speed);
switch (type) {
case "left" :
angle = angle + Math.PI;
var _local8 = Math.sin(angle);
var _local7 = -Math.cos(angle);
c1.prev.x = c1.prev.x - (_local8 * 2);
c1.prev.y = c1.prev.y - (_local7 * 2);
break;
case "right" :
_local8 = Math.sin(angle);
_local7 = -Math.cos(angle);
c1.prev.x = c1.prev.x - (_local8 * 2);
c1.prev.y = c1.prev.y - (_local7 * 2);
}
com.playerthree.game.platform.World.physics.addPrimitive(c0);
com.playerthree.game.platform.World.physics.addPrimitive(c1);
com.playerthree.game.platform.World.physics.addConstraint(s0);
}
function update() {
if (fuel > 0) {
angle = com.playerthree.utils.Trig.getAngle(c0.curr.x, c0.curr.y, c1.curr.x, c1.curr.y) - (Math.PI/2);
vX = Math.sin(angle);
vY = -Math.cos(angle);
c1.curr.y = c1.curr.y + (vY * accel);
c1.curr.x = c1.curr.x + (vX * accel);
fuel = fuel - fuelBurnRate;
}
actualSpeed = Math.sqrt((c0.getYVel() * c0.getYVel()) + (c0.getXVel() * c0.getXVel()));
myX = c0.curr.x;
myY = c0.curr.y;
target._rotation = (com.playerthree.utils.Trig.getAngle(c0.curr.x, c0.curr.y, c1.curr.x, c1.curr.y) * com.playerthree.utils.Trig.RADDEG) - 90;
super.render();
}
function getFuel() {
return(fuel);
}
function getRender() {
return(renderOn);
}
function getSpeed() {
return(actualSpeed);
}
function destroy() {
com.playerthree.game.platform.World.physics.removePrimitive(c0);
com.playerthree.game.platform.World.physics.removePrimitive(c1);
com.playerthree.game.platform.World.physics.removeConstraint(s0);
target.removeMovieClip();
}
}
Symbol 715 MovieClip [__Packages.Glider] Frame 0
class Glider extends com.playerthree.game.platform.entities.StaticEntity
{
var state, w1, w2, c0, s0, s1, s2, angle, hitGround, maxPower, target, actualSpeed, myX, myY, height, power, render;
function Glider (mc, initX, initY, p1, p2, p3, pAngle) {
super(mc, initX, initY);
state = "fine";
w1 = new org.cove.flade.primitives.Wheel(p1.curr.x, p1.curr.y, 15);
w2 = new org.cove.flade.primitives.Wheel(p3.curr.x, p3.curr.y, 15);
c0 = new org.cove.flade.primitives.CircleParticle(p2.curr.x, p2.curr.y, 15);
s0 = new org.cove.flade.constraints.SpringConstraint(w1, w2, true);
s1 = new org.cove.flade.constraints.SpringConstraint(w2, c0, true);
s2 = new org.cove.flade.constraints.SpringConstraint(c0, w1, true);
com.playerthree.game.platform.World.physics.addPrimitive(w1);
com.playerthree.game.platform.World.physics.addPrimitive(w2);
com.playerthree.game.platform.World.physics.addPrimitive(c0);
w1.id = 16;
w2.id = 17;
c0.id = 18;
com.playerthree.game.platform.World.physics.addConstraint(s0);
com.playerthree.game.platform.World.physics.addConstraint(s1);
com.playerthree.game.platform.World.physics.addConstraint(s2);
w1.prev.x = p1.prev.x;
w1.prev.y = p1.prev.y;
c0.prev.x = p2.prev.x;
c0.prev.y = p2.prev.y;
w2.prev.x = p3.prev.x;
w2.prev.y = p3.prev.y;
angle = pAngle;
thrust = 0.65;
hitGround = false;
maxPower = 300;
target._xscale = -140;
target._yscale = 140;
}
function update() {
if (state == "fine") {
angle = com.playerthree.utils.Trig.getAngle(w1.curr.x, w1.curr.y, c0.curr.x, c0.curr.y) - Math.PI;
var _local5 = (72 + Math.round((180 + target._rotation) / 2.5)) % 144;
target.gotoAndStop(_local5);
actualSpeed = Math.sqrt((c0.getYVel() * c0.getYVel()) + (c0.getXVel() * c0.getXVel()));
xSpeed = Math.sin(angle);
ySpeed = -Math.cos(angle);
if (!hitGround) {
thrust = thrust + (ySpeed / 1010);
lift = lift - ((ySpeed / 1010) * thrust);
var _local3 = thrust * xSpeed;
var _local2 = lift;
w2.curr.x = w2.curr.x + _local3;
w2.curr.y = w2.curr.y - _local2;
w1.curr.x = w1.curr.x + _local3;
w1.curr.y = w1.curr.y - _local2;
c0.curr.x = c0.curr.x + _local3;
c0.curr.y = c0.curr.y - _local2;
}
if (((w2.curr.y > -100) || (w1.curr.y > -100)) || (c0.curr.y > -100)) {
hitGround = true;
com.playerthree.game.platform.World.physics.setGravity(0, 0.7082);
}
if (hitGround && (actualSpeed < 0.5)) {
Globals.endGame.show(Globals.main.maxHeight);
state = "landed";
}
target._rotation = angle * com.playerthree.utils.Trig.RADDEG;
var _local6 = flash.geom.Point.interpolate(new flash.geom.Point(w1.curr.x, w1.curr.y), new flash.geom.Point(c0.curr.x, c0.curr.y), 0.5);
var _local4 = flash.geom.Point.interpolate(_local6, new flash.geom.Point(w2.curr.x, w2.curr.y), 0.5);
myX = _local4.x;
myY = _local4.y;
height = (-(myY - 100)) / 10;
power = Math.sqrt((c0.getXVel() * c0.getXVel()) + (c0.getYVel() * c0.getYVel()));
render();
}
}
function destroy() {
com.playerthree.game.platform.World.physics.removePrimitive(w1);
com.playerthree.game.platform.World.physics.removePrimitive(w2);
com.playerthree.game.platform.World.physics.removePrimitive(c0);
com.playerthree.game.platform.World.physics.removeConstraint(s0);
com.playerthree.game.platform.World.physics.removeConstraint(s1);
com.playerthree.game.platform.World.physics.removeConstraint(s2);
target.removeMovieClip();
}
function explode() {
com.playerthree.game.SoundManager.go().oneShot("explosion.wav", 1);
state = "exploded";
Globals.endGame.show(Globals.main.maxHeight);
target._visible = false;
}
function changeAngle(dir) {
var _local6 = Math.sin(angle - (Math.PI/2));
var _local5 = -Math.cos(angle - (Math.PI/2));
var _local4 = Math.sin(angle + (Math.PI/2));
var _local3 = -Math.cos(angle + (Math.PI/2));
w2.curr.x = w2.curr.x + ((_local6 * dir) * (power / maxPower));
w2.curr.y = w2.curr.y + ((_local5 * dir) * (power / maxPower));
w1.curr.x = w1.curr.x + ((_local4 * dir) * (power / maxPower));
w1.curr.y = w1.curr.y + ((_local3 * dir) * (power / maxPower));
c0.curr.x = c0.curr.x + ((_local4 * dir) * (power / maxPower));
c0.curr.y = c0.curr.y + ((_local3 * dir) * (power / maxPower));
}
function getHeight() {
return(height - 29.42);
}
function getSpeed() {
return(actualSpeed);
}
function getAngle() {
return(angle);
}
var xSpeed = 1;
var ySpeed = 0;
var stall = false;
var response = 2;
var engineSpeed = 1.1;
var dead = false;
var hitState = "none";
var thrustDone = false;
var onFire = false;
var lift = 0;
var thrust = 0;
var weight = 0.5;
var drag = 0;
}
Symbol 716 MovieClip [__Packages.org.cove.flade.primitives.Wheel] Frame 0
class org.cove.flade.primitives.Wheel extends org.cove.flade.primitives.CircleParticle
{
var rp, coeffSlip, isVisible, curr, dmc, radius, prev;
function Wheel (x, y, r) {
super(x, y, r);
rp = new org.cove.flade.primitives.RimParticle(r, 2);
coeffSlip = 0;
}
function verlet(sysObj) {
rp.verlet(sysObj);
super.verlet(sysObj);
}
function resolveCollision(normal, sysObj) {
super.resolveCollision(normal, sysObj);
resolve(normal);
}
function paint() {
if (isVisible) {
var _local3 = curr.x;
var _local2 = curr.y;
var _local5 = rp.curr.x;
var _local4 = rp.curr.y;
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintCircle(dmc, _local3, _local2, radius);
dmc.lineStyle(0, 10066329, 100);
org.cove.flade.graphics.Graphics.paintLine(dmc, _local5 + _local3, _local4 + _local2, _local3, _local2);
org.cove.flade.graphics.Graphics.paintLine(dmc, (-_local5) + _local3, (-_local4) + _local2, _local3, _local2);
org.cove.flade.graphics.Graphics.paintLine(dmc, (-_local4) + _local3, _local5 + _local2, _local3, _local2);
org.cove.flade.graphics.Graphics.paintLine(dmc, _local4 + _local3, (-_local5) + _local2, _local3, _local2);
}
}
function setTraction(t) {
coeffSlip = t;
}
function resolve(n) {
var _local3 = -rp.curr.y;
var _local2 = rp.curr.x;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 / _local4;
_local2 = _local2 / _local4;
var _local13 = _local3 * rp.speed;
var _local11 = _local2 * rp.speed;
var _local12 = curr.x - prev.x;
var _local10 = curr.y - prev.y;
var _local9 = _local12 + _local13;
var _local8 = _local10 + _local11;
var _local6 = ((-n.y) * _local9) + (n.x * _local8);
rp.prev.x = rp.curr.x - (_local6 * _local3);
rp.prev.y = rp.curr.y - (_local6 * _local2);
var _local7 = 1 - coeffSlip;
curr.x = curr.x + ((_local7 * rp.speed) * (-n.y));
curr.y = curr.y + ((_local7 * rp.speed) * n.x);
rp.speed = rp.speed * coeffSlip;
}
}
Symbol 717 MovieClip [__Packages.org.cove.flade.primitives.RimParticle] Frame 0
class org.cove.flade.primitives.RimParticle
{
var curr, prev, vs, speed, maxTorque, wr;
function RimParticle (r, mt) {
curr = new org.cove.flade.util.Vector(r, 0);
prev = new org.cove.flade.util.Vector(0, 0);
vs = 0;
speed = 0;
maxTorque = mt;
wr = r;
}
function verlet(sysObj) {
speed = Math.max(-maxTorque, Math.min(maxTorque, speed + vs));
var _local3 = -curr.y;
var _local2 = curr.x;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 / _local4;
_local2 = _local2 / _local4;
curr.x = curr.x + (speed * _local3);
curr.y = curr.y + (speed * _local2);
var _local10 = prev.x;
var _local9 = prev.y;
var _local8 = (prev.x = curr.x);
var _local7 = (prev.y = curr.y);
curr.x = curr.x + (sysObj.coeffDamp * (_local8 - _local10));
curr.y = curr.y + (sysObj.coeffDamp * (_local7 - _local9));
var _local6 = Math.sqrt((curr.x * curr.x) + (curr.y * curr.y));
var _local5 = (_local6 - wr) / _local6;
curr.x = curr.x - (curr.x * _local5);
curr.y = curr.y - (curr.y * _local5);
}
}
Symbol 718 MovieClip [__Packages.Modes] Frame 0
class Modes
{
function Modes () {
}
static var PAUSED = "paused";
static var COUNTDOWN = "countdown";
static var FLIGHT = "flight";
static var EXPLODE = "explosion";
static var GLIDE = "glide";
static var FINISHED = "finish";
}
Symbol 719 MovieClip [__Packages.com.robertpenner.easing.Expo] Frame 0
class com.robertpenner.easing.Expo
{
function Expo () {
}
static function easeIn(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOut(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOut(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
}
Symbol 720 MovieClip [__Packages.Debris] Frame 0
class Debris
{
var target, rotation, scale, particle, renderOn;
function Debris (mc, startX, startY, force) {
target = mc;
rotation = Math.random() * 20;
scale = (target._yscale = (Math.random() * 80) + 50);
particle = new org.cove.flade.primitives.CircleParticle(startX, startY, Math.random() * 20);
particle.curr.x = startX;
particle.curr.y = startY;
particle.prev.x = startX + (((-force) / 2) + (Math.random() * force));
particle.prev.y = startY + (((-force) / 2) + (Math.random() * force));
com.playerthree.game.platform.World.physics.addPrimitive(particle);
}
function render() {
if ((((particle.curr.x >= com.playerthree.game.platform.Camera.x) && (particle.curr.x <= com.playerthree.game.platform.Camera.farX)) && ((-particle.curr.y) >= com.playerthree.game.platform.Camera.y)) && ((-particle.curr.y) <= com.playerthree.game.platform.Camera.farY)) {
renderOn = true;
} else {
renderOn = false;
}
target._x = particle.curr.x - com.playerthree.game.platform.Camera.x;
target._y = particle.curr.y + com.playerthree.game.platform.Camera.y;
target._xscale = (target._yscale = scale);
target._rotation = target._rotation + rotation;
if ((particle.getXVel() <= 0.001) && (particle.getYVel() <= 0.001)) {
destroy();
destroyMe = true;
}
}
function destroy() {
com.playerthree.game.platform.World.physics.removePrimitive(particle);
target.removeMovieClip();
}
function getX() {
return(particle.curr.x);
}
function getY() {
return(particle.curr.y);
}
var destroyMe = false;
}
Symbol 721 MovieClip [__Packages.com.robertpenner.easing.Quad] Frame 0
class com.robertpenner.easing.Quad
{
function Quad () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
}
Symbol 722 MovieClip [__Packages.com.playerthree.game.CursorKeys] Frame 0
class com.playerthree.game.CursorKeys
{
function CursorKeys () {
}
static function check(skipCheck) {
var _local1 = 0;
if (kD(37) || (kD(65))) {
_local1 = _local1 + 1;
}
if (kD(39) || (kD(68))) {
_local1 = _local1 + 2;
}
if (kD(40) || (kD(83))) {
_local1 = _local1 + 4;
}
if (kD(38) || (kD(87))) {
_local1 = _local1 + 8;
}
if (kD(32)) {
_local1 = _local1 + 16;
}
if (kD(17)) {
_local1 = _local1 + 32;
}
if (kD(16)) {
_local1 = _local1 + 64;
}
if (kD(49)) {
_local1 = _local1 + 128;
}
if (kD(50)) {
_local1 = _local1 + 256;
}
if (kD(51)) {
_local1 = _local1 + 512;
}
if (kD(52)) {
_local1 = _local1 + 1024;
}
if (kD(53)) {
_local1 = _local1 + 2048;
}
if (kD(80)) {
_local1 = _local1 + 4096;
}
if (skipCheck != true) {
if ((_local1 & 1) && (_local1 & 2)) {
_local1 = _local1 - 3;
}
if ((_local1 & 4) && (_local1 & 8)) {
_local1 = _local1 - 12;
}
}
return(_local1);
}
static var LEFT = 1;
static var RIGHT = 2;
static var DOWN = 4;
static var UP = 8;
static var SPACE = 16;
static var CTRL = 32;
static var SHIFT = 64;
static var NUM1 = 128;
static var NUM2 = 256;
static var NUM3 = 512;
static var NUM4 = 1024;
static var NUM5 = 2048;
static var P = 4096;
static var kD = Key.isDown;
}
Symbol 723 MovieClip [__Packages.Blackout] Frame 0
class Blackout extends MovieClip
{
var _alpha, _visible, func;
function Blackout () {
super();
_alpha = 0;
}
function fadeOut() {
state = "fadeOut";
_alpha = 0;
_visible = true;
}
function fadeIn() {
_alpha = 100;
state = "fadeIn";
}
function assocFunc(f) {
func = f;
}
function setSpeed(n) {
speed = n;
}
function onEnterFrame() {
if (state == "fadeOut") {
_alpha = _alpha + speed;
if (_alpha > 100) {
_alpha = 100;
state = "out";
if (func != null) {
func();
func = null;
}
}
}
if (state == "fadeIn") {
_alpha = _alpha - speed;
if (_alpha < 0) {
_alpha = 0;
state = "in";
_visible = false;
if (func != null) {
func();
func = null;
}
}
}
}
var state = "out";
var speed = 5;
}
Symbol 724 MovieClip [__Packages.SendToFriend] Frame 0
class SendToFriend extends MovieClip
{
var gotoAndStop, _visible, send_btn, cancel_btn, email1_txt, email2_txt, e1Back_mc, e2Back_mc, _parent, error_txt, play;
function SendToFriend () {
super();
gotoAndStop(1);
_visible = false;
}
function init() {
send_btn.enabled = true;
cancel_btn.enabled = true;
send_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, sendMail);
cancel_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, cancel);
cancel_btn.onRollOver = (send_btn.onRollOver = rollOver);
cancel_btn.onRollOut = (send_btn.onRollOut = rollOut);
email1_txt.onSetFocus = com.playerthree.utils.EventDelegate.create(this, hilight1);
email2_txt.onSetFocus = com.playerthree.utils.EventDelegate.create(this, hilight2);
}
function hilight1() {
e1Back_mc._alpha = 60;
e2Back_mc._alpha = 37;
}
function hilight2() {
e1Back_mc._alpha = 37;
e2Back_mc._alpha = 60;
}
function rollOut() {
gotoAndStop(1);
}
function rollOver() {
com.playerthree.game.SoundManager.go().oneShot("rollover_switch.aif", 1, 0, true);
gotoAndStop(2);
}
function cancel() {
com.playerthree.game.SoundManager.go().oneShot("press_switch.aif", 1, 0, true);
_parent.menu_mc.enableButtons();
_visible = false;
}
function show() {
_visible = true;
error_txt.text = "";
email1_txt.text = "";
email2_txt.text = "";
gotoAndStop(1);
}
function sendMail() {
com.playerthree.game.SoundManager.go().oneShot("press_switch.aif", 1, 0, true);
if (validate(email1_txt.text) && (validate(email2_txt.text))) {
var _local3 = new Date();
var _local4 = String(Date.UTC(_local3.getFullYear(), _local3.getMonth(), _local3.getDate(), _local3.getHours(), _local3.getMinutes(), _local3.getSeconds()));
var _local7 = email1_txt.text + _local4;
var _local5 = new com.playerthree.crypto.MD5();
var _local6 = _local5.hash(_local7);
var _local2 = new LoadVars();
_local2.onLoad = com.playerthree.utils.EventDelegate.create(this, successful);
_local2.e = email1_txt.text;
_local2.e2 = email2_txt.text;
_local2.t = _local4;
_local2.h = _local6;
error_txt.text = "Please Wait... Sending Email";
send_btn.enabled = false;
cancel_btn.enabled = false;
send_btn._alpha = 50;
cancel_btn._alpha = 50;
_local2.sendAndLoad(gateway, _local2);
} else {
error_txt.text = "Please enter valid E-mail address";
}
}
function successful() {
play();
}
function validate(emailInput) {
if ((((((((((emailInput.length < 6) || (emailInput.indexOf(",") >= 0)) || (emailInput.indexOf(";") >= 0)) || (emailInput.indexOf(":") >= 0)) || (emailInput.indexOf("/") >= 0)) || (emailInput.indexOf(" ") >= 0)) || (emailInput.indexOf("@") <= 0)) || (emailInput.indexOf("@") != emailInput.lastIndexOf("@"))) || (emailInput.lastIndexOf(".") < emailInput.indexOf("@"))) || ((emailInput.lastIndexOf(".") + 3) > emailInput.length)) {
return(false);
}
return(true);
}
var gateway = "http://bbc.threeserve.com/refer.php";
}
Symbol 725 MovieClip [__Packages.com.playerthree.crypto.MD5] Frame 0
class com.playerthree.crypto.MD5
{
function MD5 (b64pad, chrsz) {
if (b64pad != undefined) {
this.b64pad = b64pad;
}
if (((chrsz != undefined) && (chrsz == 8)) || (chrsz == 16)) {
this.chrsz = chrsz;
}
}
function hash(s) {
return(hex_md5(s));
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local5 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local3 = -1732584194;
var _local2 = 271733878 /* 0x10325476 */;
var _local6 = 0;
while (_local6 < x.length) {
var _local11 = _local5;
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 0], 7, -680876936);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 1], 12, -389564586);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 2], 17, 606105819);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 3], 22, -1044525330);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 4], 7, -176418897);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 5], 12, 1200080426);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 6], 17, -1473231341);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 7], 22, -45705983);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 8], 7, 1770035416);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 9], 12, -1958414417);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 10], 17, -42063);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 11], 22, -1990404162);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 12], 7, 1804603682);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 13], 12, -40341101);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 14], 17, -1502002290);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 15], 22, 1236535329);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 1], 5, -165796510);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 6], 9, -1069501632);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 11], 14, 643717713);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 0], 20, -373897302);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 5], 5, -701558691);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 10], 9, 38016083);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 15], 14, -660478335);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 4], 20, -405537848);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 9], 5, 568446438);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 14], 9, -1019803690);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 3], 14, -187363961);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 8], 20, 1163531501);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 13], 5, -1444681467);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 2], 9, -51403784);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 7], 14, 1735328473);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 12], 20, -1926607734);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 5], 4, -378558);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 8], 11, -2022574463);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 11], 16, 1839030562);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 14], 23, -35309556);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 1], 4, -1530992060);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 4], 11, 1272893353);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 7], 16, -155497632);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 10], 23, -1094730640);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 13], 4, 681279174);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 0], 11, -358537222);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 3], 16, -722521979);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 6], 23, 76029189);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 9], 4, -640364487);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 12], 11, -421815835);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 15], 16, 530742520);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 2], 23, -995338651);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 0], 6, -198630844);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 7], 10, 1126891415);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 14], 15, -1416354905);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 5], 21, -57434055);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 12], 6, 1700485571);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 3], 10, -1894986606);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 10], 15, -1051523);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 1], 21, -2054922799);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 8], 6, 1873313359);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 15], 10, -30611744);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 6], 15, -1560198380);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 13], 21, 1309151649);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 4], 6, -145523070);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 11], 10, -1120210379);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 2], 15, 718787259);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 9], 21, -343485551);
_local5 = safe_add(_local5, _local11);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local6 = _local6 + 16;
}
return(new Array(_local5, _local4, _local3, _local2));
}
function core_hmac_md5(key, data) {
var _local3 = new Array(str2binl(key));
if (_local3.length > 16) {
_local3 = core_md5(_local3, key.length * chrsz);
}
var _local4 = new Array(16);
var _local5 = new Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local4[_local2] = _local3[_local2] ^ 909522486;
_local5[_local2] = _local3[_local2] ^ 1549556828;
_local2++;
}
var _local6 = new Array(core_md5(_local4.concat(str2binl(data)), 512 + (data.length * chrsz)));
return(core_md5(_local5.concat(_local6), 640));
}
function safe_add(x, y) {
var _local1 = new Number((x & 65535) + (y & 65535));
var _local2 = new Number(((x >> 16) + (y >> 16)) + (_local1 >> 16));
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local4 = new Array();
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (str.length * chrsz)) {
_local4[_local2 >> 5] = _local4[_local2 >> 5] | ((str.charCodeAt(_local2 / chrsz) & _local5) << (_local2 % 32));
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2str(bin) {
var _local4 = new String("");
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (bin.length * 32)) {
_local4 = _local4 + String.fromCharCode((bin[_local2 >> 5] >>> (_local2 % 32)) & _local5);
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2hex(binarray) {
var _local3 = "0123456789abcdef";
var _local4 = new String("");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
function binl2b64(binarray) {
var _local7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local5 = new String("");
var _local3 = 0;
while (_local3 < (binarray.length * 4)) {
var _local6 = ((((binarray[_local3 >> 2] >> (8 * (_local3 % 4))) & 255) << 16) | (((binarray[(_local3 + 1) >> 2] >> (8 * ((_local3 + 1) % 4))) & 255) << 8)) | ((binarray[(_local3 + 2) >> 2] >> (8 * ((_local3 + 2) % 4))) & 255);
var _local2 = 0;
while (_local2 < 4) {
if (((_local3 * 8) + (_local2 * 6)) > (binarray.length * 32)) {
_local5 = _local5 + b64pad;
} else {
_local5 = _local5 + _local7.charAt((_local6 >> (6 * (3 - _local2))) & 63);
}
_local2++;
}
_local3 = _local3 + 3;
}
return(_local5);
}
var b64pad = new String("");
var chrsz = new Number(8);
}
Symbol 726 MovieClip [__Packages.SubmitScore] Frame 0
class SubmitScore extends MovieClip
{
var _visible, service, submit_btn, close_btn, gotoAndStop, _currentframe, nextFrame, pName, name_txt, pEmail, email_txt, score, error_txt, h1, h2, h3, h4, h5, h6, t1_txt;
function SubmitScore () {
super();
mx.remoting.debug.NetDebug.initialize();
_visible = false;
service = new mx.remoting.Service(gatewayUrl, null, "HighScores");
init();
}
function init() {
submit_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, submitClick);
close_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, restart);
submit_btn.onRollOver = (close_btn.onRollOver = rollOver);
submit_btn.onRollOut = (close_btn.onRollOut = (close_btn.onReleaseOutside = (submit_btn.onReleaseOutside = rollOut)));
}
function rollOut() {
gotoAndStop(1);
}
function rollOver() {
gotoAndStop(2);
com.playerthree.game.SoundManager.go().oneShot("rollover_switch.aif", 1, 0, true);
}
function submitClick() {
com.playerthree.game.SoundManager.go().oneShot("press_switch.aif", 1, 0, true);
switch (_currentframe) {
case 1 :
nextFrame();
break;
case 2 :
if (validateFields()) {
pName = name_txt.text;
pEmail = email_txt.text;
screwString(pName, pEmail, score);
disableButtons();
Globals.gameButtons = false;
nextFrame();
} else {
error_txt.text = "Please provide correct details";
}
}
}
function disableButtons() {
submit_btn.enabled = false;
close_btn.enabled = false;
submit_btn._alpha = 50;
close_btn._alpha = 50;
}
function enableButtons() {
submit_btn.enabled = true;
close_btn.enabled = true;
submit_btn._alpha = 100;
close_btn._alpha = 100;
}
function restart() {
Globals.main.reset();
}
function validateFields() {
var _local2 = email_txt.text;
var _local3 = name_txt.text;
if ((_local3.length < 2) || (_local3.length > 100)) {
return(false);
}
if ((((((((((_local2.length < 6) || (_local2.indexOf(",") >= 0)) || (_local2.indexOf(";") >= 0)) || (_local2.indexOf(":") >= 0)) || (_local2.indexOf("/") >= 0)) || (_local2.indexOf(" ") >= 0)) || (_local2.indexOf("@") <= 0)) || (_local2.indexOf("@") != _local2.lastIndexOf("@"))) || (_local2.lastIndexOf(".") < _local2.indexOf("@"))) || ((_local2.lastIndexOf(".") + 3) > _local2.length)) {
return(false);
}
return(true);
}
function show(s) {
score = s;
gotoAndStop(1);
h1.text = "0";
h2.text = "0";
h3.text = "0";
h4.text = "0";
h5.text = "0";
h6.text = "0";
if (Main.safeLanding) {
t1_txt.text = "Your total altitude + landing bonus is";
var _local5 = score / 100;
score = score + _local5;
} else {
t1_txt.text = "Your total altitude is";
}
var _local6 = String(Number(toFixed(2, score) * 100));
var _local4 = _local6.split("");
var _local3 = 6;
while (_local4.length > 0) {
var _local2 = String(_local4.pop());
this["h" + _local3].text = _local2;
_local3--;
}
init();
_visible = true;
}
function hide() {
_visible = false;
}
function toFixed(dp, num) {
var _local2 = 1;
var _local1 = 0;
while (_local1 < dp) {
_local2 = _local2 * 0.1;
_local1++;
}
return(num - (num % _local2));
}
function screwString(name, email, score) {
var _local2 = service.screwString(name, email, score);
_local2.__set__responder(new mx.rpc.RelayResponder(this, "handleScrewString", "handleRemotingError"));
}
function setScore(name, email, score, screw) {
var _local2 = service.setScore(name, email, score, screw);
_local2.__set__responder(new mx.rpc.RelayResponder(this, "handleSetScore", "handleRemotingError"));
}
function handleScrewString(re) {
setScore(pName, pEmail, score, re.__get__result());
}
function handleSetScore(re) {
trace("your id : " + re.__get__result());
Globals.gameButtons = true;
Globals.yourId = Number(re.__get__result());
Globals.endGame.hide();
Globals.highscores.show();
}
function handleRemotingError(fault) {
mx.remoting.debug.NetDebug.trace({level:"None", message:"Error: " + fault.__get__fault().__get__faultstring()});
}
var gatewayUrl = "http://bbc.threeserve.com/flashservices/gateway.php";
}
Symbol 59 MovieClip [__Packages.mx.remoting.Service] Frame 0
class mx.remoting.Service extends Object
{
var log, __conn, __serviceName, __responder;
function Service (gatewayURI, logger, serviceName, conn, resp) {
super();
log = logger;
log.logInfo("Creating Service for " + serviceName, mx.services.Log.VERBOSE);
if ((gatewayURI == "") && (conn == null)) {
gatewayURI = mx.remoting.NetServices.gatewayUrl;
}
gatewayURI = mx.remoting.NetServices.getHttpUrl(gatewayURI);
if (conn == null) {
conn = mx.remoting.NetServices.getConnection(gatewayURI);
if (conn == null) {
log.logInfo("Creating gateway connection for " + gatewayURI, mx.services.Log.VERBOSE);
conn = mx.remoting.NetServices.createGatewayConnection(gatewayURI, logger);
}
}
__conn = conn;
conn.updateConfig();
_allowRes = true;
__serviceName = serviceName;
__responder = resp;
log.logInfo("Successfully created Service", mx.services.Log.VERBOSE);
}
function get connection() {
return(__conn);
}
function __resolve(methodName) {
if (_allowRes) {
var _local2 = __makeOpFunc(methodName);
this[methodName] = _local2;
return(_local2);
}
return(null);
}
function __makeOpFunc(name) {
var op = (new mx.remoting.Operation(name, this));
var _local3 = function () {
op.invoke(arguments);
return(op.send());
};
_local3.send = function () {
return(op.createThenSend());
};
_local3.setResponder = function (resp) {
op.responder = resp;
};
_local3.getRequest = function () {
return(op.request);
};
_local3.setRequest = function (val) {
op.request = val;
};
_local3.addProperty("request", _local3.getRequest, _local3.setRequest);
_local3.operation = op;
return(_local3);
}
function get name() {
return(__serviceName);
}
function get responder() {
return(__responder);
}
static var version = "1.2.0.124";
var _allowRes = false;
}
Symbol 8 MovieClip [__Packages.mx.services.Log] Frame 0
class mx.services.Log
{
var level, name;
function Log (logLevel, name) {
level = ((logLevel == undefined) ? (BRIEF) : (logLevel));
this.name = ((name == undefined) ? "" : (name));
}
function logInfo(msg, level) {
if (level == undefined) {
level = BRIEF;
}
if (level <= this.level) {
if (level == DEBUG) {
onLog((((getDateString() + " [DEBUG] ") + name) + ": ") + msg);
} else {
onLog((((getDateString() + " [INFO] ") + name) + ": ") + msg);
}
}
}
function logDebug(msg) {
logInfo(msg, DEBUG);
}
function getDateString() {
var _local1 = new Date();
return(((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()) + ":") + _local1.getSeconds());
}
function onLog(message) {
trace(message);
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
}
Symbol 9 MovieClip [__Packages.mx.remoting.Connection] Frame 0
class mx.remoting.Connection extends NetConnection
{
var uri, __urlSuffix, __originalUrl;
function Connection () {
super();
}
function getService(serviceName, client) {
var _local2 = new mx.remoting.NetServiceProxy(this, serviceName, client);
return(_local2);
}
function setCredentials(userId, password) {
addHeader("Credentials", false, {userid:userId, password:password});
}
function clone() {
var _local2 = new mx.remoting.Connection();
_local2.connect(uri);
return(_local2);
}
function getDebugId() {
return(null);
}
function getDebugConfig() {
return(null);
}
function setDebugId(id) {
}
function updateConfig() {
}
function call() {
super.call.apply(super, arguments);
}
function close() {
super.close();
}
function connect(url) {
return(super.connect(url));
}
function addHeader(name, mustUnderstand, obj) {
super.addHeader(name, mustUnderstand, obj);
}
function trace(traceObj) {
}
function AppendToGatewayUrl(urlSuffix) {
__urlSuffix = urlSuffix;
if (__originalUrl == null) {
__originalUrl = uri;
}
var _local2 = __originalUrl + urlSuffix;
connect(_local2);
}
function ReplaceGatewayUrl(newUrl) {
connect(newUrl);
}
function RequestPersistentHeader(info) {
addHeader(info.name, info.mustUnderstand, info.data);
}
static var version = "1.2.0.124";
}
Symbol 15 MovieClip [__Packages.mx.remoting.NetServiceProxy] Frame 0
class mx.remoting.NetServiceProxy extends Object
{
var nc, serviceName, client;
function NetServiceProxy (netC, servName, cli) {
super();
if (netC != null) {
nc = netC;
serviceName = servName;
client = cli;
}
_allowRes = true;
}
function _setParentService(service) {
nc = service.nc;
client = service.client;
}
function __resolve(methodName) {
if (_allowRes) {
var _local3 = function () {
if (this.client != null) {
arguments.unshift(new mx.remoting.NetServiceProxyResponder(this, methodName));
} else if (typeof(arguments[0].onResult) != "function") {
mx.remoting.NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, and no responder was given in call to " + methodName);
arguments.unshift(new mx.remoting.NetServiceProxyResponder(this, methodName));
}
if (typeof(this.serviceName) == "function") {
this.serviceName = this.servicename;
}
arguments.unshift((this.serviceName + ".") + methodName);
return(this.nc.call.apply(this.nc, arguments));
};
return(_local3);
}
return(null);
}
static function registerNetServiceProxy() {
Object.registerClass("NetServiceProxy", mx.remoting.NetServiceProxy);
return(true);
}
static var init = registerNetServiceProxy();
var _allowRes = false;
}
Symbol 21 MovieClip [__Packages.mx.remoting.NetServiceProxyResponder] Frame 0
class mx.remoting.NetServiceProxyResponder extends Object
{
var service, methodName;
function NetServiceProxyResponder (serv, method) {
super();
service = serv;
methodName = method;
}
function onResult(result) {
var _local2 = service.client;
if ((result instanceof mx.remoting.NetServiceProxy) || (result instanceof mx.remoting.RecordSet)) {
result._setParentService(service);
}
var _local4 = methodName + "_Result";
if (typeof(_local2[_local4]) == "function") {
_local2[_local4].apply(_local2, [result]);
} else if (typeof(_local2.onResult) == "function") {
_local2.onResult(result);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 1, (_local4 + " was received from server: ") + result);
}
}
function onStatus(result) {
var _local4 = service.client;
var _local6 = methodName + "_Status";
if (typeof(_local4[_local6]) == "function") {
_local4[_local6].apply(_local4, [result]);
} else if (typeof(_local4.onStatus) == "function") {
_local4.onStatus(result);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(result);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(result);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 2, (((_local6 + " was received from server: <") + result.level) + "> ") + result.description);
}
}
}
Symbol 12 MovieClip [__Packages.mx.data.PageableData] Frame 0
interface mx.data.PageableData
{
}
Symbol 11 MovieClip [__Packages.mx.data.DataRange] Frame 0
interface mx.data.DataRange
{
}
Symbol 13 MovieClip [__Packages.mx.data.PageableList] Frame 0
interface mx.data.PageableList extends mx.data.PageableData
{
}
Symbol 17 MovieClip [__Packages.mx.remoting.RecordSet] Frame 0
class mx.remoting.RecordSet extends Object implements mx.data.PageableList
{
var _items, uniqueID, mTitles, serverInfo, serverinfo, mRecordsAvailable, mRecordSetID, serviceName, mTotalCount, mDeliveryMode, mAllNotified, mOutstandingRecordCount, dispatchEvent, mPageSize, mNumPrefetchPages, mRecordSetService, gateway_conn, logger, mDataFetcher;
function RecordSet (columnNames) {
super();
mx.events.EventDispatcher.initialize(this);
_items = new Array();
uniqueID = 0;
if (mTitles != null) {
return;
}
if (serverInfo == null) {
if (serverinfo != null) {
serverInfo = serverinfo;
}
}
if (serverInfo == null) {
mTitles = columnNames;
return;
}
if (serverInfo.version != 1) {
mx.remoting.NetServices.trace("RecordSet", "warning", 100, "Received incompatible RecordSet version from server");
return;
}
mTitles = serverInfo.columnNames;
mRecordsAvailable = 0;
setData(((serverInfo.cursor == null) ? 0 : (serverInfo.cursor - 1)), serverInfo.initialData);
if (serverInfo.initialData.length != serverInfo.totalCount) {
mRecordSetID = serverInfo.id;
if (mRecordSetID != null) {
serviceName = ((serverInfo.serviceName == null) ? "RecordSet" : (serverInfo.serviceName));
mTotalCount = serverInfo.totalCount;
mDeliveryMode = "ondemand";
mAllNotified = false;
mOutstandingRecordCount = 0;
} else {
mx.remoting.NetServices.trace("RecordSet", "warning", 102, "Missing some records, but there's no RecordSet id");
}
}
serverInfo = null;
}
function addItem(item) {
addItemAt(length, item);
}
function addItemAt(index, item) {
var _local3 = true;
if ((index < length) && (index >= 0)) {
items.splice(index, 0, item);
} else if (index == length) {
items[index] = item;
} else {
_local3 = false;
mx.remoting.NetServices.trace("Cannot add an item outside the bounds of the RecordSet");
return(undefined);
}
if (_local3) {
item.__ID__ = uniqueID++;
}
updateViews("addItems", index, index);
}
function addEventListener(event, listener) {
}
function clear() {
if (checkLocal()) {
return(undefined);
}
var _local2 = items.length;
items.splice(0);
uniqueID = 0;
updateViews("removeItems", 0, _local2);
}
function contains(itmToCheck) {
if (isObjectEmpty(itmToCheck)) {
return(false);
}
var _local5;
var _local4;
var _local2 = 0;
while (_local2 < items.length) {
_local5 = items[_local2];
_local4 = true;
for (var _local6 in itmToCheck) {
if (itmToCheck[_local6] != _local5[_local6]) {
_local4 = false;
break;
}
}
if (_local4) {
return(true);
}
_local2++;
}
return(false);
}
function getColumnNames() {
return(mTitles);
}
function get columnNames() {
return(getColumnNames());
}
function getLocalLength() {
return(items.length);
}
function getLength() {
if (mRecordSetID != null) {
return(mTotalCount);
}
return(items.length);
}
function getIterator() {
var _local2 = new mx.remoting.RecordSetIterator(this);
return(_local2);
}
function get length() {
return(getLength());
}
function getItemAt(index) {
if ((index < 0) || (index >= length)) {
return(null);
}
if (mRecordSetID == null) {
return(items[index]);
}
requestRecord(index);
var _local3 = items[index];
if (_local3 == 1) {
return("in progress");
}
return(_local3);
}
function getItemID(index) {
return(items[index].__ID__);
}
function get items() {
return(_items);
}
function initialize(info) {
}
function filter(filterFunction, context) {
if (checkLocal()) {
return(undefined);
}
var _local4 = new mx.remoting.RecordSet(mTitles);
var _local5 = length;
var _local3 = 0;
while (_local3 < _local5) {
var _local2 = getItemAt(_local3);
if (((_local2 != null) && (_local2 != 1)) && (filterFunction(_local2, context))) {
_local4.addItem(_local2);
}
_local3++;
}
return(_local4);
}
function sortItems(compareFunc, optionFlags) {
if (checkLocal()) {
return(undefined);
}
items.sort(compareFunc, optionFlags);
updateViews("sort");
}
function sortItemsBy(fieldNames, order, optionFlags) {
if (checkLocal()) {
return(undefined);
}
if (typeof(order) == "string") {
items.sortOn(fieldNames);
if (order.toUpperCase() == "DESC") {
items.reverse();
}
} else {
items.sortOn(fieldNames, optionFlags);
}
updateViews("sort");
}
function sort(compareFunc) {
if (checkLocal()) {
return(undefined);
}
items.sort(compareFunc);
updateViews("sort");
}
function isEmpty() {
return(items.length == 0);
}
function isLocal() {
return(mRecordSetID == null);
}
function isFullyPopulated() {
return(isLocal());
}
function getRemoteLength() {
if (isLocal()) {
return(mRecordsAvailable);
}
return(mTotalCount);
}
function getNumberAvailable() {
if (isLocal()) {
return(getLength());
}
return(mRecordsAvailable);
}
function replaceItemAt(index, item) {
if ((index >= 0) && (index <= length)) {
var _local3 = getItemID(index);
items[index] = item;
items[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
}
function removeAll() {
clear();
}
function removeItemAt(index) {
var _local3 = _items[index];
_items.splice(index, 1);
var _local5 = [_items[index]];
var _local4 = [getItemID(index)];
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:index, removedItems:_local5, removedIDs:_local4});
return(_local3);
}
function removeEventListener(event, listener) {
}
function requestRange(range) {
var _local2 = range.getStart();
var _local3 = range.getEnd();
return(internalRequestRange(_local2, _local3));
}
function setDeliveryMode(mode, pagesize, numPrefetchPages) {
mDeliveryMode = mode.toLowerCase();
stopFetchAll();
if ((pagesize == null) || (pagesize <= 0)) {
pagesize = 25;
}
switch (mDeliveryMode) {
case "ondemand" :
break;
case "page" :
if (numPrefetchPages == null) {
numPrefetchPages = 0;
}
mPageSize = pagesize;
mNumPrefetchPages = numPrefetchPages;
break;
case "fetchall" :
stopFetchAll();
startFetchAll(pagesize);
break;
default :
mx.remoting.NetServices.trace("RecordSet", "warning", 107, "SetDeliveryMode: unknown mode string");
}
}
function editField(index, fieldName, value) {
changeFieldValue(index, fieldName, value);
}
function getEditingData(index, fieldName) {
return(items[index][fieldName]);
}
function setField(index, fieldName, value) {
changeFieldValue(index, fieldName, value);
}
function changeFieldValue(index, fieldName, value) {
if (checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= getLength())) {
return(undefined);
}
items[index][fieldName] = value;
updateViews("updateItems", index, index);
}
function isObjectEmpty(objToCheck) {
var _local1 = true;
for (var _local3 in objToCheck) {
_local1 = false;
return(_local1);
}
return(_local1);
}
function arrayToObject(anArray) {
if (mTitles == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 105, "getItem: titles are not available");
return(null);
}
var _local4 = new Object();
var _local5 = anArray.length;
var _local3;
var _local2 = 0;
while (_local2 < _local5) {
_local3 = mTitles[_local2];
if (_local3 == null) {
_local3 = ("column" + _local2) + 1;
}
_local4[_local3] = anArray[_local2];
_local2++;
}
return(_local4);
}
function checkLocal() {
if (isLocal()) {
return(false);
}
mx.remoting.NetServices.trace("RecordSet", "warning", 108, "Operation not allowed on partial recordset");
return(true);
}
function getRecordSetService() {
if (mRecordSetService == null) {
if (gateway_conn == null) {
gateway_conn = mx.remoting.NetServices.createGatewayConnection();
} else if (_global.netDebugInstance != undefined) {
gateway_conn = gateway_conn.clone();
}
if (_global.netDebugInstance != undefined) {
gateway_conn.setupRecordSet();
gateway_conn.setDebugId("RecordSet " + mRecordSetID);
}
mRecordSetService = gateway_conn.getService(serviceName, this);
if (mRecordSetService == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 101, "Failed to create RecordSet service");
mRecordSetService = null;
}
}
return(mRecordSetService);
}
function internalRequestRange(index, lastIndex) {
var _local6 = -1;
if (index < 0) {
index = 0;
}
if (lastIndex >= getRemoteLength()) {
lastIndex = getRemoteLength() - 1;
}
var _local3;
var _local4;
while (index <= lastIndex) {
while ((index <= lastIndex) && (items[index] != null)) {
index++;
}
_local3 = index;
while ((index <= lastIndex) && (items[index] == null)) {
mOutstandingRecordCount++;
items[index] = 1;
index++;
}
_local4 = index - 1;
if (_local3 <= _local4) {
logger.logInfo((((" Fetching records from index [" + _local3) + "] to index [") + _local4) + "]");
getRecordSetService().getRecords(mRecordSetID, _local3 + 1, (_local4 - _local3) + 1);
_local6 = _local4;
updateViews("fetchRows", _local3, _local4);
}
}
return(_local6);
}
function removeItems(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = items.splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function getRecords_Result(info) {
setData(info.Cursor - 1, info.Page);
mOutstandingRecordCount = mOutstandingRecordCount - info.Page.length;
updateViews("updateItems", info.Cursor - 1, ((info.Cursor - 1) + info.Page.length) - 1);
if ((mRecordsAvailable == mTotalCount) && (!mAllNotified)) {
updateViews("allRows");
mRecordSetService.release();
mAllNotified = true;
mRecordSetID = null;
mRecordSetService = null;
}
}
function release_Result() {
}
function requestOneRecord(index) {
if (items[index] == null) {
if (mDeliveryMode == "ondemand") {
logger.logInfo((" INFO: Fetching Record [" + index) + "]");
}
getRecordSetService().getRecords(mRecordSetID, index + 1, 1);
mOutstandingRecordCount++;
items[index] = 1;
updateViews("fetchRows", index, index);
}
}
function requestRecord(index) {
if (mDeliveryMode != "page") {
requestOneRecord(index);
} else {
var _local2 = int(index / mPageSize) * mPageSize;
var _local3 = (_local2 + (mPageSize * (mNumPrefetchPages + 1))) - 1;
internalRequestRange(_local2, _local3);
}
}
function _setParentService(service) {
gateway_conn = service.nc;
}
function setData(start, dataArray) {
var _local5 = dataArray.length;
var _local3;
var _local4;
var _local2 = 0;
while (_local2 < _local5) {
_local3 = _local2 + start;
_local4 = items[_local3];
if ((_local4 != null) && (_local4 != 1)) {
mx.remoting.NetServices.trace("RecordSet", "warning", 106, "Already got record # " + _local3);
} else {
mRecordsAvailable = mRecordsAvailable + 1;
}
items[_local3] = arrayToObject(dataArray[_local2]);
items[_local3].__ID__ = uniqueID++;
_local2++;
}
}
function startFetchAll(pagesize) {
if (mDataFetcher != null) {
mDataFetcher.disable();
}
mDataFetcher = new mx.remoting.RsDataFetcher(this, pagesize);
}
function stopFetchAll() {
mDataFetcher.disable();
mDataFetcher = null;
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static function registerRecordSet() {
Object.registerClass("RecordSet", mx.remoting.RecordSet);
return(true);
}
static var version = "1.2.0.124";
static var init = registerRecordSet();
}
Symbol 14 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 10 MovieClip [__Packages.mx.remoting.NetServices] Frame 0
class mx.remoting.NetServices extends Object
{
static var defaultGatewayUrl, logger, traceNetServices;
function NetServices () {
super();
}
static function setDefaultGatewayUrl(url) {
defaultGatewayUrl = url;
}
static function setGatewayUrl(url) {
gatewayUrl = url;
}
static function createGatewayConnection(url, infoLogger) {
logger = infoLogger;
if (url == undefined) {
url = gatewayUrl;
if (url == undefined) {
url = defaultGatewayUrl;
}
}
if (url == undefined) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is undefined");
logger.logInfo(("NetServices: createGatewayConnection - gateway url <" + url) + "> is undefined", mx.services.Log.DEBUG);
return(null);
}
var _local2 = new mx.remoting.Connection();
_local2.connect(url);
__sharedConnections[url] = _local2;
return(_local2);
}
static function getConnection(uri) {
return(__sharedConnections[uri]);
}
static function getHostUrl() {
if (!isHttpUrl(_root._url)) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
var _local2 = _root._url.indexOf("/", 8);
if (_local2 < 0) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
return(_root._url.substring(0, _local2));
}
static function isHttpUrl(url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
}
static function getHttpUrl(url) {
if (!isHttpUrl(url)) {
url = getHostUrl() + url;
}
return(url);
}
static function trace(who, severity, number, message) {
traceNetServices(who, severity, number, message);
}
static var version = "1.2.0.124";
static var gatewayUrl = _root.gatewayUrl;
static var __sharedConnections = new Array();
}
Symbol 16 MovieClip [__Packages.mx.utils.Iterator] Frame 0
interface mx.utils.Iterator
{
}
Symbol 18 MovieClip [__Packages.mx.remoting.RecordSetIterator] Frame 0
class mx.remoting.RecordSetIterator implements mx.utils.Iterator
{
var _recordSet, _cursor;
function RecordSetIterator (rec) {
_recordSet = rec;
_cursor = 0;
}
function hasNext() {
return(_cursor < _recordSet.getLength());
}
function next() {
return(_recordSet.getItemAt(_cursor++));
}
static var version = "1.2.0.124";
}
Symbol 20 MovieClip [__Packages.mx.remoting.RsDataFetcher] Frame 0
class mx.remoting.RsDataFetcher extends Object
{
var mRecordSet, mIncrement, mNextRecord, mEnabled, mHighestRequested;
function RsDataFetcher (pgRS, increment) {
super();
mRecordSet = pgRS;
mRecordSet.addEventListener("modelChanged", this);
mIncrement = increment;
mNextRecord = 0;
mEnabled = true;
doNext();
}
function disable() {
mEnabled = false;
}
function doNext() {
if (mEnabled) {
while (true) {
if (mNextRecord >= mRecordSet.getRemoteLength()) {
return(undefined);
}
var _local2 = new mx.remoting.RsDataRange(mNextRecord, (mNextRecord + mIncrement) - 1);
mHighestRequested = mRecordSet.requestRange(_local2);
mNextRecord = mNextRecord + mIncrement;
if (mHighestRequested > 0) {
return(undefined);
}
}
}
}
function modelChanged(eventObj) {
if (((eventObj.eventName == "updateItems") && (eventObj.firstItem <= mHighestRequested)) && (eventObj.lastItem >= mHighestRequested)) {
doNext();
}
if (eventObj.eventName == "allRows") {
disable();
}
}
}
Symbol 19 MovieClip [__Packages.mx.remoting.RsDataRange] Frame 0
class mx.remoting.RsDataRange extends Object implements mx.data.DataRange
{
var _start, _end;
function RsDataRange (s, e) {
super();
_start = s;
_end = e;
}
function getStart() {
return(_start);
}
function getEnd() {
return(_end);
}
function setEnd(e) {
_end = e;
}
function setStart(s) {
_start = s;
}
}
Symbol 58 MovieClip [__Packages.mx.rpc.Responder] Frame 0
interface mx.rpc.Responder
{
}
Symbol 55 MovieClip [__Packages.mx.rpc.ResultEvent] Frame 0
class mx.rpc.ResultEvent extends Object
{
var __result;
function ResultEvent (res) {
super();
__result = res;
}
function get result() {
return(__result);
}
}
Symbol 57 MovieClip [__Packages.mx.rpc.FaultEvent] Frame 0
class mx.rpc.FaultEvent extends Object
{
var __fault;
function FaultEvent (f) {
super();
__fault = f;
}
function get fault() {
return(__fault);
}
}
Symbol 56 MovieClip [__Packages.mx.rpc.Fault] Frame 0
class mx.rpc.Fault extends Object
{
var __faultcode, __faultstring, __detail, __type, __description;
function Fault (code, msg, detail, type) {
super();
__faultcode = code;
__faultstring = msg;
__detail = detail;
__type = type;
}
function get faultcode() {
return(__faultcode);
}
function get faultstring() {
return(__faultstring);
}
function get detail() {
return(__detail);
}
function get description() {
if (__description == null) {
if (__faultstring.indexOf(":") > -1) {
__description = __faultstring.substring(__faultstring.indexOf(":") + 1);
var _local2 = 0;
while (__description.indexOf(" ", _local2) == _local2) {
_local2++;
}
if (_local2 > 0) {
__description = __description.substring(_local2);
}
} else {
__description = __faultstring;
}
}
return(__description);
}
function get type() {
return(__type);
}
}
Symbol 60 MovieClip [__Packages.mx.remoting.Operation] Frame 0
class mx.remoting.Operation
{
var __service, __responder, __methodName, __invokationName, __request, __arguments;
function Operation (methodName, parent) {
__service = parent;
__responder = parent.responder;
__methodName = methodName;
__invokationName = (__service.__get__name() + ".") + methodName;
__request = new Object();
__arguments = new Array();
}
function createThenSend(Void) {
createArguments();
return(send());
}
function send(Void) {
__service.log.logInfo((("Invoking " + __methodName) + " on ") + __service.__get__name());
var _local3 = new mx.remoting.PendingCall(__service, __methodName);
_local3.__set__responder(__responder);
var _local2 = null;
if (__arguments == null) {
_local2 = new Array();
} else {
_local2 = __arguments.concat();
}
__invokationName = (__service.__get__name() + ".") + __methodName;
_local2.unshift(__invokationName, _local3);
__service.__get__connection().call.apply(__service.__get__connection(), _local2);
return(_local3);
}
function invoke(a) {
__arguments = a;
}
function get responder() {
return(__responder);
}
function set responder(r) {
__responder = r;
//return(responder);
}
function get request() {
return(__request);
}
function set request(r) {
__request = r;
//return(request);
}
function get name() {
return(__methodName);
}
function createArguments() {
if (__request != null) {
__arguments = new Array();
for (var _local2 in __request) {
if (_local2 != "arguments") {
__arguments.unshift(__request[_local2]);
}
}
}
}
}
Symbol 54 MovieClip [__Packages.mx.remoting.PendingCall] Frame 0
class mx.remoting.PendingCall extends Object
{
var __service, __methodName, __responder;
function PendingCall (srv, methodName) {
super();
__service = srv;
__methodName = methodName;
}
function get responder() {
return(__responder);
}
function set responder(res) {
__responder = res;
//return(responder);
}
function onResult(result) {
result.serviceName = result.serviceName;
if (result != null) {
if (result instanceof mx.remoting.NetServiceProxy) {
var _local4 = new mx.remoting.Service(null, null, result.serviceName, __service.__get__connection(), __service.__get__responder());
result = _local4;
} else if (result instanceof mx.remoting.RecordSet) {
var _local3 = new mx.remoting.NetServiceProxy(__service.__get__connection());
result._setParentService(_local3);
result.logger = __service.log;
}
}
if (__responder != null) {
__responder.onResult(new mx.rpc.ResultEvent(result));
}
if (__service.log != null) {
__service.log.logInfo((((__service.__get__name() + ".") + __methodName) + "() returned ") + mx.data.binding.ObjectDumper.toString(result));
}
}
function onStatus(status) {
if (__responder != null) {
__responder.onFault(new mx.rpc.FaultEvent(new mx.rpc.Fault(status.code, status.description, status.details, status.type)));
}
if (__service.log != null) {
__service.log.logDebug("Service invocation failed.");
__service.log.logDebug((((__service.__get__name() + ".") + __methodName) + "() returned ") + mx.data.binding.ObjectDumper.toString(status));
}
}
function get methodName() {
return(__methodName);
}
static var inited = mx.remoting.NetServiceProxy.registerNetServiceProxy();
}
Symbol 61 MovieClip [__Packages.mx.data.binding.ObjectDumper] Frame 0
class mx.data.binding.ObjectDumper
{
var inProgress;
function ObjectDumper () {
inProgress = new Array();
}
static function toString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local3 = new mx.data.binding.ObjectDumper();
if (maxLineLength == undefined) {
maxLineLength = 100;
}
if (indent == undefined) {
indent = 0;
}
return(_local3.realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent));
}
function realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local8 = 0;
while (_local8 < inProgress.length) {
if (inProgress[_local8] == obj) {
return("***");
}
_local8++;
}
inProgress.push(obj);
indent++;
var _local16 = typeof(obj);
var _local5;
if ((obj instanceof XMLNode) && (showXMLstructures != true)) {
_local5 = obj.toString();
} else if (obj instanceof Date) {
_local5 = obj.toString();
} else if (_local16 == "object") {
var _local4 = new Array();
if (obj instanceof Array) {
_local5 = "[";
var _local15 = 0;
while (_local15 < obj.length) {
_local4.push(_local15);
_local15++;
}
} else {
_local5 = "{";
for (var _local15 in obj) {
_local4.push(_local15);
}
_local4.sort();
}
var _local9 = "";
var _local3 = 0;
while (_local3 < _local4.length) {
var _local6 = obj[_local4[_local3]];
var _local7 = true;
if (typeof(_local6) == "function") {
_local7 = showFunctions == true;
}
if (typeof(_local6) == "undefined") {
_local7 = showUndefined == true;
}
if (_local7) {
_local5 = _local5 + _local9;
if (!(obj instanceof Array)) {
_local5 = _local5 + (_local4[_local3] + ": ");
}
_local5 = _local5 + realToString(_local6, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent);
_local9 = ", `";
}
_local3++;
}
if (obj instanceof Array) {
_local5 = _local5 + "]";
} else {
_local5 = _local5 + "}";
}
} else if (_local16 == "function") {
_local5 = "function";
} else if (_local16 == "string") {
_local5 = ("\"" + obj) + "\"";
} else {
_local5 = String(obj);
}
if (_local5 == "undefined") {
_local5 = "-";
}
inProgress.pop();
return(replaceAll(_local5, "`", ((_local5.length < maxLineLength) ? "" : (newline + doIndent(indent)))));
}
static function replaceAll(str, from, to) {
var _local3 = str.split(from);
var _local4 = "";
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3.length) {
_local4 = _local4 + (_local2 + _local3[_local1]);
_local2 = to;
_local1++;
}
return(_local4);
}
function doIndent(indent) {
var _local2 = "";
var _local1 = 0;
while (_local1 < indent) {
_local2 = _local2 + " ";
_local1++;
}
return(_local2);
}
}
Symbol 62 MovieClip [__Packages.mx.rpc.RelayResponder] Frame 0
class mx.rpc.RelayResponder extends Object implements mx.rpc.Responder
{
var __obj, __onFault, __onResult;
function RelayResponder (resp, resultFunc, faultFunc) {
super();
__obj = resp;
__onFault = faultFunc;
__onResult = resultFunc;
}
function onFault(fault) {
__obj[__onFault](fault);
}
function onResult(result) {
__obj[__onResult](result);
}
}
Symbol 727 MovieClip [__Packages.HighScores] Frame 0
class HighScores extends MovieClip
{
var service, sE_mc, s10_mc, s9_mc, s8_mc, s7_mc, s6_mc, s5_mc, s4_mc, s3_mc, s2_mc, s1_mc, _visible, gotoAndStop, close_btn, loading_mc, _parent;
function HighScores () {
super();
mx.remoting.debug.NetDebug.initialize();
service = new mx.remoting.Service(gatewayUrl, null, "HighScores");
s1_mc._alpha = (s2_mc._alpha = (s3_mc._alpha = (s4_mc._alpha = (s5_mc._alpha = (s6_mc._alpha = (s7_mc._alpha = (s8_mc._alpha = (s9_mc._alpha = (s10_mc._alpha = (sE_mc._alpha = 0))))))))));
_visible = false;
}
function rollOver() {
com.playerthree.game.SoundManager.go().oneShot("rollover_switch.aif", 1, 0, true);
gotoAndStop(2);
}
function rollOut() {
gotoAndStop(1);
}
function show() {
s1_mc._alpha = (s2_mc._alpha = (s3_mc._alpha = (s4_mc._alpha = (s5_mc._alpha = (s6_mc._alpha = (s7_mc._alpha = (s8_mc._alpha = (s9_mc._alpha = (s10_mc._alpha = (sE_mc._alpha = 0))))))))));
close_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, hide);
close_btn.onRollOver = rollOver;
close_btn.onRollOut = (close_btn.onReleaseOutside = rollOut);
loading_mc._visible = true;
if (Globals.yourId == null) {
sE_mc._visible = false;
getScores();
} else {
findMe(Globals.yourId, 1);
sE_mc._visible = true;
}
_visible = true;
}
function hide() {
com.playerthree.game.SoundManager.go().oneShot("press_switch.aif", 1, 0, true);
_parent.menu_mc.enableButtons();
_visible = false;
}
function getScores() {
var _local2 = service.getScores();
_local2.__set__responder(new mx.rpc.RelayResponder(this, "handleGetScores", "handleRemotingError"));
}
function findMe(id, amount) {
var _local2 = service.findMe(id, amount);
_local2.__set__responder(new mx.rpc.RelayResponder(this, "handleFindMe", "handleRemotingError"));
}
function handleGetScores(re) {
loading_mc._visible = false;
trace(re.__get__result().toString());
var _local5 = re.__get__result();
var _local2 = 0;
while (_local2 < _local5.length) {
var _local6 = new mx.transitions.Tween(this[("s" + (_local2 + 1)) + "_mc"], "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 25 + (_local2 * 2), false);
if ((_local2 / 2) == Math.floor(_local2 / 2)) {
this[("s" + (_local2 + 1)) + "_mc"].bg_mc._visible = false;
}
var _local3 = String(toFixed(2, _local5[_local2][1]));
var _local4 = _local3.substr(_local3.indexOf(".", 0));
trace(_local4);
if (_local4.length == 2) {
_local3 = _local3 + "0";
} else if (_local4.length == 1) {
_local3 = _local3 + ".00";
}
trace(_local3);
this[("s" + (_local2 + 1)) + "_mc"].num_txt.text = String("0" + (_local2 + 1)).substr(-2, 2);
this[("s" + (_local2 + 1)) + "_mc"].name_txt.text = _local5[_local2][0].toUpperCase();
this[("s" + (_local2 + 1)) + "_mc"].score_txt.text = _local5[_local2][1];
_local2++;
}
}
function toFixed(dp, num) {
var _local2 = 1;
var _local1 = 0;
while (_local1 < dp) {
_local2 = _local2 * 0.1;
_local1++;
}
return(num - (num % _local2));
}
function handleFindMe(re) {
if (Number(re.__get__result()[1].rank) < 11) {
sE_mc._visible = false;
} else {
sE_mc.visible = true;
var _local3 = new mx.transitions.Tween(sE_mc, "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 1, true);
sE_mc.num_txt.text = re.__get__result()[1].rank;
sE_mc.name_txt.text = re.__get__result()[1].name;
sE_mc.score_txt.text = toFixed(2, re.__get__result()[1].score);
}
getScores();
}
function handleRemotingError(fault) {
mx.remoting.debug.NetDebug.trace({level:"None", message:"Error: " + fault.__get__fault().__get__faultstring()});
}
var gatewayUrl = "http://bbc.threeserve.com/flashservices/gateway.php";
}
Symbol 728 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 729 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 730 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 731 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 732 MovieClip [__Packages.Credits] Frame 0
class Credits extends MovieClip
{
var gotoAndStop, _visible, close_btn, _parent;
function Credits () {
super();
gotoAndStop(1);
_visible = false;
init();
}
function init() {
close_btn.enabled = true;
close_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, cancel);
close_btn.onRollOver = rollOver;
close_btn.onRollOut = rollOut;
}
function rollOut() {
gotoAndStop(1);
}
function rollOver() {
com.playerthree.game.SoundManager.go().oneShot("rollover_switch.aif", 1, 0, true);
gotoAndStop(2);
}
function cancel() {
com.playerthree.game.SoundManager.go().oneShot("press_switch.aif", 1, 0, true);
_parent.menu_mc.enableButtons();
_visible = false;
}
function show() {
_visible = true;
}
}
Symbol 733 MovieClip [__Packages.SubmitScoreJSON] Frame 0
class SubmitScoreJSON extends MovieClip
{
var _visible, json, submit_btn, close_btn, gotoAndStop, _currentframe, nextFrame, pName, name_txt, pEmail, email_txt, score, error_txt, h1, h2, h3, h4, h5, h6, t1_txt;
function SubmitScoreJSON () {
super();
_visible = false;
init();
json = new JSON();
}
function init() {
submit_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, submitClick);
close_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, restart);
submit_btn.onRollOver = (close_btn.onRollOver = rollOver);
submit_btn.onRollOut = (close_btn.onRollOut = (close_btn.onReleaseOutside = (submit_btn.onReleaseOutside = rollOut)));
}
function rollOut() {
gotoAndStop(1);
}
function rollOver() {
gotoAndStop(2);
com.playerthree.game.SoundManager.go().oneShot("rollover_switch.aif", 1, 0, true);
}
function submitClick() {
com.playerthree.game.SoundManager.go().oneShot("press_switch.aif", 1, 0, true);
switch (_currentframe) {
case 1 :
nextFrame();
break;
case 2 :
if (validateFields()) {
pName = name_txt.text;
pEmail = email_txt.text;
setScore(pName, pEmail, score);
disableButtons();
Globals.gameButtons = false;
nextFrame();
} else {
error_txt.text = "Please provide correct details";
}
}
}
function disableButtons() {
submit_btn.enabled = false;
close_btn.enabled = false;
submit_btn._alpha = 50;
close_btn._alpha = 50;
}
function enableButtons() {
submit_btn.enabled = true;
close_btn.enabled = true;
submit_btn._alpha = 100;
close_btn._alpha = 100;
}
function restart() {
Globals.main.reset();
}
function validateFields() {
var _local2 = email_txt.text;
var _local3 = name_txt.text;
if ((_local3.length < 2) || (_local3.length > 100)) {
return(false);
}
if ((((((((((_local2.length < 6) || (_local2.indexOf(",") >= 0)) || (_local2.indexOf(";") >= 0)) || (_local2.indexOf(":") >= 0)) || (_local2.indexOf("/") >= 0)) || (_local2.indexOf(" ") >= 0)) || (_local2.indexOf("@") <= 0)) || (_local2.indexOf("@") != _local2.lastIndexOf("@"))) || (_local2.lastIndexOf(".") < _local2.indexOf("@"))) || ((_local2.lastIndexOf(".") + 3) > _local2.length)) {
return(false);
}
return(true);
}
function show(s) {
score = s;
gotoAndStop(1);
h1.text = "0";
h2.text = "0";
h3.text = "0";
h4.text = "0";
h5.text = "0";
h6.text = "0";
if (Main.safeLanding) {
t1_txt.text = "Your total altitude + landing bonus is";
var _local5 = score / 100;
score = score + _local5;
} else {
t1_txt.text = "Your total altitude is";
}
var _local6 = String(Number(toFixed(2, score) * 100));
var _local4 = _local6.split("");
var _local3 = 6;
while (_local4.length > 0) {
var _local2 = String(_local4.pop());
this["h" + _local3].text = _local2;
_local3--;
}
init();
_visible = true;
}
function hide() {
_visible = false;
}
function toFixed(dp, num) {
var _local2 = 1;
var _local1 = 0;
while (_local1 < dp) {
_local2 = _local2 * 0.1;
_local1++;
}
return(num - (num % _local2));
}
function setScore(name, email, score) {
var _local2 = new Object();
_local2.username = name;
_local2.email = email;
_local2.score = int(score * 100);
_local2.gameid = "rocket-robin";
_local2.scoredisplay = String(toFixed(2, score));
var _local5 = new Crypt();
var _local9 = (((("" + _local2.gameid) + _local2.email) + _local2.username) + _local2.score) + _local2.scoredisplay;
var _local7 = _local5.MD5Hash(_local9);
var _local8 = _local5.encode_base64(_local7);
_local2.checksum = _local8;
var _local3 = json.stringify(_local2);
trace("json encoded version of the object:" + _local3);
var _local4 = new LoadVars();
_local4.userdata = _local3;
var _local6 = new LoadVars();
_local6.onData = com.playerthree.utils.EventDelegate.create(this, handleSetScore);
_local4.sendAndLoad(Globals.gUrl, _local6, "POST");
}
function handleScrewString(re) {
setScore(pName, pEmail, score, re.__get__result());
}
function handleSetScore(data) {
var _local2 = json.parse(data);
trace("userid from the post of a score was: " + _local2.userid);
Globals.gameButtons = true;
Globals.yourId = Number(_local2.userid);
Globals.endGame.hide();
Globals.highscores.show();
}
function handleRemotingError(fault) {
mx.remoting.debug.NetDebug.trace({level:"None", message:"Error: " + fault.__get__fault().__get__faultstring()});
}
}
Symbol 734 MovieClip [__Packages.JSON] Frame 0
class JSON
{
var text;
function JSON () {
}
function stringify(arg) {
var _local4;
var _local3;
var _local7;
var _local2 = "";
var _local5;
switch (typeof(arg)) {
case "object" :
if (arg) {
if (arg instanceof Array) {
_local3 = 0;
while (_local3 < arg.length) {
_local5 = stringify(arg[_local3]);
if (_local2) {
_local2 = _local2 + ",";
}
_local2 = _local2 + _local5;
_local3++;
}
return(("[" + _local2) + "]");
}
if (typeof(arg.toString) != "undefined") {
for (_local3 in arg) {
_local5 = arg[_local3];
if ((typeof(_local5) != "undefined") && (typeof(_local5) != "function")) {
_local5 = stringify(_local5);
if (_local2) {
_local2 = _local2 + ",";
}
_local2 = _local2 + ((stringify(_local3) + ":") + _local5);
}
}
return(("{" + _local2) + "}");
}
}
return("null");
case "number" :
return((isFinite(arg) ? (String(arg)) : "null"));
case "string" :
_local7 = arg.length;
_local2 = "\"";
_local3 = 0;
while (_local3 < _local7) {
_local4 = arg.charAt(_local3);
if (_local4 >= " ") {
if ((_local4 == "\\") || (_local4 == "\"")) {
_local2 = _local2 + "\\";
}
_local2 = _local2 + _local4;
} else {
switch (_local4) {
case "\b" :
_local2 = _local2 + "\\b";
break;
case "\f" :
_local2 = _local2 + "\\f";
break;
case newline :
_local2 = _local2 + "\\n";
break;
case "\r" :
_local2 = _local2 + "\\r";
break;
case "\t" :
_local2 = _local2 + "\\t";
break;
default :
_local4 = _local4.charCodeAt();
_local2 = _local2 + (("\\u00" + Math.floor(_local4 / 16).toString(16)) + (_local4 % 16).toString(16));
}
}
_local3 = _local3 + 1;
}
return(_local2 + "\"");
case "boolean" :
return(String(arg));
}
return("null");
}
function white() {
while (ch) {
if (ch <= " ") {
next();
} else if (ch == "/") {
switch (next()) {
case "/" :
while ((next() && (ch != newline)) && (ch != "\r")) {
}
break;
case "*" :
next();
for(;;){
if (ch) {
if (ch == "*") {
if (next() == "/") {
next();
// unexpected jump
}
} else {
next();
}
} else {
error("Unterminated comment");
}
};
break;
default :
error("Syntax error");
}
} else {
break;
}
}
}
function error(m) {
throw {name:"JSONError", message:m, at:at - 1, text:text};
}
function next() {
ch = text.charAt(at);
at = at + 1;
return(ch);
}
function str() {
var _local5;
var _local2 = "";
var _local4;
var _local3;
var _local6 = false;
if (ch == "\"") {
while (next()) {
if (ch == "\"") {
next();
return(_local2);
}
if (ch == "\\") {
switch (next()) {
case "b" :
_local2 = _local2 + "\b";
break;
case "f" :
_local2 = _local2 + "\f";
break;
case "n" :
_local2 = _local2 + newline;
break;
case "r" :
_local2 = _local2 + "\r";
break;
case "t" :
_local2 = _local2 + "\t";
break;
case "u" :
_local3 = 0;
_local5 = 0;
while (_local5 < 4) {
_local4 = parseInt(next(), 16);
if (!isFinite(_local4)) {
_local6 = true;
break;
}
_local3 = (_local3 * 16) + _local4;
_local5 = _local5 + 1;
}
if (_local6) {
_local6 = false;
break;
}
_local2 = _local2 + String.fromCharCode(_local3);
break;
default :
_local2 = _local2 + ch;
}
} else {
_local2 = _local2 + ch;
}
}
}
error("Bad string");
}
function arr() {
var _local2 = [];
if (ch == "[") {
next();
white();
if (ch == "]") {
next();
return(_local2);
}
while (ch) {
_local2.push(value());
white();
if (ch == "]") {
next();
return(_local2);
}
if (ch != ",") {
break;
}
next();
white();
}
}
error("Bad array");
}
function obj() {
var _local3;
var _local2 = {};
if (ch == "{") {
next();
white();
if (ch == "}") {
next();
return(_local2);
}
while (ch) {
_local3 = str();
white();
if (ch != ":") {
break;
}
next();
_local2[_local3] = value();
white();
if (ch == "}") {
next();
return(_local2);
}
if (ch != ",") {
break;
}
next();
white();
}
}
error("Bad object");
}
function num() {
var _local2 = "";
var _local3;
if (ch == "-") {
_local2 = "-";
next();
}
while ((ch >= "0") && (ch <= "9")) {
_local2 = _local2 + ch;
next();
}
if (ch == ".") {
_local2 = _local2 + ".";
next();
while ((ch >= "0") && (ch <= "9")) {
_local2 = _local2 + ch;
next();
}
}
if ((ch == "e") || (ch == "E")) {
_local2 = _local2 + ch;
next();
if ((ch == "-") || (ch == "+")) {
_local2 = _local2 + ch;
next();
}
while ((ch >= "0") && (ch <= "9")) {
_local2 = _local2 + ch;
next();
}
}
_local3 = Number(_local2);
if (!isFinite(_local3)) {
error("Bad number");
}
return(_local3);
}
function word() {
switch (ch) {
case "t" :
if (((next() == "r") && (next() == "u")) && (next() == "e")) {
next();
return(true);
}
break;
case "f" :
if ((((next() == "a") && (next() == "l")) && (next() == "s")) && (next() == "e")) {
next();
return(false);
}
break;
case "n" :
if (!(((next() == "u") && (next() == "l")) && (next() == "l"))) {
break;
}
next();
return(null);
}
error("Syntax error");
}
function value() {
white();
switch (ch) {
case "{" :
return(obj());
case "[" :
return(arr());
case "\"" :
return(str());
case "-" :
return(num());
}
return((((ch >= "0") && (ch <= "9")) ? (num()) : (word())));
}
function parse(_text) {
text = _text;
at = 0;
ch = " ";
return(value());
}
var ch = "";
var at = 0;
}
Symbol 735 MovieClip [__Packages.Crypt] Frame 0
class Crypt
{
function Crypt () {
}
function RotateLeft(lValue, iShiftBits) {
return((lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)));
}
function AddUnsigned(lX, lY) {
var _local5;
var _local4;
var _local3;
var _local2;
var _local1;
_local3 = lX & 2147483648;
_local2 = lY & 2147483648;
_local5 = lX & 1073741824;
_local4 = lY & 1073741824;
_local1 = (lX & 1073741823) + (lY & 1073741823);
if (_local5 & _local4) {
return(((_local1 ^ 2147483648) ^ _local3) ^ _local2);
}
if (_local5 | _local4) {
if (_local1 & 1073741824) {
return(((_local1 ^ 3221225472) ^ _local3) ^ _local2);
}
return(((_local1 ^ 1073741824) ^ _local3) ^ _local2);
}
return((_local1 ^ _local3) ^ _local2);
}
function F(x, y, z) {
return((x & y) | ((~x) & z));
}
function G(x, y, z) {
return((x & z) | (y & (~z)));
}
function H(x, y, z) {
return((x ^ y) ^ z);
}
function I(x, y, z) {
return(y ^ (x | (~z)));
}
function FF(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function GG(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function HH(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function II(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function ConvertToWordArray(string) {
var _local2;
var _local5 = string.length;
var _local8 = _local5 + 8;
var _local9 = (_local8 - (_local8 % 64)) / 64;
var _local7 = (_local9 + 1) * 16;
var _local3 = Array(_local7 - 1);
var _local4 = 0;
var _local1 = 0;
while (_local1 < _local5) {
_local2 = (_local1 - (_local1 % 4)) / 4;
_local4 = (_local1 % 4) * 8;
_local3[_local2] = _local3[_local2] | (string.charCodeAt(_local1) << _local4);
_local1++;
}
_local2 = (_local1 - (_local1 % 4)) / 4;
_local4 = (_local1 % 4) * 8;
_local3[_local2] = _local3[_local2] | (128 << _local4);
_local3[_local7 - 2] = _local5 << 3;
_local3[_local7 - 1] = _local5 >>> 29;
return(_local3);
}
function WordToHex(lValue) {
var _local3 = "";
var _local2 = "";
var _local4;
var _local1;
_local1 = 0;
while (_local1 <= 3) {
_local4 = (lValue >>> (_local1 * 8)) & 255;
_local2 = "0" + _local4.toString(16);
_local3 = _local3 + _local2.substr(_local2.length - 2, 2);
_local1++;
}
return(_local3);
}
function WordsToBytes(words) {
var _local6 = [];
var _local3;
var _local1;
var _local2;
var _local4;
_local2 = 0;
while (_local2 < words.length) {
_local1 = 0;
while (_local1 <= 3) {
_local4 = (_local2 * 4) + _local1;
_local3 = (words[_local2] >>> (_local1 * 8)) & 255;
_local6[_local4] = _local3;
_local1++;
}
_local2++;
}
return(_local6);
}
function Utf8Encode(string) {
var _local2 = "";
var _local3 = 0;
while (_local3 < string.length) {
var _local1 = string.charCodeAt(_local3);
if (_local1 < 128) {
_local2 = _local2 + String.fromCharCode(_local1);
} else if ((_local1 > 127) && (_local1 < 2048)) {
_local2 = _local2 + String.fromCharCode((_local1 >> 6) | 192);
_local2 = _local2 + String.fromCharCode((_local1 & 63) | 128);
} else {
_local2 = _local2 + String.fromCharCode((_local1 >> 12) | 224);
_local2 = _local2 + String.fromCharCode(((_local1 >> 6) & 63) | 128);
_local2 = _local2 + String.fromCharCode((_local1 & 63) | 128);
}
_local3++;
}
return(_local2);
}
function MD5Hash(string) {
var _local7 = Array();
var _local6;
var _local25;
var _local26;
var _local27;
var _local24;
var _local5;
var _local4;
var _local3;
var _local2;
var _local19 = 7;
var _local17 = 12;
var _local14 = 17;
var _local11 = 22;
var _local18 = 5;
var _local15 = 9;
var _local12 = 14;
var _local9 = 20;
var _local16 = 4;
var _local13 = 11;
var _local10 = 16;
var _local8 = 23;
var _local23 = 6;
var _local22 = 10;
var _local21 = 15;
var _local20 = 21;
string = Utf8Encode(string);
_local7 = ConvertToWordArray(string);
_local5 = 1732584193 /* 0x67452301 */;
_local4 = 4023233417;
_local3 = 2562383102;
_local2 = 271733878 /* 0x10325476 */;
_local6 = 0;
while (_local6 < _local7.length) {
_local25 = _local5;
_local26 = _local4;
_local27 = _local3;
_local24 = _local2;
_local5 = FF(_local5, _local4, _local3, _local2, _local7[_local6 + 0], _local19, 3614090360);
_local2 = FF(_local2, _local5, _local4, _local3, _local7[_local6 + 1], _local17, 3905402710);
_local3 = FF(_local3, _local2, _local5, _local4, _local7[_local6 + 2], _local14, 606105819);
_local4 = FF(_local4, _local3, _local2, _local5, _local7[_local6 + 3], _local11, 3250441966);
_local5 = FF(_local5, _local4, _local3, _local2, _local7[_local6 + 4], _local19, 4118548399);
_local2 = FF(_local2, _local5, _local4, _local3, _local7[_local6 + 5], _local17, 1200080426);
_local3 = FF(_local3, _local2, _local5, _local4, _local7[_local6 + 6], _local14, 2821735955);
_local4 = FF(_local4, _local3, _local2, _local5, _local7[_local6 + 7], _local11, 4249261313);
_local5 = FF(_local5, _local4, _local3, _local2, _local7[_local6 + 8], _local19, 1770035416);
_local2 = FF(_local2, _local5, _local4, _local3, _local7[_local6 + 9], _local17, 2336552879);
_local3 = FF(_local3, _local2, _local5, _local4, _local7[_local6 + 10], _local14, 4294925233);
_local4 = FF(_local4, _local3, _local2, _local5, _local7[_local6 + 11], _local11, 2304563134);
_local5 = FF(_local5, _local4, _local3, _local2, _local7[_local6 + 12], _local19, 1804603682);
_local2 = FF(_local2, _local5, _local4, _local3, _local7[_local6 + 13], _local17, 4254626195);
_local3 = FF(_local3, _local2, _local5, _local4, _local7[_local6 + 14], _local14, 2792965006);
_local4 = FF(_local4, _local3, _local2, _local5, _local7[_local6 + 15], _local11, 1236535329);
_local5 = GG(_local5, _local4, _local3, _local2, _local7[_local6 + 1], _local18, 4129170786);
_local2 = GG(_local2, _local5, _local4, _local3, _local7[_local6 + 6], _local15, 3225465664);
_local3 = GG(_local3, _local2, _local5, _local4, _local7[_local6 + 11], _local12, 643717713);
_local4 = GG(_local4, _local3, _local2, _local5, _local7[_local6 + 0], _local9, 3921069994);
_local5 = GG(_local5, _local4, _local3, _local2, _local7[_local6 + 5], _local18, 3593408605);
_local2 = GG(_local2, _local5, _local4, _local3, _local7[_local6 + 10], _local15, 38016083);
_local3 = GG(_local3, _local2, _local5, _local4, _local7[_local6 + 15], _local12, 3634488961);
_local4 = GG(_local4, _local3, _local2, _local5, _local7[_local6 + 4], _local9, 3889429448);
_local5 = GG(_local5, _local4, _local3, _local2, _local7[_local6 + 9], _local18, 568446438);
_local2 = GG(_local2, _local5, _local4, _local3, _local7[_local6 + 14], _local15, 3275163606);
_local3 = GG(_local3, _local2, _local5, _local4, _local7[_local6 + 3], _local12, 4107603335);
_local4 = GG(_local4, _local3, _local2, _local5, _local7[_local6 + 8], _local9, 1163531501);
_local5 = GG(_local5, _local4, _local3, _local2, _local7[_local6 + 13], _local18, 2850285829);
_local2 = GG(_local2, _local5, _local4, _local3, _local7[_local6 + 2], _local15, 4243563512);
_local3 = GG(_local3, _local2, _local5, _local4, _local7[_local6 + 7], _local12, 1735328473);
_local4 = GG(_local4, _local3, _local2, _local5, _local7[_local6 + 12], _local9, 2368359562);
_local5 = HH(_local5, _local4, _local3, _local2, _local7[_local6 + 5], _local16, 4294588738);
_local2 = HH(_local2, _local5, _local4, _local3, _local7[_local6 + 8], _local13, 2272392833);
_local3 = HH(_local3, _local2, _local5, _local4, _local7[_local6 + 11], _local10, 1839030562);
_local4 = HH(_local4, _local3, _local2, _local5, _local7[_local6 + 14], _local8, 4259657740);
_local5 = HH(_local5, _local4, _local3, _local2, _local7[_local6 + 1], _local16, 2763975236);
_local2 = HH(_local2, _local5, _local4, _local3, _local7[_local6 + 4], _local13, 1272893353);
_local3 = HH(_local3, _local2, _local5, _local4, _local7[_local6 + 7], _local10, 4139469664);
_local4 = HH(_local4, _local3, _local2, _local5, _local7[_local6 + 10], _local8, 3200236656);
_local5 = HH(_local5, _local4, _local3, _local2, _local7[_local6 + 13], _local16, 681279174);
_local2 = HH(_local2, _local5, _local4, _local3, _local7[_local6 + 0], _local13, 3936430074);
_local3 = HH(_local3, _local2, _local5, _local4, _local7[_local6 + 3], _local10, 3572445317);
_local4 = HH(_local4, _local3, _local2, _local5, _local7[_local6 + 6], _local8, 76029189);
_local5 = HH(_local5, _local4, _local3, _local2, _local7[_local6 + 9], _local16, 3654602809);
_local2 = HH(_local2, _local5, _local4, _local3, _local7[_local6 + 12], _local13, 3873151461);
_local3 = HH(_local3, _local2, _local5, _local4, _local7[_local6 + 15], _local10, 530742520);
_local4 = HH(_local4, _local3, _local2, _local5, _local7[_local6 + 2], _local8, 3299628645);
_local5 = II(_local5, _local4, _local3, _local2, _local7[_local6 + 0], _local23, 4096336452);
_local2 = II(_local2, _local5, _local4, _local3, _local7[_local6 + 7], _local22, 1126891415);
_local3 = II(_local3, _local2, _local5, _local4, _local7[_local6 + 14], _local21, 2878612391);
_local4 = II(_local4, _local3, _local2, _local5, _local7[_local6 + 5], _local20, 4237533241);
_local5 = II(_local5, _local4, _local3, _local2, _local7[_local6 + 12], _local23, 1700485571);
_local2 = II(_local2, _local5, _local4, _local3, _local7[_local6 + 3], _local22, 2399980690);
_local3 = II(_local3, _local2, _local5, _local4, _local7[_local6 + 10], _local21, 4293915773);
_local4 = II(_local4, _local3, _local2, _local5, _local7[_local6 + 1], _local20, 2240044497);
_local5 = II(_local5, _local4, _local3, _local2, _local7[_local6 + 8], _local23, 1873313359);
_local2 = II(_local2, _local5, _local4, _local3, _local7[_local6 + 15], _local22, 4264355552);
_local3 = II(_local3, _local2, _local5, _local4, _local7[_local6 + 6], _local21, 2734768916);
_local4 = II(_local4, _local3, _local2, _local5, _local7[_local6 + 13], _local20, 1309151649);
_local5 = II(_local5, _local4, _local3, _local2, _local7[_local6 + 4], _local23, 4149444226);
_local2 = II(_local2, _local5, _local4, _local3, _local7[_local6 + 11], _local22, 3174756917);
_local3 = II(_local3, _local2, _local5, _local4, _local7[_local6 + 2], _local21, 718787259);
_local4 = II(_local4, _local3, _local2, _local5, _local7[_local6 + 9], _local20, 3951481745);
_local5 = AddUnsigned(_local5, _local25);
_local4 = AddUnsigned(_local4, _local26);
_local3 = AddUnsigned(_local3, _local27);
_local2 = AddUnsigned(_local2, _local24);
_local6 = _local6 + 16;
}
var _local29 = [_local5, _local4, _local3, _local2];
var _local30 = WordsToBytes(_local29);
return(_local30);
}
function encode_base64(data) {
var _local11 = "";
var _local7;
var _local4;
var _local3;
var _local10;
var _local9;
var _local8;
var _local5;
var _local2 = 0;
while (_local2 < data.length) {
_local7 = data[_local2++];
_local4 = data[_local2++];
_local3 = data[_local2++];
_local10 = _local7 >> 2;
_local9 = ((_local7 & 3) << 4) + (_local4 >> 4);
_local8 = ((_local4 & 15) << 2) + (_local3 >> 6);
_local5 = _local3 & 63;
if (isNaN(_local4)) {
_local5 = 64;
_local8 = _local5;
} else if (isNaN(_local3)) {
_local5 = 64;
}
_local11 = _local11 + (((tab.charAt(_local10) + tab.charAt(_local9)) + tab.charAt(_local8)) + tab.charAt(_local5));
}
return(_local11);
}
function decode_base64(data) {
var _local5 = "";
var _local10;
var _local9;
var _local8;
var _local11;
var _local7;
var _local4;
var _local6;
var _local2 = 0;
while (_local2 < data.length) {
_local11 = tab.indexOf(data.charAt(_local2++));
_local7 = tab.indexOf(data.charAt(_local2++));
_local4 = tab.indexOf(data.charAt(_local2++));
_local6 = tab.indexOf(data.charAt(_local2++));
_local10 = (_local11 << 2) + (_local7 >> 4);
_local9 = ((_local7 & 15) << 4) + (_local4 >> 2);
_local8 = ((_local4 & 3) << 6) + _local6;
_local5 = _local5 + String.fromCharCode(_local10);
if (_local4 != 64) {
_local5 = _local5 + String.fromCharCode(_local9);
}
if (_local6 != 64) {
_local5 = _local5 + String.fromCharCode(_local8);
}
}
return(_local5);
}
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
}
Symbol 736 MovieClip [__Packages.HighScoresJSON] Frame 0
class HighScoresJSON extends MovieClip
{
var sE_mc, s10_mc, s9_mc, s8_mc, s7_mc, s6_mc, s5_mc, s4_mc, s3_mc, s2_mc, s1_mc, _visible, json, highScoreLoader, gotoAndStop, close_btn, loading_mc, _parent;
function HighScoresJSON () {
super();
s1_mc._alpha = (s2_mc._alpha = (s3_mc._alpha = (s4_mc._alpha = (s5_mc._alpha = (s6_mc._alpha = (s7_mc._alpha = (s8_mc._alpha = (s9_mc._alpha = (s10_mc._alpha = (sE_mc._alpha = 0))))))))));
_visible = false;
json = new JSON();
highScoreLoader = new LoadVars();
}
function rollOver() {
com.playerthree.game.SoundManager.go().oneShot("rollover_switch.aif", 1, 0, true);
gotoAndStop(2);
}
function rollOut() {
gotoAndStop(1);
}
function show() {
s1_mc._alpha = (s2_mc._alpha = (s3_mc._alpha = (s4_mc._alpha = (s5_mc._alpha = (s6_mc._alpha = (s7_mc._alpha = (s8_mc._alpha = (s9_mc._alpha = (s10_mc._alpha = (sE_mc._alpha = 0))))))))));
close_btn.onRelease = com.playerthree.utils.EventDelegate.create(this, hide);
close_btn.onRollOver = rollOver;
close_btn.onRollOut = (close_btn.onReleaseOutside = rollOut);
loading_mc._visible = true;
sE_mc._visible = false;
getScores();
_visible = true;
}
function hide() {
com.playerthree.game.SoundManager.go().oneShot("press_switch.aif", 1, 0, true);
_parent.menu_mc.enableButtons();
_visible = false;
}
function getScores() {
highScoreLoader.onData = com.playerthree.utils.EventDelegate.create(this, handleGetScores);
highScoreLoader.load(Globals.gUrl);
}
function findMe(id, amount) {
}
function handleGetScores(data) {
var _local4 = json.parse(data);
trace("score table for rocketrobin");
loading_mc._visible = false;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
trace((_local3.username + " ") + _local3.score);
var _local5 = new mx.transitions.Tween(this[("s" + (_local2 + 1)) + "_mc"], "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 25 + (_local2 * 2), false);
if ((_local2 / 2) == Math.floor(_local2 / 2)) {
this[("s" + (_local2 + 1)) + "_mc"].bg_mc._visible = false;
}
this[("s" + (_local2 + 1)) + "_mc"].num_txt.text = String("0" + (_local2 + 1)).substr(-2, 2);
this[("s" + (_local2 + 1)) + "_mc"].name_txt.text = _local3.username.toUpperCase();
this[("s" + (_local2 + 1)) + "_mc"].score_txt.text = _local3.scoredisplay;
_local2++;
}
}
function toFixed(dp, num) {
var _local2 = 1;
var _local1 = 0;
while (_local1 < dp) {
_local2 = _local2 * 0.1;
_local1++;
}
return(num - (num % _local2));
}
}
Symbol 3 MovieClip [__Packages.mx.remoting.DebugClasses] Frame 0
class mx.remoting.DebugClasses extends MovieClip
{
function DebugClasses () {
super();
}
}
Symbol 22 MovieClip [__Packages.mx.remoting.debug.NetDebugConfig] Frame 0
class mx.remoting.debug.NetDebugConfig extends Object
{
function NetDebugConfig () {
super();
Object.registerClass("NetDebugConfig", mx.remoting.debug.NetDebugConfig);
}
static function getNetDebugVersion() {
return(1);
}
static function attachNetDebugConfigFunctions(ndc) {
var _local1 = ndc;
_local1.setDebug = function (setval) {
this.m_debug = setval;
};
_local1.getDebug = function () {
return(this.m_debug);
};
for (var _local2 in _local1) {
if (typeof(_local1[_local2]) == "object") {
attachNetDebugConfigFunctions(_local1[_local2]);
}
}
return(null);
}
static function getDefaultNetDebugConfig(isController) {
var _local1 = _global;
if (_local1.netDebugConfigSO == undefined) {
var _local2 = "TestMovie_Config_Info";
if (isController) {
_local2 = "Controller_Config_Info";
}
_local1.netDebugConfigSO = SharedObject.getLocal(_local2);
}
if (_local1.netDebugConfigSO.data.config == undefined) {
_local1.netDebugConfigSO.data.config = getRealDefaultNetDebugConfig();
}
_local1.netDebugConfigSO.flush();
return(_local1.netDebugConfigSO.data.config);
}
static function getRealDefaultNetDebugConfig() {
var _local1 = new mx.remoting.debug.NetDebugConfig();
_local1.m_debug = true;
_local1.client = new mx.remoting.debug.NetDebugConfig();
_local1.client.m_debug = true;
_local1.client.trace = true;
_local1.client.recordset = true;
_local1.client.http = true;
_local1.client.rtmp = true;
_local1.realtime_server = new mx.remoting.debug.NetDebugConfig();
_local1.realtime_server.m_debug = true;
_local1.realtime_server.trace = true;
_local1.app_server = new mx.remoting.debug.NetDebugConfig();
_local1.app_server.m_debug = true;
_local1.app_server.trace = true;
_local1.app_server.error = true;
_local1.app_server.recordset = true;
_local1.app_server.httpheaders = false;
_local1.app_server.amf = false;
_local1.app_server.amfheaders = false;
_local1.app_server.coldfusion = true;
return(_local1);
}
}
Symbol 23 MovieClip [__Packages.mx.utils.ObjectCopy] Frame 0
class mx.utils.ObjectCopy
{
function ObjectCopy () {
}
static function copy(refObj) {
var _local1 = new Function(refObj.__proto__.constructor)();
copyProperties(_local1, refObj);
return(_local1);
}
static function copyProperties(dstObj, srcObj) {
var _local2 = srcObj;
var to;
for (var i in _local2) {
to = typeof(_local2[i]);
if (to != "function") {
if (to == "object") {
if (_local2[i] instanceof Array) {
var p = new Array();
var _local3 = _local2[i];
var _local1 = 0;
while (_local1 < _local3.length) {
p[_local1] = _local3[_local1];
_local1++;
}
dstObj[i] = p;
} else if (_local2[i] instanceof String) {
dstObj[i] = new String(_local2[i]);
} else if (_local2[i] instanceof Number) {
dstObj[i] = new Number(_local2[i]);
} else if (_local2[i] instanceof Boolean) {
dstObj[i] = new Boolean(_local2[i]);
} else {
dstObj[i] = copy(_local2[i]);
}
} else {
dstObj[i] = _local2[i];
}
}
}
}
}
Symbol 24 MovieClip [__Packages.mx.remoting.debug.events.NetDebug] Frame 0
class mx.remoting.debug.events.NetDebug extends Object
{
var date, time;
function NetDebug () {
super();
init();
}
function init() {
var _local1 = this;
_local1.eventType = "DebugEvent";
_local1.source = "Client";
_local1.movieUrl = unescape(_root._url);
_local1.initDate();
}
function initDate() {
var _local1 = new Date();
date = _local1;
time = _local1.getTime();
}
}
Symbol 25 MovieClip [__Packages.mx.remoting.debug.events.NetDebugNetConnection] Frame 0
class mx.remoting.debug.events.NetDebugNetConnection extends mx.remoting.debug.events.NetDebug
{
function NetDebugNetConnection () {
super();
}
}
Symbol 26 MovieClip [__Packages.mx.remoting.debug.events.NetDebugConnect] Frame 0
class mx.remoting.debug.events.NetDebugConnect extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugConnect (args) {
var _local1 = args;
var _local2 = this;
super();
_local2.eventType = "Connect";
_local2.connectString = _local1[0];
if (_local1[1] != null) {
_local2.userName = _local1[1];
}
if (_local1[2] != null) {
_local2.password = _local1[2];
}
}
}
Symbol 27 MovieClip [__Packages.mx.remoting.debug.commands.Local] Frame 0
class mx.remoting.debug.commands.Local extends Object
{
var command, data;
function Local () {
super();
}
function init(commandname, dataobj) {
command = commandname;
data = dataobj;
}
}
Symbol 28 MovieClip [__Packages.mx.remoting.debug.commands.StartRTMPTrace] Frame 0
class mx.remoting.debug.commands.StartRTMPTrace extends mx.remoting.debug.commands.Local
{
var init;
function StartRTMPTrace (cs) {
super();
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
init("startRealTimeTrace", _local1);
}
}
Symbol 29 MovieClip [__Packages.mx.remoting.debug.ConnectionMixin] Frame 0
class mx.remoting.debug.ConnectionMixin extends Object
{
var _protocol, _id, _config;
function ConnectionMixin () {
super();
}
static function initialize() {
var _local1 = mx.remoting.Connection.prototype;
var _local2 = mx.remoting.debug.ConnectionMixin.prototype;
if (!_local1.netDebugProxyFunctions) {
_local1.netDebugProxyFunctions = true;
_local1.realConnect = _local1.connect;
_local1.realCall = _local1.call;
_local1.realClose = _local1.close;
_local1.realAddHeader = _local1.addHeader;
_local1.connect = _local2.netDebugProxyConnect;
_local1.call = _local2.netDebugProxyCall;
_local1.close = _local2.netDebugProxyClose;
_local1.addHeader = _local2.netDebugProxyAddHeader;
_local1.attachDebug = _local2.attachDebug;
_local1.sendDebugEvent = _local2.sendDebugEvent;
_local1.sendServerEvent = _local2.sendServerEvent;
_local1.sendClientEvent = _local2.sendClientEvent;
_local1.addNetDebugHeader = _local2.addNetDebugHeader;
_local1.updateConfig = _local2.updateConfig;
_local1.getNetDebug = _local2.getNetDebug;
_local1.isRealTime = _local2.isRealTime;
_local1.setupRecordSet = _local2.setupRecordSet;
_local1.setDebugId = _local2.setDebugId;
_local1.getDebugId = _local2.getDebugId;
_local1.getDebugConfig = _local2.getDebugConfig;
_local1.trace = _local2.trace;
return(true);
}
return(false);
}
function attachDebug() {
var _local1 = this;
if (!_attached) {
_attached = true;
_local1._headerAdded = false;
_local1._configured = false;
_local1._config = new mx.remoting.debug.NetDebugConfig();
mx.utils.ObjectCopy.copyProperties(_local1._config, _local1.getNetDebug().getConfig());
_local1._protocol = "none";
_local1._id = String(_local1.getNetDebug().addNetConnection(_local1));
}
}
function sendDebugEvent(eventobj) {
var _local1 = this;
var _local2 = eventobj;
_local2.protocol = _local1._protocol;
_local2.debugId = _local1._id;
return(_local1.getNetDebug().onEvent(_local2));
}
function sendServerEvent(eventobj) {
eventobj.movieUrl = unescape(_root._url);
if (!sendDebugEvent(eventobj)) {
}
}
function sendClientEvent(eventobj) {
var _local1 = this;
if (_local1._config.m_debug && (_local1._config.client.m_debug)) {
if ((_local1._config.client.http && (_local1._protocol == "http")) || (_local1._config.client.rtmp && (_local1._protocol.substr(0, 4) == "rtmp"))) {
if (!_local1.sendDebugEvent(eventobj)) {
}
}
}
}
function addNetDebugHeader() {
var _local1 = this;
if (!_local1._headerAdded) {
_local1._headerAdded = true;
if ((_local1._config.m_debug && (_local1._config.app_server.m_debug)) && (_local1._protocol == "http")) {
_local1.realAddHeader("amf_server_debug", true, _local1._config.app_server);
} else {
_local1.realAddHeader("amf_server_debug", true, undefined);
}
}
}
function updateConfig(config) {
var _local1 = this;
var _local2 = config;
_local1.attachDebug();
if ((_local2 == null) && (!_local1._configured)) {
_local1._configured = true;
_local2 = mx.remoting.debug.NetDebugConfig.getRealDefaultNetDebugConfig();
}
mx.utils.ObjectCopy.copyProperties(_local1._config, _local2);
_local1._headerAdded = false;
}
function isRealTime() {
return(_protocol.substr(0, 4) == "rtmp");
}
function setupRecordSet() {
var _local1 = this;
_local1.attachDebug();
_local1._config.client.http = _local1._config.client.recordset;
}
function netDebugProxyConnect() {
var _local1 = this;
var _local2 = arguments;
_local1.attachDebug();
var _local3 = _local2[0].substr(0, 4);
if ((_local3 == "http") || (_local3.substr(0, 4) == "rtmp")) {
if (_local2[0].charAt(4) == ":") {
_local1._protocol = _local3;
} else {
_local1._protocol = _local2[0].substr(0, 5);
}
} else {
_local1._protocol = "http";
}
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugConnect(_local2));
if (_local1.isRealTime()) {
_local1._connectString = _local2[0];
_local1.getNetDebug().sendCommand(new mx.remoting.debug.commands.StartRTMPTrace(_local2[0]));
var ret = _local1.realConnect.apply(_local1, _local2);
_local1.realCall("@getClientID", new mx.remoting.RTMPClientIDResponse(_local2[0], _local1));
return(ret);
}
return(Boolean(_local1.realConnect.apply(_local1, _local2)));
}
function netDebugProxyCall() {
var _local1 = this;
var _local2 = arguments;
_local1.attachDebug();
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugCall(_local2));
_local1.addNetDebugHeader();
if (_local1._config.app_server) {
_local2[1] = new mx.remoting.debug.NetDebugResponseProxy(_local1, _local2[1]);
return(Boolean(_local1.realCall.apply(_local1, _local2)));
}
return(Boolean(_local1.realCall.apply(_local1, _local2)));
}
function netDebugProxyClose() {
var _local1 = this;
_local1.attachDebug();
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugClose());
if (_local1.isRealTime()) {
_local1.getNetDebug().sendCommand(new mx.remoting.debug.commands.StopRTMPTrace(_local1._connectString, _local1._clientId));
}
var _local2 = _local1.realClose();
_local1.getNetDebug().removeNetConnection(_local1);
return(_local2);
}
function netDebugProxyAddHeader() {
var _local1 = this;
_local1.attachDebug();
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugAddHeader(arguments));
return(Boolean(_local1.realAddHeader.apply(_local1, arguments)));
}
function setDebugId(id) {
attachDebug();
_id = id;
}
function getDebugId() {
attachDebug();
return(_id);
}
function trace(traceobj) {
var _local1 = this;
_local1.attachDebug();
if ((_local1._config.m_debug && (_local1._config.client.m_debug)) && (_local1._config.client.trace)) {
_local1.sendDebugEvent(new mx.remoting.debug.events.NetDebugTrace(traceobj));
}
}
function getDebugConfig() {
attachDebug();
return(_config);
}
function getNetDebug() {
return(mx.remoting.debug.NetDebug.getNetDebug());
}
static var _attached = false;
}
Symbol 30 MovieClip [__Packages.mx.remoting.debug.events.NetDebugDuplicateNCDError] Frame 0
class mx.remoting.debug.events.NetDebugDuplicateNCDError extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugDuplicateNCDError () {
var _local1 = this;
super();
_local1.eventType = "Error";
_local1.source = "NCD";
_local1.message = "NCD_ALREADY_RUNNING";
}
}
Symbol 31 MovieClip [__Packages.mx.remoting.debug.GlobalLocalConnection] Frame 0
class mx.remoting.debug.GlobalLocalConnection extends Object
{
var sendPrefix;
function GlobalLocalConnection (isController, receiver, domainName) {
var _local2 = this;
var _local3 = _global;
super();
_local2.maxConnections = 10;
var sToMovie = "_NetDebugLocalToDebugMovie";
var sToController = "_NetDebugLocalToController";
var connectname = null;
if (isController) {
connectname = sToController;
_local2.sendNames = new Array();
_local2.sendNames.push(sToMovie);
var _local1 = 0;
while (_local1 < _local2.maxConnections) {
_local2.sendNames.push(sToMovie + _local1);
_local1++;
}
_local2.maxConnections = 0;
} else {
connectname = sToMovie;
_local2.sendNames = new Array();
_local2.sendNames.push(sToController);
}
_local2.setDomainName(domainName);
if (_local3.g_NetDebugLocalConnection == undefined) {
_local3.g_NetDebugLocalConnection = new LocalConnection();
_local3.g_NetDebugLocalConnection.allowDomain = function () {
return(true);
};
}
if (receiver != null) {
_local3.g_NetDebugLocalConnection.m_Receiver = receiver;
_local3.g_NetDebugLocalConnection.onData = function (dataobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceive(dataobj);
};
_local3.g_NetDebugLocalConnection.onCommand = function (commandobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceiveCommand(commandobj);
};
if (!_local3.g_NetDebugLocalConnection.connect(connectname)) {
var connected = false;
var _local1 = 0;
while (_local1 < _local2.maxConnections) {
if (_local3.g_NetDebugLocalConnection.connect(connectname + _local1)) {
connected = true;
break;
}
_local1++;
}
if (!connected) {
if (isController) {
receiver.onReceiveError(new mx.remoting.debug.events.NetDebugDuplicateNCDError());
}
}
}
}
}
function setDomainName(domainName) {
var _local1 = domainName;
if ((_local1 != null) && (_local1 != "")) {
sendPrefix = _local1 + ":";
} else {
sendPrefix = "";
}
}
function send(dataobj) {
return(sendRaw("onData", dataobj));
}
function sendCommand(commandObj) {
return(sendRaw("onCommand", commandObj));
}
function sendRaw(functionName, obj) {
var _local3 = this;
var _local2 = true;
var snlen = _local3.sendNames.length;
var _local1 = 0;
while (_local1 < snlen) {
_local2 = Boolean(_local2 & _global.g_NetDebugLocalConnection.send(_local3.sendPrefix + _local3.sendNames[_local1], functionName, obj));
_local1++;
}
return(_local2);
}
}
Symbol 32 MovieClip [__Packages.mx.remoting.debug.commands.GetConfig] Frame 0
class mx.remoting.debug.commands.GetConfig extends mx.remoting.debug.commands.Local
{
var init;
function GetConfig () {
super();
}
function GetConfigCommand() {
super();
init("getConfig", null);
}
}
Symbol 33 MovieClip [__Packages.mx.remoting.debug.events.NetDebugFailedSendError] Frame 0
class mx.remoting.debug.events.NetDebugFailedSendError extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugFailedSendError (ev) {
var _local1 = this;
super();
_local1.eventType = "Error";
_local1.source = "NCD";
_local1.originalEvent = ev;
_local1.message = "NCD_FAILED_TO_SEND_EVENT";
}
}
Symbol 34 MovieClip [__Packages.mx.remoting.debug.events.NetDebugStatus] Frame 0
class mx.remoting.debug.events.NetDebugStatus extends mx.remoting.debug.events.NetDebugNetConnection
{
var eventType, status;
function NetDebugStatus (statusobj) {
super();
eventType = "Status";
status = statusobj;
}
}
Symbol 35 MovieClip [__Packages.mx.remoting.debug.events.NetDebugError] Frame 0
class mx.remoting.debug.events.NetDebugError extends mx.remoting.debug.events.NetDebug
{
var eventType, error;
function NetDebugError (dataobj) {
super();
eventType = "NetDebugError";
error = dataobj;
}
}
Symbol 36 MovieClip [__Packages.mx.remoting.debug.events.NetDebugTraceNetServices] Frame 0
class mx.remoting.debug.events.NetDebugTraceNetServices extends mx.remoting.debug.events.NetDebug
{
function NetDebugTraceNetServices (w, s, n, m) {
var _local1 = this;
super();
_local1.eventType = "NetServicesTrace";
_local1.trace = m;
_local1.who = w;
_local1.severity = s;
_local1.number = n;
}
}
Symbol 37 MovieClip [__Packages.mx.remoting.debug.events.NetDebugTrace] Frame 0
class mx.remoting.debug.events.NetDebugTrace extends mx.remoting.debug.events.NetDebug
{
var eventType, trace;
function NetDebugTrace (traceobj) {
super();
eventType = "Trace";
trace = traceobj;
}
}
Symbol 38 MovieClip [__Packages.mx.remoting.debug.NetDebug] Frame 0
class mx.remoting.debug.NetDebug extends Object
{
static var ndSingleton;
var _ncs, _nextNewId, _glc, _config;
function NetDebug () {
var _local1 = this;
super();
_local1._ncs = new Array();
_local1._config = mx.remoting.debug.NetDebugConfig.getDefaultNetDebugConfig(false);
_local1._glc = new mx.remoting.debug.GlobalLocalConnection(false, _local1);
_local1._glc.sendCommand(new mx.remoting.debug.commands.GetConfig());
_local1._nextNewId = 0;
if (_global.System.onStatus == undefined) {
_global.System.onStatus = globalOnStatus;
}
mx.remoting.NetServices.traceNetServices = traceNetServices;
}
function addNetConnection(nc) {
_ncs.push(nc);
return(_nextNewId++);
}
function requestNewConfig() {
return(sendCommand(new mx.remoting.debug.commands.GetConfig()));
}
function removeNetConnection(nc) {
var _local2 = this;
var _local3 = _local2._ncs.length;
var _local1 = 0;
while (_local1 < _local3) {
if (nc == _local2._ncs[_local1]) {
_local2._ncs.splice(_local1, 1);
return;
}
_local1++;
}
}
function sendDebugEvent(eventobj) {
if (!_glc.send(eventobj)) {
_glc.send(new mx.remoting.debug.events.NetDebugFailedSendError(stripNCDEventToMinmal(eventobj)));
return(false);
}
return(true);
}
function sendCommand(commandobj) {
return(_glc.sendCommand(commandobj));
}
function updateConfig(config) {
var _local2 = this;
mx.utils.ObjectCopy.copyProperties(_local2._config, config);
var _local3 = _local2._ncs.length;
var _local1 = 0;
while (_local1 < _local3) {
if (_local2._ncs[_local1] != null) {
_local2._ncs[_local1].updateConfig(config);
}
_local1++;
}
}
function sendStatus(statusobj) {
var _local1 = this;
if (_local1._config.m_debug && (_local1._config.client.m_debug)) {
return(_local1._glc.send(new mx.remoting.debug.events.NetDebugStatus(statusobj)));
}
return(undefined);
}
function onEvent(eventObj) {
return(sendDebugEvent(eventObj));
}
function onEventError(errorObj) {
return(sendDebugEvent(new mx.remoting.debug.events.NetDebugError(errorObj)));
}
function onReceiveCommand(commandobj) {
this[commandobj.command](commandobj.data);
}
function onReceiveError(errorobj) {
sendDebugEvent(new mx.remoting.debug.events.NetDebugError(errorobj));
}
function getConfig() {
return(_config);
}
static function getNetDebug() {
return(ndSingleton);
}
static function trace(obj) {
getNetDebug()._trace(obj);
}
static function traceNetServices(who, severity, number, message) {
getNetDebug()._traceNetServices(who, severity, number, message);
}
static function globalOnStatus(statusobj) {
getNetDebug().sendStatus(statusobj);
}
static function initialize() {
if (ndSingleton == null) {
ndSingleton = new mx.remoting.debug.NetDebug();
mx.remoting.debug.ConnectionMixin.initialize();
}
return(true);
}
static function stripNCDEventToMinmal(ev) {
var _local1 = ev;
var _local2 = new Object();
if (_local1.eventType != null) {
_local2.eventType = _local1.eventType;
}
if (_local1.source != null) {
_local2.source = _local1.source;
}
if (_local1.movieUrl != null) {
_local2.movieUrl = _local1.movieUrl;
}
if (_local1.date != null) {
_local2.date = _local1.date;
}
if (_local1.time != null) {
_local2.time = _local1.time;
}
if (_local1.protocol != null) {
_local2.protocol = _local1.protocol;
}
if (_local1.debugId != null) {
_local2.debugId = _local1.debugId;
}
return(_local2);
}
function _traceNetServices(who, severity, number, message) {
var _local1 = this;
if ((_local1._config.m_debug && (_local1._config.client.m_debug)) && (_local1._config.client.trace)) {
if (!_local1.sendDebugEvent(new mx.remoting.debug.events.NetDebugTraceNetServices(who, severity, number, message))) {
}
}
}
function _trace(traceobj) {
var _local1 = this;
if ((_local1._config.m_debug && (_local1._config.client.m_debug)) && (_local1._config.client.trace)) {
if (!_local1.sendDebugEvent(new mx.remoting.debug.events.NetDebugTrace(traceobj))) {
}
}
}
static var version = "1.2.0.124";
}
Symbol 39 MovieClip [__Packages.mx.remoting.debug.commands.AddRTMPClient] Frame 0
class mx.remoting.debug.commands.AddRTMPClient extends mx.remoting.debug.commands.Local
{
var init;
function AddRTMPClient (cs, cid) {
super();
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
_local1.clientid = cid;
init("addRealTimeClient", _local1);
}
}
Symbol 40 MovieClip [__Packages.mx.remoting.RTMPClientIDResponse] Frame 0
class mx.remoting.RTMPClientIDResponse extends Object
{
var _connectString, _nc;
function RTMPClientIDResponse (cs, nc) {
super();
_connectString = cs;
_nc = nc;
}
function onResult(cid) {
_nc._clientId = cid;
mx.remoting.debug.NetDebug.getNetDebug().sendCommand(new mx.remoting.debug.commands.AddRTMPClient(_connectString, cid));
}
}
Symbol 41 MovieClip [__Packages.mx.remoting.debug.events.NetDebugCall] Frame 0
class mx.remoting.debug.events.NetDebugCall extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugCall (args) {
var _local2 = this;
var _local3 = args;
super();
_local2.eventType = "Call";
_local2.methodName = _local3[0];
_local2.parameters = new Array();
var alen = _local3.length;
var _local1 = 2;
while (_local1 < alen) {
_local2.parameters[_local1 - 2] = _local3[_local1];
_local1++;
}
}
}
Symbol 42 MovieClip [__Packages.mx.remoting.debug.events.NetDebugResult] Frame 0
class mx.remoting.debug.events.NetDebugResult extends mx.remoting.debug.events.NetDebugNetConnection
{
var eventType, result;
function NetDebugResult (resultobj) {
super();
eventType = "Result";
result = resultobj;
}
}
Symbol 43 MovieClip [__Packages.mx.remoting.debug.events.NetDebugReceiveCall] Frame 0
class mx.remoting.debug.events.NetDebugReceiveCall extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugReceiveCall (mName, args) {
var _local1 = this;
super();
_local1.eventType = "ReceivedCall";
_local1.methodName = mName;
_local1.parameters = args;
}
}
Symbol 44 MovieClip [__Packages.mx.remoting.debug.NetDebugResponseProxy] Frame 0
class mx.remoting.debug.NetDebugResponseProxy extends Object
{
var _sourceNC, _originalNR;
function NetDebugResponseProxy (source, original) {
super();
_sourceNC = source;
_originalNR = original;
}
function onDebugEvents(debugevents) {
var _local3 = debugevents;
var _local2 = _local3.length;
var _local1 = 0;
while (_local1 < _local2) {
_sourceNC.sendServerEvent(_local3[_local1]);
_local1++;
}
}
function onResult(resultobj) {
_sourceNC.sendClientEvent(new mx.remoting.debug.events.NetDebugResult(resultobj));
_originalNR.onResult(resultobj);
}
function onStatus(statusobj) {
var _local1 = this;
var _local2 = statusobj;
_local1._sourceNC.sendClientEvent(new mx.remoting.debug.events.NetDebugStatus(_local2));
if (_local1._originalNR.onStatus != undefined) {
_local1._originalNR.onStatus(_local2);
} else {
_global.System.onStatus(_local2);
}
}
function __resolve(name) {
var _local1 = name;
trace("NetDebugResponseProxy.__resolve name: " + _local1);
_sourceNC.sendClientEvent(new mx.remoting.debug.events.NetDebugReceiveCall(_local1, arguments));
_originalNR[_local1].apply(arguments);
return(null);
}
}
Symbol 45 MovieClip [__Packages.mx.remoting.debug.events.NetDebugClose] Frame 0
class mx.remoting.debug.events.NetDebugClose extends mx.remoting.debug.events.NetDebugNetConnection
{
var eventType;
function NetDebugClose () {
super();
eventType = "Close";
}
}
Symbol 46 MovieClip [__Packages.mx.remoting.debug.commands.StopRTMPTrace] Frame 0
class mx.remoting.debug.commands.StopRTMPTrace extends mx.remoting.debug.commands.Local
{
var init;
function StopRTMPTrace () {
super();
}
function StopRTMPTraceCommand(cs, cid) {
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
_local1.clientid = cid;
init("stopRealTimeTrace", _local1);
}
}
Symbol 47 MovieClip [__Packages.mx.remoting.debug.events.NetDebugAddHeader] Frame 0
class mx.remoting.debug.events.NetDebugAddHeader extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugAddHeader (args) {
var _local1 = this;
var _local2 = args;
super();
_local1.eventType = "AddHeader";
_local1.headerName = _local2[0];
_local1.mustUnderstand = _local2[1];
if (_local2[2] != null) {
_local1.headerObject = _local2[2];
}
}
}
Symbol 48 MovieClip [__Packages.mx.remoting.debug.events.NetDebugInfoError] Frame 0
class mx.remoting.debug.events.NetDebugInfoError extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugInfoError (infoobj, mes) {
var _local1 = this;
super();
_local1.eventType = "Error";
_local1.source = "NCD";
_local1.info = infoobj;
if (mes != null) {
_local1.message = mes;
}
}
}
Symbol 49 MovieClip [__Packages.mx.remoting.debug.events.NetDebugRtmpLog] Frame 0
class mx.remoting.debug.events.NetDebugRtmpLog extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugRtmpLog (infoobj) {
var _local1 = this;
super();
_local1.eventType = "Trace";
_local1.source = "Flash Communication Server";
_local1.info = infoobj;
_local1.trace = infoobj.description;
}
}
Symbol 50 MovieClip [__Packages.mx.remoting.debug.commands.UpdateNetDebugConfig] Frame 0
class mx.remoting.debug.commands.UpdateNetDebugConfig extends mx.remoting.debug.commands.Local
{
var init;
function UpdateNetDebugConfig () {
super();
}
function UpdateNetDebugCommand(dataobj) {
super();
init("updateConfig", dataobj);
}
}
Symbol 51 MovieClip [__Packages.mx.remoting.ApiClasses] Frame 0
class mx.remoting.ApiClasses extends MovieClip
{
function ApiClasses () {
super();
}
}
Symbol 53 MovieClip [__Packages.mx.remoting.DataGlue] Frame 0
class mx.remoting.DataGlue extends Object
{
var __dataProv, __labelStr, __dataStr, formatFunction;
function DataGlue (dp) {
super();
__dataProv = dp;
}
function get dataProvider() {
return(__dataProv);
}
function get labelString() {
return(__labelStr);
}
function set labelString(val) {
__labelStr = val;
//return(labelString);
}
function get dataString() {
return(__dataStr);
}
function set dataString(val) {
__dataStr = val;
//return(dataString);
}
static function bindFormatStrings(dataConsumer, dp, labelStr, dataStr) {
var _local1 = new mx.remoting.DataGlue(dp);
_local1.__set__labelString(labelStr);
_local1.__set__dataString(dataStr);
_local1.getItemAt = mx.remoting.DataGlue.prototype.getItemAt_FormatString;
dataConsumer.dataProvider = _local1;
}
static function bindFormatFunction(dataConsumer, dp, formatFunc) {
var _local1 = new mx.remoting.DataGlue(dp);
_local1.formatFunction = formatFunc;
_local1.getItemAt = mx.remoting.DataGlue.prototype.getItemAt_FormatFunction;
dataConsumer.setDataProvider(_local1);
}
function addEventListener(eventName, listener) {
dataProvider.addEventListener(eventName, listener);
}
function get length() {
return(getLength());
}
function getLength() {
return(dataProvider.length);
}
function format(formatString, item) {
var _local3 = formatString.split("#");
var result = "";
var tlen = _local3.length;
var _local2;
var _local1 = 0;
while (_local1 < tlen) {
result = result + _local3[_local1];
_local2 = _local3[_local1 + 1];
if (_local2 != undefined) {
result = result + item[_local2];
}
_local1 = _local1 + 2;
}
return(result);
}
function getItemAt_FormatString(index) {
var _local2 = this;
var _local1 = _local2.dataProvider.getItemAt(index);
if ((_local1 == "in progress") || (_local1 == undefined)) {
return(_local1);
}
return({label:_local2.format(_local2.__get__labelString(), _local1), data:((_local2.__get__dataString() == null) ? (_local1) : (_local2.format(_local2.__get__dataString(), _local1)))});
}
function getItemAt_FormatFunction(index) {
var _local1 = dataProvider.getItemAt(index);
if ((_local1 == "in progress") || (_local1 == undefined)) {
return(_local1);
}
return(formatFunction(_local1));
}
function getItemID(index) {
return(dataProvider.getItemID(index));
}
function addItemAt(index, value) {
dataProvider.addItemAt(index, value);
}
function addItem(value) {
dataProvider.addItem(value);
}
function removeItemAt(index) {
dataProvider.removeItemAt(index);
}
function removeAll() {
dataProvider.removeAll();
}
function replaceItemAt(index, itemObj) {
dataProvider.replaceItemAt(index, itemObj);
}
function sortItemsBy(fieldNames, optionFlags) {
dataProvider.sortItemsBy(fieldNames, optionFlags);
}
function sortItems(compareFunc, optionFlags) {
dataProvider.sortItems(compareFunc, optionFlags);
}
static var version = "1.2.0.124";
}
Symbol 63 MovieClip [__Packages.mx.rpc.DefaultResponder] Frame 0
class mx.rpc.DefaultResponder
{
var __target;
function DefaultResponder (t) {
target = (t);
}
function get target() {
return(__target);
}
function set target(t) {
__target = t;
//return(target);
}
function onResult(event) {
trace("RPC Result: " + event.__get__result());
}
function onFault(event) {
trace("RPC Fault: " + event.fault.faultstring);
}
}
Symbol 623 MovieClip [mc.blackout] Frame 1
#initclip 121
Object.registerClass("mc.blackout", Blackout);
#endinitclip
Symbol 635 MovieClip Frame 1
stop();
Symbol 637 MovieClip Frame 1
stop();
Symbol 641 MovieClip Frame 1
stop();
Symbol 643 MovieClip Frame 1
stop();
Symbol 645 MovieClip [mc.sendtofriend] Frame 1
#initclip 124
Object.registerClass("mc.sendtofriend", SendToFriend);
#endinitclip
stop();
init();
Symbol 645 MovieClip [mc.sendtofriend] Frame 8
stop();
another_btn.onRelease = function () {
play();
};
close_btn.onRelease = function () {
cancel();
};
close_btn.onRollOver = (another_btn.onRollOver = rollOver);
close_btn.onRollOut = (another_btn.onRollOut = rollOut);
Symbol 647 MovieClip Frame 1
stop();
Symbol 664 MovieClip [mc.endGame] Frame 1
#initclip 122
Object.registerClass("mc.endGame", SubmitScoreJSON);
#endinitclip
stop();
Symbol 664 MovieClip [mc.endGame] Frame 2
name_txt.restrict = "A-Z a-z";
Symbol 674 MovieClip [mc.highscores] Frame 1
#initclip 123
Object.registerClass("mc.highscores", HighScoresJSON);
#endinitclip