Section 1
//Tracker (com.memecounter.Tracker)
package com.memecounter {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class Tracker {
private static var ori_dom:String;
private static var lurl:String;
private static var _isReady:Boolean = false;
public static var a:uint = 0;
public static var root:DisplayObject;
public static var c:uint;
public static var d:String = "";
private static var _isInited:Boolean = false;
public static var fpv:String = "";
private static var l:Loader;
private static var tracker:MovieClip;
public static var da:Array = ["distralytics.com", "distralytics.co.uk"];
private static function loadError(_arg1:Event):void{
a++;
lc();
}
public static function init(_arg1:uint, _arg2:DisplayObject):void{
var _local3:uint;
if (!_isInited){
_isInited = true;
c = _arg1;
root = _arg2;
_local3 = 0;
while (_local3 < da.length) {
Security.allowDomain(da[_local3], ((c + ".c.") + da[_local3]), ("*." + da[_local3]));
_local3++;
};
ori_dom = (root.loaderInfo.parameters.hasOwnProperty("ori_dom")) ? root.loaderInfo.parameters.ori_dom : "";
d = ((ori_dom)!="") ? ori_dom : ((root.loaderInfo.loaderURL.split("/")[0].indexOf("http"))==-1) ? "Local" : root.loaderInfo.loaderURL.split("/")[2].split("?")[0];
fpv = Capabilities.version.split(" ")[1].split(",")[0];
lurl = ((((((((("/control/tracking/trackerAS3.swf" + "?c=") + c) + "&r=") + Math.floor((Math.random() * 10000000000))) + "&d=") + d) + "&p=") + fpv) + "&as=3");
l = new Loader();
l.contentLoaderInfo.addEventListener(Event.INIT, loadComplete);
l.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
lc();
};
}
public static function get isReady():Boolean{
return (_isReady);
}
public static function kvClick(_arg1:uint):void{
if (_isReady){
tracker.kvClick(_arg1);
};
}
public static function kvCountry():String{
if (_isReady){
return (tracker.kvCountry());
};
return ("");
}
public static function kvEvent(_arg1:uint):void{
if (_isReady){
tracker.kvEvent(_arg1);
};
}
private static function lc():void{
var _local1:String;
_local1 = (((("http://" + c) + ".c.") + da[(a % da.length)]) + lurl);
Security.allowDomain(_local1);
l.load(new URLRequest(_local1));
}
private static function loadComplete(_arg1:Event):void{
tracker = _arg1.target.content;
tracker.init(getDefinitionByName("com.memecounter.Tracker"), root);
_isReady = true;
}
}
}//package com.memecounter
Section 2
//charAnim_38 (RooftopRunner_16JUN09_JT_fla.charAnim_38)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
public dynamic class charAnim_38 extends MovieClip {
public function charAnim_38(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
stop();
}
function frame1(){
stop();
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 3
//charSelectAnimate_37 (RooftopRunner_16JUN09_JT_fla.charSelectAnimate_37)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
public dynamic class charSelectAnimate_37 extends MovieClip {
public var lightFemale:MovieClip;
public var FemaleMC:MovieClip;
public var lightMale:MovieClip;
public var maleMC:MovieClip;
public function charSelectAnimate_37(){
addFrameScript(8, frame9, 9, frame10, 10, frame11);
}
function frame10(){
lightMale.gotoAndPlay(2);
lightFemale.gotoAndStop(1);
}
function frame9(){
stop();
}
function frame11(){
lightFemale.gotoAndPlay(2);
lightMale.gotoAndStop(1);
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 4
//CheckpointReached_69 (RooftopRunner_16JUN09_JT_fla.CheckpointReached_69)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
public dynamic class CheckpointReached_69 extends MovieClip {
public function CheckpointReached_69(){
addFrameScript(34, frame35);
}
function frame35(){
stop();
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 5
//Countdown2_68 (RooftopRunner_16JUN09_JT_fla.Countdown2_68)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Countdown2_68 extends MovieClip {
public var checkPointText:MovieClip;
public function Countdown2_68(){
addFrameScript(0, frame1, 1, frame2, 88, frame89);
}
function frame89(){
stop();
MovieClip(root)._stopwatch.init();
MovieClip(root).gameMode = "play";
}
function frame1(){
stop();
}
function frame2(){
if (MovieClip(root).currentFrame == 1){
checkPointText.visible = false;
} else {
checkPointText.visible = true;
checkPointText.gotoAndPlay(1);
};
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 6
//fader_71 (RooftopRunner_16JUN09_JT_fla.fader_71)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
public dynamic class fader_71 extends MovieClip {
public function fader_71(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 7
//faderIn_88 (RooftopRunner_16JUN09_JT_fla.faderIn_88)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
public dynamic class faderIn_88 extends MovieClip {
public function faderIn_88(){
addFrameScript(0, frame1, 8, frame9);
}
function frame1(){
stop();
}
function frame9(){
MovieClip(root).gotoAndPlay(35, "mainmenu");
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 8
//GameInstructions_70 (RooftopRunner_16JUN09_JT_fla.GameInstructions_70)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class GameInstructions_70 extends MovieClip {
public var insPlayBut:SimpleButton;
public function GameInstructions_70(){
addFrameScript(0, frame1);
}
public function playGameFunction(_arg1:MouseEvent){
this.visible = false;
MovieClip(root).countdownMovie.gotoAndPlay(2);
MovieClip(root).startGame = true;
MovieClip(root).hasPlayedTutorial = true;
}
function frame1(){
if (MovieClip(root).hasPlayedTutorial){
this.visible = false;
MovieClip(root).countdownMovie.gotoAndPlay(2);
MovieClip(root).startGame = true;
};
insPlayBut.addEventListener(MouseEvent.CLICK, playGameFunction);
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 9
//GameLevel1_49 (RooftopRunner_16JUN09_JT_fla.GameLevel1_49)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
public dynamic class GameLevel1_49 extends MovieClip {
public var b2:DynamicBilboard;
public var b4:DynamicBilboard;
public var b1:DynamicBilboard;
public var b3:DynamicBilboard;
}
}//package RooftopRunner_16JUN09_JT_fla
Section 10
//GameLevel2_74 (RooftopRunner_16JUN09_JT_fla.GameLevel2_74)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
public dynamic class GameLevel2_74 extends MovieClip {
public var b2:DynamicBilboard;
public var b1:DynamicBilboard;
public var b3:DynamicBilboard;
}
}//package RooftopRunner_16JUN09_JT_fla
Section 11
//GameLevel3_76 (RooftopRunner_16JUN09_JT_fla.GameLevel3_76)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
public dynamic class GameLevel3_76 extends MovieClip {
public var b1:DynamicBilboard;
}
}//package RooftopRunner_16JUN09_JT_fla
Section 12
//GameLevel5_80 (RooftopRunner_16JUN09_JT_fla.GameLevel5_80)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
public dynamic class GameLevel5_80 extends MovieClip {
public var b2:DynamicBilboard;
public var b1:DynamicBilboard;
public var b3:DynamicBilboard;
}
}//package RooftopRunner_16JUN09_JT_fla
Section 13
//MuteButtonMc_6 (RooftopRunner_16JUN09_JT_fla.MuteButtonMc_6)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MuteButtonMc_6 extends MovieClip {
public function MuteButtonMc_6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
if (MovieClip(root).isMute){
gotoAndStop("inactive");
} else {
gotoAndStop("active");
};
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 14
//OutOfTimeMessage_63 (RooftopRunner_16JUN09_JT_fla.OutOfTimeMessage_63)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class OutOfTimeMessage_63 extends MovieClip {
public function OutOfTimeMessage_63(){
addFrameScript(0, frame1, 48, frame49);
}
function frame1(){
stop();
}
function frame49(){
stop();
MovieClip(root).gotoAndPlay("failed", "gameComplete");
MovieClip(root).totalSecondsRemaining = 0;
MovieClip(root).finalScore = (MovieClip(root).gameScore + MovieClip(root).totalSecondsRemaining);
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 15
//ticker_46 (RooftopRunner_16JUN09_JT_fla.ticker_46)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
public dynamic class ticker_46 extends MovieClip {
public function ticker_46(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 16
//TutorialInstructions_86 (RooftopRunner_16JUN09_JT_fla.TutorialInstructions_86)
package RooftopRunner_16JUN09_JT_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class TutorialInstructions_86 extends MovieClip {
public var tutPlayBut:SimpleButton;
public function TutorialInstructions_86(){
addFrameScript(0, frame1);
}
public function playGameFunction(_arg1:MouseEvent){
this.visible = false;
MovieClip(root).gameMode = "play";
}
function frame1(){
tutPlayBut.addEventListener(MouseEvent.CLICK, playGameFunction);
}
}
}//package RooftopRunner_16JUN09_JT_fla
Section 17
//Border (Border)
package {
import flash.display.*;
public dynamic class Border extends MovieClip {
}
}//package
Section 18
//Bus (Bus)
package {
import flash.display.*;
import flash.events.*;
public class Bus extends MovieClip {
private var speed:Number;
public function Bus(){
init();
}
private function init():void{
speed = (Math.random() * 4);
addEventListener(Event.ENTER_FRAME, moveBus);
}
private function moveBus(_arg1:Event):void{
this.x = (this.x - speed);
if (this.x < 0){
this.x = MovieClip(root).gamelevel.width;
};
}
}
}//package
Section 19
//ChoseplayerScreen (ChoseplayerScreen)
package {
import flash.display.*;
import flash.events.*;
public class ChoseplayerScreen extends MovieClip {
public var maleBtn:SimpleButton;
public var femaleBtn:SimpleButton;
public function ChoseplayerScreen(){
init();
}
private function selectMaleCharacter(_arg1:MouseEvent){
MovieClip(root).gameCharacter = "male";
MovieClip(root).gotoAndStop("play", "game");
}
private function init():void{
maleBtn.addEventListener(MouseEvent.CLICK, selectMaleCharacter);
femaleBtn.addEventListener(MouseEvent.CLICK, selectFemaleCharacter);
}
private function selectFemaleCharacter(_arg1:MouseEvent){
MovieClip(root).gameCharacter = "female";
MovieClip(root).gotoAndStop("play", "game");
}
}
}//package
Section 20
//Corner (Corner)
package {
import flash.display.*;
public dynamic class Corner extends MovieClip {
}
}//package
Section 21
//Countdown (Countdown)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Countdown extends MovieClip {
private var count:uint;
private var timer:Timer;
public function Countdown(){
addFrameScript(0, frame1);
}
public function init():void{
MovieClip(root).gameMode = "out";
count = 1;
gotoAndStop(count);
timer = new Timer(1000, 3);
timer.addEventListener(TimerEvent.TIMER, countdownFunction);
timer.start();
}
private function countdownFunction(_arg1:TimerEvent){
if (count < 3){
MovieClip(root).soundEffects.playSound("_sound_beep");
count++;
gotoAndStop(count);
} else {
MovieClip(root).soundEffects.playSound("_sound_beep");
this.visible = false;
timer.removeEventListener(TimerEvent.TIMER, countdownFunction);
};
}
function frame1(){
stop();
}
}
}//package
Section 22
//documentClass (documentClass)
package {
import flash.display.*;
import flash.events.*;
import com.memecounter.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
public class documentClass extends MovieClip {
public var playAgainBtn2:SimpleButton;
public var stopwatch:Stopwatch;
private var dynamicBilboards:Array;
public var backBut:SimpleButton;
public var finalScoreTxt:TextField;
public var shareBut:SimpleButton;
private var playSlideSound:Boolean;// = false
public var fadeInMc:MovieClip;
public var secondsRemaining:int;
public var isLevelPlaying:Boolean;// = false
public var isMute:Boolean;// = false
public var nextBtn:SimpleButton;
private var scoreTxt:TextField;
private var lastTime:Number;// = 0
public var scoreBut:SimpleButton;
public var enterBut:SimpleButton;
public var _stopwatch:Stopwatch;
public var hasPlayedTutorial:Boolean;// = false
public var secRemaining:TextField;
private var ledgeObjects:Array;
public var playBut:SimpleButton;
public var gameMode:String;// = "start"
public var skipper2:SimpleButton;
public var background1:MovieClip;
public var finalScore:int;
public var gamelevel:MovieClip;
public var crukBut:SimpleButton;
public var muteBtn3:MovieClip;
public var soundEffects;
private var fixedObjects:Array;
private var floorFriction:Number;// = 1
public var sendToFriendsBut:SimpleButton;
public var maleBtn:SimpleButton;
public var visitBut:SimpleButton;
public var muteBtn2:MovieClip;
public var skipper:SimpleButton;
private var borderObjects:Array;
public var gameCharacter:String;// = "male"
public var femaleBtn:SimpleButton;
public var levelScore:int;
public var coinsCollected:TextField;
public var startGame;
public var countdownMovie:MovieClip;
private var coinValue:int;// = 100
public var muteBtn:MovieClip;
public var gotoMenuBtn:SimpleButton;
public var totalSecondsRemaining:int;// = 0
public var instructions:MovieClip;
public var howtoBut:SimpleButton;
public var gameScore:int;
public var charselect:MovieClip;
public var _scoreTxt:TextField;
public var scoBut:SimpleButton;
private var otherObjects:Array;
public var hero:Object;
static const edgeDistance:Number = 300;
static const gravity:Number = 0.004;
public function documentClass():void{
gameMode = "start";
lastTime = 0;
floorFriction = 1;
gameCharacter = "male";
playSlideSound = false;
coinValue = 100;
totalSecondsRemaining = 0;
isLevelPlaying = false;
isMute = false;
hasPlayedTutorial = false;
super();
addFrameScript(0, frame1, 2, frame3, 293, frame294, 307, frame308, 312, frame313, 317, frame318, 322, frame323, 335, frame336, 336, frame337, 337, frame338, 338, frame339, 339, frame340, 340, frame341, 431, frame432, 432, frame433, 437, frame438, 442, frame443, 447, frame448, 448, frame449, 453, frame454, 458, frame459, 463, frame464);
Tracker.init(606, MovieClip(root));
stage.quality = "LOW";
Security.allowDomain("http://www.matmi.com");
Security.loadPolicyFile("http://www.matmi.com/crossdomain.xml");
}
public function selectMaleCharacter(_arg1:MouseEvent){
MovieClip(root).gameCharacter = "male";
maleBtn.removeEventListener(MouseEvent.CLICK, selectMaleCharacter);
femaleBtn.removeEventListener(MouseEvent.CLICK, selectFemaleCharacter);
MovieClip(root).soundEffects.stopLoopSound();
MovieClip(root).soundEffects.stopSound2();
gotoAndPlay("goGame", "mainmenu");
}
public function createSoundEffects():void{
soundEffects = new gameSounds();
}
public function trackEvent(_arg1):void{
Tracker.kvEvent(_arg1);
}
public function getObject(_arg1:int){
if ((otherObjects[_arg1] is Door)){
soundEffects.stopLoopSound();
removeChild(gamelevel);
removeChild(background1);
this.removeEventListener(Event.ENTER_FRAME, gameLoop);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
if (currentLabel == "play"){
trackEvent(2198);
} else {
if (currentLabel == "play2"){
trackEvent(2199);
} else {
if (currentLabel == "play3"){
trackEvent(2200);
};
};
};
nextFrame();
gameMode = "out";
countdownMovie.gotoAndPlay(2);
_stopwatch.resetStopwatch();
totalSecondsRemaining = (totalSecondsRemaining + secondsRemaining);
} else {
if ((otherObjects[_arg1] is DoorFinal)){
soundEffects.stopLoopSound();
removeChild(gamelevel);
removeChild(background1);
this.removeEventListener(Event.ENTER_FRAME, gameLoop);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
isLevelPlaying = false;
totalSecondsRemaining = (totalSecondsRemaining + secondsRemaining);
finalScore = (gameScore + totalSecondsRemaining);
trackEvent(2206);
gotoAndPlay("completedAnimation", "completed");
} else {
if ((otherObjects[_arg1] is Donation)){
soundEffects.playSound("_sound_donation");
gamelevel.removeChild(otherObjects[_arg1]);
otherObjects.splice(_arg1, 1);
levelScore = (levelScore + coinValue);
gameScore = (gameScore + coinValue);
} else {
if ((otherObjects[_arg1] is TutorialDoor)){
fadeInMc.gotoAndPlay("fadeIn");
};
};
};
};
}
public function highScores2(_arg1:MouseEvent){
trackEvent(2193);
gotoAndPlay("highscores", "mainmenu");
}
public function sendToFriendLink(_arg1:MouseEvent){
backBut.removeEventListener(MouseEvent.CLICK, MovieClip(root).backToMenu);
gotoAndPlay("stf", "mainmenu");
}
public function backToMenu(_arg1:MouseEvent, _arg2:Boolean=false){
backBut.removeEventListener(MouseEvent.CLICK, MovieClip(root).backToMenu);
gotoAndPlay("mainmenu", "mainmenu");
}
public function moveCharacter(_arg1:Object, _arg2:Number){
var _local3:*;
var _local4:String;
var _local5:int;
var _local6:Number;
var _local7:int;
var _local8:uint;
var _local9:Number;
var _local10:Number;
var _local11:Number;
if (_arg2 < 1){
return;
};
if (gameMode != "play"){
return;
};
if (!_arg1.hang){
_local10 = ((_arg1.dy * _arg2) + (_arg2 * gravity));
_local11 = _local10;
} else {
_local10 = 0;
};
if (_local10 > 30){
_local10 = 30;
};
_arg1.dy = (_arg1.dy + (_arg2 * gravity));
_local4 = "stand";
_local5 = _arg1.direction;
if (((((((_arg1.moveLeft) && (!(_arg1.flip)))) && (!(_arg1.hangCorner)))) && (!(_arg1.walljump)))){
if (_arg1.jumpHorizontalSpeed > -5){
_arg1.jumpHorizontalSpeed = (_arg1.jumpHorizontalSpeed - 0.25);
} else {
_arg1.jumpHorizontalSpeed = -5;
};
_arg1.acel = (-(_arg1.walkSpeed) * _arg2);
_local5 = -1;
_arg1.height = 67.9;
if (_arg1.hang){
_local4 = "hangmove";
} else {
if (_arg1.roll){
_local4 = "roll";
} else {
if (_arg1.isGrounded){
_local4 = "run";
};
};
};
} else {
if (((((((_arg1.moveRight) && (!(_arg1.flip)))) && (!(_arg1.hangCorner)))) && (!(_arg1.walljump)))){
if (_arg1.jumpHorizontalSpeed < 5){
_arg1.jumpHorizontalSpeed = (_arg1.jumpHorizontalSpeed + 0.25);
} else {
_arg1.jumpHorizontalSpeed = 5;
};
_arg1.acel = (_arg1.walkSpeed * _arg2);
_local5 = 1;
_arg1.height = 67.9;
if (_arg1.hang){
_local4 = "hangmove";
} else {
if (_arg1.roll){
_local4 = "roll";
} else {
if (_arg1.isGrounded){
_local4 = "run";
};
};
};
} else {
if (_arg1.slide){
_arg1.height = 30;
_local4 = "slide";
floorFriction = 0.15;
if (_local5 == 1){
if (_arg1.acel > 0){
_arg1.acel = (_arg1.acel - 0.07);
} else {
_arg1.acel = 0;
};
} else {
if (_local5 == -1){
if (_arg1.acel < 0){
_arg1.acel = (_arg1.acel + 0.07);
} else {
_arg1.acel = 0;
};
};
};
} else {
if (_arg1.hang){
if (_arg1.hangCorner){
_local4 = "hangCorner";
} else {
_local4 = "hang";
};
_arg1.acel = 0;
if (_arg1.flip){
_local4 = "flip";
};
if (_arg1.climb){
_local4 = "climb";
};
} else {
if (_arg1.bounceLeft){
soundEffects.playSound("_sound_whip");
_local5 = 1;
_arg1.acel = 5;
_arg1.bounceLeft = false;
_arg1.dy = -(_arg1.jumpSpeed);
_local10 = -(_arg1.jumpSpeed);
} else {
if (_arg1.bounceRight){
soundEffects.playSound("_sound_whip");
_local5 = -1;
_arg1.acel = -5;
_arg1.bounceRight = false;
_arg1.dy = -(_arg1.jumpSpeed);
_local10 = -(_arg1.jumpSpeed);
} else {
if (_arg1.walljump){
_local4 = "walljump";
_arg1.acel = 0;
} else {
_arg1.roll = false;
_arg1.grabbing = false;
_arg1.jumpHorizontalSpeed = 0;
floorFriction = 1;
if ((((_local5 == 1)) && ((_arg1.acel > 0)))){
if (_arg1.inAir){
_arg1.acel = (_arg1.acel - 0.07);
} else {
_local4 = "balance";
_arg1.acel = (_arg1.acel - floorFriction);
};
} else {
if ((((_local5 == 1)) && ((_arg1.acel < 0)))){
_arg1.acel = 0;
} else {
if ((((_local5 == -1)) && ((_arg1.acel < 0)))){
if (_arg1.inAir){
_arg1.acel = (_arg1.acel + 0.07);
} else {
_local4 = "balance";
_arg1.acel = (_arg1.acel + floorFriction);
};
} else {
if ((((_local5 == -1)) && ((_arg1.acel > 0)))){
_arg1.acel = 0;
};
};
};
};
};
};
};
};
};
};
};
if (!_arg1.inAir){
_local3 = _arg1.acel;
} else {
_local3 = (_arg1.acel + _arg1.jumpHorizontalSpeed);
};
if (_arg1.jump){
_arg1.jump = false;
_arg1.dy = -(_arg1.jumpSpeed);
_local10 = -(_arg1.jumpSpeed);
};
if (_local10 > 0){
_arg1.releaseHang = false;
};
_arg1.hitWallRight = false;
_arg1.hitWallLeft = false;
_arg1.inAir = true;
_arg1.isGrounded = false;
_local6 = (_arg1.mc.y + _local10);
_local7 = 0;
while (_local7 < fixedObjects.length) {
if (((((_arg1.mc.x + (_arg1.width / 2)) > fixedObjects[_local7].leftside)) && (((_arg1.mc.x - (_arg1.width / 2)) < fixedObjects[_local7].rightside)))){
if ((((_arg1.mc.y <= fixedObjects[_local7].topside)) && ((_local6 > fixedObjects[_local7].topside)))){
_local6 = fixedObjects[_local7].topside;
_arg1.dy = 0;
_arg1.inAir = false;
_arg1.flip = false;
_arg1.isGrounded = true;
if (_local11 > 30){
soundEffects.playSound("_sound_bodyFall1High");
_arg1.roll = true;
};
if (_local10 == 30){
_arg1.landed = true;
};
break;
} else {
if (((((_arg1.mc.y - _arg1.mc.height) > fixedObjects[_local7].bottomside)) && (((_local6 - (_arg1.mc.height + 10)) < fixedObjects[_local7].bottomside)))){
if ((((fixedObjects[_local7].mc is Floor)) || ((fixedObjects[_local7].mc is Wall)))){
_local6 = (fixedObjects[_local7].bottomside + _arg1.mc.height);
_arg1.dy = 0;
break;
};
};
};
};
_local7++;
};
_local8 = 0;
while (_local8 < borderObjects.length) {
if (((((_arg1.mc.x + (_arg1.width / 3)) > borderObjects[_local8].leftside)) && (((_arg1.mc.x - (_arg1.width / 3)) < borderObjects[_local8].rightside)))){
if ((((((((_arg1.mc.y >= borderObjects[_local8].bottomside)) && ((_local6 < (borderObjects[_local8].bottomside + _arg1.mc.height))))) && (!(_arg1.releaseHang)))) && (!(_arg1.releaseHang2)))){
_arg1.hang = true;
_local6 = (borderObjects[_local8].topside + _arg1.mc.height);
_arg1.dy = 0;
_arg1.inAir = false;
if ((borderObjects[_local8].mc is Corner)){
_local9 = borderObjects[_local8].mc.x;
_arg1.hangCorner = true;
if (_arg1.mc.x < borderObjects[_local8].mc.x){
_local5 = 1;
} else {
_local5 = -1;
};
};
break;
};
} else {
_arg1.hang = false;
_arg1.hangCorner = false;
};
_local8++;
};
_local9 = (_arg1.mc.x + _local3);
_local7 = 0;
while (_local7 < fixedObjects.length) {
if ((((_local6 > fixedObjects[_local7].topside)) && (((_local6 - _arg1.height) < fixedObjects[_local7].bottomside)))){
if (((((_arg1.mc.x - (_arg1.width / 2)) >= fixedObjects[_local7].rightside)) && (((_local9 - (_arg1.width / 2)) <= fixedObjects[_local7].rightside)))){
_local9 = (fixedObjects[_local7].rightside + (_arg1.width / 2));
_arg1.hitWallLeft = true;
if ((((fixedObjects[_local7].mc is WallJump)) && (!(_arg1.slide)))){
_local6 = fixedObjects[_local7].topside;
_local9 = (fixedObjects[_local7].mc.x + (fixedObjects[_local7].mc.width / 2));
_arg1.walljump = true;
};
break;
};
if (((((_arg1.mc.x + (_arg1.width / 2)) <= fixedObjects[_local7].leftside)) && (((_local9 + (_arg1.width / 2)) >= fixedObjects[_local7].leftside)))){
_local9 = (fixedObjects[_local7].leftside - (_arg1.width / 2));
_arg1.hitWallRight = true;
if ((((fixedObjects[_local7].mc is WallJump)) && (!(_arg1.slide)))){
_local6 = fixedObjects[_local7].topside;
_local9 = (fixedObjects[_local7].mc.x + (fixedObjects[_local7].mc.width / 2));
_arg1.walljump = true;
};
break;
};
};
_local7++;
};
if (_local9 > gamelevel.width){
_local9 = gamelevel.width;
} else {
if (_local9 < 0){
_local9 = 0;
};
};
_arg1.mc.x = _local9;
_arg1.mc.y = _local6;
if (((_arg1.inAir) && (!(_arg1.hang)))){
if (_local10 > 0){
_local4 = "jumpDown";
} else {
_local4 = "jumpUp";
};
};
if (_arg1.animstate == "run"){
_arg1.animstep = (_arg1.animstep + (_arg2 / 60));
if (_arg1.animstep > _arg1.walkAnimation.length){
_arg1.animstep = 0;
};
_arg1.mc.gotoAndStop(_arg1.walkAnimation[Math.floor(_arg1.animstep)]);
} else {
if (_arg1.animstate == "hangmove"){
_arg1.animstep = (_arg1.animstep + (_arg2 / 60));
if (_arg1.animstep > _arg1.hangAnimation.length){
_arg1.animstep = 0;
};
_arg1.mc.gotoAndStop(_arg1.hangAnimation[Math.floor(_arg1.animstep)]);
} else {
if (_arg1.animstate == "roll"){
_arg1.animstep = (_arg1.animstep + (_arg2 / 60));
if (_arg1.animstep > _arg1.rollAnimation.length){
_arg1.animstep = 0;
_arg1.roll = false;
};
_arg1.mc.gotoAndStop(_arg1.rollAnimation[Math.floor(_arg1.animstep)]);
} else {
if (_arg1.animstate == "flip"){
_arg1.animstep = (_arg1.animstep + (_arg2 / 60));
if (_arg1.animstep > _arg1.flipAnimation.length){
_arg1.flip = false;
_arg1.animstep = 0;
_arg1.releaseHang = true;
_arg1.jump = true;
};
_arg1.mc.gotoAndStop(_arg1.flipAnimation[Math.floor(_arg1.animstep)]);
} else {
if (_arg1.animstate == "climb"){
_arg1.animstep = (_arg1.animstep + (_arg2 / 60));
if (_arg1.animstep > _arg1.climbAnimation.length){
_arg1.climb = false;
_arg1.animstep = 0;
_arg1.releaseHang = true;
hero.mc.y = (hero.mc.y - 80);
hero.mc.x = (hero.mc.x + (40 * _arg1.direction));
};
_arg1.mc.gotoAndStop(_arg1.climbAnimation[Math.floor(_arg1.animstep)]);
} else {
if (_arg1.animstate == "walljump"){
_arg1.animstep = (_arg1.animstep + (_arg2 / 60));
if (_arg1.animstep > _arg1.walljumpAnimation.length){
_arg1.walljump = false;
_arg1.animstep = 0;
_arg1.dy = -0.7;
_local10 = -0.7;
};
_arg1.mc.gotoAndStop(_arg1.walljumpAnimation[Math.floor(_arg1.animstep)]);
} else {
if (_arg1.animstate == "stand"){
_arg1.animstep = (_arg1.animstep + (_arg2 / 60));
if (_arg1.animstep > _arg1.standAnimation.length){
_arg1.animstep = 0;
};
_arg1.mc.gotoAndStop(_arg1.standAnimation[Math.floor(_arg1.animstep)]);
} else {
_arg1.mc.gotoAndStop(_arg1.animstate);
};
};
};
};
};
};
};
_arg1.animstate = _local4;
if (_local5 != _arg1.direction){
_arg1.direction = _local5;
_arg1.mc.scaleX = _arg1.direction;
};
}
function frame294(){
play();
}
function frame3(){
MovieClip(root).createSoundEffects();
MovieClip(root).soundEffects.playSound2("_sound_office");
skipper.addEventListener(MouseEvent.CLICK, playit);
muteBtn.addEventListener(MouseEvent.CLICK, MovieClip(root).muteGame);
}
public function StartPlatformGame(){
_stopwatch = stopwatch;
gameScore = 0;
scoreTxt = _scoreTxt;
}
public function startGameLevel(){
levelScore = 0;
trackEvent(2195);
_stopwatch = stopwatch;
_stopwatch.visible = false;
createHero();
examineLevel();
this.addEventListener(Event.ENTER_FRAME, gameLoop);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
uploadBilboardImages();
}
public function updateBillboard(_arg1, _arg2):void{
var _local3:DynamicBilboard;
var _local4:*;
_local3 = gamelevel[("b" + _arg1)];
_local4 = new dynamicImage((("http://www.matmi.com/games/RooftopRunner/dynamicImages/bilboard" + _arg1) + ".jpg"), _arg2, _arg1);
_local3.bContainer.addChild(_local4);
}
public function playAgainFunction(_arg1:MouseEvent){
MovieClip(root).gotoAndStop(1, "game");
}
function frame1(){
stop();
}
private function keyDownFunction(_arg1:KeyboardEvent){
if (gameMode != "play"){
return;
};
if (_arg1.keyCode == 37){
hero.moveLeft = true;
} else {
if (_arg1.keyCode == 39){
hero.moveRight = true;
} else {
if (_arg1.keyCode == 38){
if (((!(hero.inAir)) && (!(hero.hang)))){
if (gameCharacter == "female"){
soundEffects.playSound("_sound_jumpFemale");
} else {
soundEffects.playSound("_sound_jump2");
};
hero.jump = true;
} else {
if (((!(hero.inAir)) && (hero.hang))){
if (!hero.hangCorner){
soundEffects.playSound("_sound_whip");
hero.flip = true;
} else {
if (hero.hangCorner){
hero.climb = true;
};
};
} else {
if (((hero.inAir) && (hero.hitWallLeft))){
hero.bounceLeft = true;
} else {
if (((hero.inAir) && (hero.hitWallRight))){
hero.bounceRight = true;
};
};
};
};
} else {
if (_arg1.keyCode == 40){
if (hero.hang){
hero.releaseHang2 = true;
} else {
if (!playSlideSound){
soundEffects.playSound("_sound_slide");
playSlideSound = true;
};
hero.slide = true;
};
};
};
};
};
}
public function selectFemaleCharacter(_arg1:MouseEvent){
MovieClip(root).gameCharacter = "female";
maleBtn.removeEventListener(MouseEvent.CLICK, selectMaleCharacter);
femaleBtn.removeEventListener(MouseEvent.CLICK, selectFemaleCharacter);
MovieClip(root).soundEffects.stopLoopSound();
MovieClip(root).soundEffects.stopSound2();
gotoAndPlay("goGame", "mainmenu");
}
public function examineLevel(){
var _local1:int;
var _local2:*;
var _local3:Object;
var _local4:Object;
fixedObjects = new Array();
borderObjects = new Array();
otherObjects = new Array();
dynamicBilboards = new Array();
_local1 = 0;
while (_local1 < this.gamelevel.numChildren) {
_local2 = this.gamelevel.getChildAt(_local1);
if ((((((((_local2 is Floor)) || ((_local2 is Wall)))) || ((_local2 is Roof)))) || ((_local2 is WallJump)))){
_local3 = new Object();
_local3.mc = _local2;
_local3.mc.alpha = 0;
_local3.leftside = _local2.x;
_local3.rightside = (_local2.x + _local2.width);
_local3.topside = _local2.y;
_local3.bottomside = (_local2.y + _local2.height);
fixedObjects.push(_local3);
} else {
if ((((_local2 is Border)) || ((_local2 is Corner)))){
_local4 = new Object();
_local4.mc = _local2;
_local4.mc.alpha = 0;
_local4.leftside = _local2.x;
_local4.rightside = (_local2.x + _local2.width);
_local4.topside = _local2.y;
_local4.bottomside = (_local2.y + _local2.height);
borderObjects.push(_local4);
} else {
if ((((((((_local2 is Door)) || ((_local2 is Donation)))) || ((_local2 is DoorFinal)))) || ((_local2 is TutorialDoor)))){
otherObjects.push(_local2);
} else {
if ((_local2 is DynamicBilboard)){
dynamicBilboards.push(_local2);
};
};
};
};
_local1++;
};
}
public function checkCollisions(){
var _local1:*;
_local1 = (otherObjects.length - 1);
while (_local1 >= 0) {
if (hero.mc.hitTestObject(otherObjects[_local1])){
getObject(_local1);
};
_local1--;
};
}
public function cancerLink(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.cancerresearchuk.org/10k/?utm_source=RooftopRacer&utm_medium=Viral&utm_content=Homepage&utm_campaign=Run10kViral2009"), "_blank");
Tracker.kvClick(1012);
}
public function tintInFemale(_arg1:MouseEvent):void{
MovieClip(root).soundEffects.playSound("_sound_lightSwitch");
charselect.gotoAndStop("tintwoman");
}
function frame308(){
stop();
initMainMenu();
crukBut.addEventListener(MouseEvent.CLICK, MovieClip(root).cancerLink);
visitBut.addEventListener(MouseEvent.CLICK, MovieClip(root).run10);
scoreBut.addEventListener(MouseEvent.CLICK, MovieClip(root).highScores2);
sendToFriendsBut.addEventListener(MouseEvent.CLICK, MovieClip(root).sendToFriendLink2);
muteBtn2.addEventListener(MouseEvent.CLICK, MovieClip(root).muteGame);
}
public function tintOutMale(_arg1:MouseEvent):void{
}
public function uninitMainMenu():void{
playBut.removeEventListener(MouseEvent.CLICK, clickStart);
howtoBut.removeEventListener(MouseEvent.CLICK, tutorialStart);
}
function frame313(){
stop();
maleBtn.addEventListener(MouseEvent.CLICK, selectMaleCharacter);
femaleBtn.addEventListener(MouseEvent.CLICK, selectFemaleCharacter);
maleBtn.addEventListener(MouseEvent.MOUSE_OVER, tintInMale);
femaleBtn.addEventListener(MouseEvent.MOUSE_OVER, tintInFemale);
maleBtn.addEventListener(MouseEvent.MOUSE_OUT, tintOutMale);
femaleBtn.addEventListener(MouseEvent.MOUSE_OUT, tintOutFemale);
backBut.addEventListener(MouseEvent.CLICK, MovieClip(root).backToMenu);
}
function frame433(){
backBut.addEventListener(MouseEvent.CLICK, MovieClip(root).backToMenuAndPlayLoop);
enterBut.addEventListener(MouseEvent.CLICK, MovieClip(root).run10);
sendToFriendsBut.addEventListener(MouseEvent.CLICK, MovieClip(root).sendToFriendLink);
playAgainBtn2.addEventListener(MouseEvent.CLICK, MovieClip(root).playAgainFunction);
coinsCollected.text = MovieClip(root).gameScore;
secRemaining.text = MovieClip(root).totalSecondsRemaining;
finalScoreTxt.text = (MovieClip(root).finalScore + " points");
}
function frame438(){
stop();
nextBtn.addEventListener(MouseEvent.CLICK, nextScreen);
}
function frame448(){
gotoAndPlay(6);
}
function frame449(){
backBut.addEventListener(MouseEvent.CLICK, MovieClip(root).backToMenuAndPlayLoop);
enterBut.addEventListener(MouseEvent.CLICK, MovieClip(root).run10);
sendToFriendsBut.addEventListener(MouseEvent.CLICK, MovieClip(root).sendToFriendLink);
playAgainBtn2.addEventListener(MouseEvent.CLICK, MovieClip(root).playAgainFunction);
coinsCollected.text = MovieClip(root).gameScore;
secRemaining.text = MovieClip(root).totalSecondsRemaining;
finalScoreTxt.text = (MovieClip(root).finalScore + " points");
}
function frame443(){
stop();
}
public function createHero(){
hero = new Object();
if (gameCharacter == "male"){
hero.mc = new HeroMale();
hero.mc.x = 120;
hero.mc.y = 420;
gamelevel.addChild(hero.mc);
trackEvent(2196);
} else {
if (gameCharacter == "female"){
hero.mc = new HeroFemale();
hero.mc.x = 120;
hero.mc.y = 420;
gamelevel.addChild(hero.mc);
trackEvent(2197);
};
};
hero.dx = 0;
hero.dy = 0;
hero.inAir = false;
hero.direction = 1;
hero.animstate = "stand";
hero.standAnimation = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);
hero.walkAnimation = new Array(14, 15, 16, 17, 18, 19, 20, 21, 22);
hero.hangAnimation = new Array(27, 28, 29, 30, 31);
hero.rollAnimation = new Array(32, 33, 34, 35, 36, 37, 38, 39, 40, 41);
hero.flipAnimation = new Array(42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52);
hero.climbAnimation = new Array(57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67);
hero.walljumpAnimation = new Array(69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79);
hero.animstep = 0;
hero.jump = false;
hero.moveLeft = false;
hero.moveRight = false;
hero.roll = false;
hero.jumpSpeed = 1.1;
hero.walkSpeed = 0.25;
hero.width = 30;
hero.height = 60.5;
hero.startx = hero.mc.x;
hero.starty = hero.mc.y;
hero.acel = 0;
hero.slide = false;
hero.hang = false;
hero.releaseHang = false;
hero.releaseHang2 = false;
hero.flip = false;
hero.hitWallRight = false;
hero.hitWallLeft = false;
hero.bounceLeft = false;
hero.bounceRight = false;
hero.isGrounded = false;
hero.landed = false;
hero.countAfterLand = 7;
hero.walljump = false;
hero.hangCorner = false;
hero.climb = false;
hero.jumpHorizontalSpeed = 0;
gamelevel.setChildIndex(hero.mc, (gamelevel.numChildren - 1));
}
function frame432(){
gotoAndPlay("won", "gameComplete");
}
private function uploadBilboardImages(){
var _local1:uint;
var _local2:uint;
var _local3:*;
_local1 = 0;
while (_local1 < dynamicBilboards.length) {
_local2 = (_local1 + 1);
_local3 = new dynamicBilboardClass(this, _local2);
_local1++;
};
}
public function nextScreen(_arg1:MouseEvent){
play();
}
function frame323(){
stop();
backBut.addEventListener(MouseEvent.CLICK, MovieClip(root).backToMenu);
crukBut.addEventListener(MouseEvent.CLICK, MovieClip(root).cancerLink);
}
function frame339(){
startGameLevel();
}
function frame454(){
stop();
nextBtn.addEventListener(MouseEvent.CLICK, nextScreen);
}
function frame336(){
stop();
MovieClip(root).gotoAndStop("play", "game");
}
private function keyUpFunction(_arg1:KeyboardEvent){
if (_arg1.keyCode == 37){
hero.moveLeft = false;
} else {
if (_arg1.keyCode == 39){
hero.moveRight = false;
} else {
if (_arg1.keyCode == 38){
hero.releaseHang = false;
} else {
if (_arg1.keyCode == 40){
hero.releaseHang2 = false;
playSlideSound = false;
hero.slide = false;
};
};
};
};
}
function frame318(){
stop();
backBut.addEventListener(MouseEvent.CLICK, MovieClip(root).backToMenu);
crukBut.addEventListener(MouseEvent.CLICK, MovieClip(root).cancerLink);
}
public function playit(_arg1:MouseEvent):void{
MovieClip(root).soundEffects.stopSound2();
MovieClip(root).soundEffects.stopLoopSound();
MovieClip(root).soundEffects.loopSound("_introLoopSound");
gotoAndStop("mainmenu", "mainmenu");
}
function frame338(){
startGameLevel();
}
function frame464(){
gotoAndStop(22);
}
public function sendToFriendLink2(_arg1:MouseEvent){
gotoAndPlay("share", "mainmenu");
}
public function gotoMenuFunction(_arg1:MouseEvent){
gotoMenuBtn.removeEventListener(MouseEvent.CLICK, gotoMenuFunction);
MovieClip(root).soundEffects.stopLoopSound();
gotoAndPlay("mainmenu", "mainmenu");
MovieClip(root).soundEffects.loopSound("_introLoopSound");
}
function frame459(){
stop();
}
function frame340(){
startGameLevel();
}
function frame341(){
StartPlatformGame();
startGameLevel();
MovieClip(root).hasPlayedTutorial = true;
gotoMenuBtn.addEventListener(MouseEvent.CLICK, gotoMenuFunction);
skipper2.addEventListener(MouseEvent.CLICK, playAgainFunction);
}
function frame337(){
StartPlatformGame();
startGameLevel();
stop();
muteBtn3.addEventListener(MouseEvent.CLICK, MovieClip(root).muteGame);
}
public function resetLevel(){
hero.mc.x = 120;
hero.mc.y = 420;
hero.animstep = 0;
hero.acel = 0;
hero.mc.gotoAndStop("stand");
gamelevel.x = 0;
gamelevel.y = -60;
background1.x = 0;
gameScore = (gameScore - levelScore);
levelScore = 0;
countdownMovie.gotoAndPlay(1);
}
public function tintOutFemale(_arg1:MouseEvent):void{
}
public function tintInMale(_arg1:MouseEvent):void{
MovieClip(root).soundEffects.playSound("_sound_lightSwitch");
charselect.gotoAndStop("tintman");
}
public function muteGame(_arg1:MouseEvent){
if (isMute == false){
soundEffects.muteBackgroundMusic();
isMute = true;
_arg1.target.gotoAndStop("inactive");
} else {
soundEffects.unMuteBackgroundMusic();
isMute = false;
_arg1.target.gotoAndStop("active");
};
}
private function tutorialStart(_arg1:MouseEvent){
soundEffects.stopLoopSound();
soundEffects.stopSound2();
MovieClip(root).gotoAndStop("tutorial", "game");
trackEvent(2194);
}
public function gameLoop(_arg1:Event){
var _local2:uint;
_local2 = 40;
scoreTxt.text = gameScore.toString();
moveCharacter(hero, _local2);
scrollWithHero();
checkCollisions();
}
private function clickStart(_arg1:MouseEvent){
MovieClip(root).gotoAndPlay("chooseChar");
}
public function scrollWithHero(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (hero.mc.y < 80){
_local1 = 160;
} else {
_local1 = 80;
};
_local2 = (gamelevel.x + hero.mc.x);
_local3 = (stage.stageWidth - edgeDistance);
_local4 = edgeDistance;
_local5 = (gamelevel.y + hero.mc.y);
_local6 = 200;
_local7 = (stage.stageHeight - _local1);
if (_local5 < _local6){
gamelevel.y = (gamelevel.y - (_local5 - _local6));
} else {
if (_local5 > _local7){
gamelevel.y = (gamelevel.y + (_local7 - _local5));
};
};
if (_local2 > _local3){
gamelevel.x = (gamelevel.x - (_local2 - _local3));
background1.x = (background1.x - ((_local2 - _local3) * 0.5));
if (gamelevel.x < -((gamelevel.width - stage.stageWidth))){
gamelevel.x = -((gamelevel.width - stage.stageWidth));
};
if (background1.x < -2700){
background1.x = -2700;
};
};
if (_local2 < _local4){
gamelevel.x = (gamelevel.x + (_local4 - _local2));
background1.x = (background1.x + ((_local4 - _local2) * 0.5));
if (gamelevel.x > 0){
gamelevel.x = 0;
};
if (background1.x > 0){
background1.x = 0;
};
};
}
public function initMainMenu():void{
playBut.addEventListener(MouseEvent.CLICK, clickStart);
howtoBut.addEventListener(MouseEvent.CLICK, tutorialStart);
}
public function backToMenuAndPlayLoop(_arg1:MouseEvent, _arg2:Boolean=false){
backBut.removeEventListener(MouseEvent.CLICK, MovieClip(root).backToMenuAndPlayLoop);
gotoAndPlay("mainmenu", "mainmenu");
soundEffects.loopSound("_introLoopSound");
}
public function run10(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.cancerresearchuk.org/10k/?utm_source=RooftopRacer&utm_medium=Viral&utm_content=Homepage&utm_campaign=Run10kViral2009"), "_blank");
Tracker.kvClick(1012);
}
}
}//package
Section 23
//Donation (Donation)
package {
import flash.display.*;
public dynamic class Donation extends MovieClip {
}
}//package
Section 24
//Door (Door)
package {
import flash.display.*;
public dynamic class Door extends MovieClip {
}
}//package
Section 25
//DoorFinal (DoorFinal)
package {
import flash.display.*;
public dynamic class DoorFinal extends MovieClip {
}
}//package
Section 26
//DynamicBilboard (DynamicBilboard)
package {
import flash.display.*;
public dynamic class DynamicBilboard extends MovieClip {
public var bContainer:MovieClip;
public function DynamicBilboard(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package
Section 27
//dynamicBilboardClass (dynamicBilboardClass)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class dynamicBilboardClass extends MovieClip {
var variables:URLVariables;
var theId;
var _root;
public var urlIs:String;// = ""
public function dynamicBilboardClass(_arg1, _arg2:Number=1){
var _local3:URLRequest;
var _local4:URLLoader;
variables = new URLVariables();
urlIs = "";
super();
theId = _arg2;
_root = _arg1;
Security.allowDomain("http://www.matmi.com");
Security.loadPolicyFile("http://www.matmi.com/crossdomain.xml");
_local3 = new URLRequest(((("http://www.matmi.com/games/RooftopRunner/getBillboard.php?id=" + _arg2) + "&sdfsdfsdf=") + (Math.random() * 999)));
_local4 = new URLLoader();
_local4.dataFormat = URLLoaderDataFormat.VARIABLES;
_local3.method = URLRequestMethod.POST;
_local4.addEventListener(Event.COMPLETE, handleComplete);
_local4.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
_local4.load(_local3);
}
private function handleComplete(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
if (_local2.data.err == "false"){
_root.updateBillboard(theId, _local2.data.url);
} else {
trace(("error: contents = " + _local2.data));
};
}
private function onIOError(_arg1:IOErrorEvent):void{
trace("Error loading URL.");
}
}
}//package
Section 28
//dynamicImage (dynamicImage)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class dynamicImage extends MovieClip {
private var loader;
private var path:String;// = ""
private var theurl:String;
private var theNum:int;
private var loaderMC;
public function dynamicImage(_arg1:String, _arg2:String, _arg3:int){
var _local4:URLRequest;
path = "";
super();
theNum = _arg3;
Security.allowDomain("http://www.matmi.com");
Security.loadPolicyFile("http://www.matmi.com/crossdomain.xml");
loaderMC = new preloaderAnimation();
addChild(loaderMC);
path = _arg1;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
_local4 = new URLRequest(this.path);
loader.load(_local4);
trace(("url is: " + _arg2));
if (_arg2 != ""){
theurl = _arg2;
this.addEventListener(MouseEvent.CLICK, gotoURL);
this.buttonMode = true;
};
}
private function gotoURL(_arg1:MouseEvent):void{
var request:URLRequest;
var e = _arg1;
if (theNum == 1){
MovieClip(root).trackEvent(2202);
} else {
if (theNum == 2){
MovieClip(root).trackEvent(2203);
} else {
if (theNum == 3){
MovieClip(root).trackEvent(2204);
} else {
MovieClip(root).trackEvent(2205);
};
};
};
request = new URLRequest(theurl);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
private function onComplete(_arg1:Event):void{
var _local2:BitmapData;
var _local3:*;
_local2 = new BitmapData(loader.width, loader.height);
_local2.draw(loader);
_local3 = new Bitmap();
_local3.bitmapData = _local2;
_local3.smoothing = true;
addChild(_local3);
loaderMC.stop();
loaderMC.visible = false;
removeChild(loaderMC);
}
}
}//package
Section 29
//FinalScreen (FinalScreen)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class FinalScreen extends MovieClip {
public var playagainBtn:MovieClip;
public var finalScore:TextField;
public function FinalScreen(){
init();
}
private function init():void{
playagainBtn.addEventListener(MouseEvent.CLICK, playagainFunction);
finalScore.text = MovieClip(root).gameScore.toString();
}
private function playagainFunction(_arg1:MouseEvent){
MovieClip(root).gotoAndStop(3);
MovieClip(root).resetLevel();
}
}
}//package
Section 30
//Floor (Floor)
package {
import flash.display.*;
public dynamic class Floor extends MovieClip {
}
}//package
Section 31
//FloorWithOil (FloorWithOil)
package {
import flash.display.*;
public dynamic class FloorWithOil extends MovieClip {
}
}//package
Section 32
//gameSounds (gameSounds)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class gameSounds extends MovieClip {
var _sound_beep:Sound;
var _sound_musicLoop:Sound;
var _sound_bodyFall1:Sound;
var _sound_lightSwitch:Sound;
var currentLoopedSound:String;// = ""
var _sound_hey:Sound;
var _sound_bodyFall1High:Sound;
var _sound_whip:Sound;
var soundtransform2:SoundTransform;
var soundchannel1:SoundChannel;
var soundchannel3:SoundChannel;
var _sound_jumpFemale:Sound;
var soundtransform1:SoundTransform;
var soundtransform3:SoundTransform;
var _sound_slide:Sound;
var soundmuter:SoundTransform;
var isBackgroundMusicMute:Boolean;// = false
var _sound_office:Sound;
var _sound_jump2:Sound;
var soundchannel2:SoundChannel;
var _introLoopSound:Sound;
var _sound_donation:Sound;
var _sound_jump:Sound;
public function gameSounds(){
currentLoopedSound = "";
isBackgroundMusicMute = false;
super();
_sound_donation = new sound_donation();
_sound_jump = new sound_jump();
_sound_jump2 = new sound_jump2();
_sound_jumpFemale = new sound_jumpFemale();
_sound_slide = new sound_slide();
_sound_whip = new sound_whip();
_sound_bodyFall1 = new sound_bodyFall1();
_sound_bodyFall1High = new sound_bodyFall1High();
_sound_beep = new sound_beep();
_sound_hey = new sound_hey();
_sound_musicLoop = new sound_musicLoop();
_introLoopSound = new introLoopSound();
_sound_lightSwitch = new sound_lightSwitch();
_sound_office = new sound_office();
soundchannel1 = new SoundChannel();
soundtransform1 = new SoundTransform();
soundtransform1.volume = 10;
soundchannel1.soundTransform = soundtransform1;
soundchannel2 = new SoundChannel();
soundtransform2 = new SoundTransform();
soundtransform2.volume = 1;
soundchannel2.soundTransform = soundtransform2;
soundchannel3 = new SoundChannel();
soundtransform3 = new SoundTransform();
soundtransform3.volume = 1;
soundchannel3.soundTransform = soundtransform3;
soundmuter = new SoundTransform();
}
private function muteBackground(_arg1:Boolean){
if (_arg1){
soundtransform2.volume = 0;
soundchannel2.soundTransform = soundtransform2;
};
}
public function stopSound():void{
soundchannel1.stop();
}
public function playSound2(_arg1:String):void{
soundchannel3 = this[_arg1].play();
soundchannel3.addEventListener(Event.SOUND_COMPLETE, sound2Final);
}
public function playSound(_arg1:String):void{
soundchannel1 = this[_arg1].play();
}
public function mute():void{
soundmuter.volume = 0;
SoundMixer.soundTransform = soundmuter;
}
private function looper(_arg1:Event):void{
soundchannel2.removeEventListener(Event.SOUND_COMPLETE, looper);
loopSound(currentLoopedSound);
}
public function unMute():void{
soundmuter.volume = 1;
SoundMixer.soundTransform = soundmuter;
}
public function muteBackgroundMusic():void{
soundtransform2.volume = 0;
soundtransform3.volume = 0;
soundchannel2.soundTransform = soundtransform2;
soundchannel3.soundTransform = soundtransform3;
isBackgroundMusicMute = true;
}
public function sound2Final(_arg1:Event){
loopSound("_introLoopSound");
muteBackground(isBackgroundMusicMute);
}
public function stopSound2():void{
soundchannel3.stop();
}
public function unMuteBackgroundMusic():void{
soundtransform2.volume = 1;
soundtransform3.volume = 1;
soundchannel2.soundTransform = soundtransform2;
soundchannel3.soundTransform = soundtransform3;
isBackgroundMusicMute = false;
}
public function stopLoopSound():void{
soundchannel2.stop();
}
public function loopSound(_arg1:String):void{
currentLoopedSound = _arg1;
soundchannel2 = this[currentLoopedSound].play();
soundchannel2.addEventListener(Event.SOUND_COMPLETE, looper);
muteBackground(isBackgroundMusicMute);
}
}
}//package
Section 33
//Hero (Hero)
package {
import flash.display.*;
public dynamic class Hero extends MovieClip {
public function Hero(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 34
//HeroFemale (HeroFemale)
package {
import flash.display.*;
public dynamic class HeroFemale extends MovieClip {
public function HeroFemale(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 35
//HeroMale (HeroMale)
package {
import flash.display.*;
public dynamic class HeroMale extends MovieClip {
public function HeroMale(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 36
//introLoopSound (introLoopSound)
package {
import flash.media.*;
public dynamic class introLoopSound extends Sound {
}
}//package
Section 37
//PlayerPosition (PlayerPosition)
package {
import flash.display.*;
import flash.events.*;
public class PlayerPosition extends MovieClip {
private var levelOffset:Number;
public var playerSpot:MovieClip;
private var currentLevel:uint;
private var firstFrame:uint;// = 1
private var numberOfLevels:uint;// = 4
private var offset:Number;
public function PlayerPosition(){
numberOfLevels = 4;
firstFrame = 1;
super();
init();
}
private function init():void{
if (MovieClip(root).currentLabel == "tutorial"){
this.visible = false;
};
levelOffset = (this.width / numberOfLevels);
offset = (this.width / 6000);
addEventListener(Event.ENTER_FRAME, updatePosition);
}
private function updatePosition(_arg1:Event){
playerSpot.x = ((levelOffset * (MovieClip(root).currentFrame - firstFrame)) + (((MovieClip(root).hero.mc.x * offset) * 1) / numberOfLevels));
}
}
}//package
Section 38
//preloader (preloader)
package {
import flash.display.*;
import flash.events.*;
public class preloader extends MovieClip {
public var lbar:MovieClip;
var initX:Number;// = 0
public function preloader(){
initX = 0;
super();
addEventListener(Event.ENTER_FRAME, handleProgress);
addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
}
public function UpdateProgress(_arg1:Number):void{
if (_arg1 <= 1){
lbar.scaleX = _arg1;
};
}
public function handleProgress(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = stage.loaderInfo.bytesLoaded;
_local3 = stage.loaderInfo.bytesTotal;
_local4 = 0;
_local4 = (_local2 / _local3);
UpdateProgress(_local4);
if (_local2 >= _local3){
removeEventListener(Event.ENTER_FRAME, handleProgress);
MovieClip(root).play();
};
}
public function ioErrorHandler(_arg1:IOErrorEvent):void{
trace(("ioErrorHandler: " + _arg1));
}
}
}//package
Section 39
//preloaderAnimation (preloaderAnimation)
package {
import flash.display.*;
public dynamic class preloaderAnimation extends MovieClip {
}
}//package
Section 40
//Roof (Roof)
package {
import flash.display.*;
public dynamic class Roof extends MovieClip {
}
}//package
Section 41
//scoreboardClass (scoreboardClass)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
public class scoreboardClass extends MovieClip {
public var s28:TextField;
public var s23:TextField;
public var s30:TextField;
public var s32:TextField;
public var s33:TextField;
public var s36:TextField;
public var s31:TextField;
public var s34:TextField;
public var s4:TextField;
public var s6:TextField;
public var s1:TextField;
public var s3:TextField;
public var s2:TextField;
public var s5:TextField;
public var s7:TextField;
public var s8:TextField;
public var s9:TextField;
public var s35:TextField;
public var n10:TextField;
public var n11:TextField;
public var n13:TextField;
public var n16:TextField;
public var n18:TextField;
public var n15:TextField;
public var n17:TextField;
public var n12:TextField;
public var n14:TextField;
public var n20:TextField;
public var n21:TextField;
public var n22:TextField;
public var n23:TextField;
public var n24:TextField;
public var n25:TextField;
public var n26:TextField;
public var n27:TextField;
public var n29:TextField;
public var n19:TextField;
public var n28:TextField;
public var n31:TextField;
public var n32:TextField;
public var n33:TextField;
public var n34:TextField;
public var n35:TextField;
public var n30:TextField;
public var n36:TextField;
var variables:URLVariables;
public var n1:TextField;
public var n2:TextField;
public var n3:TextField;
public var n5:TextField;
public var n7:TextField;
public var n8:TextField;
public var n9:TextField;
public var n6:TextField;
public var n4:TextField;
var _root;
public var s10:TextField;
public var s11:TextField;
public var s12:TextField;
public var s13:TextField;
public var s14:TextField;
public var s15:TextField;
public var s17:TextField;
public var s18:TextField;
public var s19:TextField;
public var s16:TextField;
public var s20:TextField;
public var s22:TextField;
public var s26:TextField;
public var s27:TextField;
public var s21:TextField;
public var s29:TextField;
public var s24:TextField;
public var s25:TextField;
public function scoreboardClass(){
var _local1:URLRequest;
var _local2:URLLoader;
variables = new URLVariables();
super();
_root = MovieClip(root);
Security.allowDomain("http://www.matmi.com");
Security.loadPolicyFile("http://www.matmi.com/crossdomain.xml");
_local1 = new URLRequest(("http://www.matmi.com/games/RooftopRunner/getScores.php?rnd=" + (Math.random() * 999)));
_local2 = new URLLoader();
_local2.dataFormat = URLLoaderDataFormat.VARIABLES;
_local1.method = URLRequestMethod.POST;
_local2.addEventListener(Event.COMPLETE, handleComplete);
_local2.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
_local2.load(_local1);
}
private function handleComplete(_arg1:Event):void{
var _local2:URLLoader;
var _local3:int;
_local2 = URLLoader(_arg1.target);
_local3 = 1;
while (_local2.data[("n" + _local3)]) {
this[("n" + _local3)].text = _local2.data[("n" + _local3)];
this[("s" + _local3)].text = _local2.data[("s" + _local3)];
_local3++;
};
}
private function onIOError(_arg1:IOErrorEvent):void{
trace("Error loading URL.");
}
}
}//package
Section 42
//scoreSubmissionClass (scoreSubmissionClass)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
public class scoreSubmissionClass extends MovieClip {
public var ticked:String;// = "YES"
public var ticker:MovieClip;
public var oblique:Number;
var redrum:String;
public var hackCheck:String;
var aka:String;
public var err:TextField;
var score:Number;// = 0
public var em:TextField;
public var usr:TextField;
var gameid:Number;// = 110
var variables:URLVariables;
var actualEmail:String;
var anom_rnd_pnt:String;
var undefawg:String;
var _root;
public var submitScoreBut:SimpleButton;
public function scoreSubmissionClass(){
score = 0;
gameid = 110;
variables = new URLVariables();
ticked = "YES";
super();
addFrameScript(0, frame1);
_root = MovieClip(root);
score = MovieClip(root).finalScore;
}
private function submitDetails(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:Number;
var _local5:URLRequest;
var _local6:URLLoader;
err.text = "";
if (((((!((usr.text == ""))) && ((score > 0)))) && (!((em.text == ""))))){
_local2 = usr.text;
usr.visible = false;
em.visible = false;
_local3 = em.text;
_local4 = Math.round((Math.random() * 3));
gotoAndStop("submitting");
switch (_local4){
case 0:
anom_rnd_pnt = stringToAscii(_local2, 7);
redrum = stringToAscii(String(score), 10);
undefawg = stringToAscii(_local3, 97);
break;
case 1:
anom_rnd_pnt = stringToAscii(_local2, 69);
redrum = stringToAscii(String(score), 21);
undefawg = stringToAscii(_local3, 91);
break;
case 2:
anom_rnd_pnt = stringToAscii(_local2, 23);
redrum = stringToAscii(String(score), 17);
undefawg = stringToAscii(_local3, 4);
break;
case 3:
anom_rnd_pnt = stringToAscii(_local2, 110);
redrum = stringToAscii(String(score), 17);
undefawg = stringToAscii(_local3, 78);
break;
default:
break;
};
_local5 = new URLRequest("http://www.matmi.com/games/RooftopRunner/version.php");
_local6 = new URLLoader();
_local6.dataFormat = URLLoaderDataFormat.VARIABLES;
variables.tapy_cd_ps = gameid;
variables.anom_rnd_pnt = anom_rnd_pnt;
variables.redrum = redrum;
variables.undefawg = undefawg;
variables.ticked = ticked;
variables.usr_scr_pss = _local4;
_local5.data = variables;
_local5.method = URLRequestMethod.POST;
_local6.addEventListener(Event.COMPLETE, handleComplete);
_local6.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
_local6.load(_local5);
} else {
if (score == 0){
err.text = "You need a score of 1 or more to submit";
} else {
err.text = "Sorry, to submit your score we require both a name and a valid email address. Please try again.";
};
};
}
private function stringToAscii(_arg1:String, _arg2:Number):String{
var _local3:*;
var _local4:String;
var _local5:Number;
_local3 = _arg1.split("");
_local4 = "";
_local5 = 0;
while (_local3[_local5] != null) {
_local4 = (_local4 + ((_local3[_local5].charCodeAt(0) + _arg2) + "||"));
_local5++;
};
return (_local4);
}
function frame1(){
stop();
ticker.buttonMode = true;
ticker.addEventListener(MouseEvent.CLICK, tickerGo);
submitScoreBut.addEventListener(MouseEvent.CLICK, submitDetails);
}
private function handleComplete(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
if (_local2.data.err != "false"){
err.text = _local2.data.err;
usr.visible = true;
em.visible = true;
gotoAndStop(1);
} else {
err.text = "";
gotoAndStop("submitted");
MovieClip(root).trackEvent(2201);
};
}
private function tickerGo(_arg1:MouseEvent):void{
if (ticker.currentLabel == "yes"){
ticker.gotoAndStop("no");
ticked = "NO";
} else {
ticker.gotoAndStop("yes");
ticked = "YES";
};
}
private function onIOError(_arg1:IOErrorEvent):void{
gotoAndStop(1);
err.text = "Error loading URL.";
}
Security.allowDomain("http://www.matmi.com");
Security.loadPolicyFile("http://www.matmi.com/crossdomain.xml");
}
}//package
Section 43
//SendToAFriendClass (SendToAFriendClass)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
public class SendToAFriendClass extends MovieClip {
var ticked:String;// = "NO"
public var email3:TextField;
public var email1:TextField;
public var ticker:MovieClip;
public var email2:TextField;
public var subBut:SimpleButton;
public var email5:TextField;
public var email4:TextField;
public var namer:TextField;
var variables:URLVariables;
public var err:TextField;
var done:Boolean;// = false
public var email:TextField;
public function SendToAFriendClass(){
variables = new URLVariables();
done = false;
ticked = "NO";
super();
addFrameScript(0, frame1);
startit();
}
public function startit():void{
ticker.buttonMode = true;
ticked = "NO";
ticker.addEventListener(MouseEvent.CLICK, changeTicker);
subBut.addEventListener(MouseEvent.CLICK, submit);
}
function frame1(){
stop();
startit();
}
private function handleComplete(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
if (_local2.data.err == "false"){
play();
done = false;
MovieClip(root).trackEvent(2192);
} else {
err.text = _local2.data.err;
gotoAndStop("submit");
done = false;
};
}
private function endEmail(_arg1:MouseEvent):void{
gotoAndPlay("sent");
}
private function submit(_arg1:MouseEvent):void{
var _local2:URLRequest;
var _local3:URLLoader;
if (((!((email.text == ""))) && (!((namer.text == ""))))){
_local2 = new URLRequest("http://www.matmi.com/games/RooftopRunner/sendtoafriend.php");
_local3 = new URLLoader();
_local3.dataFormat = URLLoaderDataFormat.VARIABLES;
variables.ticked = ticked;
variables.email = email.text;
variables.namer = namer.text;
variables.email1 = email1.text;
variables.email2 = email2.text;
variables.email3 = email3.text;
variables.email4 = email4.text;
variables.email5 = email5.text;
nextFrame();
_local2.data = variables;
_local2.method = URLRequestMethod.POST;
_local3.addEventListener(Event.COMPLETE, handleComplete);
_local3.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
_local3.load(_local2);
} else {
err.text = "Please fill in all fields";
};
}
private function onIOError(_arg1:IOErrorEvent):void{
trace("Error loading URL.");
}
private function changeTicker(_arg1:MouseEvent):void{
if (ticker.currentLabel == "yes"){
ticker.gotoAndStop("no");
ticked = "NO";
} else {
ticker.gotoAndStop("yes");
ticked = "YES";
};
}
Security.allowDomain("http://www.matmi.com");
Security.loadPolicyFile("http://www.matmi.com/crossdomain.xml");
}
}//package
Section 44
//sound_beep (sound_beep)
package {
import flash.media.*;
public dynamic class sound_beep extends Sound {
}
}//package
Section 45
//sound_bodyFall1 (sound_bodyFall1)
package {
import flash.media.*;
public dynamic class sound_bodyFall1 extends Sound {
}
}//package
Section 46
//sound_bodyFall1High (sound_bodyFall1High)
package {
import flash.media.*;
public dynamic class sound_bodyFall1High extends Sound {
}
}//package
Section 47
//sound_donation (sound_donation)
package {
import flash.media.*;
public dynamic class sound_donation extends Sound {
}
}//package
Section 48
//sound_hey (sound_hey)
package {
import flash.media.*;
public dynamic class sound_hey extends Sound {
}
}//package
Section 49
//sound_jump (sound_jump)
package {
import flash.media.*;
public dynamic class sound_jump extends Sound {
}
}//package
Section 50
//sound_jump2 (sound_jump2)
package {
import flash.media.*;
public dynamic class sound_jump2 extends Sound {
}
}//package
Section 51
//sound_jumpFemale (sound_jumpFemale)
package {
import flash.media.*;
public dynamic class sound_jumpFemale extends Sound {
}
}//package
Section 52
//sound_lightSwitch (sound_lightSwitch)
package {
import flash.media.*;
public dynamic class sound_lightSwitch extends Sound {
}
}//package
Section 53
//sound_musicLoop (sound_musicLoop)
package {
import flash.media.*;
public dynamic class sound_musicLoop extends Sound {
}
}//package
Section 54
//sound_office (sound_office)
package {
import flash.media.*;
public dynamic class sound_office extends Sound {
}
}//package
Section 55
//sound_slide (sound_slide)
package {
import flash.media.*;
public dynamic class sound_slide extends Sound {
}
}//package
Section 56
//sound_whip (sound_whip)
package {
import flash.media.*;
public dynamic class sound_whip extends Sound {
}
}//package
Section 57
//Stopwatch (Stopwatch)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class Stopwatch extends MovieClip {
private var timer:Timer;
public var timeTxt:TextField;
private var sec:uint;
private var levelTime:uint;
public var resetBtn:SimpleButton;
public var outMessage:MovieClip;
public function Stopwatch(){
resetBtn.visible = false;
outMessage.visible = false;
}
public function init():void{
if (MovieClip(root).currentLabel == "tutorial"){
this.visible = false;
} else {
this.visible = true;
MovieClip(root).isLevelPlaying = true;
};
if (MovieClip(root).currentLabel != "tutorial"){
MovieClip(root).soundEffects.loopSound("_sound_musicLoop");
};
if (MovieClip(root).currentFrame == 4){
levelTime = 90;
} else {
levelTime = 60;
};
sec = levelTime;
timeTxt.text = sec.toString();
timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, countSeconds);
timer.start();
}
private function countSeconds(_arg1:TimerEvent){
if (MovieClip(root).currentLabel == "tutorial"){
return;
};
if ((((sec > 0)) && (MovieClip(root).isLevelPlaying))){
sec--;
MovieClip(root).secondsRemaining = (sec * 10);
timeTxt.text = sec.toString();
} else {
MovieClip(root).soundEffects.stopLoopSound();
resetBtn.visible = true;
outMessage.visible = true;
outMessage.play();
MovieClip(root).gameMode = "out";
MovieClip(root).trackEvent(2207);
sec = 0;
timer.removeEventListener(TimerEvent.TIMER, countSeconds);
};
}
public function resetStopwatch(){
timer.removeEventListener(TimerEvent.TIMER, countSeconds);
}
}
}//package
Section 58
//TutorialDoor (TutorialDoor)
package {
import flash.display.*;
public dynamic class TutorialDoor extends MovieClip {
}
}//package
Section 59
//Wall (Wall)
package {
import flash.display.*;
public dynamic class Wall extends MovieClip {
}
}//package
Section 60
//WallJump (WallJump)
package {
import flash.display.*;
public dynamic class WallJump extends MovieClip {
}
}//package