Section 1
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package fl.transitions.easing
Section 2
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 3
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 4
//absClip_12 (Run_fla.absClip_12)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class absClip_12 extends MovieClip {
public var hitBox:SimpleButton;
public var currentframe:Number;
public function absClip_12(){
addFrameScript(0, frame1);
}
function frame1(){
try {
hitBox.addEventListener("click", function (_arg1:Event){
navigateToURL(new URLRequest("http://www.albinoblacksheep.com/"));
});
} catch(exception:Error) {
trace("Error: cannot access albinoblacksheep.com");
};
stop();
currentframe = 1;
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
currentframe = (currentframe + ((30 * root.tsle) * (this.hitTestPoint(root.mouseX, root.mouseY)) ? 1 : -1));
currentframe = Math.max(Math.min(currentframe, 11), 0);
gotoAndStop(Math.round(currentframe));
}
}
}//package Run_fla
Section 5
//advComplete_76 (Run_fla.advComplete_76)
package Run_fla {
import flash.display.*;
public dynamic class advComplete_76 extends MovieClip {
public var checkMark:MovieClip;
}
}//package Run_fla
Section 6
//API_3 (Run_fla.API_3)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class API_3 extends MovieClip {
public var loader:Loader;
public var paramObj:Object;
public var urlRequest:URLRequest;
public var api_url:String;
public var kongregate;
public function API_3(){
addFrameScript(0, frame1);
}
public function loadComplete(_arg1:Event){
kongregate = _arg1.target.content;
kongregate.services.connect();
}
function frame1(){
if (root.kongregate == null){
paramObj = LoaderInfo(root.loaderInfo).parameters;
api_url = ((paramObj.api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf"));
urlRequest = new URLRequest(api_url);
loader = new Loader();
loader.contentLoaderInfo.addEventListener("complete", loadComplete);
loader.load(urlRequest);
addChild(loader);
kongregate = null;
};
}
}
}//package Run_fla
Section 7
//Background_4 (Run_fla.Background_4)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Background_4 extends MovieClip {
public function Background_4(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package Run_fla
Section 8
//button_8 (Run_fla.button_8)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class button_8 extends MovieClip {
public var checkMark:MovieClip;
public var hitBox:SimpleButton;
public var checked:Boolean;
public var currentframe:Number;
public function button_8(){
addFrameScript(0, frame1);
}
public function displayCheck(){
checkMark.visible = true;
checked = true;
}
function frame1(){
checkMark.visible = checked;
stop();
currentframe = 1;
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
currentframe = (currentframe + ((30 * root.tsle) * (this.hitTestPoint(root.mouseX, root.mouseY)) ? 1 : -1));
currentframe = Math.max(Math.min(currentframe, 11), 0);
gotoAndStop(Math.round(currentframe));
}
}
}//package Run_fla
Section 9
//Character_18 (Run_fla.Character_18)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Character_18 extends MovieClip {
public var clip3:MovieClip;
public var clip4:MovieClip;
public var currentclip:MovieClip;
public var currentframe:Number;
public var currentclipnumber:Number;
public var clip1:MovieClip;
public var clip5:MovieClip;
public var clip6:MovieClip;
public var clip2:MovieClip;
public function Character_18(){
addFrameScript(0, frame1);
}
function frame1(){
stopped = false;
currentframe = 1;
currentclipnumber = 2;
currentclip = clip2;
addEventListener("enterFrame", onenterframe);
onenterframe(new Event("genericString"));
}
public function onenterframe(_arg1:Event){
if (root.rotating){
return (null);
};
currentclipnumber = ((((((root.jumping) || (!((root.cameraY == 280))))) || ((currentclipnumber > 3)))) ? 5 : 2 + Math.max(Math.min(Math.round((root.xVel / 200)), 1), -1));
currentclip = this[("clip" + currentclipnumber.toString())];
clip1.visible = false;
clip2.visible = false;
clip3.visible = false;
clip4.visible = false;
clip5.visible = false;
clip6.visible = false;
currentclip.visible = true;
if (stopped){
return (null);
};
if (currentclipnumber > 3){
if (root.yVel > 250){
currentframe = 10;
} else {
if (root.yVel > -100){
if (!root.gamePaused){
currentframe = (currentframe + (30 * root.tslf));
if (((!((root.cameraY == 280))) && ((currentframe > 10)))){
currentframe = 10;
};
};
} else {
currentframe = 2;
};
};
if (root.falling){
currentframe = 10;
};
if ((((280 == root.cameraY)) && (!(root.gamePaused)))){
if (currentclip.currentFrame < 11){
currentframe = 11;
} else {
currentframe = Math.min((currentframe + (((10 * 0.2) * root.zVel) * root.tslf)), 42);
};
};
if ((((currentframe >= 11)) && (!(root.kt.isDown(root.jumpKey))))){
root.jumping = false;
};
if (currentframe >= 15){
currentclip.gotoAndStop(1);
currentframe = Math.ceil((Math.random() * 18));
currentclipnumber = 2;
currentclip = clip2;
root.jumping = false;
};
} else {
if (!root.gamePaused){
currentframe = root.getWithinRange((currentframe + (16 * root.tslf)), 1, 18);
};
};
if (currentclip == clip3){
clip3.gotoAndStop(root.getWithinRange((Math.round(currentframe) + 9), 1, 18));
} else {
currentclip.gotoAndStop(Math.round(currentframe));
};
}
}
}//package Run_fla
Section 10
//DisplayOptions_70 (Run_fla.DisplayOptions_70)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class DisplayOptions_70 extends MovieClip {
public var currentframe:Number;
public function DisplayOptions_70(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
currentframe = 1;
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
var _local2:Boolean;
if (parent.dActivator == null){
removeEventListener("enterFrame", onenterframe);
return;
};
_local2 = ((this.hitTestPoint(root.mouseX, root.mouseY, true)) && ((currentFrame > 16)));
_local2 = ((_local2) || (parent.dActivator.hitTestPoint(root.mouseX, root.mouseY)));
_local2 = ((_local2) && ((parent.t.currentFrame < 10)));
currentframe = (currentframe + ((30 * root.tsle) * (_local2) ? 1 : -1));
currentframe = Math.max(Math.min(currentframe, 20), 0);
gotoAndStop(Math.round(currentframe));
}
}
}//package Run_fla
Section 11
//distanceVisible_51 (Run_fla.distanceVisible_51)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class distanceVisible_51 extends MovieClip {
public var prevFocus:Object;
public var newDistance:Number;
public var inputDistance:TextField;
public function distanceVisible_51(){
addFrameScript(0, frame1);
}
public function onLeave(){
newDistance = parseInt(inputDistance.text);
if (!isNaN(newDistance)){
newDistance = (newDistance + 6);
if (root.distanceVisible != newDistance){
root.distanceVisible = Math.min(Math.max(Math.round(newDistance), 12), 20);
inputDistance.text = (root.distanceVisible - 6).toString();
newDistance = parseInt(inputDistance.text);
root.saveFile.data.distanceVisible = root.distanceVisible;
};
};
}
function frame1(){
newDistance = (root.distanceVisible - 6);
inputDistance.text = newDistance.toString();
prevFocus = stage.focus;
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
if (inputDistance == stage.focus){
if (((!((inputDistance == prevFocus))) && ((inputDistance.text == newDistance.toString())))){
inputDistance.text = "";
};
} else {
if (inputDistance == prevFocus){
if (inputDistance.text == ""){
inputDistance.text = newDistance.toString();
} else {
onLeave();
};
};
};
prevFocus = stage.focus;
}
}
}//package Run_fla
Section 12
//Drawings_6 (Run_fla.Drawings_6)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Drawings_6 extends MovieClip {
public var highY:Number;
public var tileType:uint;
public var drawings:Shape;
public var leftX:Number;
public var endPos:uint;
public var startPos:uint;
public var lowY:Number;
public var rightX:Number;
public function Drawings_6(){
addFrameScript(0, frame1);
}
public function drawSection(_arg1:int){
leftX = convertX(400, (_arg1 + 0.5));
rightX = convertX(400, (_arg1 - 0.5));
if ((((leftX < 275)) || (root.rotating))){
startPos = 0;
while (startPos < 4) {
if ((((_arg1 < 0)) || ((_arg1 >= root.level.length)))){
tileType = 1;
} else {
tileType = root.level[_arg1][root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15)];
};
if (tileType != 0){
endPos = (startPos + 1);
while ((((endPos < 4)) && ((((((_arg1 < 0)) || ((_arg1 >= root.level.length)))) || ((root.level[_arg1][root.getWithinRange(((endPos + (4 * root.angle)) - 4), 0, 15)] == tileType)))))) {
endPos++;
};
endPos--;
drawings.graphics.beginFill(root.getColor(_arg1, root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15), root.tileAlpha), 100);
drawings.graphics.moveTo(leftX, convertY((100 * (((endPos * 2) - 4) + 2)), (_arg1 + 0.5)));
if (root.rotating){
drawings.graphics.lineStyle(1, root.getColor(_arg1, root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15), root.tileAlpha), 100);
};
drawings.graphics.lineTo(leftX, convertY((100 * ((startPos * 2) - 4)), (_arg1 + 0.5)));
drawings.graphics.lineStyle(1, 0x929292, 0);
drawings.graphics.lineTo(rightX, convertY((100 * ((startPos * 2) - 4)), (_arg1 - 0.5)));
drawings.graphics.lineTo(rightX, convertY((100 * (((endPos * 2) - 4) + 2)), (_arg1 - 0.5)));
drawings.graphics.lineTo(leftX, convertY((100 * (((endPos * 2) - 4) + 2)), (_arg1 + 0.5)));
drawings.graphics.endFill();
startPos = endPos;
};
startPos++;
};
};
rightX = convertX(-400, (_arg1 + 0.5));
if ((((rightX > -275)) || (root.rotating))){
leftX = convertX(-400, (_arg1 - 0.5));
startPos = (4 * 2);
while (startPos < (4 * 3)) {
if ((((_arg1 < 0)) || ((_arg1 >= root.level.length)))){
tileType = 1;
} else {
tileType = root.level[_arg1][root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15)];
};
if (tileType != 0){
endPos = (startPos + 1);
while ((((endPos < (4 * 3))) && ((((((_arg1 < 0)) || ((_arg1 >= root.level.length)))) || ((root.level[_arg1][root.getWithinRange(((endPos + (4 * root.angle)) - 4), 0, 15)] == tileType)))))) {
endPos++;
};
endPos--;
drawings.graphics.beginFill(root.getColor(_arg1, root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15), root.tileAlpha), 100);
drawings.graphics.moveTo(rightX, convertY((100 * (((((4 * 2) - endPos) * 2) - 4) + 6)), (_arg1 + 0.5)));
if (root.rotating){
drawings.graphics.lineStyle(1, root.getColor(_arg1, root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15), root.tileAlpha), 100);
};
drawings.graphics.lineTo(rightX, convertY((100 * (((((4 * 2) - startPos) * 2) - 4) + 8)), (_arg1 + 0.5)));
drawings.graphics.lineStyle(1, 0x929292, 0);
drawings.graphics.lineTo(leftX, convertY((100 * (((((4 * 2) - startPos) * 2) - 4) + 8)), (_arg1 - 0.5)));
drawings.graphics.lineTo(leftX, convertY((100 * (((((4 * 2) - endPos) * 2) - 4) + 6)), (_arg1 - 0.5)));
drawings.graphics.lineTo(rightX, convertY((100 * (((((4 * 2) - endPos) * 2) - 4) + 6)), (_arg1 + 0.5)));
drawings.graphics.endFill();
startPos = endPos;
};
startPos++;
};
};
lowY = convertY(-400, (_arg1 + 0.5));
if ((((lowY > -200)) || (root.rotating))){
highY = convertY(-400, (_arg1 - 0.5));
startPos = (4 * 3);
while (startPos < (4 * 4)) {
if ((((_arg1 < 0)) || ((_arg1 >= root.level.length)))){
tileType = 1;
} else {
tileType = root.level[_arg1][root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15)];
};
if (tileType != 0){
endPos = (startPos + 1);
while ((((endPos < (4 * 4))) && ((((((_arg1 < 0)) || ((_arg1 >= root.level.length)))) || ((root.level[_arg1][root.getWithinRange(((endPos + (4 * root.angle)) - 4), 0, 15)] == tileType)))))) {
endPos++;
};
endPos--;
drawings.graphics.beginFill(root.getColor(_arg1, root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15), root.tileAlpha), 100);
drawings.graphics.moveTo(convertX((100 * (((endPos - (4 * 3)) * 2) - 2)), (_arg1 + 0.5)), lowY);
if (root.rotating){
drawings.graphics.lineStyle(1, root.getColor(_arg1, root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15), root.tileAlpha), 100);
};
drawings.graphics.lineTo(convertX((100 * (((startPos - (4 * 3)) * 2) - 4)), (_arg1 + 0.5)), lowY);
drawings.graphics.lineStyle(1, 0x929292, 0);
drawings.graphics.lineTo(convertX((100 * (((startPos - (4 * 3)) * 2) - 4)), (_arg1 - 0.5)), highY);
drawings.graphics.lineTo(convertX((100 * (((endPos - (4 * 3)) * 2) - 2)), (_arg1 - 0.5)), highY);
drawings.graphics.lineTo(convertX((100 * (((endPos - (4 * 3)) * 2) - 2)), (_arg1 + 0.5)), lowY);
drawings.graphics.endFill();
startPos = endPos;
};
startPos++;
};
};
highY = convertY(400, (_arg1 + 0.5));
lowY = convertY(400, (_arg1 - 0.5));
if ((((highY < 200)) || (root.rotating))){
startPos = 4;
while (startPos < 8) {
if ((((_arg1 < 0)) || ((_arg1 >= root.level.length)))){
tileType = 1;
} else {
tileType = root.level[_arg1][root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15)];
};
if (tileType != 0){
endPos = (startPos + 1);
while ((((endPos < 8)) && ((((((_arg1 < 0)) || ((_arg1 >= root.level.length)))) || ((root.level[_arg1][root.getWithinRange(((endPos + (4 * root.angle)) - 4), 0, 15)] == tileType)))))) {
endPos++;
};
endPos--;
drawings.graphics.beginFill(root.getColor(_arg1, root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15), root.tileAlpha), 100);
drawings.graphics.moveTo(convertX((100 * (((((4 * 2) - endPos) * 2) - 4) - 2)), (_arg1 + 0.5)), highY);
if (root.rotating){
drawings.graphics.lineStyle(1, root.getColor(_arg1, root.getWithinRange(((startPos + (4 * root.angle)) - 4), 0, 15), root.tileAlpha), 100);
};
drawings.graphics.lineTo(convertX((100 * ((((4 * 2) - startPos) * 2) - 4)), (_arg1 + 0.5)), highY);
drawings.graphics.lineStyle(1, 0x929292, 0);
drawings.graphics.lineTo(convertX((100 * ((((4 * 2) - startPos) * 2) - 4)), (_arg1 - 0.5)), lowY);
drawings.graphics.lineTo(convertX((100 * (((((4 * 2) - endPos) * 2) - 4) - 2)), (_arg1 - 0.5)), lowY);
drawings.graphics.lineTo(convertX((100 * (((((4 * 2) - endPos) * 2) - 4) - 2)), (_arg1 + 0.5)), highY);
drawings.graphics.endFill();
startPos = endPos;
};
startPos++;
};
};
}
public function convertX(_arg1:Number, _arg2:Number):Number{
if (root.cameraZ < _arg2){
return (((8000 * (_arg1 - root.cameraX)) / fourthPower(((_arg2 + 5) - root.cameraZ))));
};
return (0);
}
public function fourthPower(_arg1:Number):Number{
return ((((_arg1 * _arg1) * _arg1) * _arg1));
}
public function convertY(_arg1:Number, _arg2:Number):Number{
if (root.cameraZ < _arg2){
return (((8000 * (_arg1 - root.cameraY)) / fourthPower(((_arg2 + 5) - root.cameraZ))));
};
return (0);
}
public function clearAll(){
drawings.graphics.clear();
}
function frame1(){
drawings = new Shape();
addChild(drawings);
}
}
}//package Run_fla
Section 13
//editContainer_29 (Run_fla.editContainer_29)
package Run_fla {
import flash.display.*;
public dynamic class editContainer_29 extends MovieClip {
public var tor:editor;
}
}//package Run_fla
Section 14
//EditMenu_61 (Run_fla.EditMenu_61)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class EditMenu_61 extends MovieClip {
public var openEditMenu:SimpleButton;
public var saveLoad:MovieClip;
public var dActivator:MovieClip;
public var d:MovieClip;
public var t:MovieClip;
public var direction:int;
public var currentframe:Number;
public var playtest:SimpleButton;
public var invisiButton:MovieClip;
public var back:SimpleButton;
public function EditMenu_61(){
addFrameScript(0, frame1, 19, frame20);
}
public function emptyAll(_arg1:Event){
var yPos:*;
var xPos:*;
var e = _arg1;
yPos = 0;
while (yPos < root.level.length) {
xPos = 0;
while (xPos < 16) {
root.level[yPos][xPos] = 0;
xPos = (xPos + 1);
};
yPos = (yPos + 1);
};
var _local3 = root;
with (_local3) {
level[0][5] = 1;
level[1][5] = 1;
level[2][5] = 1;
level[3][5] = 1;
edi.tor.gotoAndPlay(2);
buttonJustClicked = true;
};
}
public function fillAll(_arg1:Event){
var yPos:*;
var xPos:*;
var e = _arg1;
yPos = 0;
while (yPos < root.level.length) {
xPos = 0;
while (xPos < 16) {
root.level[yPos][xPos] = 1;
xPos = (xPos + 1);
};
yPos = (yPos + 1);
};
var _local3 = root;
with (_local3) {
edi.tor.gotoAndPlay(2);
buttonJustClicked = true;
};
}
function frame20(){
invisiButton.addEventListener("mouseDown", function (_arg1:Event){
stage.focus = back;
});
}
function frame1(){
playtest.addEventListener("mouseDown", goPlaytest);
t.fill.addEventListener("mouseDown", fillAll);
t.empty.addEventListener("mouseDown", emptyAll);
t.aRT.addEventListener("mouseDown", addRandom);
saveLoad.addEventListener("mouseDown", doSaveLoad);
t.addEventListener("click", doNothing);
d.addEventListener("click", doNothing);
stop();
currentframe = 1;
direction = 0;
addEventListener("enterFrame", onenterframe);
openEditMenu.addEventListener("click", openMenu);
}
public function doSaveLoad(_arg1:Event){
var tempString:*;
var yPos:*;
var xPos:*;
var e = _arg1;
var _local3 = saveLoad;
with (_local3) {
if (isSave){
tempString = "";
yPos = 0;
while (yPos < root.level.length) {
xPos = 0;
while (xPos < 16) {
tempString = (tempString + root.level[yPos][xPos]);
xPos++;
};
yPos++;
};
tempString = ((((binToHex(tempString) + "|") + root.getLevelText()) + "|") + root.getLevelColor());
root.inOut.text = tempString;
root.inOut.visible = true;
parent.gotoAndStop(4);
} else {
var _local4 = root;
with (_local4) {
loadLevel(inOut.text);
lText.gotoAndStop(1);
lText.currentframe = -100;
level[0][5] = 1;
level[1][5] = 1;
level[2][5] = 1;
level[3][5] = 1;
edi.tor.gotoAndPlay(2);
inOut.visible = false;
};
parent.gotoAndStop(2);
};
isSave = !(isSave);
root.buttonJustClicked = true;
};
}
public function onenterframe(_arg1:Event){
if (((root.mouseIsDown) && (hitTestPoint(root.mouseX, root.mouseY, true)))){
if ((((stage.focus == null)) || ((stage.focus == back)))){
direction = -1;
stage.focus = parent.focusReceiver;
};
};
currentframe = (currentframe + ((30 * root.tsle) * direction));
currentframe = Math.max(Math.min(currentframe, 20), 0);
if ((((currentframe < 18.5)) && ((currentFrame >= 19)))){
stage.focus = null;
};
gotoAndStop(Math.round(currentframe));
}
public function doNothing(_arg1:Event){
}
public function openMenu(_arg1:Event){
direction = 1;
stage.focus = parent.focusReceiver;
}
public function addRandom(_arg1:Event){
var _local2:*;
var _local3:*;
_local2 = 0;
while (_local2 < root.level.length) {
_local3 = 0;
while (_local3 < 16) {
if ((((root.level[_local2][_local3] == 0)) && ((Math.random() > 0.9)))){
root.level[_local2][_local3] = 1;
};
_local3++;
};
_local2++;
};
root.edi.tor.gotoAndPlay(2);
root.buttonJustClicked = true;
}
public function goPlaytest(_arg1:Event){
var e = _arg1;
var _local3 = root;
with (_local3) {
edi.tor.Deactivate();
editing = false;
reset();
cameraZ = level.length;
playtesting = true;
starter.visible = true;
levelComplete.visible = true;
lText.visible = true;
character.visible = true;
starfield.visible = true;
starter.gotoAndPlay(1);
starter.currentframe = -100;
gamePaused = false;
drawTunnel(true);
};
_local3 = parent;
with (_local3) {
grid.visible = false;
oefType = 0;
gotoAndStop(5);
};
}
}
}//package Run_fla
Section 15
//FocusTracker_1 (Run_fla.FocusTracker_1)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class FocusTracker_1 extends MovieClip {
public function FocusTracker_1(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package Run_fla
Section 16
//framerate_50 (Run_fla.framerate_50)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class framerate_50 extends MovieClip {
public var newFramerate:Number;
public var inputFramerate:TextField;
public var prevFocus:Object;
public function framerate_50(){
addFrameScript(0, frame1);
}
public function onLeave(){
newFramerate = parseFloat(inputFramerate.text);
if (!isNaN(newFramerate)){
if (Math.round(stage.frameRate) != newFramerate){
stage.frameRate = Math.min(Math.max(Math.round(newFramerate), 10), 99);
root.saveFile.data.frameRate = stage.frameRate;
root.saveFile.flush();
};
};
}
function frame1(){
newFramerate = Math.round(stage.frameRate);
inputFramerate.text = newFramerate.toString();
prevFocus = stage.focus;
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
if (inputFramerate == stage.focus){
if (((!((inputFramerate == prevFocus))) && ((inputFramerate.text == newFramerate.toString())))){
inputFramerate.text = "";
};
} else {
if (inputFramerate == prevFocus){
if (inputFramerate.text == ""){
inputFramerate.text = newFramerate.toString();
} else {
onLeave();
};
};
};
prevFocus = stage.focus;
}
}
}//package Run_fla
Section 17
//Grid_32 (Run_fla.Grid_32)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Grid_32 extends MovieClip {
public var vPos:uint;
public var hPos:uint;
public var tileSize;
public function Grid_32(){
addFrameScript(0, frame1);
}
function frame1(){
tileSize = root.eTileSize;
graphics.lineStyle(0, 0x666666);
hPos = 0;
while (hPos < 20) {
graphics.moveTo(hPos, -1);
graphics.lineTo(hPos, 16);
hPos++;
};
vPos = 0;
while (vPos < ((400 / tileSize) + 1)) {
graphics.moveTo(0, vPos);
graphics.lineTo(4, vPos);
graphics.moveTo(5, vPos);
graphics.lineTo(9, vPos);
graphics.moveTo(10, vPos);
graphics.lineTo(14, vPos);
graphics.moveTo(15, vPos);
graphics.lineTo(19, vPos);
vPos++;
};
width = (width * tileSize);
height = (height * tileSize);
}
}
}//package Run_fla
Section 18
//HiQ_49 (Run_fla.HiQ_49)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class HiQ_49 extends MovieClip {
public var select:MovieClip;
public function HiQ_49(){
addFrameScript(0, frame1);
}
function frame1(){
select.visible = (stage.quality == "HIGH");
stop();
}
}
}//package Run_fla
Section 19
//infComplete_77 (Run_fla.infComplete_77)
package Run_fla {
import flash.display.*;
public dynamic class infComplete_77 extends MovieClip {
public var checkMark:MovieClip;
}
}//package Run_fla
Section 20
//jump_22 (Run_fla.jump_22)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class jump_22 extends MovieClip {
public function jump_22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 21
//LevelComplete_27 (Run_fla.LevelComplete_27)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class LevelComplete_27 extends MovieClip {
public var levelAlreadyCompleted:Boolean;
public var rToReplay:MovieClip;
public function LevelComplete_27(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
if (root.kt.isDown(root.jumpKey)){
gotoAndPlay(2);
} else {
gotoAndPlay(4);
};
}
function frame1(){
levelAlreadyCompleted = false;
stop();
}
function frame4(){
addEventListener("enterFrame", onenterframe);
}
function frame2(){
if (((!(levelAlreadyCompleted)) && (!(root.playtesting)))){
levelAlreadyCompleted = true;
var _local2 = root;
with (_local2) {
currentLevel = (currentLevel + 1);
if ((((playMode == "adventure")) && ((currentLevel <= (advLevels.length + 1))))){
if (currentLevel > maxLevelReached){
kongregate.scores.submit(maxLevelReached, "Level Completed");
maxLevelReached = currentLevel;
saveFile.data.maxAdvLevel = currentLevel;
saveFile.flush();
};
};
rToReplay.visible = true;
if (playMode == "infinite"){
rToReplay.visible = false;
if (difficulty == 99){
saveFile.data.infCompletions = (saveFile.data.infCompletions + 1);
saveFile.flush();
kongregate.scores.submit(saveFile.data.infCompletions, "Infinite Mode Completed");
if (saveFile.data.maxDifficulty != 100){
difficulty = 100;
};
} else {
difficulty = (difficulty + ((deaths)==0) ? 10 : Math.max((5 - (deaths / Math.sqrt(difficulty))), 1));
difficulty = Math.min(difficulty, 99);
};
if (saveFile.data.maxDifficulty < difficulty){
saveFile.data.maxDifficulty = difficulty;
saveFile.flush();
};
kongregate.scores.submit(Math.round(difficulty), "Difficulty Reached");
};
};
if (root.modeIsComplete()){
root.modeCompleted = true;
root.options.goNext(new Event(""));
gotoAndStop(1);
};
};
}
function frame5(){
gotoAndPlay(4);
}
public function onenterframe(_arg1:Event){
var e = _arg1;
if (currentFrame < 4){
return (null);
};
if (root.modeIsComplete()){
root.modeCompleted = true;
root.options.goNext(new Event(""));
gotoAndStop(1);
removeEventListener("enterFrame", onenterframe);
};
if (((root.kt.isDown(82)) && (!((root.playMode == "infinite"))))){
var _local3 = root;
with (_local3) {
currentLevel = (currentLevel - 1);
deaths = 0;
starter.gotoAndPlay(1);
};
gotoAndStop(1);
removeEventListener("enterFrame", onenterframe);
} else {
if (((root.kt.isDown(KeyTracker.SPACE)) || (root.kt.isDown(root.jumpKey)))){
_local3 = root;
with (_local3) {
if (!playtesting){
firstTimeThrough = false;
starter.gotoAndPlay(1);
} else {
options.goBackEdit(new Event(""));
};
};
gotoAndStop(1);
removeEventListener("enterFrame", onenterframe);
};
};
}
}
}//package Run_fla
Section 22
//LevelSelectMenu_13 (Run_fla.LevelSelectMenu_13)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class LevelSelectMenu_13 extends MovieClip {
public var backward:SimpleButton;
public var displayWindow:SimpleButton;
public var playButton:MovieClip;
public var startHitBox:SimpleButton;
public var selectedLevel:uint;
public var forward:SimpleButton;
public var levNumber:TextField;
public function LevelSelectMenu_13(){
addFrameScript(0, frame1);
}
public function onDown(_arg1:Event){
playButton.gotoAndStop(3);
}
public function onOver(_arg1:Event){
playButton.gotoAndStop(2);
if (root.mouseIsDown){
playButton.gotoAndStop(3);
};
}
public function displayCurrentLevel(){
var _local2 = root;
with (_local2) {
distanceVisible = 20;
loadNextLevel();
cameraX = 0;
cameraY = 0;
cameraZ = -5;
angle = 1;
back.drawings.y = -40;
back.drawings.scaleX = 0.5;
back.drawings.scaleY = 0.5;
drawTunnel();
};
}
function frame1(){
selectedLevel = root.currentLevel;
addEventListener("enterFrame", function (_arg1:Event){
levNumber.text = selectedLevel.toString();
});
forward.addEventListener("click", forwardClicked);
backward.addEventListener("click", backwardClicked);
displayCurrentLevel();
startHitBox.addEventListener("click", startGame);
displayWindow.addEventListener("click", startGame);
startHitBox.addEventListener("rollOver", onOver);
startHitBox.addEventListener("rollOut", onOut);
startHitBox.addEventListener("mouseDown", onDown);
}
public function startGame(_arg1:Event){
var e = _arg1;
var _local3 = root;
with (_local3) {
distanceVisible = saveFile.data.distanceVisible;
back.drawings.y = 0;
back.drawings.scaleX = 1;
back.drawings.scaleY = 1;
play();
};
}
public function forwardClicked(_arg1:Event){
selectedLevel = root.getWithinRange((selectedLevel + 1), 1, root.maxLevelReached);
root.currentLevel = selectedLevel;
displayCurrentLevel();
}
public function backwardClicked(_arg1:Event){
selectedLevel = root.getWithinRange((selectedLevel - 1), 1, root.maxLevelReached);
root.currentLevel = selectedLevel;
displayCurrentLevel();
}
public function onOut(_arg1:Event){
playButton.gotoAndStop(1);
}
}
}//package Run_fla
Section 23
//LowQ_46 (Run_fla.LowQ_46)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class LowQ_46 extends MovieClip {
public var select:MovieClip;
public function LowQ_46(){
addFrameScript(0, frame1);
}
function frame1(){
select.visible = (stage.quality == "LOW");
stop();
}
}
}//package Run_fla
Section 24
//LText_23 (Run_fla.LText_23)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class LText_23 extends MovieClip {
public var playing:Boolean;
public var currentframe:Number;
public var levelText:TextField;
public function LText_23(){
addFrameScript(0, frame1);
}
public function displayText(_arg1:String){
levelText.text = _arg1;
startOver();
}
public function startOver(){
playing = true;
currentframe = 2;
gotoAndStop(2);
}
function frame1(){
playing = false;
currentframe = 1;
stop();
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
if (playing){
currentframe = (currentframe + (20 * root.tslf));
gotoAndStop(Math.max(Math.min(Math.round(currentframe), 249), 1));
if (currentframe >= 250){
playing = false;
};
};
}
}
}//package Run_fla
Section 25
//MainMenu_7 (Run_fla.MainMenu_7)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MainMenu_7 extends MovieClip {
public var editButton:MovieClip;
public var infButton:MovieClip;
public var credits:MovieClip;
public var advButton:MovieClip;
public var back:SimpleButton;
public function MainMenu_7(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
back.addEventListener("click", goBack);
if (root.toLevelSelect){
gotoAndStop(2);
};
advButton.addEventListener("mouseDown", function (_arg1:Event){
onClick(1);
});
infButton.addEventListener("mouseDown", function (_arg1:Event){
onClick(2);
});
editButton.addEventListener("mouseDown", function (_arg1:Event){
onClick(3);
});
credits.addEventListener("mouseDown", function (_arg1:Event){
onClick(4);
});
if (root.saveFile.data.maxAdvLevel > root.advLevels.length){
advButton.displayCheck();
};
if (root.saveFile.data.maxDifficulty == 100){
infButton.displayCheck();
};
stop();
}
function frame2(){
root.toLevelSelect = false;
}
public function onClick(_arg1:uint){
var buttonType = _arg1;
switch (buttonType){
case 1:
root.playMode = "adventure";
root.currentLevel = 1;
if (root.saveFile.data.maxAdvLevel == 1){
root.play();
} else {
gotoAndStop(2);
};
root.front.visible = true;
root.back.visible = true;
break;
case 3:
root.toEditMode = true;
case 2:
var _local3 = root;
with (_local3) {
playMode = "infinite";
play();
currentLevel = 1;
front.visible = true;
back.visible = true;
};
break;
case 4:
gotoAndStop(3);
break;
default:
break;
};
}
public function goBack(_arg1:Event){
var e = _arg1;
gotoAndStop(1);
var _local3 = root;
with (_local3) {
distanceVisible = saveFile.data.distanceVisible;
SoundMixer.stopAll();
front.clearAll();
front.visible = false;
back.clearAll();
back.visible = false;
back.drawings.y = 0;
back.drawings.scaleX = 1;
back.drawings.scaleY = 1;
};
}
}
}//package Run_fla
Section 26
//MainTimeline (Run_fla.MainTimeline)
package Run_fla {
import flash.events.*;
import fl.transitions.easing.*;
import fl.transitions.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MainTimeline extends MovieClip {
public var xVel:Number;
public var kongregate;
public var advLevels:Array;
public var pulsePos:Number;
public var restart:MovieClip;
public var changeToSet:Boolean;
public var api:MovieClip;
public var toPlayModes:Boolean;
public var music:MovieClip;
public var front:MovieClip;
public var toLevelSelect:Boolean;
public var pulseSpeed:uint;
public var tsle:Number;
public var jumpDistance:Number;
public var tslf:Number;
public var gravity:Number;
public var yVel:Number;
public var changeTo:uint;
public var firstTimeThrough:Boolean;
public var qPressed:Boolean;
public var tutComplete:Boolean;
public var playtesting:Boolean;
public var preloader:MovieClip;
public var lastFrame:uint;
public var runSpeed:Number;
public var deaths:Number;
public var starter:MovieClip;
public var toEditMode:Boolean;
public var varsSet:Boolean;
public var tt:TimeTracker;
public var startPos:uint;
public var falling:Boolean;
public var options:MovieClip;
public var jumpStrength:Number;
public var pulseMod:Number;
public var gameTimeScale:Number;
public var acceleration:Number;
public var oefType:uint;
public var maxLevelReached:uint;
public var rightKey:Number;
public var distanceVisible:Number;
public var eXPos:Number;
public var xPos:Number;
public var saveFile:SharedObject;
public var zVel:Number;
public var targetB:Number;
public var index;
public var angle:uint;
public var targetG:Number;
public var levelComplete:MovieClip;
public var targetR:Number;
public var back:MovieClip;
public var jumpHeight:Number;
public var highX:Number;
public var playMode:String;
public var leftKey:Number;
public var buttonJustClicked:Boolean;
public var yPos:Number;
public var tileType:Number;
public var gMod:Number;
public var character:MovieClip;
public var jumping:Boolean;
public var eYPos:Number;
public var rMod:Number;
public var leftX:Number;
public var sideSpeed:Number;
public var drag:Number;
public var focusTracker:MovieClip;
public var levelData:String;
public var bMod:Number;
public var tileAlpha:Number;
public var jumpKey:Number;
public var songMuted:Boolean;
public var rotating:Boolean;
public var eTileSize:Number;
public var backgroundOffset:uint;
public var endPos:uint;
public var kt:KeyTracker;
public var level:Array;
public var lowX:Number;
public var currentLevel:uint;
public var editing:Boolean;
public var soundMuted:Boolean;
public var maxLevelLength:uint;
public var edi:MovieClip;
public var lastEvent:uint;
public var outside:Boolean;
public var lText:MovieClip;
public var difficulty:Number;
public var rightX:Number;
public var gamePaused:Boolean;
public var lineAlpha:Number;
public var cameraX:Number;
public var cameraY:Number;
public var cameraZ:Number;
public var starfield:MovieClip;
public var inOut:TextField;
public var mouseIsDown:Boolean;
public var modeCompleted:Boolean;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
public function loadNextLevel(){
var _local1:*;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
cameraZ = (-(distanceVisible) + (cameraZ - Math.floor(cameraZ)));
if (playtesting){
return (null);
};
if (modeIsComplete()){
modeCompleted = true;
options.goNext(new Event(""));
};
if (playMode == "infinite"){
level = new Array(Math.round((30 + (difficulty * 0.6))));
_local1 = ((Math.pow((difficulty / 100), 1.3) * 85) + 10);
_local2 = 5;
_local3 = 0;
_local4 = (11 + Math.round((4 * (Math.random() - 0.5))));
_local5 = 0;
_local6 = (60 / Math.pow(_local1, 1.18));
yPos = 0;
while (yPos < level.length) {
level[yPos] = new Array(16);
xPos = 0;
while (xPos < 16) {
_local7 = (((_local6 * Math.random()) + Math.round((((Math.random() / ((difBet(xPos, _local2) * 0.2) + 1.3)) + 0.15) - (_local1 / 2000)))) + Math.round((((Math.random() / ((difBet(xPos, _local4) * 0.3) + 1.5)) + 0.12) - (_local1 / 2000))));
level[yPos][xPos] = Math.max(Math.min(Math.round(_local7), 1), 0);
xPos++;
};
if (yPos > (9 - (_local1 / 15))){
_local3 = Math.max(Math.min(0.5, (_local3 + Math.round((1.1 * (Math.random() - 0.5))))), -0.5);
_local5 = Math.max(Math.min(0.5, (_local5 + Math.round((1.1 * (Math.random() - 0.5))))), -0.5);
_local2 = (_local2 + ((Math.random())<(_local1 / 150)) ? _local3 : 0);
_local2 = getWithinRange(_local2, 0, 15);
_local4 = (_local4 + ((Math.random())<(_local1 / 150)) ? _local5 : 0);
_local4 = getWithinRange(_local4, 0, 15);
};
yPos++;
};
switch (Math.floor((difficulty / 20))){
case 0:
targetR = (randInt(30, 70) / 140);
targetG = (randInt(130, 190) / 140);
targetB = (randInt(210, 0xFF) / 140);
break;
case 1:
targetR = (randInt(50, 100) / 140);
targetG = (randInt(50, 100) / 140);
targetB = (randInt(240, 0xFF) / 140);
break;
case 2:
targetR = (randInt(50, 100) / 140);
targetG = (randInt(210, 0xFF) / 140);
targetB = (randInt(50, 100) / 140);
break;
case 3:
targetR = (randInt(210, 0xFF) / 140);
targetG = (randInt(210, 0xFF) / 140);
targetB = (randInt(30, 70) / 140);
break;
case 4:
targetR = (randInt(210, 0xFF) / 140);
targetG = (randInt(130, 190) / 140);
targetB = (randInt(30, 70) / 140);
break;
case 5:
targetR = (randInt(210, 0xFF) / 140);
targetG = (randInt(50, 100) / 140);
targetB = (randInt(50, 100) / 140);
break;
default:
targetR = (randInt(50, 0xFF) / 140);
targetG = (randInt(50, 0xFF) / 140);
targetB = (randInt(50, 0xFF) / 140);
};
if (difficulty >= 99){
setLevelColor("0xFF0000");
};
deaths = 0;
} else {
loadLevel(getLevel(currentLevel));
if (playMode == "adventure"){
difficulty = (10 + ((currentLevel / root.advLevels.length) * 80));
} else {
difficulty = (1 + ((currentLevel / root.tutLevels.length) * 10));
};
};
level[0][5] = 1;
level[1][5] = 1;
level[2][5] = 1;
level[3][5] = 1;
if (playMode == "infinite"){
gameTimeScale = (1 + (difficulty / 200));
} else {
gameTimeScale = (1.125 + (currentLevel * 0.005));
};
if (playMode == "tutorial"){
gameTimeScale = 1;
};
}
public function getLevelText():String{
return (lText.levelText.text);
}
public function onKeyPress(_arg1:Event){
kt.keyDownHandler(_arg1);
if ((((oefType == 2)) && (!(editing)))){
tsle = ((gameTimeScale * tt.timeSince(lastEvent)) / 1000);
lastEvent = tt.time();
inOut.visible = false;
stdMove();
};
}
public function binFromHex(_arg1:String):String{
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg1.substring(0, 2) == "0x"){
_arg1 = _arg1.substring(2, _arg1.length);
};
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = parseInt(_arg1.charAt(_local3));
if (isNaN(_local4)){
_local4 = (_arg1.charCodeAt(_local3) - 55);
};
_local5 = 8;
while (_local5 >= 1) {
if (_local4 >= _local5){
_local4 = (_local4 - _local5);
_local2 = (_local2 + "1");
} else {
_local2 = (_local2 + "0");
};
_local5 = (_local5 / 2);
};
_local3++;
};
return (_local2);
}
public function getLevelColor():String{
var _local1:String;
_local1 = ((((targetR * 140) << 16) | ((targetG * 140) << 8)) | (targetB * 140)).toString(16);
while (_local1.length < 6) {
_local1 = ("0" + _local1);
};
return (("0x" + _local1.toUpperCase()));
}
public function loadLevel(_arg1:String){
var iterations:Number;
var sections:Array;
var levelStr = _arg1;
if (levelStr.substring(0, 2) == "0x"){
sections = levelStr.split("|");
levelStr = binFromHex(sections[0]);
if (lText != null){
if (sections[1] == null){
lText.displayText("");
} else {
lText.displayText(sections[1]);
};
};
if (sections[2] != null){
setLevelColor(sections[2]);
};
};
level.length = Math.max(Math.ceil((levelStr.length / 16)), 20);
yPos = 0;
while (yPos < level.length) {
level[yPos] = new Array(16);
yPos++;
};
iterations = 0;
try {
yPos = 0;
while (yPos < level.length) {
xPos = 0;
while (xPos < 16) {
try {
level[yPos][xPos] = ((levelStr.charAt(iterations))=="1") ? 1 : 0;
} catch(e:Error) {
level[yPos][xPos] = 0;
};
iterations = (iterations + 1);
xPos++;
};
yPos++;
};
} catch(exception:Error) {
};
while (xPos < 16) {
level[yPos][xPos] = 0;
xPos++;
};
}
public function setLevelColor(_arg1:String){
var newR:int;
var newG:int;
var newB:int;
var inputColor = _arg1;
if (inputColor.substring(0, 1) == "#"){
inputColor = ("0x" + inputColor.substring(1));
};
if (((!((inputColor.substring(0, 2) == "0x"))) || ((inputColor.length < 8)))){
return;
};
try {
newR = parseInt(inputColor.substring(2, 4), 16);
newG = parseInt(inputColor.substring(4, 6), 16);
newB = parseInt(inputColor.substring(6, 8), 16);
if (((((isNaN(newR)) || (isNaN(newG)))) || (isNaN(newB)))){
return;
};
targetR = (newR / 140);
targetG = (newG / 140);
targetB = (newB / 140);
} catch(e:Error) {
};
}
public function difBet(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = Math.abs((_arg1 - _arg2));
if (_local3 > 8){
_local3 = (16 - _local3);
};
return (_local3);
}
public function onMouseMoved(_arg1:MouseEvent){
mouseIsDown = _arg1.buttonDown;
if (_arg1.buttonDown == false){
buttonJustClicked = false;
};
}
function frame3(){
stop();
if (((((!(firstTimeThrough)) && (!(toLevelSelect)))) && (!(toPlayModes)))){
nextFrame();
play();
} else {
oefType = 1;
};
}
function frame6(){
gotoAndPlay((currentFrame - 1));
}
function frame4(){
reset();
inOut.visible = false;
drawTunnel(true);
starfield.cacheAsBitmap = true;
}
public function getWithinRange(_arg1:Number, _arg2:Number, _arg3:Number):Number{
var _local4:Number;
if (_arg2 == _arg3){
return (_arg2);
};
if (_arg2 > _arg3){
_local4 = _arg2;
_arg2 = _arg3;
_arg3 = _local4;
};
while (_arg1 > _arg3) {
_arg1 = (_arg1 - ((_arg3 - _arg2) + 1));
};
while (_arg1 < _arg2) {
_arg1 = (_arg1 + ((_arg3 - _arg2) + 1));
};
return (_arg1);
}
function frame1(){
if (!varsSet){
varsSet = true;
stage.showDefaultContextMenu = false;
stage.stageFocusRect = false;
addEventListener(FocusEvent.KEY_FOCUS_CHANGE, stopKeyFocus);
mouseIsDown = false;
oefType = 1;
addEventListener("enterFrame", onenterframe);
levelData = "";
level = new Array(50);
index = 0;
while (index < level.length) {
level[index] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
index++;
};
cameraX = 100;
cameraY = 0;
cameraZ = -6;
angle = 1;
distanceVisible = 14;
rMod = 1;
gMod = 1;
bMod = 1;
targetR = 1;
targetB = 1;
targetG = 1;
pulseMod = 1;
pulsePos = -1;
pulseSpeed = Math.round((distanceVisible / 2));
backgroundOffset = 0;
gameTimeScale = 1;
lastEvent = 0;
lastFrame = 0;
tsle = 0;
tslf = 0;
songMuted = false;
soundMuted = false;
kongregate = null;
advLevels = new Array();
advLevels[advLevels.length] = "0xFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF99999999FFFFFFFFFFFFFFFFF0F0F0F0FFFFFFFF9F9F9F9F9F9FF0FFF0FFFFF9FFF9FF6F6F6F6F0F099F699F69FFF9FFFFFFFFF9FFF9F6F9F669966F966F9F669F6FFF0FF909690969690969|Use the arrow keys to move and space to jump.|0x4F7BFF";
advLevels[advLevels.length] = "0x7FFF67F3FE7FFFEDCFEDFFFFF3BF3FB3FDFFEDFEEFCEFFFF9CF9FFDFF7DFF67C3FFFF3E7FFFFEEBDE6BDF7FFFFCF99FEFF7EE5677DFEFFDFFE5993FFFFFEEEFEEE9FBFFFB9F3FFFFFDCF3DFDFFFDFE7FCFFCF3BF7FBB7FFBFCFF9FCFFFFFEB67EB7F3FF9||0x4F7BFF";
advLevels[advLevels.length] = "0xF7FFFDDFFFFDFF7FBEFFFFFFFBFFFFEEFFFFFEFBDFBFF7FFFFFDED7FFFFFB7B7FFFFDFFE7BEBFFFFAEFDF7DBBFFB7D7FD7FEFEEEA7FBFFDF9FBF79F3FEFFAFEFCB7DDFAFBCFDFFF6339FFDFB67EFDDEEDEBBBFFF2B7DFEF7FBD65DFDB76DFBBA8A9FFE759DD4A69D6C80||0x3E77FD";
advLevels[advLevels.length] = "0xDF3DFFB12D60FF8BBE3DFF7DEFF8F330FFF1FF97BFBDDCBCFE7EFFECFFF0E7F97FDFFFDFFFFAFDFAFA7DEB3FFF7637FBF27FFFFFFEBFDBFEEBCFE7B9FEF3DB3F9CFFDFF7FDF7EC5BD33FD7FFBEBDEFB9C3BFF3FFAEDEC976CD2787FFA35D683D26EFA86FCD8FD16B106F1F3FA837815F413E|Try touching one of the walls.|0x3E77FD";
advLevels[advLevels.length] = "0x059F8DADBFA41F058F1D9F9C9FA71A8F7EE26FC87ED83C9834E8BEF87CF67E7F6C37F837BBEBFDAAA0FFBCBB5E6B7C6DFABDFA1FE03F703F59AD78FFF85FF8E7F0FFB36DB2EBE0D8F5DA518FF08BFCCD6ECC334DFED4FA57FF1EFF8E999FCBBFFFFB1EBFDF9D25FD07B566A74F0F1B9E1F33||0x2D6BFD";
advLevels[advLevels.length] = "0xFF9FCE9B9EF3FCF77F7F373BB551F49F76AF1FEFFFCFFDF0F1FFDFF39FF3D37FF31DEFFDEEC9CCCF7EFF3FFFBBFEF1B87FBF19B7F9B3EEF7CECFD2CFF6FD37F97F3B7D9FFCFFEEFECFBCEF8EFBFFBB73B3739F3FFDFD7CE13ECFBFDFF3FFF3BECF1ECDFCF1FF||0x2D6BFD";
advLevels[advLevels.length] = "0x66666666FFFFFFFF66640644FFFFFFFF26466246FFFFFFFF26622422FFFFFFFF22262624FFFFFFFF24662642FFFFFFFF60464044FFFFFFFF26242626FFFFFFFF44024462FFFFFFFF62660206FFFFFFFF60206620FFFFFFFF06460044FFFFFFFF20062002FFFFFFFF06606660FFFFFFFF40064606FFFFFFFF22262220FFFFFFFF00466646FFFFFFFF66040604FFFFFFFF44624462||0x1C60FD";
advLevels[advLevels.length] = "0x0E000E000E000C007C007C0070006000670067000700E700E300E3E0C3E0C0E0C0E00EE00E607E607E607C607C603C6030003000307030700070007070307030703060306030603000000000E0E0E0E0E0E0C060C060C060C70707070707077706770676067606300030000E070E070E030C030C030C||0x1C60FD";
advLevels[advLevels.length] = "0xB5A6ACFBCF31DD7D1E673F766D6FF4B65EEF0D632BBB6AF7A6FB0EC5DE5EFC72AF5A87C153A691B657F67661F6B7FCB4FCDBD33A57FFBFFEAF778DAED7EFFFEDBE7B6EF7F4513FE6DEE9BA7CBB7CEE7E7EAB9FF9FE9BBCBB7C5F5C7ADCB4182CF826F0EEE0B6C0BEC4F6F56FA8F9B02220F3B11661FF71DA7342CB4E0DD746B9B497A5EB||0x0B54FD";
advLevels[advLevels.length] = "0xFE3F3E3E3E3E3FFEFFE3F8E3F8E3F8FFFFFFFE3FC63FC63FC7FF7FFC71FC71FCF1C7FFC7FFC738FE38FE38FEFFFFE223222222223FFEF8FFF8F8F8F8C7F8C47FC47FFC7FE3FFE3E3E3E3FFE318FF18FF18C7FFC7F1C731FE311E3F1EFF1FF1E3F1E3F1E3||0x5EFFFF";
advLevels[advLevels.length] = "0xBF3C3CBDFDCFCFDBEEF3BCBF9F3CF3FE3BFB6FD9CF9FFDF3D99B9FBEFCEC36CFB379CF3BECEFDECBC9B3BB9F37FDF37CBF3F94C9F2EBDD3EC97C3F97B7B3F2CFBCAB9B39F3FFCCCDEEDCD337CAB33CCFBB5CF33DCEF7DCD3B79E937C7F3F34E9D2CD4FF739B3CD3FD7CC72ED3CFF||0x55FFFF";
advLevels[advLevels.length] = "0x4EFB47FA37CFC7E80FCFEE47FC76CFF75FFCD4EF86E7E7FDF73F3FFFB3EB9FEAF7FFF76E73DAF3E6EF66FE26EE7E6C6FFE64F74DF4D698E5DBCEF1ACF9B6BFC2BAEFF77FE9EF690DFE7DF01FFCADB98F99FEF1C7F0C3F413F45054EDE0FF63DE2C7BB82F7AC6E75FFF6FF9EDDB65CBAD961BAE9FBFDFE096CB9EDBF4FB7E7BEF59637E7FCC61C65FE0FF2EF61ABF5BB37B137C871DE0DDFF59FF3A693E133F978F0F7F56CE4ED98ECFEDC6B70F32CFC3FD7EE53ECF9DBFFDB309||0x4DFFFF";
advLevels[advLevels.length] = "0x96969696969696969696F0F00F0F0F0F96969696F0F06969696969690F0F0F0F969696969696F0F0F0F06969696969696969F0F09696969696969696F0F06969696969696969F0F0F0F06969696969690F0F0F0FF0F0F0F069690F0F0F0F6969696969696969696969699696969696969696F0F0F0F0||0x3CFFFF";
advLevels[advLevels.length] = "0x3D04BD75BD753C10FF5D8E5DAEC1A2FF3A06FBF6FB8680BEBA8082FFFEFF0E1F6FD8EFDB03C36BFF0A0FFAEF1828DEABCE8BEEFB6E8860AF7FAF7E2F7EE0FEFF8038BEBAB80A3AA8F88EFFFEC03EDFBE11BEF5A3F42BF7EBF00B1FFB5FC347DF7400F5DF05DEFC1E1FF8C3FAFB8080BBBA8338FEFFFE||0x2BFFFF";
advLevels[advLevels.length] = "0x0C000C00FC7CFC7CC06FC06FFE63FE6307E3E7E3E003600061F061F061B0E1BFE1BF0180FD87FDE70DE60C660C667C7E7C7E600060007FFC7FFC000C000CFF8DFF8D81FD81FD8001BFC1BFDFB0DF3CD83CD80CF8FCF9FC01800F87CF07CC1ECC1ECCF8CFF8CF00C000DF7FDF7FDB601B67FBE7FBE6030600||0x00FFFF";
advLevels[advLevels.length] = "0xFFFFFFFFFF0F0FFFFFFFFFFFF0FFFFFFFFF0FF0F0FFFF0FFFFFFF0FFFFFFFFF0F0FF0FF0FFFFF0FFFFF0FF0F00FFFFFFF0000FFFF00F0FFFFF0F0FFFFFF0F0FF0FFFFFFFFF0F00FFFFF0FFFFFFF0000FFFF0F0FFFFF0FFFF00F0FFFFFFFF0F0FF0FF0FFF||0x00F8F8";
advLevels[advLevels.length] = "0x464EB63E8726161656525E303E90B330B30023F103E340F1C072CC7AEC398C29C92C180ECA1C8F1F8315C714CF96861FC71F050FC22B810EC40E4E071C879807F80DD00F303C32F86070F07070E0B8E29AC638C438003DC614C20EC00EC006C00680||0x00F2F2";
advLevels[advLevels.length] = "0x44444444444444444444FFFFFFFFFFFF22222222222222222222FFFFFFFFFFFF88888888888888888888FFFFFFFFFFFF00002222222222222222FFFFFFFFFFFF88888888000088888888FFFFFFFFFFFF00002222222222220000FFFFFFFFFFFF00000000111111111111FFFFFFFFFFFF00000000444444440000||0x00ECEC";
advLevels[advLevels.length] = "0x66BDBD91BD0AE671AC6E2D78084F3C3D1E9A7FF864B7A606AEB057F51F5E9F9ADF78C7C8D1D66CFEE0ADB8F8A8C86073317C195C4A16B41831BD518C591ED947F405C989C48C5399BC0B3C5B8BCB05E11B031FF51BB0A9B2B82BE1774053E625BF8E9716363FFE23C236DE6FD7D158931A63AB9AD242||0x00E6E6";
advLevels[advLevels.length] = "0xF7F7959DF7F9A48FA7E2E5A7B5E59725D2FF7298D7BF95E9B729E47B2E5EFA729B2FF9292FE9E5AFA7A4A1E4BF8F9AF9FE999AFFDB5279FF4FA978AD5FA575E5254FE7EAA2AFF2A99EFBDA5E5F7275474D4579F5DF9591F7F7A225FEEF5AAA5FEE79442F7E295B7D79572F74224E7EFADA9A9EFAB44FEF4929EF29A1FFE19A2FFA292E7D74575774F54FAF49B9F99B9DFE974BF2E95FAD59E77F||0x4DFF70";
advLevels[advLevels.length] = "0x66666666666666666666666600000000666666666606666606660066606060006606666666666666666600660066600660666666666666600660000660666066666666600660066666066606000006666666606666666606060660606066666606666666660666060600666060606066660666066606060606666660606066666666666606060006606066606660||0x4EFE5F";
advLevels[advLevels.length] = "0xFFFF5555FFFFFFFFAAAAFFFFFFFF5575FFFFFFFF0000FFFF55555555FFFFFFFFAAAA5F5FFFFF5555FAFAFFFF2080FFFFFFFF555555FF55FFAAAAAAFFAAFF5555F55FF55FAAAAFFAAFFAA5555AAFA55F5AAAAFFFFFFFF5555FFFFFFFFA0A0F0FFF0FF1041F0FFF0FF2A88FFFFFFFF4015AAAA5555AAAA5555||0x5FFF4D";
advLevels[advLevels.length] = "0x07F80FF01FE03FC07F80FF00FE01FC03F807F00FE01FC03F807F00FF01FE03FC07F80FF01FE03FC07F80FF00FE01FC03F807F00F||0x53FF09";
advLevels[advLevels.length] = "0x040004040604060C020C0208040805000D000D8009882888208C600C6004404440400060006080208020900190811881199109900918011900098009840184048C040C06080608020002||0x50FD0B";
advLevels[advLevels.length] = "0x8400B5FE8402FFFAF808FBEF182CDFAD1F8CFFFF3118B55BB558315EFF5FF85F0BD8E81B0FF8F8FF1AFF58FF5FE311EBF4EB16E2D0FE9F1E315EF55FC55F5D4C416D7F0CFFFFC071DF75C075FFF58FF5A814ABD6A850AF5FA11FBDFF81C3FFDBF1D3F4571747507F5FC75C14DDF51C04FFFF008F7EA340BB5F8311FFF58FF1A8FFAA802ABFEAA00AAFF8A07FBF718175FD751C74DFF71010F7DFF41115F551851FBDFF81||0x4AF700";
advLevels[advLevels.length] = "0x861F861F1F861FB6063066FC60FCF831F9B1618067E007EC318C31BFFC3FFC0C306C306001F831F83060FC60FC0C300C303F01BF018CC7ECC7E0F183F183C018C0180C7E0C7E3F183F1B0C03CC0FC0CF00C303F31BF018C07EC07E061806981F819F0186C7E6C7E0F183F19BC018C07E067E06181F981F80060006030003C00FC18F018307E3||0x48EE00";
advLevels[advLevels.length] = "0x3CCF3CCF3CC3FCC3FFF3CFF3C303C303C3CFFFCFFCCF3CC03CF0F0FFF03FC33FC30CCF0C0FC00CC30CF30FFF033F030FC30CC30CCC00CC000C300C330C3F3C3F300CF00CC00CC0CC00C000C300F3CCF3CC33CC33CCF0C0C000C000F03330333033003F003C003C303C30303CF03CC00CC00C000F0003C003C00FF03C303C3C300CF00CC00CC0||0x33F200";
advLevels[advLevels.length] = "0xFFFFFDFDEFFFBFBFFEFEFFFFFBF7FFEFBFFDF77FDFF7FFFE7DEFFEBDEFFF7FF7BDDBFBFF6FFCF7A5FFF5DEDED3B37FFDAD7CFBD3EFEBCEFFFED8A7974D7EDBF89FB7B9C37EEBC7BF7B79539F9EEB3F50E9D92D6B979D7C50CD479B529E222A48175C5D49C7B9CA22BF6C43454D16D78C1A8348ADE6988158B34AD4418965A2142C4C44495150481A1212D6C2||0x17F400";
advLevels[advLevels.length] = "0x5E5AA5A57E5AAFA5DB5ABDA55B5AB5A77E5EE5E55E5EE5E55A7AF5A5DA7EB5ADDA5AA5AD7A5AA5AD7A5AA5A57A5EA5A5DE5EA5A5DE5BA5A55B5BA5A55BDAA5AF5ADAA5EF5A5BA5BDDADBE5B57BFAA7A57A7AE7A55E5AE5A57E5AA5B55B5AB5B55A7AB5A55A7AE5A55A5AE5E5DA5AA5E55A5BB5B55A5BBDB75E7AA5AD5E5AA7ED5A5AA5E55A5A||0x00FF00";
advLevels[advLevels.length] = "0x044004400440044007700110011001100110011003300220022002200660044004400CC0088008800880088008800FF00110011001100110011001100770044004400CC008800880088008800EE00220022002200220033001100FF0088008800880088008800EE002200220022002200EE00880088008800880088||0xF2FF80";
advLevels[advLevels.length] = "0xFFFF0600FFFF0600FFFF0000FFFF0600FFFF0900FFFF1800FFFF3300FFFF2200FFFF0200FFFF8100FFFF8042FFFF00C2FFFF2080FFFF2000FFFF8024FFFF8024FFFF0000FFFF2042FFFF2042FFFF0004FFFF1084FFFF0C01FFFF0441FFFF0244FFFF0104FFFF0020FFFF0422FFFF0002FFFF0288FFFF0208FFFF0140FFFF0004FFFF0224FFFF0201FFFF0041FFFF0400FFFF0424FFFF0224FFFF0242FFFF0240||0xF2FF80";
advLevels[advLevels.length] = "0x04EA34491C0A4C768C481D0D3510B109319A00829092189553E4908C002CC269CC474F507140751B1CA4CE36C72052AA4C88B4292E7A843AD79E8629814E2B1938A628352CD42C358DB2A710872799068D0ADC0EA5099C1CFE8C42574E1E7653FC314F610621B620E580C7C48FE007880CB174D50C7B943B5E3D071C0362C045A0C128AD28A268C229070223531A87442E508CD4CCD5348C1CAC940ED0B9D091||0xF1FF6F";
advLevels[advLevels.length] = "0x0404040404040606060602020303F3F33030101010103030F7F706060404040404040604E7E76060202020202020202030303C3C0C0C04040406878781818080808080808181BFBF30302020202020206060E7E706060404040406068787E1E160602020202020206060E7E70606040404040C0CFCFCC0C08080808080808080||0xEFFF5D";
advLevels[advLevels.length] = "0xC601C601067006700000380039C039C039C0000000E0E0E0E0E0E0000000000000F0E0F0E0F0E0000700870187198719001800181C031C031C031C030000000C000C1E0C1E001E38003800380000380038063806000600000030E030E030E030E0000000000000C030C030C030C03000000000000000||0xEEFF55";
advLevels[advLevels.length] = "0x040004000400040006000600060006000200020012001000140014800C8008C0084020602220222022000204440444444444C040804101410141214120002020342404240400004010441044104418111811101110111014000420042004200C20081008100810080008000840084800480008020C0204020402||0xEDFF44";
advLevels[advLevels.length] = "0x0780058005800780000000003CF034D034D03CF000000000F0F0D0F0D090F0F000000000001E781A6816581E780000000000000F0009000F000F0000C003C002C002C0030000007878584858787878000000000000F03CD02CB02CF03C0000000000C7834683C582C7830000000000003C0024003C003C00000000000000E00160016001E001||0xEAFF2B";
advLevels[advLevels.length] = "0x146FAF5C8C3107608F738D64DD253D931B0CF30FB30E730B71044781DF46DF148C0AAF5587C2E381C1C3C5C441A8C0DBD09386B10403006310D700F60876013700338051C071D639C018A00CA90CA006340E280F210900195011C844C20CCABC8A8C84A80B1947195ED053F17AF03A702BC02EE20A69002100A340E34053506760EE10DC121C1E783A6006262FE613E692CE37E76B7EF750540001030AC307E38C6385679EF3E7B1E301C3D0C1F1E8E8986910C1F0EC70E9F082B0037C6067E0FF70A140||0xE9FF1A";
advLevels[advLevels.length] = "0x040004700457F5F5154477C441064F02780283BFBEA2E0BE0380E278BEC88088FF88000E77E2D42F172A11AE7EB0539E7002870F850ABFCEA540BFFC8544FF740417E7D12070A38FBEF88000BDE0E5238522872280237BE04A004FF842087278124713C57C3D542175E1051D05D5FC550074F38712E0122EFEEA908AF0FA0702E57B25C8FC08A3E8EE280838780747057DFF000407FCC4037402177371514FF7C9448F44805D1E7113811C87E4FCA700A10F3F08C0FB5E82D3FF10821EFEE201227F3BC00C0004000400||0xE6FF00";
advLevels[advLevels.length] = "0x0404151415149554915080428242021222122210201121010901494149404044004422142A152A110891108914889508950A814208424850421442040025012529212800A2488248124A5002541244104151014129092829222882A08882090221122010AA588A480002412245224428208820812815085581549104142014A240A2488A4808024002511015908484A404202111211108014848504A12521212||0xDEF700";
advLevels[advLevels.length] = "0x2F652764C72C0F082E09CD498F440E2046008B007B68C6071F4281108F381B00D7015E20360E2D0220D03B6057003FB6F91C6A1456007D417760EC82820CE0E4E510E10141D18191C0C0E2DE6080E080C586B71D9747D7458601050705B2070F0F0B9F81DAD1FAC2F4E060E6A0E268716050C170C8709063A05060D2F0E570E050E16068B0E0D0C0F0E3E1C0E08C09C671C073E023E832A61AE01EC01EEC0EA403E523A407B40EB60E5EAC4400050007800603066303030B132F218FC00F10673036000E840604160416008200C200020002||0xFFB366";
advLevels[advLevels.length] = "0x041C0E1C0E1E0E0000006000E380E7800380000380039C731C501C7082030003802378387038703B800380E338E038A0380013800381C381C201C001000007000700E700E100600000001C001C001E000000000000000E000E0006000000E000E000C0800380038083838002800300E000E000E781070007000000200070007000700000||0xFFAA55";
advLevels[advLevels.length] = "0xFFFFFFFF666666666666666666666666FFFFFFFF1111111111111111111111111111FFFFFFFF0402040204020402040204020402FFFFFFFF6000606060606060606000600060FFFFFFFF00000909090909090909090909090909FFFFFFFF0000606060606060000000000000FFFFFFFFFFFF0000000060606060606006060606060606060000606060606060606000000000FFFFFFFFFFFFFFFF000000002010201000100000040404040404040400000000FFFFFFFFFFFFFFFFFFFF0000FFFFFFFF0000||0xFFA244";
advLevels[advLevels.length] = "0x040004000400050005001500150011001100114011401040904090409040904090408140810081008100810081000100010000404440444044404440444044404440440044100410041004101014101410141004100410041004000400040000080008010801080108010801000102010201020002000200000408040804080408040804200020002000200820082008200800088028802880288028802080A0A0A020A020A020802080208020802800080008000800088008800880088008800880008000800080||0xFF9933";
advLevels[advLevels.length] = "0x66660666066006000000008000C006C00EC00EC00C4000000000000C040C0C0E0C0E080630067000700060030003000300006000E000E000C0020002000600068004C004C020C030C03040300030002000001000304030C030C030C030C0208000008006820686070607060706030643026000600068004C000C000C00080000008000C000C000C60046000E006E006C006C00600060006000000000000000000060006000600060006000000000||0xFF952B";
advLevels[advLevels.length] = "0x04048444844084408440040004800480048004800480008000800080080008200820082008200820082008000800090421042104210421042104210021020102400240024002440044000401040104010401040140804080408040804480440044400440044010401040104010001000001000104110411041104110410441044104400002020202020200021000100010000000||0xFD802D";
advLevels[advLevels.length] = "0x04000400060006000A000A000A0002000000000008000800080008002000280028002800000020002000400040000001000180018001C000C00040006000600020002000200120010001000100000000400340034002400200020000000000010001000100010001000500050005000300020032003200300090009001900380038006800680048004800400040000000000||0xFB761E";
advLevels[advLevels.length] = "0x6666EEEECCCCCCCCCCCC88888888888800002222222266666666EEEECCCCCCCC888899991111333333332222666666664444CCCCCCCC888800000000111111113333222266664444CCCC88888888000000000000111111113333222266664444CCCC88889999111133332222||0xFB6B0D";
advLevels[advLevels.length] = "0x0F000F000F000F0000000000F3C0F3C0F3C0F3C0000001E001E0F1E0F1E0F000F000007800780078E079E001E001E7810780079E079E001E001E000001E0F1E0F1E0F1E0F0000000003C003C1E3C1E3C1E001E0000000000E1E1E1E1E1E1E1E10000000000003C3C3C3C3C3C3C3C0000000000000F1E0F1E0F1E0F1E000000001E009E079E079E07800700000000F000F000F000F0000000000000000F0F0F0F0F0F0F0F0000000000009E079E079E079E070000000000000000F000F000F000F000||0xF26304";
advLevels[advLevels.length] = "0x040004000400040004000000000000000800080000000000000010001000000000000000100010000000000000002000200000000000000000008000800000000000000080008000000000000000000200060006000E000C000C00000000000800080008002000200060006000C000C0000000000000000000800080008000800080000000000000000000200020000000000000FF0F||0xFF1111";
advLevels[advLevels.length] = "0x0400040004000400000000000000010001000100010000000000000000400440044004400400000000000000200820082008200800000000000000010001000100010000000000000008800880088008800000000000000000101010101010101000000000000000048004800480048000000000000000000100010001000100||0xFF0000";
jumpKey = 32;
leftKey = 37;
rightKey = 39;
xVel = 0;
yVel = 0;
zVel = 0;
runSpeed = 4;
sideSpeed = 410;
falling = false;
jumping = false;
outside = false;
jumpDistance = 4.75;
jumpHeight = 250;
jumpStrength = (((4 * jumpHeight) * runSpeed) / jumpDistance);
gravity = (((2 * runSpeed) * jumpStrength) / jumpDistance);
lineAlpha = 100;
tileAlpha = 100;
rotating = false;
gamePaused = false;
editing = false;
playtesting = false;
playMode = "infinite";
modeCompleted = false;
tutComplete = false;
currentLevel = 1;
maxLevelReached = 1;
difficulty = 20;
eTileSize = 45;
changeToSet = false;
qPressed = false;
buttonJustClicked = false;
maxLevelLength = 200;
kt = new KeyTracker();
stage.addEventListener("keyDown", onKeyPress);
stage.addEventListener("keyUp", onKeyRelease);
tt = new TimeTracker();
addEventListener("mouseDown", onClick);
addEventListener("mouseUp", onMouseRelease);
addEventListener("mouseMove", onMouseMoved);
addEventListener("mouseWheel", onWheel);
saveFile = SharedObject.getLocal("run");
if (saveFile.data.maxAdvLevel == undefined){
saveFile.data.maxAdvLevel = 1;
saveFile.data.maxDifficulty = 10;
saveFile.data.qualitySetting = "MEDIUM";
saveFile.data.jumpKey = jumpKey;
saveFile.data.leftKey = leftKey;
saveFile.data.rightKey = rightKey;
saveFile.data.tutorialCompleted = false;
saveFile.data.songMuted = false;
saveFile.data.soundMuted = false;
saveFile.data.frameRate = 20;
saveFile.data.distanceVisible = 16;
saveFile.data.infCompletions = 0;
saveFile.flush();
};
};
difficulty = Math.min(saveFile.data.maxDifficulty, 99);
stage.quality = saveFile.data.qualitySetting;
maxLevelReached = Math.min(saveFile.data.maxAdvLevel, advLevels.length);
jumpKey = saveFile.data.jumpKey;
leftKey = saveFile.data.leftKey;
rightKey = saveFile.data.rightKey;
songMuted = saveFile.data.songMuted;
soundMuted = saveFile.data.soundMuted;
tutComplete = saveFile.data.tutorialCompleted;
stage.frameRate = saveFile.data.frameRate;
distanceVisible = saveFile.data.distanceVisible;
deaths = 0;
acceleration = 0.15;
drag = 31;
firstTimeThrough = true;
toLevelSelect = false;
toPlayModes = false;
toEditMode = false;
starfield.angle = 0;
}
public function stdMove(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
starfield.rotation = (back.rotation - (90 * backgroundOffset));
if (gamePaused){
return;
};
if (!rotating){
back.rotation = 0;
front.rotation = 0;
_local1 = xVel;
if (((kt.isDown(rightKey)) && (!(kt.isDown(leftKey))))){
if (xVel < (sideSpeed - 10)){
xVel = (sideSpeed - ((sideSpeed - xVel) * Math.pow(0.5, (tsle / 0.225))));
} else {
xVel = sideSpeed;
};
};
if (((kt.isDown(leftKey)) && (!(kt.isDown(rightKey))))){
if (xVel > (-(sideSpeed) + 10)){
xVel = (-(sideSpeed) - ((-(sideSpeed) - xVel) * Math.pow(0.5, (tsle / 0.225))));
} else {
xVel = -(sideSpeed);
};
};
if (((((!(((kt.isDown(leftKey)) && ((xVel < 0))))) && (!(((kt.isDown(rightKey)) && ((xVel > 0))))))) || (((kt.isDown(leftKey)) && (kt.isDown(rightKey)))))){
xVel = (xVel * Math.pow(0.5, (tsle / 0.175)));
if (Math.abs(xVel) < 25){
xVel = 0;
};
};
cameraX = (cameraX + (((_local1 + xVel) / 2) * tsle));
if (cameraX > 360){
cameraX = 360;
if (((kt.isDown(rightKey)) || ((xVel > (sideSpeed / 4))))){
rotateTunnel(-1);
};
};
if (cameraX < -360){
cameraX = -360;
if (((kt.isDown(leftKey)) || ((xVel < (-(sideSpeed) / 4))))){
rotateTunnel(1);
};
};
_local2 = yVel;
if (kt.isDown(jumpKey)){
if ((((((cameraY >= 280)) && (!((onTile() == 0))))) && (!(jumping)))){
yVel = -(jumpStrength);
jumping = true;
};
} else {
if (yVel < 0){
yVel = (yVel + ((gravity * tsle) * 0.75));
};
};
yVel = (yVel + (gravity * tsle));
cameraY = (cameraY + (((_local2 + yVel) / 2) * tsle));
if (cameraY > 280){
if (onTile() != 0){
cameraY = 280;
yVel = 0;
if (character.currentclipnumber < 4){
jumping = false;
};
} else {
falling = true;
};
} else {
if (cameraY < -280){
cameraY = -280;
xVel = (xVel * 0.3);
yVel = 0;
zVel = (zVel * 0.9);
} else {
outside = false;
};
};
if (cameraY > 650){
deaths = (deaths + 1);
reset();
restart.play();
};
_local3 = zVel;
if (zVel < (runSpeed - 0.1)){
zVel = (runSpeed - ((runSpeed - zVel) * Math.pow(0.5, (tsle / 0.225))));
} else {
zVel = runSpeed;
};
cameraZ = (cameraZ + (((_local3 + zVel) / 2) * tsle));
if (((((((cameraZ + 5) > level.length)) && (!(falling)))) && ((starter.currentFrame == 51)))){
levelComplete.play();
};
};
}
public function ntrt():Boolean{
if (falling){
return (false);
};
if (((((cameraZ + 5.5) < 0)) || ((level.length < (cameraZ + 5.5))))){
return (true);
};
return (!((level[(Math.round(cameraZ) + 5)][(-(Math.round(((2 + (cameraY / 200)) - 1.5))) + (4 * angle))] == 0)));
}
function frame5(){
oefType = 2;
}
public function modeIsComplete():Boolean{
if (playMode == "infinite"){
return ((difficulty > 99));
};
return ((getLevel(currentLevel) == ""));
}
public function onWheel(_arg1:Event){
if (editing){
edi.tor.y = (edi.tor.y + (25 * _arg1.delta));
};
}
public function onenterframe(_arg1:Event){
tsle = ((gameTimeScale * tt.timeSince(lastEvent)) / 1000);
lastEvent = tt.time();
tslf = ((gameTimeScale * tt.timeSince(lastFrame)) / 1000);
lastFrame = tt.time();
if (level.length > maxLevelLength){
level.length = maxLevelLength;
};
if (((toLevelSelect) || (toPlayModes))){
gotoAndStop(3);
};
if (currentFrame < 4){
gamePaused = true;
};
if ((((kongregate == null)) && (!((api.kongregate == null))))){
kongregate = api.kongregate;
root.removeChild(api);
};
switch (oefType){
case 2:
if ((((((options.currentFrame == 2)) || ((options.currentFrame == 3)))) || ((options.currentFrame == 6)))){
break;
};
if (!editing){
inOut.visible = false;
stdMove();
drawTunnel(true);
front.visible = true;
back.visible = true;
} else {
editMove();
};
saveFile.data.maxDifficulty = Math.max(saveFile.data.maxDifficulty, difficulty);
saveFile.data.qualitySetting = stage.quality;
if (playMode == "adventure"){
saveFile.data.advLevel = currentLevel;
};
break;
default:
return (null);
};
}
public function setLevelText(_arg1:String){
lText.displayText(_arg1);
lText.gotoAndStop(1);
lText.currentframe = 1;
}
public function drawTunnel(_arg1:Boolean=false){
back.drawings.graphics.clear();
front.drawings.graphics.clear();
front.rotation = back.rotation;
if (_arg1){
rMod = (targetR - ((targetR - rMod) * Math.pow(0.5, (tslf / 2))));
gMod = (targetG - ((targetG - gMod) * Math.pow(0.5, (tslf / 2))));
bMod = (targetB - ((targetB - bMod) * Math.pow(0.5, (tslf / 2))));
} else {
rMod = targetR;
gMod = targetG;
bMod = targetB;
};
tileAlpha = 107;
if (_arg1){
pulsePos = getWithinRange((pulsePos + (10 * tslf)), (Math.round(cameraZ) + 2), ((Math.round(cameraZ) + 2) + distanceVisible));
};
yPos = Math.ceil((cameraZ + 1));
while ((yPos - cameraZ) < 4) {
if (_arg1){
setPulseMod(yPos);
};
if (rotating){
back.drawSection(yPos);
} else {
front.drawSection(yPos);
};
yPos++;
};
yPos = (distanceVisible + Math.ceil(cameraZ));
while (yPos >= Math.ceil((cameraZ + 4))) {
if (_arg1){
setPulseMod(yPos);
};
tileAlpha = (((165 - (2 * distanceVisible)) - ((110 * (yPos - cameraZ)) / distanceVisible)) - Math.max(((110 * ((yPos - cameraZ) - (distanceVisible * 0.8))) / distanceVisible), 0));
back.drawSection(yPos);
yPos--;
};
}
public function onClick(_arg1:Event){
mouseIsDown = true;
}
public function getEXPos(){
var _local1:Number;
_local1 = (19 - Math.floor(getWithinRange((((mouseX - (4 * eTileSize)) - edi.tor.rightWall.x) / eTileSize), 0, 19)));
if (((_local1 / 5) + 0.2) != Math.round(((_local1 / 5) + 0.2))){
return ((_local1 - Math.floor((_local1 / 5))));
};
return (-1);
}
public function onMouseRelease(_arg1:Event){
mouseIsDown = false;
buttonJustClicked = false;
}
public function setPulseMod(_arg1:int){
if (_arg1 == Math.ceil(pulsePos)){
pulseMod = 1.2;
return;
};
if ((((_arg1 == Math.ceil((pulsePos - 1)))) || ((_arg1 == Math.ceil((pulsePos + 1)))))){
pulseMod = 1.02;
return;
};
pulseMod = 1;
}
public function onTile():int{
if (falling){
return (0);
};
if (((((cameraZ + 5.5) < 0)) || ((level.length < (cameraZ + 5.5))))){
return (1);
};
return (level[(Math.round(cameraZ) + 5)][(-(Math.round(((cameraX / 200) - 1.5))) + (4 * angle))]);
}
public function getEYPos(){
return (((level.length - Math.floor(((mouseY / eTileSize) - (edi.tor.y / eTileSize)))) - 1));
}
public function editMove(){
var yMFC:*;
var xMFC:*;
if (!edi.tor.Active){
return;
};
if (mouseIsDown){
if (((((!(buttonJustClicked)) && (!(inOut.visible)))) && ((stage.focus == null)))){
eYPos = getEYPos();
eXPos = getEXPos();
if ((((((((eXPos >= 0)) && ((eXPos < 16)))) && ((eYPos >= 0)))) && ((eYPos < level.length)))){
if (!changeToSet){
changeTo = getWithinRange((level[eYPos][eXPos] + 1), 0, 1);
if (isNaN(changeTo)){
changeTo = 0;
};
changeToSet = true;
};
if (((!((eXPos == 5))) || ((eYPos > 3)))){
level[eYPos][eXPos] = changeTo;
edi.tor.fillTile(eXPos, eYPos);
};
};
};
} else {
changeToSet = false;
};
if (stage.focus == null){
yMFC = (mouseY - 200);
if (yMFC != 0){
if (((kt.isDown(KeyTracker.SPACE)) || (kt.isDown(root.jumpKey)))){
edi.tor.y = (edi.tor.y - ((((20 * tslf) * (yMFC - ((80 * yMFC) / Math.abs(yMFC)))) / 2) * ((Math.abs(yMFC))>80) ? 1 : 0));
} else {
edi.tor.y = (edi.tor.y - ((((20 * tslf) * (yMFC - ((170 * yMFC) / Math.abs(yMFC)))) / 3) * ((Math.abs(yMFC))>170) ? 1 : 0));
};
};
if (((kt.isDown(KeyTracker.UP)) && ((stage.focus == null)))){
edi.tor.y = (edi.tor.y + ((12 * tslf) * eTileSize));
};
if (((kt.isDown(KeyTracker.DOWN)) && ((stage.focus == null)))){
edi.tor.y = (edi.tor.y - ((12 * tslf) * eTileSize));
};
if (edi.tor.y > (2 * eTileSize)){
edi.tor.y = (2 * eTileSize);
};
if (edi.tor.y < (((-(level.length) * eTileSize) - (2 * eTileSize)) + 400)){
edi.tor.y = (((-(level.length) * eTileSize) - (2 * eTileSize)) + 400);
};
edi.tor.y = Math.round(edi.tor.y);
options.grid.y = getWithinRange((edi.tor.y - 4), ((-(options.y) - eTileSize) + 1), -(options.y));
var _local2 = edi.tor;
with (_local2) {
xMFC = (root.mouseX - 275);
if (xMFC != 0){
if (((root.kt.isDown(KeyTracker.SPACE)) || (root.kt.isDown(root.jumpKey)))){
rightWall.x = (root.getWithinRange(((rightWall.x / tSize) - ((((20 * root.tslf) * (xMFC - ((100 * xMFC) / Math.abs(xMFC)))) / 200) * ((Math.abs(xMFC))>100) ? 1 : 0)), -4, 15) * tSize);
} else {
rightWall.x = (root.getWithinRange(((rightWall.x / tSize) - ((((20 * root.tslf) * (xMFC - ((240 * xMFC) / Math.abs(xMFC)))) / 100) * ((Math.abs(xMFC))>240) ? 1 : 0)), -4, 15) * tSize);
};
};
if (root.kt.isDown(KeyTracker.LEFT)){
rightWall.x = (rightWall.x - ((12 * root.tslf) * tSize));
};
if (root.kt.isDown(KeyTracker.RIGHT)){
rightWall.x = (rightWall.x + ((12 * root.tslf) * tSize));
};
rightWall.x = root.getWithinRange(rightWall.x, (-5 * tSize), (15 * tSize));
ceiling.x = root.getWithinRange((rightWall.x + (5 * tSize)), (-5 * tSize), (15 * tSize));
leftWall.x = root.getWithinRange((rightWall.x + (10 * tSize)), (-5 * tSize), (15 * tSize));
floor.x = root.getWithinRange((rightWall.x + (15 * tSize)), (-5 * tSize), (15 * tSize));
};
};
options.grid.x = getWithinRange(((edi.tor.rightWall.x - (eTileSize * 3)) + 4), ((-(options.x) - (eTileSize * 5)) + 1), -(options.x));
}
public function reset(){
cameraX = 100;
cameraY = 0;
cameraZ = -8;
xVel = 0;
yVel = 0;
zVel = 0;
angle = 1;
falling = false;
jumping = false;
character.currentframe = 10;
}
function frame2(){
if (loaderInfo.bytesLoaded < loaderInfo.bytesTotal){
preloader.gotoAndStop(Math.round(((loaderInfo.bytesLoaded / loaderInfo.bytesTotal) * 100)));
gotoAndPlay(1);
};
}
public function randInt(_arg1:int, _arg2:int){
var _local3:*;
if (_arg1 > _arg2){
_local3 = _arg1;
_arg1 = _arg2;
_arg2 = _local3;
};
return (((Math.random() * ((_arg2 - _arg1) + 1)) + _arg1));
}
public function rotateTunnel(_arg1:Number){
var tween1:Tween;
var tween2:Tween;
var onMotionFinished:*;
var partwayCheck:*;
var firstCheck:Boolean;
var onPartway:*;
var amount = _arg1;
onMotionFinished = function (){
var _local1:*;
_local1 = cameraY;
cameraY = (cameraX * -(amount));
if (cameraY != 280){
trace("cameraY not properly set");
};
cameraX = (_local1 * amount);
angle = getWithinRange((angle + amount), 0, 3);
backgroundOffset = getWithinRange((backgroundOffset + amount), 0, 3);
back.rotation = 0;
drawTunnel(true);
rotating = false;
xVel = 0;
yVel = 0;
zVel = 0;
if (character.currentFrame >= 4){
character.currentclip.gotoAndStop(59);
};
character.stopped = false;
falling = false;
falling = !(onTile());
timer = null;
tween1 = null;
tween2 = null;
clearInterval(partwayCheck);
};
onPartway = function (){
if (firstCheck){
firstCheck = false;
return;
};
if (((kt.isDown(rightKey)) && (!(kt.isDown(leftKey))))){
timer.finish = (timer.finish + (3 * amount));
} else {
if (((kt.isDown(leftKey)) && (!(kt.isDown(rightKey))))){
timer.finish = (timer.finish - (3 * amount));
};
};
};
if ((((cameraY > 290)) || ((amount == 0)))){
return;
};
rotating = true;
character.stopped = true;
if (((!((amount == -1))) && (!((amount == 1))))){
amount = (amount / Math.abs(amount));
};
tween1 = new Tween(back, "rotation", Regular.easeInOut, back.rotation, (back.rotation - (90 * amount)), (8 / 17), true);
tween2 = new Tween(root, "cameraX", Regular.easeIn, cameraX, (280 * -(amount)), (8 / 17), true);
timer = new Tween(root, "cameraY", Regular.easeIn, cameraY, Math.max(Math.min(((cameraY * ((amount * (-0.1 / 3)) + 0.8)) + 100), 360), -360), (8 / 17), true);
character.stop();
timer.addEventListener("motionFinish", onMotionFinished);
partwayCheck = setInterval(onPartway, (2 / 17));
firstCheck = true;
}
public function getColor(_arg1:int, _arg2:uint, _arg3:Number):Number{
var _local4:uint;
var _local5:uint;
var _local6:uint;
_arg3 = (_arg3 * pulseMod);
if ((((_arg1 < 0)) || ((_arg1 >= level.length)))){
_local4 = Math.round(((46 + _arg3) * rMod));
_local5 = Math.round(((46 + _arg3) * gMod));
_local6 = Math.round(((46 + _arg3) * bMod));
} else {
switch (level[_arg1][_arg2]){
case 0:
return (0);
case 1:
_local4 = Math.round(((46 + _arg3) * rMod));
_local5 = Math.round(((46 + _arg3) * gMod));
_local6 = Math.round(((46 + _arg3) * bMod));
break;
case 2:
_local4 = Math.round((120 - (_arg3 / 4)));
_local5 = Math.round((120 - (_arg3 / 4)));
_local6 = Math.round((120 - (_arg3 / 4)));
break;
default:
return (0xFF0000);
};
};
_local4 = Math.max(Math.min(_local4, 0xFF), 0);
_local5 = Math.max(Math.min(_local5, 0xFF), 0);
_local6 = Math.max(Math.min(_local6, 0xFF), 0);
return ((((_local4 << 16) | (_local5 << 8)) | _local6));
}
public function stopKeyFocus(_arg1:FocusEvent){
_arg1.preventDefault();
}
public function getLevel(_arg1:Number):String{
if (playMode == "adventure"){
if (_arg1 > advLevels.length){
return ("");
};
return (advLevels[(_arg1 - 1)]);
//unresolved jump
};
if (_arg1 > tutLevels.length){
return ("");
};
return (tutLevels[(_arg1 - 1)]);
}
public function squareOf(_arg1:Number){
return ((_arg1 * _arg1));
}
public function onKeyRelease(_arg1:Event){
kt.keyUpHandler(_arg1);
if ((((oefType == 2)) && (!(editing)))){
tsle = ((gameTimeScale * tt.timeSince(lastEvent)) / 1000);
lastEvent = tt.time();
inOut.visible = false;
stdMove();
};
}
}
}//package Run_fla
Section 27
//mask_55 (Run_fla.mask_55)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class mask_55 extends MovieClip {
public function mask_55(){
addFrameScript(0, frame1);
}
function frame1(){
height = (2 * root.eTileSize);
x = -(parent.x);
}
}
}//package Run_fla
Section 28
//MedQ_48 (Run_fla.MedQ_48)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MedQ_48 extends MovieClip {
public var select:MovieClip;
public function MedQ_48(){
addFrameScript(0, frame1);
}
function frame1(){
select.visible = (stage.quality == "MEDIUM");
stop();
}
}
}//package Run_fla
Section 29
//Music_78 (Run_fla.Music_78)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Music_78 extends MovieClip {
public function Music_78(){
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
if (root.songMuted){
stop();
};
}
}
}//package Run_fla
Section 30
//MuteMusic_42 (Run_fla.MuteMusic_42)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MuteMusic_42 extends MovieClip {
public function MuteMusic_42(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 31
//MuteSound_43 (Run_fla.MuteSound_43)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MuteSound_43 extends MovieClip {
public function MuteSound_43(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 32
//Options_31 (Run_fla.Options_31)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Options_31 extends MovieClip {
public var edit:SimpleButton;
public var exitToMainMenu:Boolean;
public var back2:SimpleButton;
public var C:MovieClip;
public var F:MovieClip;
public var exitEdit:SimpleButton;
public var setLevel:MovieClip;
public var L:MovieClip;
public var R:MovieClip;
public var keysPressedFor:Number;
public var muteSound:MovieClip;
public var editMenu:MovieClip;
public var oefType:uint;
public var mainMenu:SimpleButton;
public var aComplete:MovieClip;
public var iComplete:MovieClip;
public var editMode:SimpleButton;
public var setRight:MovieClip;
public var focusReceiver:MovieClip;
public var back:SimpleButton;
public var openOptions:SimpleButton;
public var setControls:SimpleButton;
public var justPaused:Boolean;
public var grid:MovieClip;
public var topCover:MovieClip;
public var setLeft:MovieClip;
public var pauseFade:MovieClip;
public var muteMusic:MovieClip;
public var setJump:MovieClip;
public var cover:MovieClip;
public var setDifficulty:MovieClip;
public var tComplete:MovieClip;
public var pReleased:Boolean;
public var jReleased:Boolean;
public function Options_31(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
public function goNext(_arg1:Event){
var e = _arg1;
var _local3 = root;
with (_local3) {
gamePaused = true;
starter.stop();
starter.visible = false;
character.visible = false;
lText.visible = false;
lText.playing = false;
front.clearAll();
back.clearAll();
starfield.visible = false;
restart.gotoAndStop(1);
levelComplete.gotoAndStop(1);
saveFile.flush();
pulseMod = 1;
};
oefType = 0;
justPaused = true;
if (!root.modeCompleted){
nextFrame();
} else {
gotoAndStop(6);
};
}
public function goRight(_arg1:Event){
setRight.gotoAndPlay(((setRight.currentFrame)==1) ? 2 : 1);
}
public function muteUnmuteSound(_arg1:Event){
var e = _arg1;
var _local3 = root;
with (_local3) {
if (soundMuted){
soundMuted = false;
saveFile.data.soundMuted = false;
} else {
soundMuted = true;
saveFile.data.soundMuted = true;
};
};
}
function frame2(){
oefType = 2;
if (!justPaused){
pauseFade.visible = false;
};
justPaused = false;
if (root.playMode == "infinite"){
setDifficulty.visible = true;
setLevel.visible = false;
} else {
if (root.playMode == "adventure"){
setLevel.visible = true;
} else {
setLevel.visible = false;
};
setDifficulty.visible = false;
};
if (exitToMainMenu){
exitToMainMenu = false;
goMenu(new Event(""));
};
if (root.toEditMode){
goEdit(new Event(""));
};
setControls.addEventListener("click", goControls);
mainMenu.addEventListener("click", goMenu);
editMode.addEventListener("click", goEdit);
back.addEventListener("click", goBack);
muteMusic.addEventListener("click", muteUnmuteMusic);
muteSound.addEventListener("click", muteUnmuteSound);
}
function frame3(){
setLeft.addEventListener("click", goLeft);
setJump.addEventListener("click", goJump);
setRight.addEventListener("click", goRight);
back2.addEventListener("click", goFrame2);
}
public function goMenu(_arg1:Event){
var e = _arg1;
goBack(new Event(""));
var _local3 = root;
with (_local3) {
front.clearAll();
back.clearAll();
starter.visible = true;
levelComplete.visible = true;
character.visible = true;
starfield.visible = true;
levelComplete.gotoAndStop(1);
starter.gotoAndStop(1);
music.gotoAndStop(1);
SoundMixer.stopAll();
gotoAndPlay(1);
};
}
function frame5(){
edit.addEventListener("click", goBackEdit);
}
function frame6(){
oefType = 4;
jReleased = false;
var _local2 = root;
with (_local2) {
gamePaused = true;
modeCompleted = false;
oefType = 1;
back.clearAll();
front.clearAll();
stop();
};
if (root.playMode == "tutorial"){
iComplete.visible = false;
aComplete.visible = false;
root.tutComplete = true;
root.saveFile.data.tutorialCompleted = true;
root.saveFile.flush();
};
if (root.playMode == "infinite"){
tComplete.visible = false;
aComplete.visible = false;
};
if (root.playMode == "adventure"){
tComplete.visible = false;
iComplete.visible = false;
};
}
function frame1(){
pReleased = false;
jReleased = false;
keysPressedFor = 0;
justPaused = false;
exitToMainMenu = false;
openOptions.addEventListener("click", goNext);
oefType = 1;
addEventListener("enterFrame", onenterframe);
stop();
}
function frame4(){
oefType = 3;
grid.visible = true;
stage.focus = null;
exitEdit.addEventListener("click", exit);
if (root.toEditMode){
root.toEditMode = false;
exitToMainMenu = true;
editMenu.fillAll(new Event(""));
};
}
public function goBackEdit(_arg1:Event){
var e = _arg1;
var _local3 = root;
with (_local3) {
gamePaused = true;
starter.stop();
starter.visible = false;
character.visible = false;
front.drawings.graphics.clear();
back.drawings.graphics.clear();
starfield.visible = false;
restart.gotoAndStop(1);
levelComplete.gotoAndStop(1);
lText.visible = false;
lText.gotoAndStop(1);
lText.currentframe = -100;
edi.tor.Activate();
edi.tor.y = -9999;
back.clearAll();
front.clearAll();
editing = true;
buttonJustClicked = true;
pulseMod = 1;
};
grid.visible = true;
oefType = 0;
gotoAndStop(4);
}
public function onenterframe(_arg1:Event){
var e = _arg1;
switch (oefType){
case 1:
grid.visible = false;
if (!root.gamePaused){
pReleased = ((pReleased) || (!(root.kt.isDown(80))));
jReleased = ((jReleased) || (!(root.kt.isDown(root.jumpKey))));
if (((((((((root.kt.isDown(80)) && (pReleased))) || (((((((((jReleased) && ((keysPressedFor > 0.075)))) && (root.kt.isDown(root.jumpKey)))) && (root.kt.isDown(root.leftKey)))) && (root.kt.isDown(root.rightKey)))))) || (stage.isFocusInaccessible()))) || (root.toEditMode))){
pReleased = false;
jReleased = false;
goNext(new Event(""));
};
keysPressedFor = (((((root.kt.isDown(root.jumpKey)) && (root.kt.isDown(root.leftKey)))) && (root.kt.isDown(root.rightKey)))) ? (keysPressedFor + root.tsle) : 0;
};
break;
case 2:
root.front.clearAll();
root.back.clearAll();
pReleased = ((pReleased) || (!(root.kt.isDown(80))));
jReleased = ((jReleased) || (!(root.kt.isDown(root.jumpKey))));
if (((((root.kt.isDown(80)) && (pReleased))) || (((root.kt.isDown(root.jumpKey)) && (jReleased))))){
goBack(new Event(""));
};
if (muteMusic.hitTestPoint(root.mouseX, root.mouseY)){
muteMusic.gotoAndStop((root.songMuted) ? 4 : 2);
} else {
muteMusic.gotoAndStop((root.songMuted) ? 3 : 1);
};
if (muteSound.hitTestPoint(root.mouseX, root.mouseY)){
muteSound.gotoAndStop((root.soundMuted) ? 4 : 2);
} else {
muteSound.gotoAndStop((root.soundMuted) ? 3 : 1);
};
break;
case 3:
var _local3 = editMenu;
with (_local3) {
if (saveLoad.hitTestPoint(root.mouseX, root.mouseY)){
saveLoad.gotoAndStop((saveLoad.isSave) ? 2 : 4);
} else {
saveLoad.gotoAndStop((saveLoad.isSave) ? 1 : 3);
};
if (((root.inOut.visible) && ((stage.focus == null)))){
stage.focus = focusReceiver;
};
};
_local3 = root;
with (_local3) {
options.R.x = ((edi.tor.rightWall.x + eTileSize) - 300);
options.F.x = ((edi.tor.floor.x + eTileSize) - 300);
options.L.x = ((edi.tor.leftWall.x + eTileSize) - 300);
options.C.x = ((edi.tor.ceiling.x + eTileSize) - 300);
options.cover.y = ((edi.tor.y + ((level.length - 3) * eTileSize)) - 3);
options.topCover.y = ((edi.tor.y - (eTileSize * 5)) - 4);
};
break;
case 4:
if (((root.kt.isDown(root.jumpKey)) || (root.kt.isDown(KeyTracker.SPACE)))){
if (jReleased){
goMenu(new Event(""));
root.toPlayModes = true;
};
} else {
jReleased = true;
};
default:
grid.visible = false;
return (null);
};
}
public function goLeft(_arg1:Event){
setLeft.gotoAndPlay(((setLeft.currentFrame)==1) ? 2 : 1);
}
public function exit(_arg1:Event){
var e = _arg1;
var _local3 = root;
with (_local3) {
edi.tor.Deactivate();
editing = false;
reset();
cameraY = 280;
cameraZ = level.length;
starter.currentframe = 1;
starter.gotoAndStop(1);
loadNextLevel();
playtesting = false;
};
oefType = 0;
gotoAndStop(2);
}
public function goEdit(_arg1:Event){
var e = _arg1;
var _local3 = root;
with (_local3) {
edi.tor.Activate();
edi.tor.y = -9999;
back.drawings.graphics.clear();
front.drawings.graphics.clear();
editing = true;
buttonJustClicked = true;
pulseMod = 1;
};
oefType = 0;
gotoAndStop(4);
}
public function goJump(_arg1:Event){
setJump.gotoAndPlay(((setJump.currentFrame)==1) ? 2 : 1);
}
public function muteUnmuteMusic(_arg1:Event){
var e = _arg1;
var _local3 = root;
with (_local3) {
if (songMuted){
music.gotoAndPlay(1);
songMuted = false;
saveFile.data.songMuted = false;
} else {
SoundMixer.stopAll();
songMuted = true;
saveFile.data.songMuted = true;
};
};
}
public function goFrame2(_arg1:Event){
var e = _arg1;
var _local3 = root;
with (_local3) {
saveFile.data.rightKey = rightKey;
saveFile.data.leftKey = leftKey;
saveFile.data.jumpKey = jumpKey;
saveFile.flush();
};
oefType = 0;
gotoAndStop(2);
}
public function goControls(_arg1:Event){
oefType = 0;
nextFrame();
}
public function goBack(_arg1:Event){
var e = _arg1;
if ((((root.playMode == "infinite")) && ((currentFrame == 2)))){
setDifficulty.onLeave();
};
var _local3 = root;
with (_local3) {
starter.visible = true;
levelComplete.visible = true;
character.visible = true;
lText.visible = true;
lText.playing = true;
starfield.visible = true;
if (((toLevelSelect) || (toPlayModes))){
gotoAndStop(3);
starter.gotoAndStop(51);
} else {
if (starter.currentFrame != 51){
starter.play();
};
gamePaused = false;
drawTunnel(true);
};
};
oefType = 0;
gotoAndStop(1);
}
}
}//package Run_fla
Section 33
//Pause_41 (Run_fla.Pause_41)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Pause_41 extends MovieClip {
public var currentframe:Number;
public function Pause_41(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
currentframe = 1;
addEventListener("enterFrame", function (_arg1:Event){
currentframe = (currentframe + (20 * root.tsle));
gotoAndStop(Math.min(Math.round(currentframe), 40));
});
}
}
}//package Run_fla
Section 34
//playbutton_14 (Run_fla.playbutton_14)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class playbutton_14 extends MovieClip {
public function playbutton_14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 35
//Preloader_5 (Run_fla.Preloader_5)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Preloader_5 extends MovieClip {
public function Preloader_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 36
//Quality_44 (Run_fla.Quality_44)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Quality_44 extends MovieClip {
public var setQ:MovieClip;
public var currentframe:Number;
public function Quality_44(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
currentframe = 1;
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
currentframe = (currentframe + ((30 * root.tsle) * (this.hitTestPoint(root.mouseX, root.mouseY, true)) ? 1 : -1));
currentframe = Math.max(Math.min(currentframe, 20), 0);
if ((((currentframe < 9.5)) && ((currentFrame >= 10)))){
stage.focus = null;
};
gotoAndStop(Math.round(currentframe));
}
}
}//package Run_fla
Section 37
//Restart_26 (Run_fla.Restart_26)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Restart_26 extends MovieClip {
public var prevCurrentFrame:uint;
public var currentframe:Number;
public function Restart_26(){
addFrameScript(0, frame1);
}
function frame1(){
currentframe = 1;
prevCurrentFrame = currentFrame;
addEventListener("enterFrame", onenterframe);
stop();
}
public function onenterframe(_arg1:Event){
if (currentFrame != prevCurrentFrame){
currentframe = (currentframe + ((40 * root.tslf) / root.gameTimeScale));
gotoAndPlay(Math.min(Math.round(currentframe), 30));
};
if (currentFrame == 30){
removeEventListener("enterFrame", onenterframe);
gotoAndStop(1);
};
}
}
}//package Run_fla
Section 38
//run_21 (Run_fla.run_21)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class run_21 extends MovieClip {
public function run_21(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 39
//runside_19 (Run_fla.runside_19)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class runside_19 extends MovieClip {
public function runside_19(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 40
//SaveLoad_64 (Run_fla.SaveLoad_64)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SaveLoad_64 extends MovieClip {
public var isSave:Boolean;
public function SaveLoad_64(){
addFrameScript(0, frame1);
}
function frame1(){
isSave = true;
stop();
}
public function binToHex(_arg1:String):String{
var _local2:String;
var _local3:Number;
var _local4:String;
var _local5:Number;
_local2 = "0x";
_local3 = 0;
while (((_local3 * 4) + 4) <= _arg1.length) {
_local4 = _arg1.substr((_local3 * 4), 4);
_local5 = parseInt(_local4, 2);
if (_local5 > 9){
_local2 = (_local2 + String.fromCharCode((55 + _local5)));
} else {
_local2 = (_local2 + _local5);
};
_local3++;
};
return (_local2);
}
}
}//package Run_fla
Section 41
//SetColor_72 (Run_fla.SetColor_72)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetColor_72 extends MovieClip {
public var prevFocus:Object;
public var inputColor:TextField;
public var newColor:String;
public function SetColor_72(){
addFrameScript(0, frame1);
}
function frame1(){
prevFocus = stage.focus;
newColor = root.getLevelColor();
inputColor.text = newColor;
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
var e = _arg1;
if (inputColor.text.substring(0, 4) == "0x0x"){
inputColor.text = inputColor.text.substring(2);
};
if (inputColor.text.substring(0, 3) == "0x#"){
inputColor.text = ("0x" + inputColor.text.substring(3));
};
if (inputColor.text.substring(0, 1) == "#"){
inputColor.text = ("0x" + inputColor.text.substring(1));
};
if (inputColor.text.length > 8){
inputColor.text = inputColor.text.substring(0, 8);
};
if (inputColor == stage.focus){
if (inputColor != prevFocus){
inputColor.text = "0x";
};
} else {
if (inputColor == prevFocus){
var _local3 = root;
with (_local3) {
setLevelColor(inputColor.text);
rMod = targetR;
gMod = targetG;
bMod = targetB;
edi.tor.gotoAndPlay(2);
};
newColor = root.getLevelColor();
} else {
inputColor.text = newColor;
};
};
prevFocus = stage.focus;
}
}
}//package Run_fla
Section 42
//SetDifficulty_39 (Run_fla.SetDifficulty_39)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetDifficulty_39 extends MovieClip {
public var inputDifficulty:TextField;
public var newDifficulty:Number;
public var focusListener:TextField;
public var randomize:MovieClip;
public function SetDifficulty_39(){
addFrameScript(0, frame1);
}
public function onLeave(){
newDifficulty = parseFloat(inputDifficulty.text);
if (!isNaN(newDifficulty)){
if (Math.round(root.difficulty) != newDifficulty){
root.difficulty = Math.min(Math.max(Math.round(newDifficulty), 5), 99, root.saveFile.data.maxDifficulty);
root.starter.gotoAndPlay(1);
root.starter.currentframe = 0;
root.loadNextLevel();
};
};
}
function frame1(){
newDifficulty = Math.round(root.difficulty);
inputDifficulty.text = newDifficulty.toString();
addEventListener("enterFrame", onenterframe);
randomize.addEventListener("click", function (_arg1:Event){
root.loadNextLevel();
root.starter.gotoAndPlay(1);
parent.goBack(new Event(""));
});
}
public function onenterframe(_arg1:Event){
if (focusListener == stage.focus){
stage.focus = inputDifficulty;
};
if ((((inputDifficulty == stage.focus)) && ((((inputDifficulty.text == newDifficulty.toString())) || ((inputDifficulty.text == "")))))){
inputDifficulty.text = "";
} else {
if (inputDifficulty.text == ""){
inputDifficulty.text = newDifficulty.toString();
};
};
}
}
}//package Run_fla
Section 43
//SetJump_54 (Run_fla.SetJump_54)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetJump_54 extends MovieClip {
public function SetJump_54(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
function frame2(){
if (root.kt.isDown(root.kt.getCode())){
root.jumpKey = root.kt.getCode();
gotoAndStop(1);
};
}
}
}//package Run_fla
Section 44
//SetLeft_52 (Run_fla.SetLeft_52)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetLeft_52 extends MovieClip {
public function SetLeft_52(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
function frame2(){
if (root.kt.isDown(root.kt.getCode())){
root.leftKey = root.kt.getCode();
gotoAndStop(1);
};
}
}
}//package Run_fla
Section 45
//SetLevel_38 (Run_fla.SetLevel_38)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetLevel_38 extends MovieClip {
public function SetLevel_38(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener("mouseDown", onmousedown);
addEventListener("rollOver", function (_arg1:Event){
gotoAndStop(2);
});
addEventListener("rollOut", function (_arg1:Event){
gotoAndStop(1);
});
stop();
}
public function onmousedown(_arg1:Event){
root.toLevelSelect = true;
parent.goBack(new Event(""));
}
}
}//package Run_fla
Section 46
//SetQuality_45 (Run_fla.SetQuality_45)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetQuality_45 extends MovieClip {
public var medQ:MovieClip;
public var hiQ:MovieClip;
public var lowQ:MovieClip;
public function SetQuality_45(){
addFrameScript(0, frame1);
}
public function setHigh(_arg1:Event){
lowQ.select.visible = false;
medQ.select.visible = false;
hiQ.select.visible = true;
stage.quality = "HIGH";
}
public function setMed(_arg1:Event){
lowQ.select.visible = false;
medQ.select.visible = true;
hiQ.select.visible = false;
stage.quality = "MEDIUM";
}
function frame1(){
addEventListener("enterFrame", onenterframe);
lowQ.addEventListener("click", setLow);
medQ.addEventListener("click", setMed);
hiQ.addEventListener("click", setHigh);
}
public function setLow(_arg1:Event){
lowQ.select.visible = true;
medQ.select.visible = false;
hiQ.select.visible = false;
stage.quality = "LOW";
}
public function onenterframe(_arg1:Event){
lowQ.gotoAndStop(1);
medQ.gotoAndStop(1);
hiQ.gotoAndStop(1);
if (lowQ.hitTestPoint(root.mouseX, root.mouseY)){
lowQ.gotoAndStop(2);
};
if (medQ.hitTestPoint(root.mouseX, root.mouseY)){
medQ.gotoAndStop(2);
};
if (hiQ.hitTestPoint(root.mouseX, root.mouseY)){
hiQ.gotoAndStop(2);
};
}
}
}//package Run_fla
Section 47
//SetRight_53 (Run_fla.SetRight_53)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetRight_53 extends MovieClip {
public function SetRight_53(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
function frame2(){
if (root.kt.isDown(root.kt.getCode())){
root.rightKey = root.kt.getCode();
gotoAndStop(1);
};
}
}
}//package Run_fla
Section 48
//SetText_71 (Run_fla.SetText_71)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetText_71 extends MovieClip {
public var prevFocus:Object;
public var levelText:TextField;
public var newText:String;
public function SetText_71(){
addFrameScript(0, frame1);
}
function frame1(){
prevFocus = stage.focus;
newText = root.getLevelText();
levelText.text = newText;
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
var e = _arg1;
if (levelText != stage.focus){
if (levelText == prevFocus){
var _local3 = root;
with (_local3) {
setLevelText(levelText.text);
};
newText = root.getLevelText();
} else {
levelText.text = newText;
};
};
prevFocus = stage.focus;
}
}
}//package Run_fla
Section 49
//SpaceToScroll_74 (Run_fla.SpaceToScroll_74)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SpaceToScroll_74 extends MovieClip {
public function SpaceToScroll_74(){
addFrameScript(0, frame1);
}
public function oef(_arg1:Event){
if (root.kt.isDown(KeyTracker.SPACE)){
this.visible = false;
removeEventListener("enterFrame", oef);
};
}
function frame1(){
addEventListener("enterFrame", oef);
}
}
}//package Run_fla
Section 50
//Start_24 (Run_fla.Start_24)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Start_24 extends MovieClip {
public var green:Sound;
public var yellowPlaying:Boolean;
public var redPlaying:Boolean;
public var prevCurrentFrame:uint;
public var red:Sound;
public var currentframe:Number;
public var greenPlaying:Boolean;
public var levelNumber:TextField;
public function Start_24(){
addFrameScript(0, frame1, 50, frame51);
}
function frame1(){
currentframe = 1;
prevCurrentFrame = currentFrame;
red = new Red();
redPlaying = false;
yellowPlaying = false;
green = new Green();
greenPlaying = false;
var _local2 = root;
with (_local2) {
loadNextLevel();
angle = 1;
gamePaused = false;
drawTunnel(true);
lText.playing = true;
};
if (root.playtesting){
levelNumber.text = "";
levelNumber.visible = false;
} else {
levelNumber.text = ("Level " + root.currentLevel.toString());
levelNumber.visible = true;
};
_local2 = root;
with (_local2) {
if ((cameraZ + 6) < level.length){
distToPulse = (pulsePos - cameraZ);
cameraZ = (((cameraZ - Math.floor(cameraZ)) + level.length) + 6);
pulsePos = (cameraZ + distToPulse);
};
};
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
var distToPulse:int;
var e = _arg1;
if (((!((currentFrame == prevCurrentFrame))) && (!(root.gamePaused)))){
currentframe = (currentframe + (20 * root.tslf));
gotoAndPlay(Math.max(Math.min(Math.round(currentframe), 51), 0));
if ((((((currentframe >= 12)) && (!(redPlaying)))) && (!(root.soundMuted)))){
red.play();
redPlaying = true;
};
if ((((((currentframe >= 26)) && (!(yellowPlaying)))) && (!(root.soundMuted)))){
red.play();
yellowPlaying = true;
};
if ((((((currentframe >= 41)) && (!(greenPlaying)))) && (!(root.soundMuted)))){
green.play();
greenPlaying = true;
};
if ((((currentframe >= 42)) && ((root.cameraZ > root.level.length)))){
var _local3 = root;
with (_local3) {
distToPulse = (pulsePos - cameraZ);
cameraZ = ((cameraZ - Math.floor(cameraZ)) - 14);
pulsePos = (cameraZ + distToPulse);
};
};
if ((((currentframe < 42)) && (((root.cameraZ + 6) < root.level.length)))){
_local3 = root;
with (_local3) {
distToPulse = (pulsePos - cameraZ);
cameraZ = (((cameraZ - Math.floor(cameraZ)) + level.length) + 6);
pulsePos = (cameraZ + distToPulse);
};
};
};
prevCurrentFrame = currentFrame;
}
function frame51(){
stop();
removeEventListener("enterFrame", onenterframe);
}
}
}//package Run_fla
Section 51
//TileOptions_66 (Run_fla.TileOptions_66)
package Run_fla {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class TileOptions_66 extends MovieClip {
public var aRT:SimpleButton;
public var fill:SimpleButton;
public var empty:SimpleButton;
public var currentframe:Number;
public function TileOptions_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
currentframe = 1;
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
var _local2:Boolean;
if (parent.dActivator == null){
removeEventListener("enterFrame", onenterframe);
return;
};
_local2 = this.hitTestPoint(root.mouseX, root.mouseY, true);
_local2 = ((_local2) && ((parent.d.currentFrame < 10)));
currentframe = (currentframe + ((30 * root.tsle) * (_local2) ? 1 : -1));
currentframe = Math.max(Math.min(currentframe, 20), 0);
gotoAndStop(Math.round(currentframe));
}
}
}//package Run_fla
Section 52
//tutComplete_75 (Run_fla.tutComplete_75)
package Run_fla {
import flash.display.*;
public dynamic class tutComplete_75 extends MovieClip {
public var checkMark:MovieClip;
}
}//package Run_fla
Section 53
//editor (editor)
package {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class editor extends MovieClip {
public var rightWall:Sprite;
public var ceilingData:BitmapData;
public var yPos;
public var leftBitmap:Bitmap;
public var Active:Boolean;
public var floor:Sprite;
public var floorBitmap:Bitmap;
public var leftData:BitmapData;
public var rightBitmap:Bitmap;
public var leftWall:Sprite;
public var levelLength:uint;
public var tSize:uint;
public var varsSet:Boolean;
public var ceilingBitmap:Bitmap;
public var xPos;
public var ceiling:Sprite;
public var floorData:BitmapData;
public var rightData:BitmapData;
public function editor(){
addFrameScript(0, frame1, 1, frame2, 3, frame4);
}
public function Activate(){
rightWall.visible = true;
floor.visible = true;
leftWall.visible = true;
ceiling.visible = true;
Active = true;
visible = true;
play();
}
public function resetLength(){
levelLength = root.level.length;
rightData.dispose();
rightData = new BitmapData(4, levelLength, false, 0);
rightBitmap = new Bitmap(rightData);
floorData.dispose();
floorData = new BitmapData(4, levelLength, false, 0);
floorBitmap = new Bitmap(floorData);
leftData.dispose();
leftData = new BitmapData(4, levelLength, false, 0);
leftBitmap = new Bitmap(leftData);
ceilingData.dispose();
ceilingData = new BitmapData(4, levelLength, false, 0);
ceilingBitmap = new Bitmap(ceilingData);
}
function frame4(){
gotoAndPlay(3);
}
function frame1(){
if (((!(varsSet)) && (!((root == null))))){
Active = false;
tSize = root.eTileSize;
levelLength = root.maxLevelLength;
rightWall = new Sprite();
addChild(rightWall);
rightData = new BitmapData(4, levelLength, false, 0);
rightBitmap = new Bitmap(rightData);
rightWall.addChild(rightBitmap);
rightWall.scaleX = tSize;
rightWall.scaleY = tSize;
floor = new Sprite();
addChild(floor);
floorData = new BitmapData(4, levelLength, false, 0);
floorBitmap = new Bitmap(floorData);
floor.addChild(floorBitmap);
floor.scaleX = tSize;
floor.scaleY = tSize;
leftWall = new Sprite();
addChild(leftWall);
leftData = new BitmapData(4, levelLength, false, 0);
leftBitmap = new Bitmap(leftData);
leftWall.addChild(leftBitmap);
leftWall.scaleX = tSize;
leftWall.scaleY = tSize;
ceiling = new Sprite();
addChild(ceiling);
ceilingData = new BitmapData(4, levelLength, false, 0);
ceilingBitmap = new Bitmap(ceilingData);
ceiling.addChild(ceilingBitmap);
ceiling.scaleX = tSize;
ceiling.scaleY = tSize;
};
if (((!(varsSet)) && (!((root == null))))){
varsSet = true;
Deactivate();
};
}
function frame2(){
if (!varsSet){
gotoAndPlay(1);
};
if (Active){
rightData.lock();
floorData.lock();
leftData.lock();
ceilingData.lock();
yPos = 0;
while (yPos < root.level.length) {
xPos = 0;
while (xPos < 16) {
fillTile(xPos, yPos);
xPos++;
};
yPos++;
};
rightData.unlock();
floorData.unlock();
leftData.unlock();
ceilingData.unlock();
};
}
public function Deactivate(){
rightWall.visible = false;
floor.visible = false;
leftWall.visible = false;
ceiling.visible = false;
Active = false;
visible = false;
gotoAndStop(1);
}
public function fillTile(_arg1:Number, _arg2:Number){
var _local3:Number;
var _local4:Number;
_local3 = (3 - root.getWithinRange(_arg1, 0, 3));
_local4 = (root.level.length - _arg2);
switch (Math.floor((_arg1 / 4))){
case 0:
rightData.setPixel(_local3, (_local4 - 1), root.getColor(_arg2, _arg1, 100));
break;
case 1:
floorData.setPixel(_local3, (_local4 - 1), root.getColor(_arg2, _arg1, 100));
break;
case 2:
leftData.setPixel(_local3, (_local4 - 1), root.getColor(_arg2, _arg1, 100));
break;
default:
ceilingData.setPixel(_local3, (_local4 - 1), root.getColor(_arg2, _arg1, 100));
break;
};
}
}
}//package
Section 54
//Green (Green)
package {
import flash.media.*;
public dynamic class Green extends Sound {
}
}//package
Section 55
//KeyTracker (KeyTracker)
package {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
public class KeyTracker extends Sprite {
private var keyArray:ByteArray;
private var mostRecentKey:uint;// = 0
public static const SHIFT:uint = 16;
public static const SPACE:uint = 32;
public static const LEFT:uint = 39;
public static const DOWN:uint = 40;
public static const UP:uint = 38;
public static const RIGHT:uint = 37;
public static const ENTER:uint = 13;
public function KeyTracker(){
var _local1:*;
keyArray = new ByteArray();
mostRecentKey = 0;
super();
_local1 = 0;
while (_local1 <= 90) {
keyArray.writeBoolean(false);
_local1++;
};
}
public function isDown(_arg1:uint):Boolean{
keyArray.position = _arg1;
return (keyArray.readBoolean());
}
public function getCode():uint{
return (mostRecentKey);
}
public function keyDownHandler(_arg1:KeyboardEvent):void{
mostRecentKey = _arg1.keyCode;
keyArray.position = mostRecentKey;
keyArray.writeBoolean(true);
}
public function keyUpHandler(_arg1:KeyboardEvent):void{
keyArray.position = _arg1.keyCode;
keyArray.writeBoolean(false);
}
}
}//package
Section 56
//Red (Red)
package {
import flash.media.*;
public dynamic class Red extends Sound {
}
}//package
Section 57
//Space_theme_cropped (Space_theme_cropped)
package {
import flash.media.*;
public dynamic class Space_theme_cropped extends Sound {
}
}//package
Section 58
//TimeTracker (TimeTracker)
package {
import flash.utils.*;
import flash.display.*;
public class TimeTracker extends Sprite {
private var thisFrameTime:uint;// = 0
private var prevFrameTime:uint;// = 0
public function TimeTracker(){
prevFrameTime = 0;
thisFrameTime = 0;
super();
addEventListener("enterFrame", setFrameTimer);
}
public function timeSince(_arg1:uint):uint{
return ((getTimer() - _arg1));
}
public function timeSinceLastFrame():uint{
return ((time() - prevFrameTime));
}
public function time():uint{
return (getTimer());
}
private function setFrameTimer(_arg1){
prevFrameTime = thisFrameTime;
thisFrameTime = time();
}
}
}//package