Section 1
//FrameClass (AS.FrameClass)
package AS {
import flash.display.*;
public class FrameClass {
public var photo2:Boolean;// = false
public var magglass:Boolean;// = false
public var ripped1:Boolean;// = false
public var key:Boolean;// = false
var pressed:Boolean;// = true
public var _inUse:Boolean;// = false
public var crseen:Boolean;// = false
public var _frame:int;// = 1
public var photo:Boolean;// = false
public var ripped2:Boolean;// = false
public var note:Boolean;// = false
public var screwdriver:Boolean;// = false
public function addScrollClick(_arg1:MovieClip, _arg2:MovieClip, _arg3:String, _arg4:int, _arg5:FrameClass){
return (new ScrollClick(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public function addScrollArrow(_arg1:MovieClip, _arg2:MovieClip, _arg3:int, _arg4:FrameClass, _arg5:String){
return (new ScrollArrow(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package AS
Section 2
//gameObject (AS.gameObject)
package AS {
import flash.display.*;
import flash.events.*;
public class gameObject {
private var _className:String;
private var _object:MovieClip;
private var _objectName:String;
private var _frame:FrameClass;
public function gameObject(_arg1:MovieClip, _arg2:FrameClass, _arg3:String, _arg4:String){
_object = _arg1;
_frame = _arg2;
_objectName = _arg3;
_className = _arg4;
_object.buttonMode = true;
_object.addEventListener(MouseEvent.CLICK, pickup);
}
function pickup(_arg1:MouseEvent){
_object.visible = false;
_arg1.currentTarget.root.textBox.text = ("You picked up " + _objectName);
if (_className == "note"){
_frame.note = true;
} else {
if (_className == "screwdriver"){
_frame.screwdriver = true;
} else {
if (_className == "magglass"){
_frame.magglass = true;
} else {
if (_className == "photo"){
_frame.photo = true;
} else {
if (_className == "ripped1"){
_frame.ripped1 = true;
} else {
if (_className == "photo2"){
_frame.photo2 = true;
} else {
if (_className == "key"){
_frame.key = true;
} else {
if (_className == "ripped2"){
_frame.ripped2 = true;
};
};
};
};
};
};
};
};
}
}
}//package AS
Section 3
//NavButton (AS.NavButton)
package AS {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class NavButton {
private var _cursor:MovieClip;
private var _frame:uint;
private var _clip:MovieClip;
public function NavButton(_arg1:MovieClip, _arg2:uint, _arg3:MovieClip){
_clip = _arg1;
_frame = _arg2;
_cursor = _arg3;
_clip.addEventListener(MouseEvent.CLICK, nav);
_clip.addEventListener(MouseEvent.MOUSE_OVER, over);
_clip.addEventListener(MouseEvent.MOUSE_OUT, out);
}
private function nav(_arg1:MouseEvent):void{
_arg1.stopImmediatePropagation();
_arg1.currentTarget.root.textBox.text = "";
_clip.removeEventListener(MouseEvent.CLICK, nav);
_clip.removeEventListener(MouseEvent.MOUSE_OVER, over);
_clip.removeEventListener(MouseEvent.MOUSE_OUT, out);
_clip.removeEventListener(Event.ENTER_FRAME, mouseMoveHandler);
_cursor.visible = false;
Mouse.show();
_arg1.currentTarget.root.gotoAndStop(_frame);
}
private function over(_arg1:MouseEvent){
Mouse.hide();
_cursor.visible = true;
_cursor.mouseEnabled = false;
_clip.addEventListener(Event.ENTER_FRAME, mouseMoveHandler);
}
private function out(_arg1:MouseEvent){
_clip.removeEventListener(Event.ENTER_FRAME, mouseMoveHandler);
_cursor.visible = false;
Mouse.show();
}
private function mouseMoveHandler(_arg1:Event):void{
_cursor.x = _arg1.currentTarget.root.mouseX;
_cursor.y = _arg1.currentTarget.root.mouseY;
}
}
}//package AS
Section 4
//ScrollArrow (AS.ScrollArrow)
package AS {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class ScrollArrow {
private var keycode:int;
private var _numFrames;
private var _dir:String;
private var pressed:Boolean;// = true
private var _theTarget:MovieClip;
private var reverseFrame:int;
private var _frame:FrameClass;
private var _clip:MovieClip;
private var _inverse;
private var keepScroll:Boolean;
public function ScrollArrow(_arg1:MovieClip, _arg2:MovieClip, _arg3:int, _arg4:FrameClass, _arg5:String){
_inverse = _arg5;
_numFrames = _arg3;
_clip = _arg1;
_frame = _arg4;
_theTarget = _arg2;
_clip.stage.addEventListener(KeyboardEvent.KEY_DOWN, nav);
_clip.stage.addEventListener(KeyboardEvent.KEY_UP, setScroll);
_clip.stage.focus = _clip.stage;
}
private function setScroll(_arg1:KeyboardEvent){
_frame._inUse = false;
trace(_frame._inUse);
_clip.removeEventListener(Event.ENTER_FRAME, mouseMoveHandler);
_clip.removeEventListener(Event.ENTER_FRAME, mouseMoveHandler2);
if (keycode == 37){
_clip.mc_cursor.visible = false;
Mouse.show();
_frame._frame = _theTarget.currentFrame;
} else {
if (keycode == 39){
_clip.mc_cursorright.visible = false;
Mouse.show();
if ((((_theTarget.currentFrame == _numFrames)) || ((_theTarget.currentFrame == 1)))){
_frame._frame = 1;
} else {
_frame._frame = (_numFrames - _theTarget.currentFrame);
};
};
};
_theTarget.stop();
pressed = true;
}
public function mouseMoveHandler(_arg1:Event):void{
_clip.mc_cursorright.x = _clip.mouseX;
_clip.mc_cursorright.y = _clip.mouseY;
}
public function mouseMoveHandler2(_arg1:Event):void{
_clip.mc_cursor.x = _clip.mouseX;
_clip.mc_cursor.y = _clip.mouseY;
}
private function buttonOver(_arg1:MouseEvent){
_arg1.currentTarget.gotoAndStop(2);
}
private function nav(_arg1:KeyboardEvent):void{
_frame._inUse = true;
trace(_frame._inUse);
_clip.mouseEnabled = false;
if (pressed){
pressed = false;
keycode = _arg1.keyCode;
if (_inverse == "y"){
if (keycode == 39){
keycode = 37;
} else {
if (keycode == 37){
keycode = 39;
};
};
};
if (keycode == 39){
Mouse.hide();
_clip.mc_cursorright.visible = true;
_clip.mc_cursorright.alpha = 1;
_clip.mc_cursorright.mouseEnabled = false;
_clip.addEventListener(Event.ENTER_FRAME, mouseMoveHandler);
reverseFrame = ((_numFrames + 1) - _frame._frame);
if (reverseFrame > (_numFrames / 2)){
_theTarget.gotoAndPlay((reverseFrame + 1));
};
} else {
if (keycode == 37){
Mouse.hide();
_clip.mc_cursor.visible = true;
_clip.mc_cursor.mouseEnabled = false;
_clip.addEventListener(Event.ENTER_FRAME, mouseMoveHandler2);
if (_frame._frame < (_numFrames / 2)){
_theTarget.gotoAndPlay((_frame._frame + 1));
};
};
};
};
}
}
}//package AS
Section 5
//ScrollClick (AS.ScrollClick)
package AS {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class ScrollClick {
private var _theTarget:MovieClip;
private var theDir:String;
private var reverseFrame:int;
private var _numFrames:int;
private var _frame:FrameClass;
private var _clip:MovieClip;
private var keepScroll:Boolean;
private var _dir:String;
public function ScrollClick(_arg1:MovieClip, _arg2:MovieClip, _arg3:String, _arg4:int, _arg5:FrameClass){
_numFrames = _arg4;
_clip = _arg1;
_dir = _arg3;
_frame = _arg5;
_theTarget = _arg2;
_clip.buttonMode = true;
_clip.addEventListener(MouseEvent.MOUSE_DOWN, nav);
_clip.stage.addEventListener(MouseEvent.MOUSE_UP, setScroll);
}
private function setScroll(_arg1:MouseEvent){
if (theDir == "l"){
_clip.mc_cursor.visible = false;
Mouse.show();
_frame._frame = _theTarget.currentFrame;
} else {
if (theDir == "r"){
_clip.mc_cursorright.visible = false;
Mouse.show();
if ((((_theTarget.currentFrame == _numFrames)) || ((_theTarget.currentFrame == 1)))){
_frame._frame = 1;
} else {
_frame._frame = (_numFrames - _theTarget.currentFrame);
};
};
};
theDir = null;
_theTarget.stop();
}
private function nav(_arg1:MouseEvent){
var event = _arg1;
if (_dir == "r"){
try {
var mouseMoveHandler:Function = function (_arg1:Event):void{
_clip.mc_cursorright.x = _clip.mouseX;
_clip.mc_cursorright.y = _clip.mouseY;
};
Mouse.hide();
_clip.mc_cursorright.visible = true;
_clip.mc_cursorright.mouseEnabled = false;
_clip.addEventListener(Event.ENTER_FRAME, mouseMoveHandler);
reverseFrame = ((_numFrames + 1) - _frame._frame);
if (reverseFrame > (_numFrames / 2)){
_theTarget.gotoAndPlay((reverseFrame + 1));
theDir = "r";
};
} catch(error:Error) {
trace(("HAHA" + error));
};
} else {
if (_dir == "l"){
var mouseMoveHandler2:Function = function (_arg1:Event):void{
_clip.mc_cursor.x = _clip.mouseX;
_clip.mc_cursor.y = _clip.mouseY;
};
Mouse.hide();
_clip.mc_cursor.visible = true;
_clip.mc_cursor.mouseEnabled = false;
_clip.addEventListener(Event.ENTER_FRAME, mouseMoveHandler2);
if (_frame._frame < (_numFrames / 2)){
_theTarget.gotoAndPlay((_frame._frame + 1));
theDir = "l";
} else {
if (_frame._frame == (_numFrames / 2)){
theDir = "l";
};
};
};
};
}
}
}//package AS
Section 6
//Intro_22 (Corridor2_fla.Intro_22)
package Corridor2_fla {
import flash.display.*;
public dynamic class Intro_22 extends MovieClip {
public function Intro_22(){
addFrameScript(555, frame556);
}
function frame556(){
stop();
}
}
}//package Corridor2_fla
Section 7
//Link_10 (Corridor2_fla.Link_10)
package Corridor2_fla {
import flash.display.*;
public dynamic class Link_10 extends MovieClip {
public function Link_10(){
addFrameScript(0, frame1);
}
function frame1(){
alpha = 0;
}
}
}//package Corridor2_fla
Section 8
//MainTimeline (Corridor2_fla.MainTimeline)
package Corridor2_fla {
import flash.display.*;
import flash.events.*;
import AS.*;
import mochi.*;
import flash.media.*;
import CPMStar.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var note;
public var goforward39:MovieClip;
public var left:NavButton;
public var startTimer;
public var fib1:MovieClip;
public var forward39;
public var ad:DisplayObject;
public var back1;
public var back2;
public var back3;
public var back4;
public var back5;
public var back7;
public var back8;
public var back6;
public var failed:MovieClip;
public var percent:Number;
public var timerBox:TextField;
public var playerscore:int;
public var behindsofa;
public var mc_forward20:MovieClip;
public var liftout:MovieClip;
public var left10;
public var passed:MovieClip;
public var mc_cursorright1:MovieClip;
public var mc_cursorright2:MovieClip;
public var mc_cursorright3:MovieClip;
public var mc_cursorright4:MovieClip;
public var mc_cursorright6:MovieClip;
public var mc_cursorright7:MovieClip;
public var mc_cursorright8:MovieClip;
public var mc_cursorright9:MovieClip;
public var tut1:MovieClip;
public var mc_cursorright5:MovieClip;
public var mc_cursor10:MovieClip;
public var tut2:MovieClip;
public var roomout;
public var goRight1:MovieClip;
public var goRight2:MovieClip;
public var key00:MovieClip;
public var goRight4:MovieClip;
public var goRight5:MovieClip;
public var goRight6:MovieClip;
public var goRight7:MovieClip;
public var goRight8:MovieClip;
public var goRight9:MovieClip;
public var goRight3:MovieClip;
public var left33;
public var left34;
public var CPMStarContentSpotID:String;
public var vent:MovieClip;
public var special;
public var key11:MovieClip;
public var mc_cursor34:MovieClip;
public var key13:MovieClip;
public var mc_cursor36:MovieClip;
public var buttonBeep22:buttonBeep2;
public var FPS:MovieClip;
public var left122;
public var mc_cursor33:MovieClip;
public var left36;
public var goInLift;
public var walkthrough:MovieClip;
public var minutes:int;
public var back;
public var mc_cursorup:MovieClip;
public var goLeft1:MovieClip;
public var goLeft2:MovieClip;
public var goLeft3:MovieClip;
public var goLeft5:MovieClip;
public var goLeft6:MovieClip;
public var goLeft7:MovieClip;
public var goLeft8:MovieClip;
public var goLeft9:MovieClip;
public var left3;
public var left5;
public var goLeft:MovieClip;
public var left1;
public var left2;
public var left6;
public var left7;
public var left8;
public var left9;
public var bin;
public var right10;
public var muteB:MovieClip;
public var specialcursor:MovieClip;
public var rawr:MovieClip;
public var inventory:MovieClip;
public var textBox:TextField;
public var frame:FrameClass;
public var buttonChannel:SoundChannel;
public var screwdriver;
public var right34;
public var right33;
public var right36;
public var right1;
public var right2;
public var right3;
public var right4;
public var right5;
public var mg:MovieClip;
public var right7;
public var right8;
public var right9;
public var mc_cursorpaint:MovieClip;
public var right6;
public var back40;
public var back41;
public var sonataChannel:SoundChannel;
public var back45;
public var back46;
public var back47;
public var ripped2;
public var key0:MovieClip;
public var key1:MovieClip;
public var key2:MovieClip;
public var key3:MovieClip;
public var key5:MovieClip;
public var key6:MovieClip;
public var key8:MovieClip;
public var buttonBeep1:buttonBeep;
public var special2door:MovieClip;
public var inLift:MovieClip;
public var keypad;
public var clicksBox:TextField;
public var crs:MovieClip;
public var painting1:MovieClip;
public var mc_cursor1:MovieClip;
public var mc_cursor2:MovieClip;
public var mc_cursor5:MovieClip;
public var mc_cursor6:MovieClip;
public var mc_cursor8:MovieClip;
public var timeTaken:int;
public var mc_cursor3:MovieClip;
public var mc_cursor7:MovieClip;
public var mc_cursor9:MovieClip;
public var magglass;
public var roomout2;
public var goBackfrom:MovieClip;
public var goRight:MovieClip;
public var vent1:MovieClip;
public var mc_cursor:MovieClip;
public var mute:int;
public var right:NavButton;
public var want:Boolean;
public var rd;
public var mc_cursorright10:MovieClip;
public var transform1:SoundTransform;
public var crmg:MovieClip;
public var key;
public var gotoLiftControl;
public var tf:SoundTransform;
public var gameTimer;
public var death:MovieClip;
public var merlin:MovieClip;
public var mc_cursorright33:MovieClip;
public var mc_cursorright34:MovieClip;
public var note1;
public var mc_cursorright36:MovieClip;
public var mc_cursorbin:MovieClip;
public var staffdoor;
public var special1;
public var special2;
public var adBox:MovieClip;
public var goLeft122:MovieClip;
public var plaque;
public var painting;
public var forward:NavButton;
public var wt:MovieClip;
public var undersofa;
public var tehscores:MovieClip;
public var life:MovieClip;
public var bigroomout2:MovieClip;
public var theNext:MovieClip;
public var word:String;
public var backMochi:MovieClip;
public var gotoBigRoom;
public var goRight10:MovieClip;
public var crmgb;
public var loadText:TextField;
public var timer:int;
public var backtable;
public var liftKey:MovieClip;
public var more:MovieClip;
public var mc_cursorright:MovieClip;
public var goRight33:MovieClip;
public var goRight34:MovieClip;
public var goRight36:MovieClip;
public var outLift;
public var goLeft10:MovieClip;
public var bigroomout:MovieClip;
public var paint2:MovieClip;
public var goLeft33:MovieClip;
public var goLeft34:MovieClip;
public var mc_cursor122:MovieClip;
public var goLeft36:MovieClip;
public var sonata:moonlight_sonata;
public var tehplay:MovieClip;
public var fgn:MovieClip;
public var liftcontrol:MovieClip;
public var clicks:int;
public var fib;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 4, frame5, 5, frame6, 6, frame7, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 31, frame32, 32, frame33, 33, frame34, 35, frame36, 36, frame37, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50);
}
public function clearAll(){
key2.alpha = 0;
key1.alpha = 0;
key8.alpha = 0;
key0.alpha = 0;
key5.alpha = 0;
key13.alpha = 0;
key11.alpha = 0;
key6.alpha = 0;
key00.alpha = 0;
key3.alpha = 0;
word = "";
}
public function tehScores2(_arg1:Event){
var event = _arg1;
MochiScores.showLeaderboard({boardID:"0bafa69c7e45163c", score:playerscore, onClose:function (){
stop();
}});
}
public function timedFunction(_arg1:TimerEvent){
timeTaken++;
if (timeTaken == 60){
timeTaken = (timeTaken - 60);
minutes++;
};
if (timeTaken < 10){
timerBox.text = (((minutes + ":0") + timeTaken) + " m");
} else {
timerBox.text = (((minutes + ":") + timeTaken) + " m");
};
}
public function checkWord(){
if (word.length >= 9){
if (word == "011235813"){
buttonChannel = buttonBeep22.play(30, 0, tf);
passed.alpha = 1;
failed.alpha = 0;
gotoAndStop(30);
} else {
failed.alpha = 1;
this.clearAll();
word = "";
};
};
}
function frame10(){
painting1.addEventListener(MouseEvent.CLICK, textBox1);
painting1.buttonMode = true;
right1 = new NavButton(goRight1, 11, mc_cursorright1);
left1 = new NavButton(goLeft1, 9, mc_cursor1);
}
function frame12(){
right3 = new NavButton(goRight3, 13, mc_cursorright3);
left3 = new NavButton(goLeft3, 11, mc_cursor3);
fib = new NavButton(fib, 23, mc_cursor);
fib1.x = 377.6;
fib1.y = 213.6;
fib1.width = 32.9;
fib1.height = 13.4;
}
function frame13(){
right4 = new NavButton(goRight4, 14, mc_cursorright4);
left122 = new NavButton(goLeft122, 12, mc_cursor122);
painting = new NavButton(paint2, 27, mc_cursorpaint);
}
function frame14(){
right5 = new NavButton(goRight5, 19, mc_cursorright5);
left5 = new NavButton(goLeft5, 13, mc_cursor5);
}
function frame16(){
right7 = new NavButton(goRight7, 15, mc_cursorright7);
left7 = new NavButton(goLeft7, 17, mc_cursor7);
}
function frame17(){
gotoLiftControl = new NavButton(liftcontrol, 45, mc_cursorbin);
right8 = new NavButton(goRight8, 16, mc_cursorright8);
left8 = new NavButton(goLeft8, 18, mc_cursor8);
bin = new NavButton(bin, 28, mc_cursorbin);
}
function frame19(){
if (frame.photo){
special.visible = true;
special = new NavButton(special, 20, specialcursor);
} else {
special.visible = false;
};
right10 = new NavButton(goRight10, 18, mc_cursorright10);
left10 = new NavButton(goLeft10, 14, mc_cursor10);
}
function frame18(){
right9 = new NavButton(goRight9, 17, mc_cursorright9);
left9 = new NavButton(goLeft9, 19, mc_cursor9);
}
public function goMore(_arg1:Event){
navigateToURL(new URLRequest("http://www.freegamesnews.com"), "_blank");
}
function frame2(){
stop();
stage.frameRate = 50;
}
function frame5(){
timeTaken = 0;
minutes = 0;
clicks = 0;
gameTimer = new Timer(1000);
gameTimer.addEventListener("timer", timedFunction);
gameTimer.start();
clicksBox.visible = true;
rawr.stage.addEventListener(MouseEvent.CLICK, addClick);
stage.addEventListener(KeyboardEvent.KEY_DOWN, Inventory);
inventory.visible = false;
inventory.note1.visible = false;
inventory.mag.visible = false;
inventory.notesmall.visible = false;
inventory.screwdriver.visible = false;
inventory.rippedBig.visible = false;
inventory.ripped1.visible = false;
inventory.holPic.visible = false;
inventory.roomPic.visible = false;
inventory.roomPicBig.visible = false;
inventory.holPicBig.visible = false;
inventory.key.visible = false;
inventory.ripped2.visible = false;
inventory.rippedBig2.visible = false;
wt.addEventListener(MouseEvent.CLICK, goWalkthrough1);
wt.buttonMode = true;
mg.buttonMode = true;
mg.addEventListener(MouseEvent.CLICK, goMore1);
forward = new NavButton(vent1, 6, mc_cursor);
}
function frame6(){
tut2.visible = false;
forward = new NavButton(vent, 7, mc_cursor);
note = new gameObject(note1, frame, "a mysterious note", "note");
stage.addEventListener(MouseEvent.CLICK, checkNote);
}
function frame7(){
forward = new NavButton(vent, 8, mc_cursor);
}
function frame1(){
sonata = new moonlight_sonata();
muteB.addEventListener(MouseEvent.CLICK, goMute);
muteB.buttonMode = true;
mute = 0;
transform1 = new SoundTransform();
SoundMixer.stopAll();
stage.showDefaultContextMenu = false;
playerscore = 0;
MochiAd.showPreGameAd({clip:root, id:"1d32d408913afe4c", res:"600x600", ad_finished:function (){
this.clip.stop();
}});
MochiServices.connect("1d32d408913afe4c", root);
timer = 0;
startTimer = new Timer(1000);
startTimer.addEventListener("timer", startFunction);
startTimer.start();
if (percent == 100){
loadText.visible = false;
theNext.x = 221.3;
theNext.buttonMode = true;
theNext.gotoAndStop(2);
theNext.addEventListener(MouseEvent.CLICK, go);
};
frame = new FrameClass();
loaderInfo.addEventListener(ProgressEvent.PROGRESS, update);
stop();
CPMStarContentSpotID = "421QAD454362";
ad = new AdLoader(CPMStarContentSpotID);
adBox.addChild(ad);
}
function frame9(){
right = new NavButton(goRight, 10, mc_cursorright);
left = new NavButton(goLeft, 15, mc_cursor);
staffdoor = new NavButton(staffdoor, 21, mc_cursorup);
}
function frame3(){
sonataChannel = sonata.play(0, 10);
stop();
stage.frameRate = 50;
walkthrough.addEventListener(MouseEvent.CLICK, goWalkthrough);
walkthrough.addEventListener(MouseEvent.MOUSE_OVER, tehPlay);
walkthrough.buttonMode = true;
merlin.buttonMode = true;
more.buttonMode = true;
fgn.addEventListener(MouseEvent.CLICK, goMore);
fgn.buttonMode = true;
more.addEventListener(MouseEvent.CLICK, goMore);
more.addEventListener(MouseEvent.MOUSE_OVER, tehPlay);
merlin.addEventListener(MouseEvent.CLICK, goMerlin);
tehplay.addEventListener(MouseEvent.MOUSE_OVER, tehPlay);
tehplay.addEventListener(MouseEvent.MOUSE_DOWN, tehPlay2);
tehscores.addEventListener(MouseEvent.MOUSE_OVER, tehScores);
tehscores.addEventListener(MouseEvent.MOUSE_DOWN, tehScores2);
tehplay.buttonMode = true;
tehscores.buttonMode = true;
MochiBot.track(this, "8cec0bb3");
}
function frame23(){
plaque = new NavButton(plaque, 24, mc_cursor);
back3 = new NavButton(back2, 12, mc_cursor1);
}
function frame11(){
right2 = new NavButton(goRight2, 12, mc_cursorright2);
left2 = new NavButton(goLeft2, 10, mc_cursor2);
undersofa = new NavButton(undersofa, 25, mc_cursorup);
behindsofa = new NavButton(behindsofa, 26, mc_cursorup);
}
function frame26(){
if (frame.screwdriver == true){
screwdriver.visible = false;
} else {
screwdriver = new gameObject(screwdriver, frame, "a screwdriver", "screwdriver");
};
back5 = new NavButton(back2, 11, mc_cursor1);
}
function frame20(){
special2 = new NavButton(special2door, 38, mc_forward20);
special1 = new NavButton(special, 19, specialcursor);
}
function frame15(){
rd = new NavButton(rd, 29, mc_cursorup);
right6 = new NavButton(goRight6, 9, mc_cursorright6);
left6 = new NavButton(goLeft6, 16, mc_cursor6);
}
public function die(_arg1:Event){
if (want){
gotoAndStop(50);
} else {
textBox.text = "Woah! I don't know chinese.. Am i sure about this?";
want = true;
};
}
function frame28(){
back7 = new NavButton(back2, 17, mc_cursor1);
if (frame.ripped1 == true){
note1.visible = false;
} else {
note1 = new gameObject(note1, frame, "part of a ripped up note", "ripped1");
};
}
function frame29(){
back8 = new NavButton(back2, 15, mc_cursor1);
}
function frame21(){
keypad = new NavButton(keypad, 22, mc_cursor);
back1 = new NavButton(back1, 9, mc_cursor1);
}
function frame24(){
back2 = new NavButton(back1, 23, mc_cursor1);
}
function frame25(){
back4 = new NavButton(back2, 11, mc_cursor1);
if (frame.magglass == true){
magglass.visible = false;
} else {
magglass = new gameObject(magglass, frame, "a Magnifying Glass", "magglass");
};
}
function frame33(){
right34 = new NavButton(goRight34, 35, mc_cursorright34);
left34 = new NavButton(goLeft34, 34, mc_cursor34);
}
function frame34(){
crmgb = new NavButton(crmg, 35, mc_cursor34);
}
function frame22(){
buttonBeep1 = new buttonBeep();
buttonBeep22 = new buttonBeep2();
tf = new SoundTransform(0.1, 0);
key2.addEventListener(MouseEvent.CLICK, fun2);
key1.addEventListener(MouseEvent.CLICK, fun1);
key8.addEventListener(MouseEvent.CLICK, fun8);
key0.addEventListener(MouseEvent.CLICK, fun0);
key5.addEventListener(MouseEvent.CLICK, fun5);
key13.addEventListener(MouseEvent.CLICK, fun13);
key11.addEventListener(MouseEvent.CLICK, fun11);
key6.addEventListener(MouseEvent.CLICK, fun6);
key00.addEventListener(MouseEvent.CLICK, fun00);
key3.addEventListener(MouseEvent.CLICK, fun3);
word = "";
passed.alpha = 0;
failed.alpha = 0;
key2.buttonMode = true;
key1.buttonMode = true;
key8.buttonMode = true;
key0.buttonMode = true;
key5.buttonMode = true;
key13.buttonMode = true;
key11.buttonMode = true;
key6.buttonMode = true;
key00.buttonMode = true;
key3.buttonMode = true;
this.clearAll();
back = new NavButton(back, 21, mc_cursor1);
}
function frame36(){
right36 = new NavButton(goRight36, 15, mc_cursorright36);
left36 = new NavButton(goLeft36, 16, mc_cursor36);
}
function frame27(){
back6 = new NavButton(back2, 13, mc_cursor1);
}
function frame37(){
goBackfrom.addEventListener(MouseEvent.CLICK, goBackto);
goBackfrom.buttonMode = true;
}
function frame39(){
forward39 = new NavButton(goforward39, 40, mc_cursor);
}
function frame32(){
right33 = new NavButton(goRight33, 33, mc_cursorright33);
left33 = new NavButton(goLeft33, 33, mc_cursor33);
}
public function goBackto(_arg1:Event){
gotoAndStop(22);
}
function frame43(){
roomout = new NavButton(bigroomout, 44, mc_cursor1);
}
function frame44(){
roomout2 = new NavButton(bigroomout2, 10, mc_cursor1);
}
function frame45(){
liftKey.buttonMode = true;
liftKey.addEventListener(MouseEvent.CLICK, liftKeyr);
back45 = new NavButton(back2, 17, mc_cursor2);
}
function frame46(){
back46 = new NavButton(back2, 17, mc_cursor2);
}
function frame40(){
backtable = new NavButton(backtable, 41, mc_cursor);
back40 = new NavButton(back2, 43, mc_cursor1);
key = new gameObject(key, frame, "a key", "key");
}
function frame42(){
gotoBigRoom = new NavButton(gotoBigRoom, 39, mc_cursor);
}
function frame47(){
goInLift = new NavButton(inLift, 48, mc_cursor1);
back47 = new NavButton(back2, 17, mc_cursor2);
}
function frame48(){
death.addEventListener(MouseEvent.CLICK, die);
life.addEventListener(MouseEvent.CLICK, live);
outLift = new NavButton(liftout, 47, mc_cursor9);
want = false;
death.buttonMode = true;
life.buttonMode = true;
}
function frame50(){
textBox.text = "";
}
public function update(_arg1:ProgressEvent):void{
percent = Math.floor(((_arg1.bytesLoaded * 100) / _arg1.bytesTotal));
loadText.text = (percent + "%");
if (percent == 100){
loadText.visible = false;
theNext.x = 221.3;
theNext.buttonMode = true;
theNext.gotoAndStop(2);
theNext.addEventListener(MouseEvent.CLICK, go);
};
}
function frame49(){
textBox.text = "";
}
function frame41(){
back41 = new NavButton(back2, 43, mc_cursor1);
ripped2 = new gameObject(ripped2, frame, "the second part to the ripped note", "ripped2");
}
public function live(_arg1:Event){
if (want){
gotoAndStop(49);
} else {
textBox.text = "Woah! I don't know chinese.. Am i sure about this?";
want = true;
};
}
public function go(_arg1:Event){
gotoAndStop(2);
}
public function checkNote(_arg1:Event){
_arg1.stopImmediatePropagation();
if (frame.note){
tut1.visible = false;
tut2.visible = true;
stage.removeEventListener(MouseEvent.CLICK, checkNote);
};
}
public function Inventory(_arg1:KeyboardEvent){
if (frame.note == true){
inventory.notesmall.visible = true;
inventory.notesmall.buttonMode = true;
};
if (frame.magglass == true){
inventory.mag.visible = true;
inventory.mag.buttonMode = true;
};
if (frame.screwdriver){
inventory.screwdriver.visible = true;
inventory.screwdriver.buttonMode = true;
};
if (frame.ripped1){
inventory.ripped1.visible = true;
inventory.ripped1.buttonMode = true;
};
if (frame.photo){
inventory.roomPic.visible = true;
inventory.roomPic.buttonMode = true;
};
if (frame.photo2){
inventory.holPic.visible = true;
inventory.holPic.buttonMode = true;
};
if (frame.key){
inventory.key.visible = true;
inventory.key.buttonMode = true;
};
if (frame.ripped2){
inventory.ripped2.visible = true;
inventory.ripped2.buttonMode = true;
};
trace(_arg1.keyCode);
if (_arg1.keyCode == 32){
if (inventory.visible == false){
inventory.visible = true;
} else {
inventory.visible = false;
};
};
}
public function addClick(_arg1:MouseEvent){
clicks++;
clicksBox.text = (clicks + " clicks");
}
public function goMerlin(_arg1:Event){
navigateToURL(new URLRequest("http://www.merlingore.com/blog"));
}
public function tehPlay2(_arg1:Event){
_arg1.currentTarget.root.gotoAndStop(5);
}
public function startFunction(_arg1:Event){
timer++;
}
public function fun0(_arg1:Event){
buttonChannel = buttonBeep1.play(50, 0, tf);
word = (word + "0");
key0.alpha = 1;
checkWord();
}
public function textBox1(_arg1:Event){
_arg1.currentTarget.root.textBox.text = "A strange looking painting...";
}
public function fun5(_arg1:Event){
buttonChannel = buttonBeep1.play(50, 0, tf);
word = (word + "5");
key5.alpha = 1;
checkWord();
}
public function fun6(_arg1:Event){
buttonChannel = buttonBeep1.play(50, 0, tf);
word = (word + "6");
key6.alpha = 1;
checkWord();
}
public function fun2(_arg1:Event){
buttonChannel = buttonBeep1.play(50, 0, tf);
word = (word + "2");
key2.alpha = 1;
checkWord();
}
public function fun3(_arg1:Event){
buttonChannel = buttonBeep1.play(50, 0, tf);
word = (word + "3");
key3.alpha = 1;
checkWord();
}
public function fun8(_arg1:Event){
buttonChannel = buttonBeep1.play(50, 0, tf);
word = (word + "8");
key8.alpha = 1;
checkWord();
}
public function fun1(_arg1:Event){
buttonChannel = buttonBeep1.play(50, 0, tf);
word = (word + "1");
key1.alpha = 1;
checkWord();
}
public function goWalkthrough(_arg1:Event){
navigateToURL(new URLRequest("http://www.freegamesnews.com/en/?page_id=7782"));
}
public function tehScores(_arg1:Event){
_arg1.currentTarget.gotoAndPlay(2);
}
public function goMute(_arg1:Event){
if (mute == 0){
transform1.volume = 0;
SoundMixer.soundTransform = transform1;
muteB.gotoAndStop(2);
mute = 1;
} else {
transform1.volume = 1;
SoundMixer.soundTransform = transform1;
muteB.gotoAndStop(1);
mute = 0;
};
}
public function goMore1(_arg1:Event){
navigateToURL(new URLRequest("http://www.freegamesnews.com"), "_blank");
}
public function liftKeyr(_arg1:Event){
MovieClip(root).textBox.text = "Looks like i'll need the lift key to make it work.";
}
public function fun00(_arg1:Event){
buttonChannel = buttonBeep1.play(50, 0, tf);
clearAll();
}
public function goWalkthrough1(_arg1:Event){
navigateToURL(new URLRequest("http://www.freegamesnews.com/en/?page_id=7782"));
}
public function fun11(_arg1:Event){
buttonChannel = buttonBeep1.play(50, 0, tf);
word = (word + "1");
key11.alpha = 1;
checkWord();
}
public function fun13(_arg1:Event){
buttonChannel = buttonBeep1.play(50, 0, tf);
word = (word + "13");
key13.alpha = 1;
checkWord();
}
public function tehPlay(_arg1:Event){
_arg1.currentTarget.gotoAndPlay(2);
}
}
}//package Corridor2_fla
Section 9
//mc_93 (Corridor2_fla.mc_93)
package Corridor2_fla {
import flash.display.*;
import flash.events.*;
import AS.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class mc_93 extends MovieClip {
public var cr:MovieClip;
public var circularRoom1;
public var circularRoom2;
public var mc_cursor:MovieClip;
public function mc_93(){
addFrameScript(68, frame69);
}
function frame69(){
if (MovieClip(root).frame.crseen == true){
circularRoom1 = new NavButton(cr, 35, mc_cursor);
} else {
circularRoom2 = new NavButton(cr, 31, mc_cursor);
};
stop();
}
}
}//package Corridor2_fla
Section 10
//mc_99 (Corridor2_fla.mc_99)
package Corridor2_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class mc_99 extends MovieClip {
public var ctn:MovieClip;
public function mc_99(){
addFrameScript(0, frame1, 16, frame17, 17, frame18, 66, frame67);
}
function frame17(){
MovieClip(root).textBox.text = "What a strange room..";
stop();
ctn.buttonMode = true;
ctn.addEventListener(MouseEvent.CLICK, tehnext);
}
function frame1(){
this.stage.frameRate = 30;
}
public function tehnext(_arg1:Event){
gotoAndPlay(18);
}
function frame18(){
MovieClip(root).textBox.text = "Oh no! The door!";
}
function frame67(){
stop();
this.stage.frameRate = 50;
MovieClip(root).textBox.text = "The door must have been on a timer!";
MovieClip(root).gotoAndStop(32);
MovieClip(root).frame.crseen = true;
}
}
}//package Corridor2_fla
Section 11
//MerlinLogo_8 (Corridor2_fla.MerlinLogo_8)
package Corridor2_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class MerlinLogo_8 extends MovieClip {
public var link:MovieClip;
public function MerlinLogo_8(){
addFrameScript(0, frame1, 113, frame114);
}
function frame1(){
link.buttonMode = true;
link.addEventListener(MouseEvent.CLICK, url);
}
function frame114(){
MovieClip(root).gotoAndStop(3);
}
public function url(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.merlingore.com"), "_blank");
}
}
}//package Corridor2_fla
Section 12
//Symbol101_143 (Corridor2_fla.Symbol101_143)
package Corridor2_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Symbol101_143 extends MovieClip {
public var death:MovieClip;
public var more:MovieClip;
public var life:MovieClip;
public var MainMenu:MovieClip;
public function Symbol101_143(){
addFrameScript(12, frame13);
}
public function goMenu(_arg1:Event){
MovieClip(root).gotoAndStop(9);
}
public function tehPlay(_arg1:Event){
_arg1.currentTarget.gotoAndPlay(2);
}
function frame13(){
MainMenu.addEventListener(MouseEvent.CLICK, goMenu);
MainMenu.buttonMode = true;
stop();
more.buttonMode = true;
more.addEventListener(MouseEvent.CLICK, goMore);
more.addEventListener(MouseEvent.MOUSE_OVER, tehPlay);
}
public function goMore(_arg1:Event){
navigateToURL(new URLRequest("http://www.freegamesnews.com"), "_blank");
}
}
}//package Corridor2_fla
Section 13
//Symbol103_14 (Corridor2_fla.Symbol103_14)
package Corridor2_fla {
import flash.display.*;
public dynamic class Symbol103_14 extends MovieClip {
public function Symbol103_14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Corridor2_fla
Section 14
//Symbol107_15 (Corridor2_fla.Symbol107_15)
package Corridor2_fla {
import flash.display.*;
public dynamic class Symbol107_15 extends MovieClip {
public function Symbol107_15(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package Corridor2_fla
Section 15
//Symbol112_17 (Corridor2_fla.Symbol112_17)
package Corridor2_fla {
import flash.display.*;
public dynamic class Symbol112_17 extends MovieClip {
public function Symbol112_17(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package Corridor2_fla
Section 16
//Symbol115_20 (Corridor2_fla.Symbol115_20)
package Corridor2_fla {
import flash.display.*;
public dynamic class Symbol115_20 extends MovieClip {
public function Symbol115_20(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package Corridor2_fla
Section 17
//Symbol118_4 (Corridor2_fla.Symbol118_4)
package Corridor2_fla {
import flash.display.*;
public dynamic class Symbol118_4 extends MovieClip {
public function Symbol118_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Corridor2_fla
Section 18
//Symbol12_59 (Corridor2_fla.Symbol12_59)
package Corridor2_fla {
import flash.display.*;
import AS.*;
import flash.media.*;
public dynamic class Symbol12_59 extends MovieClip {
public var right;
public var ventNoise:ventscratch;
public var mc_cursorleft:MovieClip;
public var left;
public var ventChannel:SoundChannel;
public var landing:ventLanding;
public var mc_cursorright:MovieClip;
public var tf1:SoundTransform;
public function Symbol12_59(){
addFrameScript(0, frame1, 35, frame36, 60, frame61);
}
function frame1(){
ventNoise = new ventscratch();
landing = new ventLanding();
tf1 = new SoundTransform(0.1, 0);
ventChannel = ventNoise.play(280);
}
function frame36(){
ventChannel = landing.play(100);
}
function frame61(){
stop();
left = new NavButton(left, 9, mc_cursorleft);
right = new NavButton(right, 10, mc_cursorright);
}
}
}//package Corridor2_fla
Section 19
//Symbol121_5 (Corridor2_fla.Symbol121_5)
package Corridor2_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class Symbol121_5 extends MovieClip {
public var freegamesnews:MovieClip;
public function Symbol121_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
freegamesnews.buttonMode = true;
freegamesnews.addEventListener(MouseEvent.CLICK, goFree);
}
public function goFree(_arg1:Event){
navigateToURL(new URLRequest("http://www.freegamesnews.com"), "_blank");
}
}
}//package Corridor2_fla
Section 20
//Symbol123_6 (Corridor2_fla.Symbol123_6)
package Corridor2_fla {
import flash.display.*;
public dynamic class Symbol123_6 extends MovieClip {
public function Symbol123_6(){
addFrameScript(124, frame125);
}
function frame125(){
MovieClip(parent).gotoAndStop(2);
}
}
}//package Corridor2_fla
Section 21
//Symbol49_1 (Corridor2_fla.Symbol49_1)
package Corridor2_fla {
import flash.display.*;
public dynamic class Symbol49_1 extends MovieClip {
public function Symbol49_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Corridor2_fla
Section 22
//Symbol58_106 (Corridor2_fla.Symbol58_106)
package Corridor2_fla {
import flash.display.*;
import flash.events.*;
import AS.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Symbol58_106 extends MovieClip {
public var buttons:String;
public var mc_cursorbin:MovieClip;
public var backButtons:MovieClip;
public var goRight8:MovieClip;
public var photo;
public var backbuttons:MovieClip;
public var photo1:MovieClip;
public var button3:MovieClip;
public var out:MovieClip;
public var hole:MovieClip;
public var button4:MovieClip;
public var goOut;
public var button2:MovieClip;
public var backBtn2:MovieClip;
public var backBtn3:MovieClip;
public var peg1:MovieClip;
public var backBtn5:MovieClip;
public var peg3:MovieClip;
public var peg4:MovieClip;
public var peg5:MovieClip;
public var backBtn4:MovieClip;
public var peg2:MovieClip;
public var backBtn6:MovieClip;
public var button1:MovieClip;
public var frame:int;
public var mc_cursor1:MovieClip;
public var photo2;
public function Symbol58_106(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 8, frame9, 29, frame30, 30, frame31);
}
function frame1(){
peg1.addEventListener(MouseEvent.CLICK, fpeg1);
peg2.addEventListener(MouseEvent.CLICK, fpeg2);
peg3.addEventListener(MouseEvent.CLICK, fpeg3);
peg4.addEventListener(MouseEvent.CLICK, fpeg4);
peg5.addEventListener(MouseEvent.CLICK, fpeg5);
peg1.buttonMode = true;
peg2.buttonMode = true;
peg3.buttonMode = true;
peg4.buttonMode = true;
peg5.buttonMode = true;
stop();
frame = 0;
}
function frame30(){
hole.addEventListener(MouseEvent.CLICK, goHole);
hole.buttonMode = true;
goOut = new NavButton(out, 36, mc_cursorbin);
this.stage.frameRate = 50;
stop();
}
function frame31(){
goRight8.addEventListener(MouseEvent.CLICK, goRightt);
goRight8.buttonMode = true;
if (MovieClip(root).frame.photo == true){
photo1.visible = false;
} else {
photo = new gameObject(photo1, MovieClip(root).frame, "an old photo", "photo");
};
if (MovieClip(root).frame.photo2 == true){
photo2.visible = false;
} else {
photo2 = new gameObject(photo2, MovieClip(root).frame, "a holiday photo", "photo2");
};
}
public function goBack1(_arg1:Event){
gotoAndStop(frame);
}
public function goBack2(_arg1:Event){
gotoAndStop(7);
}
public function goBack4(_arg1:Event){
gotoAndStop(7);
}
public function goBack5(_arg1:Event){
gotoAndStop(7);
}
public function goBack6(_arg1:Event){
gotoAndStop(7);
}
public function goBack3(_arg1:Event){
gotoAndStop(7);
}
public function fpeg1(_arg1:MouseEvent){
gotoAndStop(2);
}
public function fpeg2(_arg1:MouseEvent){
gotoAndStop(3);
}
public function fpeg5(_arg1:MouseEvent){
gotoAndStop(6);
}
public function but4(_arg1:Event){
buttons = (buttons + "4");
button4.alpha = 1;
checkButton();
}
public function fpeg3(_arg1:MouseEvent){
gotoAndStop(4);
}
public function fpeg4(_arg1:MouseEvent){
gotoAndStop(5);
}
public function but3(_arg1:Event){
buttons = (buttons + "1");
button3.alpha = 1;
checkButton();
}
function frame2(){
peg1.addEventListener(MouseEvent.CLICK, fpeg1);
peg2.addEventListener(MouseEvent.CLICK, fpeg2);
peg3.addEventListener(MouseEvent.CLICK, fpeg3);
peg4.addEventListener(MouseEvent.CLICK, fpeg4);
peg5.addEventListener(MouseEvent.CLICK, fpeg5);
peg1.buttonMode = true;
peg2.buttonMode = true;
peg3.buttonMode = true;
peg4.buttonMode = true;
peg5.buttonMode = true;
backBtn2.addEventListener(MouseEvent.CLICK, goBack2);
backBtn2.buttonMode = true;
frame = 2;
}
public function checkButton(){
if (buttons.length >= 3){
if (buttons == "111"){
MovieClip(root).textBox.text = "Yes!";
gotoAndPlay(9);
} else {
buttons = "";
button1.alpha = 0;
button2.alpha = 0;
button3.alpha = 0;
button4.alpha = 0;
MovieClip(root).textBox.text = "Nothing happened..";
};
};
}
public function goHole(_arg1:Event){
gotoAndStop(31);
}
function frame4(){
peg1.addEventListener(MouseEvent.CLICK, fpeg1);
peg2.addEventListener(MouseEvent.CLICK, fpeg2);
peg3.addEventListener(MouseEvent.CLICK, fpeg3);
peg4.addEventListener(MouseEvent.CLICK, fpeg4);
peg5.addEventListener(MouseEvent.CLICK, fpeg5);
peg1.buttonMode = true;
peg2.buttonMode = true;
peg3.buttonMode = true;
peg4.buttonMode = true;
peg5.buttonMode = true;
backBtn4.addEventListener(MouseEvent.CLICK, goBack4);
backBtn4.buttonMode = true;
frame = 4;
}
public function goRightt(_arg1:Event){
gotoAndStop(30);
}
function frame6(){
peg1.addEventListener(MouseEvent.CLICK, fpeg1);
peg2.addEventListener(MouseEvent.CLICK, fpeg2);
peg3.addEventListener(MouseEvent.CLICK, fpeg3);
peg4.addEventListener(MouseEvent.CLICK, fpeg4);
peg5.addEventListener(MouseEvent.CLICK, fpeg5);
peg1.buttonMode = true;
peg2.buttonMode = true;
peg3.buttonMode = true;
peg4.buttonMode = true;
peg5.buttonMode = true;
backBtn6.addEventListener(MouseEvent.CLICK, goBack6);
backBtn6.buttonMode = true;
frame = 6;
}
function frame7(){
button1.buttonMode = true;
button2.buttonMode = true;
button3.buttonMode = true;
button4.buttonMode = true;
backButtons.buttonMode = true;
button1.alpha = 0;
button2.alpha = 0;
button3.alpha = 0;
button4.alpha = 0;
button1.addEventListener(MouseEvent.CLICK, but1);
button2.addEventListener(MouseEvent.CLICK, but2);
button3.addEventListener(MouseEvent.CLICK, but3);
button4.addEventListener(MouseEvent.CLICK, but4);
backButtons.addEventListener(MouseEvent.CLICK, goBack1);
backButtons.buttonMode = true;
buttons = "";
}
public function but2(_arg1:Event){
buttons = (buttons + "1");
button2.alpha = 1;
checkButton();
}
function frame3(){
peg1.addEventListener(MouseEvent.CLICK, fpeg1);
peg2.addEventListener(MouseEvent.CLICK, fpeg2);
peg3.addEventListener(MouseEvent.CLICK, fpeg3);
peg4.addEventListener(MouseEvent.CLICK, fpeg4);
peg5.addEventListener(MouseEvent.CLICK, fpeg5);
peg1.buttonMode = true;
peg2.buttonMode = true;
peg3.buttonMode = true;
peg4.buttonMode = true;
peg5.buttonMode = true;
backBtn3.addEventListener(MouseEvent.CLICK, goBack3);
backBtn3.buttonMode = true;
frame = 3;
}
function frame5(){
peg1.addEventListener(MouseEvent.CLICK, fpeg1);
peg2.addEventListener(MouseEvent.CLICK, fpeg2);
peg3.addEventListener(MouseEvent.CLICK, fpeg3);
peg4.addEventListener(MouseEvent.CLICK, fpeg4);
peg5.addEventListener(MouseEvent.CLICK, fpeg5);
peg1.buttonMode = true;
peg2.buttonMode = true;
peg3.buttonMode = true;
peg4.buttonMode = true;
peg5.buttonMode = true;
backBtn5.addEventListener(MouseEvent.CLICK, goBack5);
backBtn5.buttonMode = true;
frame = 5;
}
function frame9(){
this.stage.frameRate = 30;
}
public function but1(_arg1:Event){
buttons = (buttons + "1");
button1.alpha = 1;
checkButton();
}
}
}//package Corridor2_fla
Section 23
//Symbol71_39 (Corridor2_fla.Symbol71_39)
package Corridor2_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Symbol71_39 extends MovieClip {
public var holPic:MovieClip;
public var rippedBig:MovieClip;
public var roomPicBig:MovieClip;
public var mag:MovieClip;
public var notesmall:MovieClip;
public var ripped1:MovieClip;
public var ripped2:MovieClip;
public var key:MovieClip;
public var rippedBig2:MovieClip;
public var roomPic:MovieClip;
public var holPicBig:MovieClip;
public var screwdriver:MovieClip;
public var note1:MovieClip;
public function Symbol71_39(){
addFrameScript(0, frame1);
}
public function closeRip(_arg1:Event){
rippedBig.visible = false;
}
public function closeRip2(_arg1:Event){
rippedBig2.visible = false;
}
public function closeroom(_arg1:Event){
roomPicBig.visible = false;
}
function frame1(){
holPicBig.addEventListener(MouseEvent.CLICK, closehol);
roomPicBig.addEventListener(MouseEvent.CLICK, closeroom);
rippedBig2.addEventListener(MouseEvent.CLICK, closeRip2);
rippedBig.addEventListener(MouseEvent.CLICK, closeRip);
note1.addEventListener(MouseEvent.CLICK, closeNote);
stage.addEventListener(KeyboardEvent.KEY_DOWN, doStuff);
}
public function closehol(_arg1:Event){
holPicBig.visible = false;
}
public function doStuff(_arg1:KeyboardEvent){
var showNote:Function;
var showripped1:Function;
var showripped2:Function;
var showholPic:Function;
var showroomPic:Function;
var useMag:Function;
var useScrewdriver:Function;
var useKey:Function;
var e = _arg1;
showNote = function (_arg1:Event){
note1.visible = true;
};
showripped1 = function (_arg1:Event){
rippedBig.visible = true;
};
showripped2 = function (_arg1:Event){
rippedBig2.visible = true;
};
showholPic = function (_arg1:Event){
holPicBig.visible = true;
};
showroomPic = function (_arg1:Event){
roomPicBig.visible = true;
};
useMag = function (_arg1:Event){
_arg1.stopImmediatePropagation();
MovieClip(root).inventory.visible = false;
if (MovieClip(root).currentFrame == 22){
MovieClip(root).gotoAndStop(37);
} else {
MovieClip(root).textBox.text = "I have no use for this here..";
};
};
useScrewdriver = function (_arg1:Event){
_arg1.stopImmediatePropagation();
MovieClip(root).inventory.visible = false;
MovieClip(root).textBox.text = "I have no use for this here..";
};
useKey = function (_arg1:Event){
_arg1.stopImmediatePropagation();
MovieClip(root).inventory.visible = false;
if (MovieClip(root).currentFrame == 45){
MovieClip(root).gotoAndStop(46);
} else {
MovieClip(root).textBox.text = "I have no use for this here..";
};
};
if (notesmall.buttonMode){
notesmall.addEventListener(MouseEvent.CLICK, showNote);
};
if (mag.buttonMode){
mag.addEventListener(MouseEvent.CLICK, useMag);
};
if (screwdriver.buttonMode){
screwdriver.addEventListener(MouseEvent.CLICK, useScrewdriver);
};
if (ripped1.buttonMode){
ripped1.addEventListener(MouseEvent.CLICK, showripped1);
};
if (ripped2.buttonMode){
ripped2.addEventListener(MouseEvent.CLICK, showripped2);
};
if (holPic.buttonMode){
holPic.addEventListener(MouseEvent.CLICK, showholPic);
};
if (roomPic.buttonMode){
roomPic.addEventListener(MouseEvent.CLICK, showroomPic);
};
if (key.buttonMode){
key.addEventListener(MouseEvent.CLICK, useKey);
};
}
public function closeNote(_arg1:Event){
note1.visible = false;
}
}
}//package Corridor2_fla
Section 24
//Symbol73copy4_50 (Corridor2_fla.Symbol73copy4_50)
package Corridor2_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Symbol73copy4_50 extends MovieClip {
public var toprip:MovieClip;
public function Symbol73copy4_50(){
addFrameScript(0, frame1);
}
function frame1(){
stage.addEventListener(KeyboardEvent.KEY_DOWN, check33);
}
public function check33(_arg1:Event){
if (MovieClip(root).frame.ripped1){
toprip.visible = true;
} else {
toprip.visible = false;
};
}
}
}//package Corridor2_fla
Section 25
//Symbol79_124 (Corridor2_fla.Symbol79_124)
package Corridor2_fla {
import flash.display.*;
public dynamic class Symbol79_124 extends MovieClip {
public function Symbol79_124(){
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(root).gotoAndStop(42);
}
}
}//package Corridor2_fla
Section 26
//Symbol89_132 (Corridor2_fla.Symbol89_132)
package Corridor2_fla {
import flash.display.*;
public dynamic class Symbol89_132 extends MovieClip {
public function Symbol89_132(){
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(root).gotoAndStop(47);
}
}
}//package Corridor2_fla
Section 27
//Symbol94_138 (Corridor2_fla.Symbol94_138)
package Corridor2_fla {
import flash.display.*;
import flash.events.*;
import mochi.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Symbol94_138 extends MovieClip {
public var scorePage:MovieClip;
public var finalScore:TextField;
public var more:MovieClip;
public var submit:MovieClip;
public var submit1:MovieClip;
public var backMochi:MovieClip;
public var clicksBox:TextField;
public var timeTakenBox:TextField;
public var playerScore:int;
public var theClicks;
public var seconds:int;
public function Symbol94_138(){
addFrameScript(19, frame20, 20, frame21);
}
public function goScore(_arg1:MouseEvent){
gotoAndStop(21);
}
public function submitScore(_arg1:Event){
var e = _arg1;
MochiScores.showLeaderboard({boardID:"0bafa69c7e45163c", score:playerScore, onClose:function (){
stop();
}});
}
public function goMore(_arg1:Event){
navigateToURL(new URLRequest("http://www.freegamesnews.com"), "_blank");
}
public function tehPlay(_arg1:Event){
_arg1.currentTarget.gotoAndPlay(2);
}
function frame21(){
more.buttonMode = true;
more.addEventListener(MouseEvent.CLICK, goMore);
more.addEventListener(MouseEvent.MOUSE_OVER, tehPlay);
seconds = ((MovieClip(root).minutes * 60) + MovieClip(root).timeTaken);
timeTakenBox.text = (seconds + " Seconds");
clicksBox.text = (theClicks + " Clicks");
playerScore = Math.round((100000 / (seconds + theClicks)));
finalScore.text = (("" + playerScore) + " Points");
submit1.buttonMode = true;
submit1.addEventListener(MouseEvent.CLICK, submitScore);
}
function frame20(){
MovieClip(root).gameTimer.stop();
MovieClip(root).timerBox.visible = false;
MovieClip(root).clicksBox.visible = false;
MovieClip(root).textBox.visible = false;
theClicks = MovieClip(root).clicks;
scorePage.buttonMode = true;
scorePage.addEventListener(MouseEvent.CLICK, goScore);
stop();
}
}
}//package Corridor2_fla
Section 28
//ventIntro_27 (Corridor2_fla.ventIntro_27)
package Corridor2_fla {
import flash.display.*;
public dynamic class ventIntro_27 extends MovieClip {
public function ventIntro_27(){
addFrameScript(179, frame180);
}
function frame180(){
MovieClip(root).gotoAndStop(5);
}
}
}//package Corridor2_fla
Section 29
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class AdLoader extends Sprite {
private var cpmstarLoader:Loader;
private var contentspotid:String;
public function AdLoader(_arg1:String){
this.contentspotid = _arg1;
addEventListener(Event.ADDED, addedHandler);
}
private function dispatchHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
private function addedHandler(_arg1:Event):void{
removeEventListener(Event.ADDED, addedHandler);
Security.allowDomain("server.cpmstar.com");
var _local2 = "http://server.cpmstar.com/adviewas3.swf";
var _local3:DisplayObjectContainer = parent;
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler);
cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler);
cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid)));
addChild(cpmstarLoader);
}
}
}//package CPMStar
Section 30
//MochiDigits (mochi.MochiDigits)
package mochi {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function reencode():void{
var _local1:uint = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function toString():String{
var _local1:String = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function get value():Number{
return (Number(this.toString()));
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi
Section 31
//MochiScores (mochi.MochiScores)
package mochi {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public static function showLeaderboard(_arg1:Object=null):void{
var n:Number;
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
} else {
if ((options.score is MochiDigits)){
options.score = options.score.value;
};
};
n = Number(options.score);
if (isNaN(n)){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(n) != n){
trace((("WARNING: Submitted score '" + options.score) + "' will be truncated"));
};
options.score = n;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
var _local2:Object = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
_arg1 = Number(_arg1);
if (isNaN(_arg1)){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(_arg1) != _arg1){
trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated"));
};
_arg1 = Number(_arg1);
};
};
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi
Section 32
//MochiServices (mochi.MochiServices)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.geom.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__ms_";
private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
public static var netup:Boolean = true;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local4:int;
var _local14:Loader;
var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
var _local6:Array = [0, 64, 0, 0, 0];
var _local7:MovieClip = new MovieClip();
var _local8:LocalConnection = new LocalConnection();
var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime()));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
var _local10:ByteArray = new ByteArray();
var _local11:ByteArray = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
var _local12:uint = ((_local3.length + _local11.length) + 4);
var _local13:uint = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var avm1Click:DisplayObject;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
var vars:Object = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
var s = "?";
var i:Number = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
var _local2:Rectangle = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_listenChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
};
return (_local2);
}
public static function getVersion():String{
return ("1.43");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
public static function get id():String{
return (_id);
}
private static function urlOptions(_arg1:Object):Object{
var _local4:Array;
var _local5:Number;
var _local6:Array;
var _local2:Object = {};
var _local3:String = _arg1.loaderInfo.parameters.mochiad_options;
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = this.client._callbacks[cb];
if (!cblst){
return;
};
var method:* = cblst.callbackMethod;
methodName = "";
var obj:Object = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
trace("connected!");
_connecting = false;
_connected = true;
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var id = _arg1;
var clip = _arg2;
var clipname:String = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(clip).servicesURL != undefined){
_servicesURL = urlOptions(clip).servicesURL;
};
MochiServices.allowDomains(_servicesURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
_timer = new Timer(1000, 0);
_startTime = getTimer();
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
var f:Function = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999))));
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
var req:URLRequest = new URLRequest(_servicesURL);
var vars:URLVariables = new URLVariables();
vars.listenLC = _listenChannelName;
vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options;
req.data = vars;
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_clip._nextcallbackID = 0;
_clip._callbacks = {};
listen();
return (_clip);
}
public static function get clip():Object{
return (_container);
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
var mc:MovieClip = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
public static function connectWait(_arg1:TimerEvent):void{
if ((getTimer() - _startTime) > 10000){
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_timer.stop();
};
}
}
}//package mochi
Section 33
//buttonBeep (buttonBeep)
package {
import flash.media.*;
public dynamic class buttonBeep extends Sound {
}
}//package
Section 34
//buttonBeep2 (buttonBeep2)
package {
import flash.media.*;
public dynamic class buttonBeep2 extends Sound {
}
}//package
Section 35
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.7");
}
public static function showClickAwayAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
var sendHostProgress:Boolean;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
var idx:Number = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var clip:Object;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
var depth:Number = options.depth;
delete options.depth;
var mc:MovieClip = createEmptyMovieClip(clip, "_mochiad", depth);
var wh:Array = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
var lv:URLVariables = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local6:Array;
var _local3:Object = _arg2.getBounds(_arg2.root);
var _local4:Number = 0;
var _local5:Number = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array = _arg2.split(".");
var _local4:Number = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var complete:Boolean;
var unloaded:Boolean;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
var fn:Function = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
var bar_color:Number = options.color;
delete options.color;
var bar_background:Number = options.background;
delete options.background;
var bar_outline:Number = options.outline;
delete options.outline;
var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1);
var backing:Object = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2);
var inside:Object = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3);
var outline:Object = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
var f:Function = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
var _local1:Object = this.parent.parent.root;
var _local2:Object = this.parent._mochiad_ctr;
var _local3:Number = (getTimer() - this.started);
var _local4:Boolean;
var _local5:Number = _local1.loaderInfo.bytesTotal;
var _local6:Number = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
var _local7:Number = ((100 * _local6) / _local5);
var _local8:Number = ((100 * _local3) / chk.ad_msec);
var _local9:Object = this._mochiad_bar._inside;
var _local10:Number = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var mc = _arg1;
var f:Function = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 36
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 37
//moonlight_sonata (moonlight_sonata)
package {
import flash.media.*;
public dynamic class moonlight_sonata extends Sound {
}
}//package
Section 38
//ventLanding (ventLanding)
package {
import flash.media.*;
public dynamic class ventLanding extends Sound {
}
}//package
Section 39
//ventscratch (ventscratch)
package {
import flash.media.*;
public dynamic class ventscratch extends Sound {
}
}//package