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_15 (Run_fla.absClip_15)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class absClip_15 extends MovieClip {
public var hitBox:SimpleButton;
public var currentframe:Number;
public function absClip_15(){
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_78 (Run_fla.advComplete_78)
package Run_fla {
import flash.display.*;
public dynamic class advComplete_78 extends MovieClip {
public var checkMark:MovieClip;
}
}//package Run_fla
Section 6
//API_7 (Run_fla.API_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class API_7 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_7(){
addFrameScript(0, frame1);
}
public function loadComplete(_arg1:Event){
kongregate = _arg1.target.content;
kongregate.services.connect();
}
function frame1(){
if ((((root.kongregate == null)) && ((root.hostSite == "kongregate.com")))){
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_3 (Run_fla.Background_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Background_3 extends MovieClip {
public function Background_3(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package Run_fla
Section 8
//button_10 (Run_fla.button_10)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class button_10 extends MovieClip {
public var checkMark:MovieClip;
public var hitBox:SimpleButton;
public var checked:Boolean;
public var currentframe:Number;
public function button_10(){
addFrameScript(0, frame1);
}
public function displayCheck(_arg1:Boolean=true){
checkMark.visible = _arg1;
checked = _arg1;
}
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_21 (Run_fla.Character_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Character_21 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_21(){
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_73 (Run_fla.DisplayOptions_73)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class DisplayOptions_73 extends MovieClip {
public var currentframe:Number;
public function DisplayOptions_73(){
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_54 (Run_fla.distanceVisible_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class distanceVisible_54 extends MovieClip {
public var prevFocus:Object;
public var newDistance:Number;
public var inputDistance:TextField;
public function distanceVisible_54(){
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_8 (Run_fla.Drawings_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Drawings_8 extends MovieClip {
public var highY:Number;
public var tileType:int;
public var drawings:Shape;
public var leftX:Number;
public var endPos:int;
public var startPos:int;
public var lowY:Number;
public var rightX:Number;
public function Drawings_8(){
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_32 (Run_fla.editContainer_32)
package Run_fla {
import flash.display.*;
public dynamic class editContainer_32 extends MovieClip {
public var tor:editor;
}
}//package Run_fla
Section 14
//EditMenu_64 (Run_fla.EditMenu_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class EditMenu_64 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_64(){
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.external.*;
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_53 (Run_fla.framerate_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class framerate_53 extends MovieClip {
public var newFramerate:Number;
public var inputFramerate:TextField;
public var prevFocus:Object;
public function framerate_53(){
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
//GameSpeed_13 (Run_fla.GameSpeed_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class GameSpeed_13 extends MovieClip {
public var intense:MovieClip;
public var fast:MovieClip;
public var normal:MovieClip;
public function GameSpeed_13(){
addFrameScript(0, frame1);
}
function frame1(){
normal.addEventListener("mouseDown", function (_arg1:Event){
onClick(0);
});
fast.addEventListener("mouseDown", function (_arg1:Event){
onClick(1);
});
intense.addEventListener("mouseDown", function (_arg1:Event){
onClick(2);
});
recheck();
}
public function recheck(){
if (((!(root.intUnlocked())) || ((root.currentLevel > root.maxIntenseLevel)))){
intense.color = new ColorTransform(5, 5, 5, 1, 100, 100, 100);
root.intensity = Math.min(root.intensity, 1);
} else {
intense.color = new ColorTransform(1, 1, 1);
};
if (root.maxIntenseLevel > root.saveFile.data.maxAdvLevel){
root.saveFile.data.maxAdvLevel = (root.maxLevelReached = root.maxIntenseLevel);
};
normal.displayCheck(false);
fast.displayCheck(false);
intense.displayCheck(false);
switch (root.intensity){
case 1:
fast.displayCheck();
break;
case 2:
intense.displayCheck();
break;
default:
normal.displayCheck();
};
}
public function onClick(_arg1:int){
root.intensity = _arg1;
recheck();
}
}
}//package Run_fla
Section 18
//Grid_35 (Run_fla.Grid_35)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Grid_35 extends MovieClip {
public var vPos:int;
public var hPos:int;
public var tileSize;
public function Grid_35(){
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 19
//HiQ_52 (Run_fla.HiQ_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class HiQ_52 extends MovieClip {
public var select:MovieClip;
public function HiQ_52(){
addFrameScript(0, frame1);
}
function frame1(){
select.visible = (stage.quality == "HIGH");
stop();
}
}
}//package Run_fla
Section 20
//infComplete_79 (Run_fla.infComplete_79)
package Run_fla {
import flash.display.*;
public dynamic class infComplete_79 extends MovieClip {
public var checkMark:MovieClip;
}
}//package Run_fla
Section 21
//jump_25 (Run_fla.jump_25)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class jump_25 extends MovieClip {
public function jump_25(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 22
//LevelComplete_30 (Run_fla.LevelComplete_30)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class LevelComplete_30 extends MovieClip {
public var levelAlreadyCompleted:Boolean;
public var rToReplay:MovieClip;
public function LevelComplete_30(){
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 (intensity == 2){
if ((((playMode == "adventure")) && ((currentLevel <= (advLevels.length + 1))))){
if (currentLevel > maxIntenseLevel){
if (kongregate != null){
kongregate.scores.submit(maxIntenseLevel, "Level Completed on Intense");
};
maxIntenseLevel = currentLevel;
saveFile.data.maxAdvLevelInt = currentLevel;
saveFile.flush();
};
};
rToReplay.visible = true;
if (playMode == "infinite"){
rToReplay.visible = false;
if (difficulty == 99){
saveFile.data.infCompletions = (saveFile.data.infCompletions + 1);
saveFile.flush();
if (saveFile.data.maxDifficultyInt != 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.maxDifficultyInt < difficulty){
saveFile.data.maxDifficultyInt = difficulty;
saveFile.flush();
};
if (kongregate != null){
kongregate.scores.submit(Math.min(Math.round(difficulty), 99), "Difficulty Reached on Intense");
};
};
} else {
if ((((playMode == "adventure")) && ((currentLevel <= (advLevels.length + 1))))){
if (currentLevel > maxLevelReached){
if (kongregate != null){
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();
if (kongregate != null){
kongregate.scores.submit(saveFile.data.infCompletions, 100, "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();
};
if (kongregate != null){
kongregate.scores.submit(Math.min(Math.round(difficulty), 99), "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 23
//LevelSelectMenu_16 (Run_fla.LevelSelectMenu_16)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class LevelSelectMenu_16 extends MovieClip {
public var backward:SimpleButton;
public var displayWindow:SimpleButton;
public var maxLevel:int;
public var playButton:MovieClip;
public var startHitBox:SimpleButton;
public var selectedLevel:int;
public var forward:SimpleButton;
public var levNumber:TextField;
public function LevelSelectMenu_16(){
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(){
maxLevel = ((root.intensity)==2) ? root.maxIntenseLevel : root.maxLevelReached;
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, maxLevel);
root.currentLevel = selectedLevel;
displayCurrentLevel();
}
public function backwardClicked(_arg1:Event){
selectedLevel = root.getWithinRange((selectedLevel - 1), 1, maxLevel);
root.currentLevel = selectedLevel;
displayCurrentLevel();
}
public function onOut(_arg1:Event){
playButton.gotoAndStop(1);
}
}
}//package Run_fla
Section 24
//LowQ_49 (Run_fla.LowQ_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class LowQ_49 extends MovieClip {
public var select:MovieClip;
public function LowQ_49(){
addFrameScript(0, frame1);
}
function frame1(){
select.visible = (stage.quality == "LOW");
stop();
}
}
}//package Run_fla
Section 25
//LText_26 (Run_fla.LText_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class LText_26 extends MovieClip {
public var playing:Boolean;
public var currentframe:Number;
public var levelText:TextField;
public function LText_26(){
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 26
//MainMenu_9 (Run_fla.MainMenu_9)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MainMenu_9 extends MovieClip {
public var editButton:MovieClip;
public var gameSpeed:MovieClip;
public var infButton:MovieClip;
public var credits:MovieClip;
public var advButton:MovieClip;
public var back:SimpleButton;
public function MainMenu_9(){
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);
});
gameSpeed.addEventListener("mouseUp", function (_arg1:Event){
recheck();
});
gameSpeed.addEventListener("mouseDown", function (_arg1:Event){
recheck();
});
gameSpeed.addEventListener("rollOut", function (_arg1:Event){
if (_arg1.buttonDown){
recheck();
};
});
recheck();
if (!root.toLevelSelect){
root.currentLevel = 1;
};
stop();
}
function frame2(){
root.toLevelSelect = false;
}
public function recheck(){
advButton.displayCheck((((root.intensity)==2) ? root.saveFile.data.maxAdvLevelInt : root.saveFile.data.maxAdvLevel > root.advLevels.length));
infButton.displayCheck((((root.intensity)==2) ? root.saveFile.data.maxDifficultyInt : root.saveFile.data.maxDifficulty == 100));
}
public function onClick(_arg1:int){
var buttonType = _arg1;
switch (buttonType){
case 1:
root.playMode = "adventure";
if ((((root.saveFile.data.maxAdvLevel == 1)) || ((((root.saveFile.data.maxAdvLevelInt == 1)) && ((root.intensity == 2)))))){
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";
difficulty = Math.min(difficulty, ((root.intensity)==2) ? root.saveFile.data.maxDifficultyInt : root.saveFile.data.maxDifficulty);
play();
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 27
//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.external.*;
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:int;
public var intensity:int;
public var tsle:Number;
public var jumpDistance:Number;
public var tslf:Number;
public var gravity:Number;
public var i:int;
public var yVel:Number;
public var changeTo:int;
public var firstTimeThrough:Boolean;
public var qPressed:Boolean;
public var tutComplete:Boolean;
public var playtesting:Boolean;
public var preloader:MovieClip;
public var lastFrame:int;
public var runSpeed:Number;
public var deaths:Number;
public var starter:MovieClip;
public var wrongSite:SimpleButton;
public var toEditMode:Boolean;
public var varsSet:Boolean;
public var tt:TimeTracker;
public var startPos:int;
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:int;
public var maxLevelReached:int;
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:int;
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 rMod:Number;
public var leftX:Number;
public var sideSpeed:Number;
public var eYPos:Number;
public var drag:Number;
public var focusTracker:MovieClip;
public var levelData:String;
public var bMod:Number;
public var tileAlpha:Number;
public var hostSite:String;
public var jumpKey:Number;
public var songMuted:Boolean;
public var rotating:Boolean;
public var eTileSize:Number;
public var backgroundOffset:int;
public var colors:Array;
public var endPos:int;
public var kt:KeyTracker;
public var level:Array;
public var versionTest:MovieClip;
public var lowX:Number;
public var hostArray:Array;
public var currentLevel:int;
public var editing:Boolean;
public var soundMuted:Boolean;
public var maxLevelLength:int;
public var edi:MovieClip;
public var lastEvent:int;
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 rotationJustCompleted:Boolean;
public var starfield:MovieClip;
public var inOut:TextField;
public var mouseIsDown:Boolean;
public var modeCompleted:Boolean;
public var maxIntenseLevel:int;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
public function toABS(_arg1:Event){
var e = _arg1;
try {
navigateToURL(new URLRequest("http://www.albinoblacksheep.com/games/run"));
} catch(exception:Error) {
trace("Error: cannot access albinoblacksheep.com");
};
}
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.15 + (currentLevel * 0.005));
};
}
public function getLevelText():String{
return (lText.levelText.text);
}
public function onKeyPress(_arg1:Event){
if (kt.isDown(_arg1.keyCode)){
return;
};
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 frame4(){
reset();
inOut.visible = false;
drawTunnel(true);
starfield.cacheAsBitmap = true;
}
function frame3(){
stop();
if (((((!(firstTimeThrough)) && (!(toLevelSelect)))) && (!(toPlayModes)))){
nextFrame();
play();
} else {
oefType = 1;
};
}
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;
targetG = 1;
targetB = 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.";
advLevels[advLevels.length] = "0x1F873F833FC07F88FE287F206FE4F304FFE1DF819FBDBC20FE6EFFECFFF0E7F96FDDEFDDFFF8FFF8F87DFA37FE7637F3F1FBFFFBFEFFFAFCEBCDE9F9F8F3C13FC1FFDFE7DDE7FC7FD33FC0FFECBDEEBDE2BFF2FF80DEC476C42786FFA21F203B262BA82F890FF10F100F141E841E811F811F|Try touching one of the walls.";
advLevels[advLevels.length] = "0x7FFF67F3FE7FFFEDCFEDFFFFF3BF3FB3FDFFEDFEEFCEFFFF9CF9FFDFF7DFF67C3FFFF3E7FFFFEEBDE6BDF7FFFFCF99FEFF7EE5677DFEFFDFFE5993FFFFFEEEFEEE9FBFFFB9F3FFFFFDCF3DFDFFFDFE7FCFFCF3BF7FBB7FFBFCFF9FCFFFFFEB67EB7F3FF9|";
advLevels[advLevels.length] = "0x059F8DADBFA41F058F1D9F9C9FA71A8F7EE26FC87ED83C9834E8BEF87CF67E7F6C37F837BBEBFDAAA0FFBCBB5E6B7C6DFABDFA1FE03F703F59AD78FFF85FF8E7F0FFB36DB2EBE0D8F5DA518FF08BFCCD6ECC334DFED4FA57FF1EFF8E999FCBBFFFFB1EBFDF9D65FE|";
advLevels[advLevels.length] = "0xFE3F3E3E3E3E3FFEFFE3F8E3F8E3F8FFFFFFFE3FC63FC63FC7FF7FFC71FC71FCF1C7FFC7FFC738FE38FE38FEFFFFE223222222223FFEF8FFF8F8F8F8C7F8C47FC47FFC7FE3FFE3E3E3E3FFE318FF18FF18C7FFC7F1C731FE311E3F1EFF1FF1E3F1E3F1E3|";
advLevels[advLevels.length] = "0x77FFFDDFFFFDFF7FBEFFFFFFDBFFFFEEFFFFFEFBDFBFF7FF7EFDED7FFFFFB7B7FFFFD7FE7BEBFFFFAAFDF7DBBFFB7C7FD7FEF6EEA7FBFDDF97BF79F3FEFFAFEFCB7DDDAFBCFDFFF6339FFDFB67EFDDEEDEBFB7FF2B7DFEF7FBD65DFFB56FFBBA8A9FFE759DD4A29D6886|";
advLevels[advLevels.length] = "0x0E000E000E000C007C007C0070006000670067000700E700E300E3E0C3E0C0E0C0E00EE00E607E607E607C607C603C6030003000307030700070007070307030703060306030603000000000E0E0E0E0E0E0C060C060C060C70707070707077706770676067606300030000E070E070E030C030C030C|";
advLevels[advLevels.length] = "0x66666666FFFFFFFF66640644FFFFFFFF26466246FFFFFFFF26622422FFFFFFFF22262624FFFFFFFF24662642FFFFFFFF60464044FFFFFFFF26242626FFFFFFFF44024462FFFFFFFF62660206FFFFFFFF60226622FFFFFFFF06460044FFFFFFFF20062002FFFFFFFF06646666FFFFFFFF40064606FFFFFFFF22262222FFFFFFFF00466646FFFFFFFF66040604FFFFFFFF44624462|";
advLevels[advLevels.length] = "0x96969696969696969696F0F00F0F0F0F96969696F0F06969696969690F0F0F0F969696969696F0F0F0F06969696969696969F0F09696969696969696F0F06969696969696969F0F0F0F06969696969690F0F0F0FF0F0F0F069690F0F0F0F6969696969696969696969699696969696969696F0F0F0F0|";
advLevels[advLevels.length] = "0xB7FF87FFC431DD7D1F773F777F7F68FF6EEF3FE33BFB22FF2EFF2ECFEE5EEC72AF5287D01396118657867687F6B7BCB498FBD11BD37FB37FA33D838DDBE1F9EFFCFFBCF7BC013E69E668A26CB23CFA36FAB788F3EE8B20BB643B443ADC3018247806F006E036C03CC43CF41CA018A00A20022102617A615A614BC90F8D1F043684138403|";
advLevels[advLevels.length] = "0x040004040604060C020C0208040805000D000D8009882888208C600C6004404440400060006080208020900190811881199109900918011900098009840184048C040C06080608020002|";
advLevels[advLevels.length] = "0x3D04BD75BD753C10FF5D8E5DAEC1A2FF3A06FBF6FB8680BEBA8082FFFEFF0E1F6FD8EFDB03C36BFF0A0FFAEF1828DEABCE8BEEFB6E8860AF7FAF7E2F7EE0FEFF8038BEBAB80A3AA8F88EFFFEC03EDFBE11BEF5A3F42BF7EBF00B1FFB5FC347DF7400F5DF05DEFC1E1FF8C3FAFB8080BBBA8338FEFFFE|";
advLevels[advLevels.length] = "0x4EFB47FA37CFC7E80FCFEE47FC76CFF75FFCD4EF86E7E7FDF73F3FFFB3EB9FEAF7FFF76E73DAF3E6EF66FE26EE7E6C6FFE64F74DF4D698E5DBCEF1ACF9B6BFC2BAEFF77FE9EF690DFE7DF01FFCADB98F99FEF1C7F0C3F413F45054EDE0FF63DE2C7BB82F7AC6E75FFF6FF9EDDB65CBAD961BAE9FBFDFE096CB9EDBF4FB7E7BEF59637E7FCC61C65FE0FF2EF61ABF5BB37B137C871DE0DDFF59FF3A693E133F978F0F7F56CE4ED98ECFEDC6B70F32CFC3FD7EE53ECF9DBFFDB309|";
advLevels[advLevels.length] = "0xFFF0FCFFDDF39DF3D37FF31DEFFDEFC9CBCF71FF3FFFB9FEF9B877BF17B7F2B3EEF7CECFD2CFF7FD37F97F3B7D9FFCFFEEFECB7CEB1EF3FFBF33B3B393BDFDF17CEF3EEFBD4FF17FFF3ECECEC8CC77F333F3BBCFCC9C5CF9577F612F6F4FCEEEB29CB29D9EFFED97CD93696B376F716F9F6F90F7EFF1CF9FD0CF|";
advLevels[advLevels.length] = "0x0C000C00FC7CFC7CC06FC06FFE63FE6307E3E7E3E003600061F061F061B0E1BFE1BF0180FD87FDE70DE60C660C667C7E7C7E600060007FFC7FFC000C000CFF8DFF8D81FD81FD8001BFC1BFDFB0DF3CD83CD80CF8FCF9FC01800F87CF07CC1ECC1ECCF8CFF8CF00C000DF7FDF7FDB601B67FBE7FBE6030600|";
advLevels[advLevels.length] = "0xFFFFFFFFFF0F0FFFFFFFFFFFF0FFFFFFFFF0FF0F0FFFF0FFFFFFF0FFFFFFFFF0F0FF0FF0FFFFF0FFFFF0FF0F00FFFFFFF0000FFFF00F0FFFFF0F0FFFFFF0F0FF0FFFFFFFFF0F00FFFFF0FFFFFFF0000FFFF0F0FFFFF0FFFF00F0FFFFFFFF0F0FF0FF0FFF|";
advLevels[advLevels.length] = "0xFFFF5555FFFFFFFFAAAAFFFFFFFF5575FFFFFFFF0000FFFF55555555FFFFFFFFAAAA5F5FFFFF5555FAFAFFFF2080FFFFFFFF555555FF55FFAAAAAAFFAAFF5555F55FF55FAAAAFFAAFFAA5555AAFA55F5AAAAFFFFFFFF5555FFFFFFFFA0A0F0FFF0FF1041F0FFF0FF2A88FFFFFFFF4015AAAA5555AAAA5555|";
advLevels[advLevels.length] = "0xBF3C3CBDFDCFCFDBEEF3BCBF9F3CF3FE3BFB6FD9CF9FFDF3D99B9FBEFCEC36CFB379CF3BECEFDECBC9B3BB9F37FDF37CBF3F94C9F2EBDD3EC97C3F97B7B3F2CFBCAB9B39F3FFCCCDEEDCD337CAB33CCFBB5CF33DCEF7DCD3B79E937C7F3F34E9D2CD4FF739B3CD3FD7CC72ED3CFF|";
advLevels[advLevels.length] = "0x07F80FF01FE03FC07F80FF00FE01FC03F807F00FE01FC03F807F00FF01FE03FC07F80FF01FE03FC07F80FF00FE01FC03F807|";
advLevels[advLevels.length] = "0x44444444444444444444FFFFFFFFFFFF22222222222222220000FFFFFFFFFFFF88888888888888888888FFFFFFFFFFFF00002222222222222222FFFFFFFFFFFF88888888000088888888FFFFFFFFFFFF00002222222222220000FFFFFFFFFFFF00000000111111111111FFFFFFFFFFFF00000000888888880000|";
advLevels[advLevels.length] = "0x6666666666666666000000006060666666666666006600606060660066066066666666666666006600666006606066606600606600660666660660066006606006600660600660060006006066666606|";
advLevels[advLevels.length] = "0x040004000400040006000600060006000200020012001000140014800C8008C0084020602220222022000204440444444444C040804101410141214120002020342404240400004010441044104418111811101110111014000420042004200C20081008100810080008000840084800480008020C0204020402|";
advLevels[advLevels.length] = "0x861F861F1F861FB6063066FC60FCF831F9B1618067E007EC318C31BFFC3FFC0C306C306001F831F83060FC60FC0C300C303F01BF018CC7ECC7E0F183F183C018C0180C7E0C7E3F183F1B0C03CC0FC0CF00C303F31BF018C07EC07E061806981F819F0186C7E6C7E0F183F19BC018C07E067E06181F981F80060006030003C00FC18F018307E3|";
advLevels[advLevels.length] = "0x060006000C000C0000000000018001E030603C000C00000000308031831903DB00C3000000000000|";
advLevels[advLevels.length] = "0x0404040404040606060602020303F3F33030101010103030F7F706060404040404040604E7E76060202020202020202030303C3C0C0C04040406878781818080808080808181BFBF30302020202020206060E7E706060404040406068787E1E160602020202020206060E7E70606040404040606E7E760602020202020202020|";
advLevels[advLevels.length] = "0x8400B5FE8402FFFAF808FBEF182CDFAD1F8CFFFF3118B55BB558315EFF5FF85F0BD8E81B0FF8F8FF1AFF58FF5FE311EBF4EB16E2D0FE9F1E315EF55FC55F5D4C416D7F0CFFFFC071DF75C075FFF58FF5A814ABD6A850AF5FA11FBDFF81C3FFDBF1D3F4571747507F5FC75C14DDF51C04FFFF008F7EA340BB5F8311FFF58FF1A8FFAA802ABFEAA00AAFF8A07FBF718175FD751C74DFF71010F7DFF41115F551851FBDFF81|";
advLevels[advLevels.length] = "0xC601C601067006700000380039C039C039C0000000E0E0E0E0E0E0000000000000F0E0F0E0F0E0000700870187198719001800181C031C031C031C030000000C000C1E0C1E001E38003800380000380038063806000600000030E030E030E030E0000000000000C030C030C030C03000000000000000|";
advLevels[advLevels.length] = "0x044004400440044007700110011001100110011003300220022002200660044004400CC0088008800880088008800FF00110011001100110011001100770044004400CC008800880088008800EE00220022002200220033001100FF0088008800880088008800EE002200220022002200EE00880088008800880088|";
advLevels[advLevels.length] = "0xFF000FF007F8FE01F8077F8001FE03FC00FFFC03F00F807F03FC00FFE01FC03F807F03FCFE011FE0F00FFC03C03FFE01FF00F8070FF0FC03C03FFE0103FCC03FF00F03FCFF00807F03FCC03F7F800FF000FFC03F01FEFC030FF003FC3FC0E01FF00FC03F07F80FF0FE01|";
advLevels[advLevels.length] = "0x3CCF3CCF3CC3FCC3FFF3CFF3C303C303C3CFFFCFFCCF3CC03CF0F0FFF03FC33FC30CCF0C0FC00CC30CF30FFF033F030FC30CC30CCC00CC000C300C330C3F3C3F300CF00CC00CC0CC00C000C300F3CCF3CC33CC33CCF0C0C000C000F03330333033003F003C003C303C30303CF03CC00CC00C000F0003C003C00FF03C303C3C300CF00CC00CC0|";
advLevels[advLevels.length] = "0x0780058005800780000000003CF034D034D03CF000000000F0F0D0F0D090F0F000000000001E781A6816581E780000000000000F0009000F000F0000C003C002C002C0030000007878584858787878000000000000F03CD02CB02CF03C0000000000C7834683C582C7830000000000003C0024003C003C00000000000000E00160016001E001|";
advLevels[advLevels.length] = "0xF7F7959DF7F9A48FA7E2E5A7B5E59725D2FF7298D7BF95E9B729E47B2E5EFA729B2FF9292FE9E5AFA7A4A1E4BF8F9AF9FE999AFFDB5279FF4FA978AD5FA575E5254FE7EAA2AFF2A99EFBDA5E5F7275474D4579F5DF9591F7F7A225FEEF5AAA5FEE79442F7E295B7D79572F74224E7EFADA9A9EFAB44FEF4929EF29A1FFE19A2FFA292E7D74575774F54FAF49B9F99B9DFE974BF2E95FAD59E77F|";
advLevels[advLevels.length] = "0x1C000E0007000700038001C000E000700070001C001C000E0038007001C00700038001C000E000700038007000E0038001C001C0038003800E001C000E001C00380070001C000E000E00070007000380038001C000E00070007000380038001C00070007000780038003000E003800E001C00070001C000E0007C001E0008003000E001C00700038001C003800380038007000E003800E00|";
advLevels[advLevels.length] = "0xFFFFFFFF666666666666666666666666FFFFFFFF1111111111111111111111111111FFFFFFFF0402040204020402040204020402FFFFFFFF6000606060606060606000600060FFFFFFFF00000909090909090909090909090909FFFFFFFF0000606060606060000000000000FFFFFFFFFFFF0000000060606060606006060606060606060000606060606060606000000000FFFFFFFFFFFFFFFF000000002010201000100000040404040404040400000000FFFFFFFFFFFFFFFFFFFF0000FFFFFFFF0000|";
advLevels[advLevels.length] = "0x5E5AA5A57E5AAFA5DB5ABDA55B5AB5A77E5EE5E55E5EE5E55A7AF5A5DA7EB5ADDA5AA5AD7A5AA5AD7A5AA5A57A5EA5A5DE5EA5A5DE5BA5A55B5BA5A55BDAA5AF5ADAA5EF5A5BA5BDDADBE5B57BFAA7A57A7AE7A55E5AE5A57E5AA5B55B5AB5B55A7AB5A55A7AE5A55A5AE5E5DA5AA5E55A5BB5B55A5BBDB75E7AA5AD5E5AA7ED5A5AA5E55A5A|";
advLevels[advLevels.length] = "0xFFFF7DFDEFFFB7B7FE7EFFFFDBB67FEFBEFDF77FDDF7FFFE7DEFDEBDEBDF7EF7BDDAFB7F6DFCF7A5FFF5DADE92A37DFDAD3CFAD36EEBCA7FF6D8A797497EDBF29FB7B9C37E6BC5BB7B79529F9CEB375069D9216B97197450C94799529E02224917555D45C3B4CA20BC6C01454D04D78C1A9348ADE6988158B34A9441016560142C4C44495150481A1212D6C2|";
advLevels[advLevels.length] = "0x04000400060006000A000A000A0002000000000008000800080008002000280028002800000020002000400040000001000180018001C000C00040006000600020002000200120010001000100000000400340034002400200020000000000010001000100010001000500050005000300020032003200300090009001900380038006800680048004800400040000000000|";
advLevels[advLevels.length] = "0xFFFF0600FFFF0600FFFF0000FFFF0600FFFF0900FFFF1800FFFF3300FFFF2200FFFF0200FFFF8100FFFF8042FFFF00C2FFFF2080FFFF2000FFFF8024FFFF8024FFFF0000FFFF2042FFFF2042FFFF0004FFFF1084FFFF0C01FFFF0441FFFF0244FFFF0104FFFF0020FFFF0422FFFF0002FFFF0288FFFF0208FFFF0140FFFF0004FFFF0224FFFF0201FFFF0041FFFF0400FFFF0424FFFF0224FFFF0242FFFF0240|";
advLevels[advLevels.length] = "0x040004700457F5F5154477C441064F02780283BFBEA2E0BE0380E278BEC88088FF88000E77E2D42F172A11AE7EB0539E7002870F850ABFCEA540BFFC8544FF740417E7D12070A38FBEF88000BDE0E5238522872280237BE04A004FF842087278124713C57C3D542175E1051D05D5FC550074F38712E0122EFEEA908AF0FA0702E57B25C8FC08A3E8EE280838780747057DFF000407FCC4037402177371514FF7C9448F44805D1E7113811C87E4FCA700A10F3F08C0FB5E82D3FF10821EFEE201227F3BC00C0004000400|";
advLevels[advLevels.length] = "0x66660666066006000000008000C006C00EC00EC00C4000000000000C040C0C0E0C0E080630067000700060030003000300006000E000E000C0020002000600068004C004C020C030C03040300030002000001000304030C030C030C030C0208000008006820686070607060706030643026000600068004C000C000C00080000008000C000C000C60046000E006E006C006C00600060006000000000000000000060006000600060006000000000|";
advLevels[advLevels.length] = "0x040004000400040007000100010001C00140074004401C4010701010101030102010207E204220423C42047204120412071201120113C131412041E040807080108018800880088008F038102010E0188008800880088008|";
advLevels[advLevels.length] = "0x2F652764C72C0F082E09CD498F440E2046008B007B68C6071F4281108F381B00D7015E20360E2D0220D03B6057003FB6F91C6A1456007D41F7606C82820CE0E4E510E10141D18191C0C0E2DE6080E081C587B71D9747D7450601050605B2070F0F0B9F81DAD1FAC274E060E6A0E268712050817088709063A05040D2D0E570E050E16068B0E0D0C0D0E3A1C0E08C09C671C073E023E832A61AE01EC01EEC0EA403E523A403B406B60C5EAC4400050007800601066303030B132F218FC00F10673036000E840604160416008200C200020002|";
advLevels[advLevels.length] = "0x040004000400050005001500150011001100114011401040904090409040904090408140810081008100810081000100010000404440444044404440444044404440440044100410041004101014101410141004100410041004000400040000080008010801080108010801000102010201020002000200000408040804080408040804200020002000200820082008200800088028802880288028802080A0A0A020A020A020802080208020802800080008000800088008800880088008800880008000800080|";
advLevels[advLevels.length] = "0x6666EEEECCCCCCCCCCCC88888888888800002222222266666666EEEECCCCCCCC888899991111333333332222666666664444CCCCCCCC8888000000000000111111113333222266664444CCCC8888000000000000000011113333222266664444CCCC88889999111133332222|";
advLevels[advLevels.length] = "0x04048444844084408440040004800480048004800480008000800080000008200820082008200820082008000800010421042104210421002100210001020102400240024002440044000400040104010401040140804080408040804480440044400440044000400040104010001000001001100110411040104110410441044104400002020202020202021000100010000000|";
advLevels[advLevels.length] = "0x0F000F000F000F0000000000F3C0F3C0F3C0F3C0000001E001E0F1E0F1E0F000F000007800780078E079E001E001E7810780079E079E001E001E000001E0F1E0F1E0F1E0F0000000003C003C1E3C1E3C1E001E0000000000E1E1E1E1E1E1E1E10000000000003C3C3C3C3C3C3C3C0000000000000F1E0F1E0F1E0F1E000000001E009E079E079E07800700000000F000F000F000F0000000000000000F0F0F0F0F0F0F0F0000000000009E079E079E079E070000000000000000F000F000F000F000|";
advLevels[advLevels.length] = "0x0404151415149554915080428242021222122210201121010901494149404044004422142A152A110891108914889508950A814208424850421442040025012529212800A2488248124A5002541244104151014129092829222882A08882090221122010AA588A480002412245224428208820812815085581549104142014A240A2488A4808024002511015908484A404202111211108014848504A125212120000200124090528412840205000104102410A550814|";
advLevels[advLevels.length] = "0x050005000500050000000080088008800C0004000700052001E000200020016009C00980008007900C100C1001000100110010203120213000904090E090A8808880080009E001E040C040407400170031C023C002C002C0020014005E004A00080028002000A000A10011007000400040005000D20092008000400077005700520042000E000A002E007440D94099408B40CA400200009000901090108070004000C03080300010|";
advLevels[advLevels.length] = "0x040004000400040004000000000000000800080000000000000010001000000000000000100010000000000000002000200000000000000000008000800000000000000080008000000000000000000200060004000C000800080000000000040004000400200020006000600040004000000000000000000080008000800080000000000000000000200020000000000000FF0F|";
advLevels[advLevels.length] = "0x0400040004000400000000000000010001000100010000000000000000400440044004400400000000000000200820082008200800000000000000010001000100010000000000000008800880088008800000000000000000101010101010101000000000000000048004800480048000000000000000000100010001000100|";
colors = new Array("|0x4F7BFF", "|0x4F7BFF", "|0x3E77FD", "|0x3E77FD", "|0x2D6BFD", "|0x2D6BFD", "|0x1C60FD", "|0x1C60FD", "|0x0B54FD", "|0x5EFFFF", "|0x55FFFF", "|0x4DFFFF", "|0x3CFFFF", "|0x2BFFFF", "|0x00FFFF", "|0x00F8F8", "|0x00F2F2", "|0x00ECEC", "|0x00E6E6", "|0x4DFF70", "|0x4EFE5F", "|0x5FFF4D", "|0x53FF09", "|0x50FD0B", "|0x4AF700", "|0x48EE00", "|0x33F200", "|0x17F400", "|0x00FF00", "|0xF2FF80", "|0xF2FF80", "|0xF1FF6F", "|0xEFFF5D", "|0xEEFF55", "|0xEDFF44", "|0xEAFF2B", "|0xE9FF1A", "|0xE6FF00", "|0xDEF700", "|0xFFB366", "|0xFFAA55", "|0xFFA244", "|0xFF9933", "|0xFF952B", "|0xFD802D", "|0xFB761E", "|0xFB6B0D", "|0xF26304", "|0xFD3311", "|0xFF0000");
i = 0;
while (i < advLevels.length) {
advLevels[i] = (advLevels[i] + colors[Math.min(i, colors.length)]);
i++;
};
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;
rotationJustCompleted = false;
gamePaused = false;
editing = false;
playtesting = false;
playMode = "infinite";
intensity = 0;
modeCompleted = false;
tutComplete = false;
currentLevel = 1;
maxLevelReached = 1;
maxIntenseLevel = 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);
hostSite = "";
try {
hostArray = ExternalInterface.call("document.location.href.toString").match("http://.*?/");
} catch(e:Error) {
};
if (hostArray == null){
hostSite = "localhost";
} else {
hostArray = hostArray[0].match("albinoblacksheep.com|kongregate.com|absforums.com");
if (hostArray == null){
hostSite = "invalid";
} else {
hostSite = hostArray[0];
};
};
hostArray = null;
if (hostSite == "invalid"){
wrongSite.addEventListener("click", toABS);
} else {
wrongSite.visible = false;
};
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.songMuted = false;
saveFile.data.soundMuted = false;
saveFile.data.frameRate = 25;
saveFile.data.distanceVisible = 18;
saveFile.data.infCompletions = 0;
saveFile.flush();
};
if (saveFile.data.maxAdvLevelInt == undefined){
saveFile.data.maxAdvLevelInt = 1;
saveFile.data.maxDifficultyInt = 10;
saveFile.data.intensity = 0;
};
difficulty = Math.min(saveFile.data.maxDifficulty, 99);
stage.quality = saveFile.data.qualitySetting;
maxIntenseLevel = Math.min(saveFile.data.maxAdvLevelInt, advLevels.length);
maxLevelReached = Math.min(Math.max(saveFile.data.maxAdvLevel, maxIntenseLevel), advLevels.length);
jumpKey = saveFile.data.jumpKey;
leftKey = saveFile.data.leftKey;
rightKey = saveFile.data.rightKey;
songMuted = saveFile.data.songMuted;
soundMuted = saveFile.data.soundMuted;
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 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)));
}
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();
};
};
}
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){
var e = _arg1;
tsle = ((gameTimeScale * tt.timeSince(lastEvent)) / 1000);
tslf = ((gameTimeScale * tt.timeSince(lastFrame)) / 1000);
if (intensity > 1){
if ((((((((tslf > 0.2)) && (!(gamePaused)))) && (!(rotating)))) && ((cameraZ > -6)))){
try {
reset();
} catch(e:Error) {
};
tslf = 0;
tsle = 0;
} else {
tsle = (tsle * 2);
tslf = (tslf * 2);
};
} else {
if (intensity == 1){
tsle = (tsle * 1.5);
tslf = (tslf * 1.5);
};
tsle = Math.min(tsle, 0.2);
tslf = Math.min(tslf, 0.2);
};
lastEvent = (lastFrame = tt.time());
if (level.length > maxLevelLength){
level.length = maxLevelLength;
};
if (((toLevelSelect) || (toPlayModes))){
gotoAndStop(3);
};
if (currentFrame < 4){
gamePaused = true;
};
if (((((!((api == null))) && (!((api.kongregate == null))))) && ((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){
if (rotationJustCompleted){
tslf = 0;
tsle = 0;
rotationJustCompleted = false;
};
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--;
};
}
function frame6(){
gotoAndPlay((currentFrame - 1));
}
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 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 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 reset(){
cameraX = 100;
cameraY = 0;
cameraZ = (-8 - intensity);
xVel = 0;
yVel = 0;
zVel = 0;
angle = 1;
falling = false;
jumping = false;
character.currentframe = 10;
}
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));
}
function frame2(){
if (loaderInfo.bytesLoaded < loaderInfo.bytesTotal){
preloader.gotoAndStop(Math.round(((loaderInfo.bytesLoaded / loaderInfo.bytesTotal) * 100)));
gotoAndPlay(1);
};
}
public function rotateTunnel(_arg1:Number){
var time:Number;
var tween1:Tween;
var tween2:Tween;
var onMotionFinished:*;
var partwayCheck:*;
var onPartway:*;
var amount = _arg1;
onMotionFinished = function (){
var _local1:*;
_local1 = cameraY;
cameraY = (cameraX * -(amount));
if (cameraY != 280){
trace(("After rotation, y was " + cameraY));
cameraY = 280;
};
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 = (zVel * 0.2);
if (character.currentFrame >= 4){
character.currentclip.gotoAndStop(59);
};
character.stopped = false;
falling = false;
falling = !(onTile());
timer = null;
tween1 = null;
tween2 = null;
rotationJustCompleted = true;
};
onPartway = function (){
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));
};
};
clearInterval(partwayCheck);
};
if ((((cameraY > 290)) || ((amount == 0)))){
return;
};
rotating = true;
character.stopped = true;
if (((!((amount == -1))) && (!((amount == 1))))){
amount = (amount / Math.abs(amount));
};
time = ((6 / 17) / gameTimeScale);
tween1 = new Tween(back, "rotation", Regular.easeInOut, back.rotation, (back.rotation - (90 * amount)), time, true);
tween2 = new Tween(root, "cameraX", Regular.easeIn, cameraX, (280 * -(amount)), time, true);
timer = new Tween(root, "cameraY", Regular.easeIn, cameraY, Math.max(Math.min(((cameraY * ((amount * (-0.1 / 3)) + 0.8)) + 100), 360), -360), time, true);
character.stop();
timer.addEventListener("motionFinish", onMotionFinished);
partwayCheck = setInterval(onPartway, (5 / 17));
}
public function getColor(_arg1:int, _arg2:int, _arg3:Number):Number{
var _local4:int;
var _local5:int;
var _local6:int;
_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();
};
}
public function intUnlocked(){
return ((((saveFile.data.maxAdvLevel > advLevels.length)) || ((saveFile.data.maxDifficulty > 99))));
}
}
}//package Run_fla
Section 28
//mask_58 (Run_fla.mask_58)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class mask_58 extends MovieClip {
public function mask_58(){
addFrameScript(0, frame1);
}
function frame1(){
height = (2 * root.eTileSize);
x = -(parent.x);
}
}
}//package Run_fla
Section 29
//MedQ_51 (Run_fla.MedQ_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MedQ_51 extends MovieClip {
public var select:MovieClip;
public function MedQ_51(){
addFrameScript(0, frame1);
}
function frame1(){
select.visible = (stage.quality == "MEDIUM");
stop();
}
}
}//package Run_fla
Section 30
//Music_80 (Run_fla.Music_80)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Music_80 extends MovieClip {
public function Music_80(){
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
if (root.songMuted){
stop();
};
}
}
}//package Run_fla
Section 31
//MuteMusic_45 (Run_fla.MuteMusic_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MuteMusic_45 extends MovieClip {
public function MuteMusic_45(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 32
//MuteSound_46 (Run_fla.MuteSound_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MuteSound_46 extends MovieClip {
public function MuteSound_46(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 33
//Options_34 (Run_fla.Options_34)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Options_34 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:int;
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 prevIntensity;
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 pReleased:Boolean;
public var jReleased:Boolean;
public function Options_34(){
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.visible = false;
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(){
prevIntensity = root.intensity;
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 == "infinite"){
aComplete.visible = false;
};
if (root.playMode == "adventure"){
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();
};
if (root.intensity != prevIntensity){
root.starter.gotoAndPlay(1);
};
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 34
//Pause_44 (Run_fla.Pause_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Pause_44 extends MovieClip {
public var currentframe:Number;
public function Pause_44(){
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 35
//playbutton_17 (Run_fla.playbutton_17)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class playbutton_17 extends MovieClip {
public function playbutton_17(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 36
//Preloader_4 (Run_fla.Preloader_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Preloader_4 extends MovieClip {
public function Preloader_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 37
//Quality_47 (Run_fla.Quality_47)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Quality_47 extends MovieClip {
public var setQ:MovieClip;
public var currentframe:Number;
public function Quality_47(){
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 38
//Restart_29 (Run_fla.Restart_29)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Restart_29 extends MovieClip {
public var prevCurrentFrame:int;
public var currentframe:Number;
public function Restart_29(){
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 39
//run_24 (Run_fla.run_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class run_24 extends MovieClip {
public function run_24(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 40
//runside_22 (Run_fla.runside_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class runside_22 extends MovieClip {
public function runside_22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Run_fla
Section 41
//SaveLoad_67 (Run_fla.SaveLoad_67)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SaveLoad_67 extends MovieClip {
public var isSave:Boolean;
public function SaveLoad_67(){
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 42
//SetColor_75 (Run_fla.SetColor_75)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetColor_75 extends MovieClip {
public var prevFocus:Object;
public var inputColor:TextField;
public var newColor:String;
public function SetColor_75(){
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 43
//SetDifficulty_42 (Run_fla.SetDifficulty_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetDifficulty_42 extends MovieClip {
public var inputDifficulty:TextField;
public var newDifficulty:Number;
public var focusListener:TextField;
public var randomize:MovieClip;
public function SetDifficulty_42(){
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 44
//SetJump_57 (Run_fla.SetJump_57)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetJump_57 extends MovieClip {
public function SetJump_57(){
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 45
//SetLeft_55 (Run_fla.SetLeft_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetLeft_55 extends MovieClip {
public function SetLeft_55(){
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 46
//SetLevel_41 (Run_fla.SetLevel_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetLevel_41 extends MovieClip {
public function SetLevel_41(){
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 47
//SetQuality_48 (Run_fla.SetQuality_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetQuality_48 extends MovieClip {
public var medQ:MovieClip;
public var hiQ:MovieClip;
public var lowQ:MovieClip;
public function SetQuality_48(){
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 48
//SetRight_56 (Run_fla.SetRight_56)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetRight_56 extends MovieClip {
public function SetRight_56(){
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 49
//SetText_74 (Run_fla.SetText_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SetText_74 extends MovieClip {
public var prevFocus:Object;
public var levelText:TextField;
public var newText:String;
public function SetText_74(){
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 50
//SpaceToScroll_77 (Run_fla.SpaceToScroll_77)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class SpaceToScroll_77 extends MovieClip {
public function SpaceToScroll_77(){
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 51
//Start_27 (Run_fla.Start_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Start_27 extends MovieClip {
public var green:Sound;
public var yellowPlaying:Boolean;
public var redPlaying:Boolean;
public var prevCurrentFrame:int;
public var distToPulse:int;
public var red:Sound;
public var currentframe:Number;
public var greenPlaying:Boolean;
public var levelNumber:TextField;
public function Start_27(){
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) {
cameraY = Math.min(cameraY, 280);
falling = false;
distToPulse = (pulsePos - cameraZ);
cameraZ = ((cameraZ - Math.floor(cameraZ)) - 25);
pulsePos = Math.round((cameraZ + distToPulse));
};
addEventListener("enterFrame", onenterframe);
}
public function onenterframe(_arg1:Event){
if (((!((currentFrame == prevCurrentFrame))) && (!(root.gamePaused)))){
currentframe = (currentframe + (25 * 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;
};
};
prevCurrentFrame = currentFrame;
}
function frame51(){
stop();
removeEventListener("enterFrame", onenterframe);
}
}
}//package Run_fla
Section 52
//TileOptions_69 (Run_fla.TileOptions_69)
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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class TileOptions_69 extends MovieClip {
public var aRT:SimpleButton;
public var fill:SimpleButton;
public var empty:SimpleButton;
public var currentframe:Number;
public function TileOptions_69(){
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 53
//VersionTest_6 (Run_fla.VersionTest_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.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class VersionTest_6 extends MovieClip {
public var regArray:Array;
public var ver:String;
public function VersionTest_6(){
addFrameScript(0, frame1);
}
function frame1(){
if (visible){
ver = Capabilities.version;
regArray = ver.match("[0-9]+");
if (regArray != null){
ver = regArray[0];
} else {
ver = "0";
};
regArray = null;
visible = (parseInt(ver) < 9);
};
}
}
}//package Run_fla
Section 54
//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.external.*;
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:int;
public var tSize:int;
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 55
//Green (Green)
package {
import flash.media.*;
public dynamic class Green extends Sound {
}
}//package
Section 56
//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{
if (_arg1 > keyArray.length){
return (false);
};
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 57
//Red (Red)
package {
import flash.media.*;
public dynamic class Red extends Sound {
}
}//package
Section 58
//Space_theme_cropped (Space_theme_cropped)
package {
import flash.media.*;
public dynamic class Space_theme_cropped extends Sound {
}
}//package
Section 59
//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