Section 1
//Ghost (com.Heroes.Ghost)
package com.Heroes {
import flash.events.*;
import com.*;
import com.Objects.Render.*;
import flash.utils.*;
public class Ghost extends Wall {
private var channel:SndChannel;
private var posX:int;
private var posY:int;
private var sound3:sGhostD;
private var sound:sGhostA;
private var channel3:SndChannel;
private var sound2:sGhostS;
private var dx:Number;
private var dy:Number;
private var channel2:SndChannel;
private var atan:Number;
private var nextX:int;// = 0
private var nextY:int;// = 0
private var timer:Timer;
private var fs:Boolean;// = true
private var ft:Boolean;// = true
private var stat:String;// = "positive"
var grad:Number;
private var speedX:Number;// = 0
private var speedY:Number;// = 0
private var dead:Boolean;// = false
private var hyp:Number;
public function Ghost(){
addFrameScript(14, frame15, 20, frame21, 44, frame45, 71, frame72, 84, frame85);
timer = new Timer(1000, 0);
posX = this.x;
posY = this.y;
addEventListener(Event.ENTER_FRAME, efl);
sound = new sGhostA();
channel = new SndChannel(sound, true, false);
channel.maxV = 0.6;
sound2 = new sGhostS();
channel2 = new SndChannel(sound2, false, false);
channel2.maxV = 0.6;
sound3 = new sGhostD();
channel3 = new SndChannel(sound3, true, false);
channel3.maxV = 1;
Game.masterHero.parent.floorCont.push(this);
}
function frame45(){
stat = "negative";
gotoAndPlay(1);
}
function frame85(){
stop();
}
function frame72(){
this.sPlay("dead");
}
public function re(){
this.gotoAndPlay("re");
sPlay("start");
}
override public function pauseIt(_arg1:Boolean){
if (_arg1){
if (!dead){
removeEventListener(Event.ENTER_FRAME, efl);
timer.stop();
this.stop();
};
} else {
if (!dead){
timer.start();
this.play();
addEventListener(Event.ENTER_FRAME, efl);
};
};
}
public function sPlay(_arg1:String){
switch (_arg1){
case "attack":
channel.sPlay(this.x, this.y);
break;
case "start":
channel2.sPlay(this.x, this.y);
break;
case "dead":
channel3.sPlay(this.x, this.y);
break;
case "attack2":
channel.sPlay((this.x + Object(parent).x), (this.y + Object(parent).y));
break;
};
}
public function attack(){
if ((((((hyp < ((this.width / 2) + 30))) && (!(Game.masterHero.jumping)))) && (Game.masterHero.dam))){
Game.masterHero.damage();
};
}
function frame15(){
gotoAndPlay(1);
}
private function efl(_arg1:Event):void{
dx = ((Game.masterHero.x - Object(parent).x) - this.x);
dy = ((Game.masterHero.y - Object(parent).y) - this.y);
hyp = Math.sqrt(((dx * dx) + (dy * dy)));
var _local2:String = stat;
if ((((((hyp < ((this.width / 2) + 130))) && (!(Game.masterHero.hold)))) && (!((stat == "null"))))){
stat = "negative";
if (fs){
fs = false;
};
} else {
if ((((hyp > ((this.width / 2) + 130))) || (((Game.masterHero.hold) && (!((stat == "null"))))))){
stat = "positive";
if (!fs){
fs = true;
};
};
};
if (stat != _local2){
ft = true;
speedX = 0;
speedY = 0;
};
switch (stat){
case "positive":
if (ft){
timer.stop();
timer.reset();
speedX = 0;
speedY = 0;
timer.start();
ft = false;
};
if (timer.currentCount > 2){
timer.stop();
timer.reset();
nextX = ((posX - 100) + (Math.random() * 200));
nextY = ((posY - 100) + (Math.random() * 200));
dx = (nextX - this.x);
dy = (nextY - this.y);
atan = Math.atan2(dy, dx);
hyp = Math.sqrt(((dx * dx) + (dy * dy)));
grad = ((atan * 180) / Math.PI);
this.rotation = (grad + 180);
speedX = (Math.cos(atan) * 3);
speedY = (Math.sin(atan) * 3);
};
this.x = (this.x + speedX);
this.y = (this.y + speedY);
dx = (this.x - nextX);
dy = (this.y - nextY);
hyp = Math.sqrt(((dx * dx) + (dy * dy)));
if ((((hyp < 10)) && (((!((speedX == 0))) || (!((speedY == 0))))))){
speedX = 0;
speedY = 0;
ft = true;
};
break;
case "negative":
atan = Math.atan2(dy, dx);
grad = ((atan * 180) / Math.PI);
this.rotation = (grad + 180);
if (ft){
speedX = (Math.cos(atan) * 5);
speedY = (Math.sin(atan) * 5);
this.x = (this.x + speedX);
this.y = (this.y + speedY);
};
hyp = Math.sqrt(((dx * dx) + (dy * dy)));
if (hyp < ((this.width / 2) + 30)){
ft = false;
speedX = 0;
speedY = 0;
if (!Game.masterHero.free){
this.gotoAndPlay("attack");
sPlay("attack");
stat = "null";
} else {
stat = "positive";
ft = true;
};
} else {
ft = true;
};
break;
};
var _local3:Number = ((Math.abs((this.rotation - ((this.rotation % 90) * 2))) * 100) / 90);
wz = ((106 - ((31 / 100) * _local3)) * this.scaleX);
hz = ((75 + ((31 / 100) * _local3)) * this.scaleY);
if ((((Game.masterHero.stat == "attack")) && (!((mot == "free"))))){
if ((((mot == "right")) || ((mot == "left")))){
Game.masterHero.rebound(-1, 1);
} else {
if ((((mot == "up")) || ((mot == "down")))){
Game.masterHero.rebound(1, -1);
};
};
this.rotation = 0;
destroy();
this.gotoAndPlay("dead");
dead = true;
};
}
function frame21(){
attack();
}
override public function destroy(){
deactivateIt();
removeEventListener(Event.ENTER_FRAME, efl);
timer.stop();
}
override public function activateIt():void{
if (dead){
dead = false;
this.gotoAndPlay("re");
activateThis();
stat = "positive";
addEventListener(Event.ENTER_FRAME, efl);
};
}
}
}//package com.Heroes
Section 2
//Turtle (com.Heroes.Turtle)
package com.Heroes {
import flash.events.*;
import flash.display.*;
import com.*;
import flash.utils.*;
public class Turtle extends Hero {
private var channel:SndChannel;
private var sound3:sFallTurtle;
private var sound4:sDamage;
private var py:Number;
private var sound2:sAttack;
public var life:int;// = 3
private var channel2:SndChannel;
public var dam:Boolean;// = true
private var channel4:SndChannel;
private var damegeTimer:Timer;
private var dx:Number;
private var rad:Number;
private var sound:sJump;
private var channel3:SndChannel;
private var dy:Number;
private var atan:Number;
private var px:Number;
private var gameZone:Sprite;
private var pauseStat:String;
public function Turtle(_arg1:Sprite){
addFrameScript(0, frame1, 6, frame7, 12, frame13, 26, frame27, 34, frame35, 35, frame36, 52, frame53, 61, frame62, 62, frame63, 102, frame103, 127, frame128, 128, frame129, 169, frame170, 170, frame171, 213, frame214, 279, frame280, 479, frame480, 480, frame481, 520, frame521);
this.scaleX = 0.7;
this.scaleY = this.scaleX;
gameZone = Sprite(_arg1);
damegeTimer = new Timer(50, 25);
}
private function tel(_arg1:TimerEvent):void{
if (damegeTimer.currentCount < 25){
this.alpha = ((this.alpha)==1) ? 0 : 1;
if ((((damegeTimer.currentCount == 10)) && ((life <= 0)))){
damegeTimer.stop();
damegeTimer.removeEventListener(TimerEvent.TIMER, tel);
this.gotoAndPlay("dead");
shad.gotoAndPlay("dead");
};
} else {
damegeTimer.stop();
damegeTimer.removeEventListener(TimerEvent.TIMER, tel);
dam = true;
};
}
private function shows(_arg1:MouseEvent):void{
show2();
}
function frame480(){
stop();
Object(parent).stopMovie();
}
public function rebound(_arg1:int, _arg2:int){
this.gotoAndPlay("rebound");
shad.gotoAndPlay("rebound");
speedX = (speedX * _arg1);
speedY = (speedY * _arg2);
divider = 3;
stat = "rebound";
}
public function holder(){
hold = true;
damegeTimer.stop();
this.alpha = 1;
damegeTimer.removeEventListener(TimerEvent.TIMER, tel);
gameZone.removeEventListener(MouseEvent.MOUSE_UP, shows);
gameZone.removeEventListener(MouseEvent.MOUSE_DOWN, jump);
gameZone.removeEventListener(MouseEvent.MOUSE_DOWN, attack);
}
public function startIt(){
life = 3;
stat = "go";
divider = 22;
hold = false;
free = false;
jumping = false;
dam = true;
dz = false;
pl = false;
this.gotoAndStop("go");
shad.gotoAndStop("go");
gameZone.addEventListener(MouseEvent.MOUSE_DOWN, jump);
sound = new sJump();
channel = new SndChannel(sound, false, false);
channel.maxV = 0.7;
sound2 = new sAttack();
channel2 = new SndChannel(sound2, false, false);
channel2.maxV = 1;
sound3 = new sFallTurtle();
channel3 = new SndChannel(sound3, false, false);
channel3.maxV = 1;
sound4 = new sDamage();
channel4 = new SndChannel(sound4, false, false);
}
private function jump(_arg1:MouseEvent):void{
gameZone.removeEventListener(MouseEvent.MOUSE_DOWN, jump);
gameZone.addEventListener(MouseEvent.MOUSE_DOWN, attack);
this.gotoAndPlay("jump");
shad.gotoAndPlay("jump");
divider = 8;
stat = "jump";
sPlay("jump");
}
public function deadZone(){
if (((dz) && (!(pl)))){
Object(parent).fall();
dz = false;
} else {
gameZone.addEventListener(MouseEvent.MOUSE_DOWN, jump);
};
}
function frame36(){
stat = "fall";
}
function frame521(){
stop();
}
public function lifeUp(){
if (life < 3){
life++;
if (life == 3){
Object(parent.parent)._menu.staticMenu.lifes.gotoAndStop(1);
} else {
Object(parent.parent)._menu.staticMenu.lifes.gotoAndStop((life + 2));
};
};
}
function frame481(){
this.stat = "movie";
}
function frame128(){
stop();
Object(parent).dead();
}
function frame129(){
stat = "clear";
}
function frame35(){
stop();
jumping = false;
deadZone();
}
function frame170(){
stop();
Object(parent).levelClear2();
}
function frame280(){
this.speedX = 0;
}
public function pauseIt(_arg1:Boolean){
if (_arg1){
pauseStat = stat;
stat = "pause";
hold = true;
this.stop();
shad.stop();
speedX = 0;
speedY = 0;
px = otherX;
py = otherY;
otherX = 0;
otherY = 0;
} else {
stat = pauseStat;
if (stat != "hold"){
hold = false;
};
otherX = px;
otherY = py;
if (((((((!((stat == "go"))) && (!((stat == "stop"))))) && (!((stat == "hold"))))) && (!((stat == "null"))))){
this.play();
shad.play();
if ((((stat == "rebound")) || ((stat == "attack")))){
show2();
};
};
};
}
function frame171(){
this.stat = "movie";
}
public function sPlay(_arg1:String){
switch (_arg1){
case "jump":
channel.sPlay(this.x, this.y);
break;
case "attack":
channel2.sPlay(this.x, this.y);
break;
case "fall":
channel3.sPlay(this.x, this.y);
break;
case "damage":
channel4.sPlay(this.x, this.y);
break;
};
}
private function attack(_arg1:MouseEvent):void{
divider = 15;
stat = "attack";
gameZone.addEventListener(MouseEvent.MOUSE_UP, shows);
gameZone.removeEventListener(MouseEvent.MOUSE_DOWN, attack);
this.gotoAndPlay("attack");
shad.gotoAndPlay("attack");
sPlay("attack");
}
public function holdIt(){
if (!hold){
if (stat == "go"){
hold = true;
speedX = 0;
speedY = 0;
gameZone.removeEventListener(MouseEvent.MOUSE_UP, shows);
gameZone.removeEventListener(MouseEvent.MOUSE_DOWN, jump);
gameZone.removeEventListener(MouseEvent.MOUSE_DOWN, attack);
this.gotoAndStop("hold");
shad.gotoAndStop("hold");
stat = "hold";
};
} else {
if (stat == "hold"){
hold = false;
stat = "go";
this.gotoAndStop("go");
shad.gotoAndStop("go");
divider = 22;
hold = false;
free = false;
gameZone.addEventListener(MouseEvent.MOUSE_DOWN, jump);
};
};
}
function frame53(){
stop();
Object(parent).dead();
}
public function stopIt(){
stat = "stop";
hold = true;
free = true;
jumping = true;
dam = false;
addSpeedFanX = 0;
addSpeedFanY = 0;
otherX = 0;
otherY = 0;
speedX = 0;
speedY = 0;
this.alpha = 1;
damegeTimer.stop();
damegeTimer.removeEventListener(TimerEvent.TIMER, tel);
this.gotoAndStop(1);
shad.gotoAndStop(1);
gameZone.removeEventListener(MouseEvent.MOUSE_UP, shows);
gameZone.removeEventListener(MouseEvent.MOUSE_DOWN, jump);
gameZone.removeEventListener(MouseEvent.MOUSE_DOWN, attack);
}
function frame13(){
free = true;
jumping = true;
}
private function reJump1(){
gameZone.addEventListener(MouseEvent.MOUSE_DOWN, jump);
gameZone.removeEventListener(MouseEvent.MOUSE_DOWN, attack);
if (stat != "attack"){
stat = "go";
divider = 22;
};
}
private function reJump2(){
gameZone.addEventListener(MouseEvent.MOUSE_DOWN, jump);
gameZone.removeEventListener(MouseEvent.MOUSE_DOWN, attack);
gameZone.removeEventListener(MouseEvent.MOUSE_UP, shows);
stat = "go";
divider = 5;
if (((dz) && (!(pl)))){
Object(parent).fall();
dz = false;
stat = "null";
};
}
private function show2(){
if (stat == "rebound"){
gotoAndPlay((currentFrame - 34));
shad.gotoAndPlay((shad.currentFrame - 34));
} else {
gotoAndPlay((currentFrame - 8));
shad.gotoAndPlay((shad.currentFrame - 8));
};
stat = "fly";
gameZone.removeEventListener(MouseEvent.MOUSE_UP, shows);
if (!jumping){
stat = "go";
divider = 22;
this.gotoAndStop("go");
shad.gotoAndStop("go");
};
}
function frame214(){
this.speedX = -6;
}
function frame1(){
stop();
free = false;
jumping = false;
}
function frame103(){
startIt();
}
function frame62(){
stop();
jumping = false;
deadZone();
}
private function efl(_arg1:Event):void{
dx = (this.x - stage.mouseX);
dy = (this.y - stage.mouseY);
atan = Math.atan2(dy, dx);
rad = ((atan * 180) / Math.PI);
this.rotation = (rad - 90);
}
public function damage(){
life--;
if (life <= 0){
stopIt();
};
Object(parent.parent)._menu.staticMenu.lifes.gotoAndStop((life + 2));
damegeTimer.addEventListener(TimerEvent.TIMER, tel);
damegeTimer.reset();
damegeTimer.start();
dam = false;
sPlay("damage");
}
function frame7(){
free = false;
jumping = false;
}
function frame27(){
gotoAndStop("go");
jumping = false;
reJump1();
deadZone();
}
function frame63(){
stat = "new life";
}
}
}//package com.Heroes
Section 3
//Emerald (com.Objects.Bonus.Emerald)
package com.Objects.Bonus {
import flash.events.*;
import flash.display.*;
import com.*;
public class Emerald extends MovieClip {
public function Emerald(){
addFrameScript(0, frame1, 27, frame28);
addEventListener(Event.ENTER_FRAME, efl);
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
if (((this.hitTestObject(Game.masterHero)) && (!(Game.masterHero.hold)))){
Object(parent.parent.parent).changeScore(500);
Game.masterHero.parent.parent.eme++;
this.play();
Object(parent).sPlay(this.x, this.y);
removeEventListener(Event.ENTER_FRAME, efl);
};
}
function frame1(){
stop();
}
function frame28(){
stop();
this.visible = false;
}
}
}//package com.Objects.Bonus
Section 4
//Heart (com.Objects.Bonus.Heart)
package com.Objects.Bonus {
import flash.events.*;
import flash.display.*;
import com.*;
public class Heart extends MovieClip {
private var fall:Boolean;// = false
public function Heart(){
Game.masterHero.parent.floorCont.push(this);
addEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
if (((this.hitTestObject(Game.masterHero)) && (!(Game.masterHero.hold)))){
fall = true;
Game.masterHero.lifeUp();
removeEventListener(Event.ENTER_FRAME, efl);
this.gotoAndPlay("up");
Object(parent).sPlay(this.x, this.y);
};
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
public function activateIt(){
if (fall){
fall = false;
this.gotoAndPlay("re");
addEventListener(Event.ENTER_FRAME, efl);
};
}
public function deactivateIt(){
}
}
}//package com.Objects.Bonus
Section 5
//LittleBonus (com.Objects.Bonus.LittleBonus)
package com.Objects.Bonus {
import flash.events.*;
import flash.display.*;
import com.*;
public class LittleBonus extends MovieClip {
public function LittleBonus(){
addFrameScript(0, frame1, 27, frame28);
addEventListener(Event.ENTER_FRAME, efl);
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
if (((this.hitTestObject(Game.masterHero)) && (!(Game.masterHero.hold)))){
Object(parent.parent.parent).changeScore(100);
Game.masterHero.parent.parent.mon++;
this.gotoAndPlay("off");
Object(parent).sPlayCoin(this.x, this.y);
removeEventListener(Event.ENTER_FRAME, efl);
};
}
function frame1(){
stop();
}
function frame28(){
stop();
this.visible = false;
}
}
}//package com.Objects.Bonus
Section 6
//Ruby (com.Objects.Bonus.Ruby)
package com.Objects.Bonus {
import flash.events.*;
import flash.display.*;
import com.*;
public class Ruby extends MovieClip {
public function Ruby(){
addFrameScript(0, frame1, 27, frame28);
addEventListener(Event.ENTER_FRAME, efl);
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
if (((this.hitTestObject(Game.masterHero)) && (!(Game.masterHero.hold)))){
Object(parent.parent.parent).changeScore(800);
this.play();
Object(parent).sPlay(this.x, this.y);
Game.masterHero.parent.parent.rub++;
removeEventListener(Event.ENTER_FRAME, efl);
};
}
function frame1(){
stop();
}
function frame28(){
stop();
this.visible = false;
}
}
}//package com.Objects.Bonus
Section 7
//Sapphire (com.Objects.Bonus.Sapphire)
package com.Objects.Bonus {
import flash.events.*;
import flash.display.*;
import com.*;
public class Sapphire extends MovieClip {
public function Sapphire(){
addFrameScript(0, frame1, 26, frame27);
addEventListener(Event.ENTER_FRAME, efl);
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
if (((this.hitTestObject(Game.masterHero)) && (!(Game.masterHero.hold)))){
Object(parent.parent.parent).changeScore(300);
Game.masterHero.parent.parent.sap++;
this.play();
Object(parent).sPlay(this.x, this.y);
removeEventListener(Event.ENTER_FRAME, efl);
};
}
function frame1(){
stop();
}
function frame27(){
stop();
this.visible = false;
}
}
}//package com.Objects.Bonus
Section 8
//Uniq (com.Objects.Bonus.Uniq)
package com.Objects.Bonus {
import flash.events.*;
import flash.display.*;
import com.*;
import flash.net.*;
public class Uniq extends MovieClip {
private var channel:SndChannel;
private var sound:sFanf;
private var u:int;
private var save:SharedObject;
public function Uniq(){
save = SharedObject.getLocal("RichAdvBeta");
super();
}
private function sPlay(){
channel.sPlay(0, 0);
}
public function pauseIt(_arg1:Boolean):void{
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
if (((this.hitTestObject(Game.masterHero)) && (!(Game.masterHero.hold)))){
removeEventListener(Event.ENTER_FRAME, efl);
sPlay();
this.gotoAndStop(1);
switch (u){
case 1:
Game.masterHero.parent.parent.u1 = 1;
save.data.u1 = 1;
save.flush();
break;
case 2:
Game.masterHero.parent.parent.u2 = 1;
save.data.u2 = 1;
save.flush();
break;
case 3:
Game.masterHero.parent.parent.u3 = 1;
save.data.u3 = 1;
save.flush();
break;
};
};
}
public function setUniq(_arg1:int):void{
u = _arg1;
switch (_arg1){
case 1:
if (save.data.u1 != 1){
this.gotoAndStop("u1");
addEventListener(Event.ENTER_FRAME, efl);
createSound();
};
break;
case 2:
if (save.data.u2 != 1){
this.gotoAndStop("u2");
addEventListener(Event.ENTER_FRAME, efl);
createSound();
};
break;
case 3:
if (save.data.u3 != 1){
this.gotoAndStop("u3");
addEventListener(Event.ENTER_FRAME, efl);
createSound();
};
break;
};
}
private function createSound(){
sound = new sFanf();
channel = new SndChannel(sound, false, false);
}
}
}//package com.Objects.Bonus
Section 9
//EndGate (com.Objects.EndGate.EndGate)
package com.Objects.EndGate {
import com.*;
import com.Objects.Render.*;
public class EndGate extends Wall {
private var channel:SndChannel;
private var sound:sEGateOpen;
public var totalLock:int;// = 0
public var activ:Boolean;// = true
public function EndGate(){
addFrameScript(0, frame1, 37, frame38);
if ((((this.rotation == 0)) || ((this.rotation == 180)))){
wz = 180;
hz = 60;
} else {
wz = 60;
hz = 180;
};
Game.masterHero.parent.addGate(this);
Game.masterHero.parent.leverCont.push(this);
sound = new sEGateOpen();
channel = new SndChannel(sound, true, false);
}
function frame1(){
stop();
}
public function sPlay(){
channel.sPlay((this.x - 130), this.y);
}
public function setLevers(_arg1:int){
totalLock = _arg1;
switch (totalLock){
case 4:
this.gotoAndStop("lock4");
break;
case 3:
this.gotoAndStop("lock3");
break;
case 2:
this.gotoAndStop("lock2");
break;
case 1:
this.gotoAndStop("lock1");
break;
case 0:
this.gotoAndPlay("open");
break;
};
}
function frame38(){
stop();
}
public function openLock(){
totalLock--;
switch (totalLock){
case 4:
this.gotoAndStop("lock4");
break;
case 3:
this.gotoAndStop("lock3");
break;
case 2:
this.gotoAndStop("lock2");
break;
case 1:
this.gotoAndStop("lock1");
sPlay();
break;
case 0:
this.gotoAndPlay("open");
deactivateIt();
sPlay();
break;
};
}
override public function destroy(){
deactivateIt();
}
}
}//package com.Objects.EndGate
Section 10
//Lever (com.Objects.EndGate.Lever)
package com.Objects.EndGate {
import flash.events.*;
import com.*;
import com.Objects.Render.*;
public class Lever extends Wall {
private var channel:SndChannel;
public var activ:Boolean;// = true
private var sound:sLever;
public function Lever(){
addFrameScript(0, frame1, 14, frame15);
sound = new sLever();
channel = new SndChannel(sound, true, false);
channel.maxV = 0.5;
addEventListener(Event.ENTER_FRAME, efl);
if ((Object(parent.parent) as Game)){
Game.masterHero.parent.leverCont.push(this);
} else {
trace("dfsdfdf");
};
}
override public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
deactivateIt();
}
function frame1(){
stop();
}
function frame15(){
stop();
}
public function sPlay(){
channel.sPlay(this.x, this.y);
}
private function efl(_arg1:Event):void{
if (((!((mot == "free"))) && (!(Game.masterHero.hold)))){
if (Game.masterHero.stat == "attack"){
if ((((mot == "right")) || ((mot == "left")))){
Game.masterHero.rebound(-1, 1);
} else {
if ((((mot == "up")) || ((mot == "down")))){
Game.masterHero.rebound(1, -1);
};
};
};
this.play();
sPlay();
removeEventListener(Event.ENTER_FRAME, efl);
activ = false;
hz = 35;
Game.masterHero.parent.openLock();
};
}
}
}//package com.Objects.EndGate
Section 11
//ActionZone (com.Objects.Render.ActionZone)
package com.Objects.Render {
import flash.events.*;
import flash.display.*;
import com.*;
public class ActionZone extends MovieClip {
private var fnc1:String;
private var linkObj;
public function ActionZone(){
this.visible = false;
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
public function linkObject(_arg1, _arg2:String){
linkObj = _arg1;
fnc1 = _arg2;
addEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
if (((this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)) && (!(Game.masterHero.hold)))){
removeEventListener(Event.ENTER_FRAME, efl);
if (linkObj != null){
linkObj.action(fnc1);
};
};
}
}
}//package com.Objects.Render
Section 12
//ActivePlat (com.Objects.Render.ActivePlat)
package com.Objects.Render {
import flash.events.*;
import flash.display.*;
import com.*;
public class ActivePlat extends MovieClip {
private var currentY:Number;// = 0
private var speedY:Number;// = 0
private var oldR:Number;// = 0
private var ft:Boolean;// = false
public var speedRot:Number;// = 0
private var oldX:Number;// = 0
private var oldY:Number;// = 0
private var speedR:Number;// = 0
private var speedX:Number;// = 0
private var currentR:Number;// = 0
private var currentX:Number;// = 0
public function ActivePlat(){
addEventListener(Event.ENTER_FRAME, efl);
}
public function activateIt(){
addEventListener(Event.ENTER_FRAME, efl);
}
public function deactivateIt(){
destroy();
}
public function pauseIt(_arg1:Boolean){
if (_arg1){
deactivateIt();
} else {
activateIt();
};
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
public function action(_arg1:String):void{
switch (_arg1){
case "activateIt":
activateIt();
break;
case "deactivateIt":
deactivateIt();
break;
case "circle":
speedRot = (speedRot * -1);
break;
};
}
private function efl(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
if (speedRot != 0){
this.rotation = (this.rotation + speedRot);
};
currentX = this.x;
currentY = this.y;
speedX = (oldX - currentX);
speedY = (oldY - currentY);
oldX = currentX;
oldY = currentY;
currentR = this.rotation;
speedR = (currentR - oldR);
oldR = currentR;
if (((this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)) && (!(Game.masterHero.jumping)))){
if (speedR != 0){
_local2 = (Game.masterHero.x - ((this.x + Object(parent).x) + Object(parent.parent).x));
_local3 = (Game.masterHero.y - ((this.y + Object(parent).y) + Object(parent.parent).y));
_local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
_local5 = Math.atan2(_local3, _local2);
_local6 = ((speedR * Math.PI) / 180);
_local5 = (_local5 + _local6);
speedX = (Math.cos(_local5) * _local4);
speedY = (Math.sin(_local5) * _local4);
speedX = (Game.masterHero.x - (speedX + ((this.x + Object(parent).x) + Object(parent.parent).x)));
speedY = (Game.masterHero.y - (speedY + ((this.y + Object(parent).y) + Object(parent.parent).y)));
speedX = (speedX - oldX);
speedY = (speedY - oldY);
};
Game.masterHero.otherX = -(speedX);
Game.masterHero.otherY = -(speedY);
ft = true;
} else {
if (ft){
Game.masterHero.otherX = 0;
Game.masterHero.otherY = 0;
ft = false;
};
};
}
}
}//package com.Objects.Render
Section 13
//Bonus (com.Objects.Render.Bonus)
package com.Objects.Render {
import flash.display.*;
import com.*;
import com.Heroes.*;
public class Bonus extends MovieClip {
private var channel:SndChannel;
private var sound3:sStone3;
private var sound4:sCoin;
private var sound2:sStone2;
private var channel2:SndChannel;
private var channel3:SndChannel;
private var channel4:SndChannel;
private var sound:sStone1;
public var g1:Ghost;
public var g2:Ghost;
public var g3:Ghost;
public var g4:Ghost;
protected var ar:Array;
public function Bonus(){
ar = [];
super();
var _local1:int;
while (_local1 < this.numChildren) {
if ((getChildAt(_local1) as MovieClip)){
ar.push(this.getChildAt(_local1));
};
_local1++;
};
sound = new sStone1();
channel = new SndChannel(sound, false, false);
sound2 = new sStone2();
channel2 = new SndChannel(sound2, false, false);
sound3 = new sStone3();
channel3 = new SndChannel(sound3, false, false);
sound4 = new sCoin();
channel4 = new SndChannel(sound4, false, false);
channel.maxV = 0.6;
channel2.maxV = 0.6;
channel3.maxV = 0.6;
channel4.maxV = 0.45;
}
public function pauseIt(_arg1:Boolean){
}
public function sPlay(_arg1:int, _arg2:int){
var _local3:int = (Math.random() * 3);
switch (_local3){
case 0:
channel.sPlay(_arg1, _arg2);
break;
case 1:
channel2.sPlay(_arg1, _arg2);
break;
case 2:
channel3.sPlay(_arg1, _arg2);
break;
};
}
public function sPlayCoin(_arg1:int, _arg2:int){
channel4.sPlay(_arg1, _arg2);
}
public function destroy(){
var _local1:int;
while (_local1 < ar.length) {
ar[_local1].destroy();
_local1++;
};
ar = [];
}
}
}//package com.Objects.Render
Section 14
//CircleWall (com.Objects.Render.CircleWall)
package com.Objects.Render {
import flash.events.*;
import flash.display.*;
import com.*;
public class CircleWall extends MovieClip {
private var atan:Number;
protected var tw:Number;
private var diam:Number;
private var dx:Number;
private var dy:Number;
private var newX:Number;
private var newY:Number;
private var hyp:Number;
public function CircleWall(){
this.visible = false;
addEventListener(Event.ENTER_FRAME, efl);
tw = this.width;
}
public function pauseIt(_arg1:Boolean){
}
private function efl(_arg1:Event):void{
var _local2:Number = ((Game.masterHero.width / 2) + (tw / 2));
var _local3:Number = ((Game.masterHero.height / tw) / 2);
diam = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
dx = ((Game.masterHero.x - Object(parent).x) - this.x);
dy = ((Game.masterHero.y - Object(parent).y) - this.y);
hyp = Math.sqrt(((dx * dx) + (dy * dy)));
if (hyp < diam){
atan = Math.atan2(dy, dx);
newX = (Math.cos(atan) * diam);
newY = (Math.sin(atan) * diam);
Game.masterHero.x = ((this.x + Object(parent).x) + newX);
Game.masterHero.y = ((this.y + Object(parent).y) + newY);
};
}
protected function deactivateIt(){
removeEventListener(Event.ENTER_FRAME, efl);
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
}
}//package com.Objects.Render
Section 15
//DeadZone (com.Objects.Render.DeadZone)
package com.Objects.Render {
import flash.events.*;
import flash.display.*;
import com.*;
public class DeadZone extends MovieClip {
private var ft:Boolean;// = true
public function DeadZone(){
addEventListener(Event.ENTER_FRAME, efl);
}
public function pauseIt(_arg1:Boolean){
}
protected function action(){
Object(parent.parent).fall();
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
if (this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)){
if (ft){
Game.masterHero.dz = true;
ft = false;
};
} else {
if (!ft){
Game.masterHero.dz = false;
ft = true;
};
};
}
public function activateIt(){
addEventListener(Event.ENTER_FRAME, efl);
}
public function deactivateIt(){
removeEventListener(Event.ENTER_FRAME, efl);
}
}
}//package com.Objects.Render
Section 16
//EndZone (com.Objects.Render.EndZone)
package com.Objects.Render {
import flash.events.*;
import flash.display.*;
import com.*;
public class EndZone extends MovieClip {
private var kub:Boolean;// = false
public function EndZone(){
addFrameScript(149, frame150, 179, frame180, 180, frame181);
addEventListener(Event.ENTER_FRAME, efl);
}
public function pauseIt(_arg1:Boolean){
if (_arg1){
this.stop();
} else {
this.play();
};
}
public function kubMode(){
this.gotoAndStop("kub");
kub = true;
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
if (((this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)) && (!(Game.masterHero.free)))){
Object(parent.parent).levelClear();
removeEventListener(Event.ENTER_FRAME, efl);
if (!kub){
Game.masterHero.x = (this.x + Object(parent).x);
Game.masterHero.y = (this.y + Object(parent).y);
this.gotoAndPlay("on");
};
};
}
function frame180(){
stop();
}
function frame181(){
stop();
}
function frame150(){
gotoAndPlay(1);
}
}
}//package com.Objects.Render
Section 17
//Field (com.Objects.Render.Field)
package com.Objects.Render {
import flash.display.*;
import flash.filters.*;
public class Field extends Sprite {
private var bmd:BitmapData;
private var bmp:Bitmap;
public function Field(){
bmd = new BitmapData(this.width, this.height, true, 1048575);
this.filters = [new BevelFilter(4, 45, 12294246, 1, 4140575)];
bmd.draw(this);
this.filters = [];
var _local1:int;
while (_local1 < this.numChildren) {
removeChild(getChildAt(_local1));
};
bmp = new Bitmap(bmd);
addChild(bmp);
}
}
}//package com.Objects.Render
Section 18
//Plats (com.Objects.Render.Plats)
package com.Objects.Render {
import flash.events.*;
import flash.display.*;
import com.*;
public class Plats extends MovieClip {
private var channel:SndChannel;
private var curF:int;// = 1
private var ft:Boolean;// = true
private var channel2:SndChannel;
private var sound2:sPlatEnd;
private var sound:sPlatMove;
protected var btn:MovieClip;
public var cir1:cirl50;
public var c2:cir2L7;
public var c3:cir3l7;
private var ar:Array;
private var p:Boolean;// = false
private var oldF:int;// = 0
public function Plats(){
ar = [];
super();
var _local1:int;
while (_local1 < this.numChildren) {
if ((getChildAt(_local1) as ActivePlat)){
ar.push(this.getChildAt(_local1));
};
_local1++;
};
addEventListener(Event.ENTER_FRAME, efl);
sound = new sPlatMove();
channel = new SndChannel(sound, true, true);
sound2 = new sPlatEnd();
channel2 = new SndChannel(sound2, true, false);
}
public function pauseIt(_arg1:Boolean){
var _local2:int;
var _local3:int;
if (_arg1){
_local2 = 0;
while (_local2 < ar.length) {
ar[_local2].pauseIt(true);
_local2++;
};
if (oldF != curF){
this.stop();
channel.pauseIt(true);
p = true;
};
} else {
_local3 = 0;
while (_local3 < ar.length) {
ar[_local3].pauseIt(false);
_local3++;
};
if (p){
this.play();
channel.pauseIt(false);
p = false;
};
};
}
public function linkBtn(_arg1:MovieClip){
btn = _arg1;
}
public function sPlay(_arg1:String){
switch (_arg1){
case "start":
channel.sPlay(this.x, this.y);
break;
case "stop":
channel.sStop();
channel2.sPlay(this.x, this.y);
break;
};
}
private function efl(_arg1:Event):void{
oldF = curF;
curF = this.currentFrame;
if (this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)){
if (ft){
Game.masterHero.pl = true;
Game.masterHero.plMask();
Object(parent.parent).mc.staticMode = true;
ft = false;
};
} else {
if (!ft){
Game.masterHero.pl = false;
Game.masterHero.reMask();
Object(parent.parent).mc.staticMode = false;
ft = true;
};
};
}
public function destroy(){
channel.sStop();
channel2.sStop();
removeEventListener(Event.ENTER_FRAME, efl);
var _local1:int;
while (_local1 < ar.length) {
ar[_local1].destroy();
_local1++;
};
ar = [];
}
public function action(_arg1:String){
switch (_arg1){
case "activate":
this.gotoAndPlay("activate");
break;
case "play":
this.play();
break;
case "deactivate":
this.gotoAndPlay("deactivate");
break;
case "start":
this.play();
sPlay("start");
break;
case "stop":
this.stop();
sPlay("stop");
break;
};
}
}
}//package com.Objects.Render
Section 19
//SpriteS (com.Objects.Render.SpriteS)
package com.Objects.Render {
import flash.events.*;
import flash.display.*;
public class SpriteS extends Shape {
var speedX:Number;
var speedY:Number;
public function SpriteS(){
speedX = (-1 + (Math.random() * 2));
speedY = (-1 + (Math.random() * 2));
super();
graphics.beginFill(15728078);
graphics.drawCircle(0, 0, 1.5);
graphics.endFill();
addEventListener(Event.ENTER_FRAME, efl);
}
function efl(_arg1:Event):void{
this.alpha = (this.alpha - 0.05);
if (alpha <= 0){
removeEventListener(Event.ENTER_FRAME, efl);
};
x = (x + (speedX * 0.95));
y = (y + (speedY * 0.95));
}
}
}//package com.Objects.Render
Section 20
//TrapCont (com.Objects.Render.TrapCont)
package com.Objects.Render {
import flash.display.*;
import com.Objects.*;
public class TrapCont extends MovieClip {
public var t2r1:Крутилка;
public var tr2l6:Крутилка2;
public var t2r3:Крутилка;
public var t2r2:Крутилка;
public var tr11l6:Крутилка2;
public var tr12l6:Крутилка2;
public var tr13l6:Крутилка2;
public var pr1:DoublePress;
private var ar:Array;
public var tr1:Крутилка;
public var tr2:Крутилка;
public var tr1l6:Крутилка2;
public var tr3l6:Крутилка2;
public function TrapCont(){
ar = [];
super();
var _local1:int;
while (_local1 < this.numChildren) {
if ((getChildAt(_local1) as MovieClip)){
ar.push(this.getChildAt(_local1));
};
_local1++;
};
}
public function pauseIt(_arg1:Boolean){
var _local2:int;
var _local3:int;
if (_arg1){
_local2 = 0;
while (_local2 < ar.length) {
ar[_local2].pauseIt(true);
_local2++;
};
this.stop();
} else {
_local3 = 0;
while (_local3 < ar.length) {
ar[_local3].pauseIt(false);
_local3++;
};
this.play();
};
}
public function destroy(){
var _local1:int;
while (_local1 < ar.length) {
ar[_local1].destroy();
_local1++;
};
ar = [];
}
}
}//package com.Objects.Render
Section 21
//Wall (com.Objects.Render.Wall)
package com.Objects.Render {
import flash.events.*;
import flash.display.*;
import com.*;
public class Wall extends MovieClip {
private var hero;
private var thisY:Number;
private var thisWidth:Number;
private var thisX:Number;
protected var mot:String;// = "free"
private var dx:int;
private var dy:int;
protected var hz:Number;// = 0
protected var wz:Number;// = 0
private var thisHeight:Number;
private var h:Number;
public var cont:Boolean;// = false
private var w:Number;
protected var z:int;// = 3
public function Wall(){
thisWidth = this.width;
thisHeight = this.height;
hero = Game.masterHero;
addEventListener(Event.ENTER_FRAME, efl);
}
public function pauseIt(_arg1:Boolean){
}
private function efl(_arg1:Event):void{
updateWH();
if (!cont){
thisX = (this.x + Object(parent).x);
thisY = (this.y + Object(parent).y);
} else {
thisX = ((this.x + Object(parent).x) + Object(parent.parent).x);
thisY = ((this.y + Object(parent).y) + Object(parent.parent).y);
};
w = Math.abs((hero.x - thisX));
h = Math.abs((hero.y - thisY));
dx = (((hero.width / 2) + (thisWidth / 2)) - w);
dy = (((hero.height / 2) + (thisHeight / 2)) - h);
if ((((dx > 0)) && ((dy > 0)))){
if (dx < dy){
if (hero.x > thisX){
mot = "right";
} else {
mot = "left";
};
} else {
if (hero.y > thisY){
mot = "down";
} else {
mot = "up";
};
};
} else {
mot = "free";
};
switch (mot){
case "left":
hero.x = (thisX - ((thisWidth / 2) + (hero.width / 2)));
break;
case "up":
hero.y = (thisY - ((thisHeight / 2) + (hero.height / 2)));
break;
case "right":
hero.x = ((thisX + (thisWidth / 2)) + (hero.width / 2));
break;
case "down":
hero.y = (thisY + ((thisHeight / 2) + (hero.height / 2)));
break;
};
}
public function updateWH(){
if (wz != 0){
thisWidth = wz;
} else {
thisWidth = this.width;
};
if (hz != 0){
thisHeight = hz;
} else {
thisHeight = this.height;
};
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
public function activateThis():void{
addEventListener(Event.ENTER_FRAME, efl);
}
public function activateIt():void{
addEventListener(Event.ENTER_FRAME, efl);
}
public function deactivateIt():void{
removeEventListener(Event.ENTER_FRAME, efl);
}
}
}//package com.Objects.Render
Section 22
//ActiveWall (com.Objects.ActiveWall)
package com.Objects {
import flash.events.*;
import flash.display.*;
import com.*;
import com.Objects.Render.*;
public class ActiveWall extends Wall {
private var channel:SndChannel;
private var sound4:sWallBroke;
private var wall:MovieClip;
private var sound:sWallBum;
private var channel4:SndChannel;
private var totalDamage:int;
private var firstTime:Boolean;// = true
private var damage:int;
private var speedX:int;
private var speedY:int;
public function ActiveWall(){
wall = MovieClip(getChildAt(0));
addEventListener(Event.ENTER_FRAME, efl);
sound = new sWallBum();
channel = new SndChannel(sound, false, false);
channel.maxV = 0.7;
sound4 = new sWallBroke();
channel4 = new SndChannel(sound4, false, false);
}
override public function pauseIt(_arg1:Boolean){
}
public function sPlay(_arg1:String){
switch (_arg1){
case "bum":
channel.sPlay(this.x, this.y);
break;
case "broke":
channel4.sPlay(this.x, this.y);
break;
};
}
override public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
deactivateIt();
}
private function test():void{
if ((((damage >= 10)) && ((Game.masterHero.stat == "attack")))){
totalDamage = (totalDamage + damage);
this.play();
if (totalDamage <= 25){
sPlay("bum");
} else {
if ((((totalDamage > 25)) && ((totalDamage <= 45)))){
wall.gotoAndStop(2);
sPlay("bum");
} else {
if ((((totalDamage > 45)) && ((totalDamage < 60)))){
wall.gotoAndStop(3);
sPlay("bum");
} else {
this.gotoAndStop(12);
sPlay("broke");
if (this.rotation == 0){
if (Game.masterHero.y < (this.y + Object(parent).y)){
this.rotation = (this.rotation + 180);
};
} else {
if (Game.masterHero.x > (this.x + Object(parent).x)){
this.rotation = (this.rotation + 180);
};
};
wall.gotoAndPlay(4);
trace("bum!");
destroy();
};
};
};
};
}
private function efl(_arg1:Event):void{
speedX = Math.abs(Game.masterHero.speedX);
speedY = Math.abs(Game.masterHero.speedY);
if (mot != "free"){
if (firstTime){
damage = Math.sqrt(((speedX * speedX) + (speedY * speedY)));
firstTime = false;
test();
};
} else {
firstTime = true;
};
}
}
}//package com.Objects
Section 23
//Butt (com.Objects.Butt)
package com.Objects {
import flash.events.*;
import flash.display.*;
import com.*;
import com.Objects.Render.*;
import flash.text.*;
import flash.utils.*;
public class Butt extends MovieClip {
public var tt:int;// = 0
private var channel:SndChannel;
private var sound3:sTimer;
private var sound:sBtnOn;
private var sound2:sBtnOff;
private var channel2:SndChannel;
private var linkObj;
private var down:Boolean;// = false
protected var firstTime:Boolean;// = true
private var channel3:SndChannel;
public var pnt:Boolean;// = true
private var pointer:Sprite;
private var butMode:String;// = "static"
private var timer:Timer;
public var timeUp:int;// = 4000
private var partner:MovieClip;
private var tTime:Timer;
private var i:int;// = 0
public var t:TextField;
private var fnc1:String;// = "null"
private var fnc2:String;// = "null"
private var psevdo:Boolean;// = false
public function Butt(){
addFrameScript(0, frame1, 9, frame10);
}
public function destroy(){
switch (butMode){
case "static":
removeEventListener(Event.ENTER_FRAME, stat);
removeEventListener(Event.ENTER_FRAME, point);
break;
case "dynamic":
removeEventListener(Event.ENTER_FRAME, dynam);
break;
case "timer":
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, itTime);
tTime.stop();
channel3.sStop();
this.gotoAndStop("tOn");
this.t.text = "";
removeEventListener(Event.ENTER_FRAME, time);
Object(parent.parent.parent)._menu.staticMenu.t.gotoAndStop(1);
break;
};
}
private function itTime(_arg1:TimerEvent):void{
Object(parent.parent.parent)._menu.staticMenu.t.t.t.text = "0";
this.t.text = "0";
timer.stop();
tTime.stop();
channel3.sStop();
down = false;
if (linkObj != null){
linkObj.action(fnc2);
i = 1;
if ((linkObj as Plats)){
} else {
this.gotoAndStop("tOff");
sPlay("off");
firstTime = true;
psevdo = false;
this.t.text = "";
tt = 0;
Object(parent.parent.parent)._menu.staticMenu.t.play();
timer.reset();
tTime.reset();
i = 0;
if (partner != null){
partner.resetIt();
};
};
};
}
private function point(_arg1:Event):void{
var _local6:SpriteS;
var _local2:Number = ((this.x + pointer.x) - linkObj.x);
var _local3:Number = ((this.y + pointer.y) - linkObj.y);
var _local4:Number = Math.atan2(_local3, _local2);
var _local5:int;
while (_local5 < 4) {
_local6 = new SpriteS();
_local6.x = (pointer.x + (Math.random() * _local6.width));
_local6.y = (pointer.y + (Math.random() * _local6.height));
addChild(_local6);
_local5++;
};
pointer.x = (pointer.x - (Math.cos(_local4) * 15));
pointer.y = (pointer.y - (Math.sin(_local4) * 15));
if (Math.sqrt(((_local2 * _local2) + (_local3 * _local3))) < 15){
removeEventListener(Event.ENTER_FRAME, point);
linkObj.action(fnc1);
};
}
public function modeSet(_arg1:String){
butMode = _arg1;
switch (butMode){
case "static":
addEventListener(Event.ENTER_FRAME, stat);
this.gotoAndStop("sOff");
pointer = new Sprite();
addChild(pointer);
break;
case "dynamic":
addEventListener(Event.ENTER_FRAME, dynam);
this.gotoAndStop("dOff");
break;
case "timer":
timer = new Timer(timeUp, 1);
timer.addEventListener(TimerEvent.TIMER, itTime);
tTime = new Timer(1000, 15);
addEventListener(Event.ENTER_FRAME, time);
this.gotoAndStop("tOff");
sound3 = new sTimer();
channel3 = new SndChannel(sound3, false, true);
break;
};
sound = new sBtnOn();
channel = new SndChannel(sound, true, false);
channel.maxV = 1;
sound2 = new sBtnOff();
channel2 = new SndChannel(sound2, true, false);
channel2.maxV = 1;
}
protected function sPlay(_arg1:String){
switch (_arg1){
case "on":
channel.sPlay(this.x, this.y);
break;
case "off":
channel2.sPlay(this.x, this.y);
break;
case "timer":
channel3.sPlay(this.x, this.y);
break;
};
}
function frame10(){
stop();
}
private function time(_arg1:Event):void{
if (((((((((this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)) && (!(psevdo)))) && (!(Game.masterHero.hold)))) && (!(Game.masterHero.jumping)))) && (firstTime))){
firstTime = false;
this.gotoAndStop("tOn");
sPlay("on");
down = true;
if (linkObj != null){
linkObj.action(fnc1);
};
timer.start();
tTime.start();
sPlay("timer");
Object(parent.parent.parent)._menu.staticMenu.t.gotoAndPlay(2);
if (partner != null){
partner.psevdoTime();
};
};
if (((!(firstTime)) && (!(psevdo)))){
tt = (Math.floor(((timeUp / 1000) - tTime.currentCount)) - i);
this.t.text = tt.toString();
Object(parent.parent.parent)._menu.staticMenu.t.t.t.text = tt.toString();
} else {
if (((psevdo) && (!(firstTime)))){
this.t.text = partner.t.text;
if (partner.tt == 0){
this.gotoAndStop("tOff");
sPlay("off");
(this.t.text == "");
};
};
};
}
public function action(_arg1:String){
destroy();
}
public function pauseIt(_arg1:Boolean){
if (_arg1){
if (butMode == "timer"){
timer.stop();
tTime.stop();
channel3.sStop();
};
} else {
if ((((butMode == "timer")) && (down))){
timer.start();
sPlay("timer");
tTime.start();
};
};
}
private function stat(_arg1:Event):void{
if (((((this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)) && (!(Game.masterHero.hold)))) && (!(Game.masterHero.jumping)))){
this.gotoAndStop("sOn");
sPlay("on");
removeEventListener(Event.ENTER_FRAME, stat);
if (linkObj != null){
if (pnt){
addEventListener(Event.ENTER_FRAME, point);
} else {
linkObj.action(fnc1);
};
};
};
}
public function linkObject(_arg1, _arg2:String, _arg3:String){
linkObj = _arg1;
if ((((linkObj as Plats)) && ((butMode == "timer")))){
linkObj.linkBtn(this);
};
fnc1 = _arg2;
fnc2 = _arg3;
}
public function resetIt(){
if (butMode == "timer"){
if (!firstTime){
this.gotoAndStop("tOff");
channel3.sStop();
sPlay("off");
down = false;
firstTime = true;
psevdo = false;
this.t.text = "";
tt = 0;
Object(parent.parent.parent)._menu.staticMenu.t.play();
timer.reset();
tTime.reset();
i = 0;
if (partner != null){
partner.resetIt();
};
};
};
}
function frame1(){
stop();
}
private function dynam(_arg1:Event):void{
if (((((this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)) && (!(Game.masterHero.hold)))) && (!(Game.masterHero.jumping)))){
if (firstTime){
this.gotoAndStop("dOn");
sPlay("on");
if (linkObj != null){
linkObj.action(fnc1);
firstTime = false;
};
};
} else {
if (!firstTime){
this.gotoAndStop("dOff");
sPlay("off");
if (linkObj != null){
linkObj.action(fnc2);
firstTime = true;
};
};
};
}
public function linkPartner(_arg1:MovieClip){
partner = MovieClip(_arg1);
}
public function psevdoTime(){
this.gotoAndStop("tOn");
sPlay("on");
psevdo = true;
firstTime = false;
}
}
}//package com.Objects
Section 24
//CheckPoint (com.Objects.CheckPoint)
package com.Objects {
import flash.events.*;
import flash.display.*;
import com.*;
public class CheckPoint extends MovieClip {
private var channel:SndChannel;
private var sound2:sGhostS;
private var sound:sTActivate;
private var channel2:SndChannel;
public function CheckPoint(){
sound = new sTActivate();
channel = new SndChannel(sound, true, false);
sound2 = new sGhostS();
channel2 = new SndChannel(sound2, true, false);
addEventListener(Event.ENTER_FRAME, efl);
}
public function pauseIt(_arg1:Boolean){
}
protected function sPlay(_arg1:String){
switch (_arg1){
case "activate":
channel.sPlay(this.x, this.y);
break;
case "teleport":
channel2.sPlay(this.x, this.y);
break;
};
}
private function efl(_arg1:Event):void{
if (((this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)) && (!(Game.masterHero.jumping)))){
removeEventListener(Event.ENTER_FRAME, efl);
Object(parent.parent).newHeroPoint(this.x, this.y);
Object(parent.parent).telCont.push(this);
this.play();
};
}
public function startIt(){
addEventListener(Event.ENTER_FRAME, efl);
this.gotoAndStop("off");
}
public function destroy(){
channel.sStop();
removeEventListener(Event.ENTER_FRAME, efl);
}
public function firstIt(){
Object(parent.parent).telCont.push(this);
removeEventListener(Event.ENTER_FRAME, efl);
this.gotoAndStop("on");
}
public function stopIt(){
removeEventListener(Event.ENTER_FRAME, efl);
this.play();
}
}
}//package com.Objects
Section 25
//DoublePress (com.Objects.DoublePress)
package com.Objects {
import flash.events.*;
import com.*;
import com.Objects.Render.*;
public class DoublePress extends Wall {
private var currentY:Number;// = 0
public var global;// = false
private var ft:Boolean;// = false
private var speedX:Number;// = 0
private var speedY:Number;// = 0
public var dz:TrapZone;
private var oldX:Number;// = 0
private var oldY:Number;// = 0
private var currentX:Number;// = 0
public function DoublePress(){
if (this.rotation == 0){
wz = 40;
hz = 110;
} else {
wz = 110;
hz = 40;
};
addEventListener(Event.ENTER_FRAME, efl);
}
override public function pauseIt(_arg1:Boolean){
if (_arg1){
this.stop();
dz.deactivateIt();
} else {
this.play();
dz.activateIt();
};
}
private function efl(_arg1:Event):void{
if (global){
currentX = this.x;
currentY = this.y;
speedX = (oldX - currentX);
speedY = (oldY - currentY);
oldX = currentX;
oldY = currentY;
if (this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)){
if (((!(ft)) && ((mot == "right")))){
Game.masterHero.otherX = -(speedX);
Game.masterHero.otherY = -(speedY);
Game.masterHero.parent.mc.staticMode = true;
ft = true;
};
} else {
if (ft){
Game.masterHero.otherX = 0;
Game.masterHero.otherY = 0;
Game.masterHero.parent.mc.staticMode = false;
ft = false;
};
};
};
}
override public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
deactivateIt();
dz.destroy();
}
}
}//package com.Objects
Section 26
//ElGate (com.Objects.ElGate)
package com.Objects {
import flash.events.*;
import flash.display.*;
import com.*;
import com.Objects.Render.*;
import flash.filters.*;
public class ElGate extends Wall {
private var xx:int;
private var startX:int;
private var startY:int;
private var fnc:String;
private var ww:int;
private var dist:int;// = 40
private var yy:int;
private var direct:String;// = "north"
private var thisH:int;
private var hh:int;
private var beam:Shape;
private var beamDist:Number;
private var obj;
private var thisW:int;
private var ax:String;
public function ElGate(){
addFrameScript(0, frame1, 3, frame4, 12, frame13);
}
public function action(_arg1:String){
switch (_arg1){
case "deactivateIt":
removeEventListener(Event.ENTER_FRAME, efl);
deactivateIt();
beam.graphics.clear();
graphics.clear();
break;
case "activateIt":
addEventListener(Event.ENTER_FRAME, efl);
reBuild();
break;
};
}
function frame13(){
stop();
}
private function drawZone(){
graphics.clear();
graphics.beginFill(0xFFFF00, 0);
graphics.drawRect(xx, yy, ww, hh);
graphics.endFill();
updateWH();
}
function frame1(){
stop();
}
public function connection(_arg1, _arg2:String){
obj = _arg1;
obj.deactivateIt();
beam = new Shape();
direct = _arg2;
startX = this.x;
startY = this.y;
switch (direct){
case "north":
ax = "horizontal";
gotoAndStop("horizontal");
obj.gotoAndStop("horizontal");
obj.rotation = 180;
thisW = this.width;
thisH = this.height;
ww = (Math.abs((obj.x - this.x)) + (thisW * 2));
hh = dist;
xx = (-(ww) / 2);
yy = (-(hh) / 2);
this.x = (this.x + ((ww / 2) - thisW));
this.y = (this.y - (hh / 2));
drawZone();
getChildAt(0).x = ((-(ww) / 2) + thisW);
getChildAt(0).y = (hh / 2);
beamDist = (ww - thisW);
beam.x = ((-(ww) / 2) + thisW);
beam.y = (hh / 2);
break;
case "east":
ax = "vertical";
gotoAndStop("vertical");
obj.gotoAndStop("vertical");
obj.rotation = 180;
thisW = this.width;
thisH = this.height;
ww = dist;
hh = (Math.abs((obj.y - this.y)) + (thisH * 2));
xx = (-(ww) / 2);
yy = (-(hh) / 2);
this.x = (this.x + (ww / 2));
this.y = (this.y + ((hh / 2) - thisH));
drawZone();
getChildAt(0).x = (-(ww) / 2);
getChildAt(0).y = ((-(hh) / 2) + thisH);
beamDist = (hh - thisH);
beam.x = (-(ww) / 2);
beam.y = ((-(hh) / 2) + thisH);
beam.rotation = 90;
break;
case "south":
ax = "horizontal";
gotoAndStop("horizontal");
obj.gotoAndStop("horizontal");
obj.rotation = 180;
thisW = this.width;
thisH = this.height;
ww = (Math.abs((obj.x - this.x)) + (thisW * 2));
hh = dist;
xx = (-(ww) / 2);
yy = (-(hh) / 2);
this.x = (this.x + ((ww / 2) - thisW));
this.y = (this.y + (hh / 2));
drawZone();
getChildAt(0).x = ((-(ww) / 2) + thisW);
getChildAt(0).y = (-(hh) / 2);
beamDist = (ww - thisW);
beam.x = ((-(ww) / 2) + thisW);
beam.y = (-(hh) / 2);
break;
case "west":
ax = "vertical";
gotoAndStop("vertical");
obj.gotoAndStop("vertical");
obj.rotation = 180;
thisW = this.width;
thisH = this.height;
ww = dist;
hh = (Math.abs((obj.y - this.y)) + (thisH * 2));
xx = (-(ww) / 2);
yy = (-(hh) / 2);
this.x = (this.x - (ww / 2));
this.y = (this.y + ((hh / 2) - thisH));
drawZone();
getChildAt(0).x = (ww / 2);
getChildAt(0).y = ((-(hh) / 2) + thisH);
beamDist = (hh - thisH);
beam.x = (ww / 2);
beam.y = ((-(hh) / 2) + thisH);
beam.rotation = 90;
break;
};
beam.filters = [new GlowFilter(4321724, 1, 10, 10, 2, 4, false, false)];
addChild(beam);
addEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
var i:*;
var e = _arg1;
var _local3 = beam;
with (_local3) {
graphics.clear();
graphics.lineStyle(2, 4321724);
i = 0;
while (i < 20) {
graphics.lineTo(((beamDist / 20) * i), ((Math.random() * 8) - 4));
i++;
};
graphics.endFill();
};
rebut();
}
public function rebut(){
if ((((direct == "south")) && ((Game.masterHero.y > (this.y - Math.abs(Object(parent).y)))))){
direct = "north";
reBuild();
} else {
if ((((direct == "north")) && ((Game.masterHero.y < (this.y - Math.abs(Object(parent).y)))))){
direct = "south";
reBuild();
};
};
if ((((direct == "west")) && ((Game.masterHero.x < (this.x - Math.abs(Object(parent).x)))))){
direct = "east";
reBuild();
} else {
if ((((direct == "east")) && ((Game.masterHero.x > (this.x - Math.abs(Object(parent).x)))))){
direct = "west";
reBuild();
};
};
}
override public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
deactivateIt();
}
private function reBuild(){
switch (direct){
case "north":
getChildAt(0).y = 0;
this.y = startY;
yy = (-(hh) / 2);
this.y = (this.y - (hh / 2));
drawZone();
getChildAt(0).y = (hh / 2);
beam.y = (hh / 2);
break;
case "east":
getChildAt(0).x = 0;
this.x = startX;
xx = (-(ww) / 2);
this.x = (this.x + (ww / 2));
drawZone();
getChildAt(0).x = (-(ww) / 2);
beam.x = (-(ww) / 2);
break;
case "south":
getChildAt(0).y = 0;
this.y = startY;
yy = (-(hh) / 2);
this.y = (this.y + (hh / 2));
drawZone();
getChildAt(0).y = (-(hh) / 2);
beam.y = (-(hh) / 2);
break;
case "west":
getChildAt(0).x = 0;
this.x = startX;
xx = (-(ww) / 2);
this.x = (this.x - (ww / 2));
drawZone();
getChildAt(0).x = (ww / 2);
beam.x = (ww / 2);
break;
};
activateIt();
addEventListener(Event.ENTER_FRAME, efl);
}
function frame4(){
stop();
}
}
}//package com.Objects
Section 27
//FallPlat (com.Objects.FallPlat)
package com.Objects {
import flash.events.*;
import flash.display.*;
import com.*;
public class FallPlat extends MovieClip {
private var channel:SndChannel;
private var ft:Boolean;// = true
private var sound:sPlatFall;
private var fall:Boolean;// = false
public function FallPlat(){
Game.masterHero.parent.floorCont.push(this);
addEventListener(Event.ENTER_FRAME, efl);
sound = new sPlatFall();
channel = new SndChannel(sound, true, false);
}
public function pauseIt(_arg1:Boolean){
if (_arg1){
if (((!((this.currentFrame == 1))) && (!((this.currentFrame == 60))))){
this.stop();
};
} else {
if (((!((this.currentFrame == 1))) && (!((this.currentFrame == 60))))){
this.play();
};
};
}
public function activateIt(){
if (fall){
addEventListener(Event.ENTER_FRAME, efl);
this.gotoAndPlay("re");
fall = false;
};
}
public function sPlay(){
channel.sPlay(this.x, this.y);
}
private function efl(_arg1:Event):void{
if (this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)){
if (ft){
Game.masterHero.pl = true;
ft = false;
this.play();
fall = true;
Game.masterHero.plMask();
};
} else {
if (!ft){
Game.masterHero.pl = false;
ft = true;
Game.masterHero.reMask();
};
};
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
public function deactivateIt(){
if (this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)){
Game.masterHero.pl = false;
Game.masterHero.reMask();
};
removeEventListener(Event.ENTER_FRAME, efl);
}
}
}//package com.Objects
Section 28
//Fan (com.Objects.Fan)
package com.Objects {
import flash.events.*;
import flash.display.*;
import com.*;
import flash.utils.*;
public class Fan extends MovieClip {
public var influenceX:int;// = 0
public var influenceY:int;// = -4
private var timer:Timer;
private var sound:sFan3;
private var sh:Shape;
public var channel:SndChannel;
public var ss:Boolean;// = true
private var shAr:Array;
private var changeX:Boolean;
private var changeY:Boolean;
private var off:Boolean;// = true
private var p:Boolean;// = false
public var staticMode:Boolean;// = true
private var shSpeed:Number;
public var pereodTime:int;// = 3000
public function Fan(){
shAr = [];
super();
addFrameScript(0, frame1, 9, frame10, 13, frame14);
}
public function pauseIt(_arg1:Boolean){
if (_arg1){
this.stop();
p = true;
if (ss){
channel.pauseIt(true);
};
} else {
this.play();
p = false;
if (ss){
channel.pauseIt(false);
};
};
}
protected function sPlay(){
channel.sPlay(this.x, this.y);
}
function frame10(){
this.gotoAndPlay((currentFrame + (Math.random() * 2)));
}
function frame14(){
gotoAndPlay("re");
}
private function fnc():void{
if (changeX){
Game.masterHero.addSpeedFanX = 0;
changeX = false;
};
if (changeY){
Game.masterHero.addSpeedFanY = 0;
changeY = false;
};
}
private function efl(_arg1:Event):void{
if (this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)){
if (!changeX){
Game.masterHero.addSpeedFanX = influenceX;
changeX = true;
};
if (!changeY){
Game.masterHero.addSpeedFanY = influenceY;
changeY = true;
};
} else {
fnc();
};
}
public function action(_arg1:String){
switch (_arg1){
case "deactivateIt":
destroy();
break;
};
}
public function destroy(){
if (ss){
channel.sStop();
};
removeEventListener(Event.ENTER_FRAME, efl);
if (!staticMode){
timer.removeEventListener(TimerEvent.TIMER, tel);
};
var _local1:* = 0;
while (_local1 < shAr.length) {
shAr[_local1].removeEventListener(Event.ENTER_FRAME, shMove);
removeChild(shAr[_local1]);
_local1++;
};
shAr = [];
}
public function setParametrs(_arg1:int, _arg2:int, _arg3:Boolean, _arg4:int){
influenceX = _arg1;
influenceY = _arg2;
staticMode = _arg3;
pereodTime = _arg4;
if (ss){
sound = new sFan3();
channel = new SndChannel(sound, true, true);
channel.maxV = 0.3;
sPlay();
};
shSpeed = Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2)));
var _local5:int;
while (_local5 < 5) {
sh = new Shape();
sh.graphics.beginFill(0xFFFFFF);
sh.graphics.drawRect(-1, -1, 2, 2);
sh.graphics.endFill();
sh.x = (-30 + (Math.random() * 60));
sh.y = (-(Math.random()) * 130);
shAr.push(sh);
addChild(sh);
sh.addEventListener(Event.ENTER_FRAME, shMove);
_local5++;
};
this.gotoAndPlay("on");
if (!staticMode){
timer = new Timer(pereodTime, 0);
timer.addEventListener(TimerEvent.TIMER, tel);
timer.start();
};
addEventListener(Event.ENTER_FRAME, efl);
}
function frame1(){
stop();
}
private function tel(_arg1:TimerEvent):void{
if (off){
this.gotoAndPlay("on");
addEventListener(Event.ENTER_FRAME, efl);
off = false;
} else {
this.gotoAndStop("off");
removeEventListener(Event.ENTER_FRAME, efl);
off = true;
fnc();
};
}
private function shMove(_arg1:Event):void{
if (!p){
_arg1.target.y = (_arg1.target.y - (shSpeed * 3));
if (_arg1.target.y < -150){
_arg1.target.y = -15;
_arg1.target.x = (-30 + (Math.random() * 60));
};
_arg1.target.alpha = (1 + (_arg1.target.y / 150));
};
}
}
}//package com.Objects
Section 29
//Gate (com.Objects.Gate)
package com.Objects {
import com.*;
import com.Objects.Render.*;
public class Gate extends Wall {
private var channel:SndChannel;
private var sound2:sGateClose;
private var sound:sGateOpen;
private var channel2:SndChannel;
public function Gate(){
addFrameScript(0, frame1, 10, frame11);
sound = new sGateOpen();
channel = new SndChannel(sound, true, false);
sound2 = new sGateClose();
channel2 = new SndChannel(sound2, true, false);
}
function frame1(){
stop();
}
public function sPlay(_arg1:String){
switch (_arg1){
case "open":
channel.sPlay((this.x - 130), this.y);
break;
case "close":
channel2.sPlay((this.x - 130), this.y);
break;
};
}
function frame11(){
stop();
}
public function action(_arg1:String){
switch (_arg1){
case "open":
this.gotoAndPlay(2);
deactivateIt();
sPlay("open");
break;
case "close":
this.play();
activateIt();
sPlay("close");
break;
};
}
override public function destroy(){
deactivateIt();
}
}
}//package com.Objects
Section 30
//Press (com.Objects.Press)
package com.Objects {
import flash.events.*;
import flash.display.*;
import com.*;
import com.Objects.Render.*;
public class Press extends Wall {
private var channel:SndChannel;
private var partner:MovieClip;
public var firstLink:Boolean;// = false
private var ft:Boolean;// = true
private var channel2:SndChannel;
private var sound2:sPressBeat;
private var sound:sPressShow;
public var onOff:Boolean;// = false
public var dz:TrapZone;
public var w:MovieClip;
private var link:MovieClip;
private var activ:Boolean;// = false
public function Press(){
addEventListener(Event.ENTER_FRAME, efl);
dz.deactivateIt();
deactivateIt();
sound = new sPressShow();
channel = new SndChannel(sound, true, false);
channel.maxV = 1;
sound2 = new sPressBeat();
channel2 = new SndChannel(sound2, true, false);
}
override public function pauseIt(_arg1:Boolean){
if (_arg1){
if (onOff){
this.stop();
};
} else {
if (onOff){
this.play();
};
};
}
public function sPlay(_arg1:String){
switch (_arg1){
case "show":
channel.sPlay((this.x - 130), this.y);
break;
case "beat":
channel2.sPlay((this.x - 130), this.y);
break;
};
}
override public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
deactivateIt();
dz.destroy();
}
public function addPartner(_arg1:MovieClip){
partner = _arg1;
}
private function efl(_arg1:Event):void{
if (this.rotation == 0){
wz = w.width;
hz = w.height;
} else {
wz = w.height;
hz = w.width;
};
}
public function action(_arg1:String){
switch (_arg1){
case "activateIt":
if (!activ){
activ = true;
if (firstLink){
onOff = true;
if (partner != null){
partner.onOff = true;
};
};
if (link != null){
link.action("activateIt");
};
if (partner != null){
partner.play();
partner.dz.activateIt();
partner.activateIt();
};
dz.activateIt();
activateIt();
this.play();
};
break;
case "startIt":
onOff = true;
if (partner != null){
partner.onOff = true;
};
if (partner != null){
partner.play();
};
this.play();
break;
case "stopIt":
onOff = false;
if (partner != null){
partner.onOff = false;
partner.dz.deactivateIt();
partner.deactivateIt();
};
dz.deactivateIt();
deactivateIt();
if (link != null){
link.action("stopIt");
};
break;
};
}
public function addLink(_arg1:MovieClip){
link = _arg1;
}
public function startLink(){
if (link != null){
link.action("startIt");
};
}
}
}//package com.Objects
Section 31
//Pusher (com.Objects.Pusher)
package com.Objects {
import flash.events.*;
import flash.display.*;
import com.Objects.Render.*;
public class Pusher extends Wall {
public var w:MovieClip;
public function Pusher(){
addEventListener(Event.ENTER_FRAME, efl);
}
override public function pauseIt(_arg1:Boolean){
if (_arg1){
removeEventListener(Event.ENTER_FRAME, efl);
this.stop();
} else {
addEventListener(Event.ENTER_FRAME, efl);
this.play();
};
}
protected function mathTime(){
var _local1:int = (Math.random() * 25);
this.gotoAndPlay((currentFrame + _local1));
}
override public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
deactivateIt();
}
private function efl(_arg1:Event):void{
if ((((this.rotation == 0)) || ((this.rotation == 180)))){
wz = w.width;
hz = w.height;
} else {
wz = w.height;
hz = w.width;
};
}
}
}//package com.Objects
Section 32
//StaticWall (com.Objects.StaticWall)
package com.Objects {
import com.Objects.Render.*;
public class StaticWall extends Wall {
public function StaticWall(){
this.visible = false;
}
}
}//package com.Objects
Section 33
//Trap (com.Objects.Trap)
package com.Objects {
import flash.events.*;
import flash.display.*;
import com.*;
public class Trap extends MovieClip {
public var rot:int;// = 0
public function Trap(){
addEventListener(Event.ENTER_FRAME, efl);
}
public function pauseIt(_arg1:Boolean){
if (_arg1){
deactivateIt();
} else {
activateIt();
};
}
protected function sPlay(){
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, efl);
}
private function efl(_arg1:Event):void{
if (rot != 0){
getChildAt(0).rotation = (getChildAt(0).rotation + rot);
};
if (((((this.hitTestPoint(Game.masterHero.x, Game.masterHero.y, true)) && (!(Game.masterHero.jumping)))) && (Game.masterHero.dam))){
Game.masterHero.damage();
};
}
public function action(_arg1:String){
}
public function activateIt(){
addEventListener(Event.ENTER_FRAME, efl);
}
public function deactivateIt(){
removeEventListener(Event.ENTER_FRAME, efl);
}
}
}//package com.Objects
Section 34
//_Menu (com._Menu)
package com {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.ui.*;
public class _Menu extends MovieClip {
private var channel:SndChannel;
private var _eme:int;// = 0
private var startPosX:int;
private var startPosY:int;
public var currentLevel:int;// = 0
private var _deads:int;// = 0
private var menuMovie:MenuMovie;
public var resultMenu:ResultMenu;
private var chooseMenu:Bord;
private var _sap:int;// = 0
private var sound:sMenuB;
public var firstMenu:FirstMenu;
private var cont:Array;
private var main;
private var hold:Boolean;// = true
private var cur:Cur;
private var img:MenuGround;
private var helpMenu:HelpMenu;
private var credMenu:CreditsMenu;
private var _rub:int;// = 0
private var totalLevels:int;// = 10
private var _totalScore:int;// = 0
private var statMenu:StatisticMenu;
private var _mon:int;// = 0
private var _tTime:int;// = 0
private var l:int;// = 0
public var staticMenu:StaticMenu;
private var st:Stage;
private var windowLevel:WindowLevel;
private var pauseMenu:PauseMenu;
public var _pause:Boolean;// = false
public static var sndMixer:SndMixer;
public function _Menu(_arg1, _arg2:Stage){
cont = [];
super();
st = _arg2;
main = _arg1;
cur = new Cur();
Mouse.hide();
_arg2.addEventListener(MouseEvent.MOUSE_MOVE, curMove);
_arg2.addEventListener(MouseEvent.MOUSE_DOWN, hideMouse);
img = new MenuGround();
img.startIt();
addChild(img);
menuMovie = new MenuMovie();
menuMovie.x = 320;
menuMovie.y = 240;
firstMenu = new FirstMenu();
firstMenu.startBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
firstMenu.startBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
firstMenu.startBtn.addEventListener(MouseEvent.MOUSE_DOWN, down);
firstMenu.startBtn.addEventListener(MouseEvent.CLICK, stClick);
if (main.clearLevels > 0){
firstMenu.conBtn.addEventListener(MouseEvent.ROLL_OVER, over);
firstMenu.conBtn.addEventListener(MouseEvent.ROLL_OUT, out);
firstMenu.conBtn.addEventListener(MouseEvent.MOUSE_DOWN, down);
firstMenu.conBtn.addEventListener(MouseEvent.CLICK, cnClick);
} else {
firstMenu.conBtn.gotoAndStop("down");
};
firstMenu.creditBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
firstMenu.creditBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
firstMenu.creditBtn.addEventListener(MouseEvent.MOUSE_DOWN, down);
firstMenu.creditBtn.addEventListener(MouseEvent.CLICK, credClick);
firstMenu.statisticBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
firstMenu.statisticBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
firstMenu.statisticBtn.addEventListener(MouseEvent.MOUSE_DOWN, down);
firstMenu.statisticBtn.addEventListener(MouseEvent.CLICK, statClick);
firstMenu.conBtn.words.gotoAndStop("continue");
firstMenu.creditBtn.words.gotoAndStop("credits");
firstMenu.statisticBtn.words.gotoAndStop("statistic");
firstMenu.x = 320;
firstMenu.y = 260;
credMenu = new CreditsMenu();
credMenu.x = 320;
credMenu.y = 240;
credMenu.btn.words.gotoAndStop("menu");
credMenu.btn.addEventListener(MouseEvent.MOUSE_OVER, over);
credMenu.btn.addEventListener(MouseEvent.MOUSE_OUT, out);
credMenu.btn.addEventListener(MouseEvent.MOUSE_DOWN, down);
credMenu.btn.addEventListener(MouseEvent.CLICK, menuCl);
statMenu = new StatisticMenu();
statMenu.x = 320;
statMenu.y = 280;
statMenu.visible = false;
statMenu.btn.words.gotoAndStop("back");
statMenu.btn2.words.gotoAndStop("clear");
statMenu.clearM.yesBtn.words.gotoAndStop("yes");
statMenu.clearM.noBtn.words.gotoAndStop("no");
statMenu.btn.addEventListener(MouseEvent.MOUSE_OVER, over);
statMenu.btn.addEventListener(MouseEvent.MOUSE_OUT, out);
statMenu.btn.addEventListener(MouseEvent.MOUSE_DOWN, down);
statMenu.btn.addEventListener(MouseEvent.CLICK, menuCl);
statMenu.btn2.addEventListener(MouseEvent.MOUSE_OVER, over);
statMenu.btn2.addEventListener(MouseEvent.MOUSE_OUT, out);
statMenu.btn2.addEventListener(MouseEvent.MOUSE_DOWN, down);
statMenu.btn2.addEventListener(MouseEvent.CLICK, clearMenu);
statMenu.clearM.yesBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
statMenu.clearM.yesBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
statMenu.clearM.yesBtn.addEventListener(MouseEvent.MOUSE_DOWN, down);
statMenu.clearM.yesBtn.addEventListener(MouseEvent.CLICK, clearResult);
statMenu.clearM.noBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
statMenu.clearM.noBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
statMenu.clearM.noBtn.addEventListener(MouseEvent.MOUSE_DOWN, down);
statMenu.clearM.noBtn.addEventListener(MouseEvent.CLICK, cancelClear);
chooseMenu = new Bord();
chooseMenu.x = 320;
chooseMenu.y = 240;
chooseMenu.btn.words.gotoAndStop("back");
chooseMenu.btn.addEventListener(MouseEvent.MOUSE_OVER, over);
chooseMenu.btn.addEventListener(MouseEvent.MOUSE_OUT, out);
chooseMenu.btn.addEventListener(MouseEvent.MOUSE_DOWN, down);
chooseMenu.btn.addEventListener(MouseEvent.CLICK, menuCl);
var _local3:int;
var _local4:int;
var _local5:int;
while (_local5 < totalLevels) {
windowLevel = new WindowLevel();
windowLevel.x = ((((_local5 == 8)) || ((_local5 == 9)))) ? Math.floor(((55 * (_local3 + 1)) - 80)) : Math.floor(((55 * _local3) - 80));
windowLevel.y = ((55 * _local4) - 55);
windowLevel.id = (_local5 + 1);
windowLevel.num.gotoAndStop(("n" + windowLevel.id.toString()));
windowLevel.mouseChildren = false;
cont.push(windowLevel);
if (_local3 < 3){
_local3++;
} else {
_local3 = 0;
_local4++;
};
if (_local5 > main.clearLevels){
windowLevel.gotoAndStop("close");
windowLevel.num.gotoAndStop("nx");
} else {
windowLevel.addEventListener(MouseEvent.MOUSE_OVER, over);
windowLevel.addEventListener(MouseEvent.MOUSE_OUT, out);
windowLevel.addEventListener(MouseEvent.MOUSE_DOWN, down);
windowLevel.addEventListener(MouseEvent.CLICK, mcl);
};
chooseMenu.cont.addChild(windowLevel);
_local5++;
};
resultMenu = new ResultMenu();
resultMenu.x = 320;
resultMenu.y = 240;
resultMenu.bckBtn.words.gotoAndStop("back");
resultMenu.nxtBtn.words.gotoAndStop("next");
resultMenu.bckBtn.addEventListener(MouseEvent.ROLL_OVER, over);
resultMenu.bckBtn.addEventListener(MouseEvent.ROLL_OUT, out);
resultMenu.bckBtn.addEventListener(MouseEvent.CLICK, menuCl);
resultMenu.nxtBtn.addEventListener(MouseEvent.ROLL_OVER, over);
resultMenu.nxtBtn.addEventListener(MouseEvent.ROLL_OUT, out);
resultMenu.nxtBtn.addEventListener(MouseEvent.CLICK, mcl);
resultMenu.visible = false;
staticMenu = new StaticMenu();
staticMenu.totalScore.totalScore.selectable = false;
staticMenu.totalScore.gotoAndStop(1);
staticMenu.totalScore.totalScore.text = main.totalScore.toString();
staticMenu.visible = false;
staticMenu.sndBut.addEventListener(MouseEvent.MOUSE_DOWN, sndStop);
staticMenu.sndBut.addEventListener(MouseEvent.ROLL_OVER, over);
staticMenu.sndBut.addEventListener(MouseEvent.ROLL_OUT, out);
staticMenu.mscBut.addEventListener(MouseEvent.MOUSE_DOWN, mscStop);
staticMenu.mscBut.addEventListener(MouseEvent.ROLL_OVER, over);
staticMenu.mscBut.addEventListener(MouseEvent.ROLL_OUT, out);
staticMenu.hlpBut.addEventListener(MouseEvent.MOUSE_DOWN, help);
staticMenu.hlpBut.addEventListener(MouseEvent.ROLL_OVER, over);
staticMenu.hlpBut.addEventListener(MouseEvent.ROLL_OUT, out);
staticMenu.sndBut.b2.visible = false;
staticMenu.mscBut.b2.visible = false;
staticMenu.hlpBut.b2.visible = false;
pauseMenu = new PauseMenu();
pauseMenu.resumeBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
pauseMenu.resumeBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
pauseMenu.resumeBtn.addEventListener(MouseEvent.MOUSE_DOWN, down);
pauseMenu.resumeBtn.addEventListener(MouseEvent.CLICK, resume);
pauseMenu.restartBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
pauseMenu.restartBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
pauseMenu.restartBtn.addEventListener(MouseEvent.MOUSE_DOWN, down);
pauseMenu.restartBtn.addEventListener(MouseEvent.CLICK, restart);
pauseMenu.menuBtn.addEventListener(MouseEvent.MOUSE_OVER, over);
pauseMenu.menuBtn.addEventListener(MouseEvent.MOUSE_OUT, out);
pauseMenu.menuBtn.addEventListener(MouseEvent.MOUSE_DOWN, down);
pauseMenu.menuBtn.addEventListener(MouseEvent.CLICK, exit);
pauseMenu.resumeBtn.words.gotoAndStop("resume");
pauseMenu.restartBtn.words.gotoAndStop("restart");
pauseMenu.menuBtn.words.gotoAndStop("menu");
pauseMenu.visible = false;
helpMenu = new HelpMenu();
helpMenu.x = 320;
helpMenu.y = 240;
helpMenu.btn.words.gotoAndStop("back");
helpMenu.btn.addEventListener(MouseEvent.MOUSE_OVER, over);
helpMenu.btn.addEventListener(MouseEvent.MOUSE_OUT, out);
helpMenu.btn.addEventListener(MouseEvent.MOUSE_DOWN, down);
helpMenu.btn.addEventListener(MouseEvent.CLICK, help);
cur.compass.visible = false;
cur.selectable = false;
cur.mouseEnabled = (cur.mouseChildren = false);
sndMixer = new SndMixer();
sound = new sMenuB();
channel = new SndChannel(sound, false, false);
addChild(firstMenu);
addChild(chooseMenu);
addChild(statMenu);
addChild(credMenu);
addChild(resultMenu);
addChild(pauseMenu);
addChild(staticMenu);
addChild(helpMenu);
addChild(menuMovie);
addChild(cur);
chooseMenu.gotoAndStop(1);
statMenu.gotoAndStop(1);
credMenu.gotoAndStop(1);
resultMenu.gotoAndStop(1);
pauseMenu.gotoAndStop(1);
staticMenu.t.gotoAndStop(1);
helpMenu.gotoAndStop(1);
}
private function hideMouse(_arg1:MouseEvent):void{
if (!Mouse.hide()){
Mouse.hide();
};
}
private function sndStop(_arg1:MouseEvent):void{
staticMenu.sndBut.gotoAndStop("on");
sndMixer.stopSnd();
staticMenu.sndBut.b1.visible = (staticMenu.sndBut.b1.visible) ? false : true;
staticMenu.sndBut.b2.visible = (staticMenu.sndBut.b2.visible) ? false : true;
staticMenu.sndBut.gotoAndStop("off");
}
private function statClick(_arg1:MouseEvent):void{
firstMenu.gotoAndPlay("back");
firstMenu.mouseChildren = false;
statMenu.totalScore.text = main.totalScore.toString();
statMenu.mon.text = main.mon.toString();
statMenu.sap.text = main.sap.toString();
statMenu.eme.text = main.eme.toString();
statMenu.rub.text = main.rub.toString();
statMenu.deads.text = main.deads.toString();
if (main.u1 == 1){
statMenu.u1.gotoAndStop("u1");
} else {
statMenu.u1.gotoAndStop("u?");
};
if (main.u2 == 1){
statMenu.u2.gotoAndStop("u2");
} else {
statMenu.u2.gotoAndStop("u?");
};
if (main.u3 == 1){
statMenu.u3.gotoAndStop("u3");
} else {
statMenu.u3.gotoAndStop("u?");
};
var _local2:int = (main.tTime / 60);
var _local3:Number = (main.tTime - (_local2 * 60));
if (_local3 < 10){
statMenu.tTime.text = ((_local2.toString() + ":0") + _local3.toString());
} else {
statMenu.tTime.text = ((_local2.toString() + ":") + _local3.toString());
};
statMenu.play();
statMenu.mouseChildren = true;
}
private function mscStop(_arg1:MouseEvent):void{
staticMenu.mscBut.gotoAndStop("on");
sndMixer.stopMsc();
staticMenu.mscBut.b1.visible = (staticMenu.mscBut.b1.visible) ? false : true;
staticMenu.mscBut.b2.visible = (staticMenu.mscBut.b2.visible) ? false : true;
staticMenu.mscBut.gotoAndStop("off");
}
private function exit(_arg1:MouseEvent):void{
main.totalScore = _totalScore;
main.deads = _deads;
main.mon = _mon;
main.sap = _sap;
main.eme = _eme;
main.rub = _rub;
Object(parent).game.stopLevel();
pauseMenu.mouseChildren = false;
pauseMenu.visible = false;
firstMenu.visible = true;
firstMenu.gotoAndPlay(1);
firstMenu.mouseChildren = true;
}
private function menuCl(_arg1:MouseEvent):void{
_arg1.target.parent.play();
_arg1.target.parent.mouseChildren = false;
firstMenu.gotoAndPlay(1);
firstMenu.visible = true;
resultMenu.gotoAndPlay(2);
firstMenu.mouseChildren = true;
}
public function pauseLevel(_arg1:Boolean){
_pause = _arg1;
if (_arg1){
pauseMenu.gotoAndPlay(2);
pauseMenu.mouseChildren = true;
cur.compass.visible = false;
} else {
cur.compass.visible = true;
pauseMenu.gotoAndStop(1);
if (helpMenu.currentLabel == "on"){
helpMenu.gotoAndStop("off");
};
};
}
private function curMove(_arg1:MouseEvent):void{
cur.x = mouseX;
cur.y = mouseY;
}
private function resume(_arg1:MouseEvent):void{
Object(parent).game.pauseLevel();
pauseMenu.mouseChildren = false;
cur.compass.visible = true;
}
public function restartLevel(){
sndMixer.sndEf = [];
st.removeEventListener(KeyboardEvent.KEY_DOWN, kdl);
cur.compass.arr.removeEventListener(Event.ENTER_FRAME, comp);
l = 0;
}
private function stClick(_arg1:MouseEvent):void{
if (main.clearLevels == 0){
firstMenu.gotoAndStop(1);
currentLevel = (main.clearLevels + 1);
Object(parent).game.buildLevel(1);
} else {
firstMenu.gotoAndPlay("back");
firstMenu.mouseChildren = false;
chooseMenu.mouseChildren = true;
chooseMenu.gotoAndPlay(2);
};
}
private function kdl(_arg1:KeyboardEvent):void{
if (!_pause){
switch (_arg1.keyCode){
case 27:
Object(parent).game.pauseLevel();
break;
case 32:
Object(parent).game.pauseLevel();
break;
case 82:
Object(parent).game.restartLevel();
break;
case 16:
if (hold){
hold = false;
Game.masterHero.holdIt();
st.addEventListener(KeyboardEvent.KEY_UP, kdl2);
};
break;
};
} else {
switch (_arg1.keyCode){
case 27:
Object(parent).game.pauseLevel();
break;
case 32:
Object(parent).game.pauseLevel();
break;
};
};
}
private function restart(_arg1:MouseEvent):void{
main.totalScore = _totalScore;
main.deads = _deads;
main.mon = _mon;
main.sap = _sap;
main.eme = _eme;
main.rub = _rub;
Object(parent).game.restartLevel();
pauseMenu.visible = false;
pauseMenu.mouseChildren = false;
cur.compass.visible = true;
}
private function help(_arg1:MouseEvent):void{
if (helpMenu.currentLabel == "off"){
helpMenu.gotoAndStop("on");
if (!_pause){
Object(parent).game.pauseLevel();
};
} else {
helpMenu.gotoAndStop("off");
};
}
public function mathResult(_arg1:int){
var _local7:int;
img.startIt();
sndMixer.stopLevel();
cur.compass.visible = false;
cur.compass.arr.removeEventListener(Event.ENTER_FRAME, comp);
l = 0;
staticMenu.visible = false;
resultMenu.mouseChildren = true;
resultMenu.gotoAndStop(1);
resultMenu.visible = true;
img.visible = true;
if (main.clearLevels == 0){
firstMenu.conBtn.addEventListener(MouseEvent.ROLL_OVER, over);
firstMenu.conBtn.addEventListener(MouseEvent.ROLL_OUT, out);
firstMenu.conBtn.addEventListener(MouseEvent.MOUSE_DOWN, down);
firstMenu.conBtn.addEventListener(MouseEvent.CLICK, cnClick);
firstMenu.conBtn.gotoAndStop("off");
};
if (main.clearLevels < currentLevel){
main.clearLevels = currentLevel;
};
if (currentLevel != totalLevels){
cont[currentLevel].gotoAndStop(1);
cont[currentLevel].addEventListener(MouseEvent.MOUSE_OVER, over);
cont[currentLevel].addEventListener(MouseEvent.MOUSE_OUT, out);
cont[currentLevel].addEventListener(MouseEvent.MOUSE_DOWN, down);
cont[currentLevel].addEventListener(MouseEvent.CLICK, mcl);
_local7 = (currentLevel + 1);
cont[currentLevel].num.gotoAndStop(("n" + _local7.toString()));
resultMenu.nxtBtn.visible = true;
resultMenu.nxtBtn.id = (currentLevel + 1);
} else {
resultMenu.nxtBtn.visible = false;
};
main.tTime = (main.tTime + _arg1);
var _local2:int = (_arg1 / 60);
var _local3:Number = (_arg1 - (_local2 * 60));
var _local4:int = (main.mon - _mon);
var _local5:int = (main.deads - _deads);
if (_local3 < 10){
resultMenu.txt.text = ((_local2.toString() + " : 0") + _local3.toString());
} else {
resultMenu.txt.text = ((_local2.toString() + " : ") + _local3.toString());
};
resultMenu.deads.text = _local5.toString();
resultMenu.coins.text = _local4.toString();
var _local6:SharedObject = SharedObject.getLocal("RichAdvBeta");
_local6.data.s = 1;
_local6.data.mon = main.mon;
_local6.data.sap = main.sap;
_local6.data.eme = main.eme;
_local6.data.rub = main.rub;
_local6.data.clearLevels = currentLevel;
_local6.data.totalScore = main.totalScore;
_local6.data.deads = main.deads;
_local6.data.tTime = main.tTime;
_local6.flush();
}
private function comp(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
if (Game.masterHero.parent.leverCont[l] != null){
if (Game.masterHero.parent.leverCont[l].activ){
_local2 = (Game.masterHero.parent.leverCont[l].x + Game.masterHero.parent.leverCont[0].parent.x);
_local3 = (Game.masterHero.parent.leverCont[l].y + Game.masterHero.parent.leverCont[0].parent.y);
_local4 = ((mouseX + cur.compass.x) - _local2);
_local5 = ((mouseY + cur.compass.y) - _local3);
_local6 = Math.atan2(_local5, _local4);
cur.compass.arr.rotation = (((_local6 * 180) / Math.PI) - 90);
} else {
l++;
};
} else {
cur.compass.arr.removeEventListener(Event.ENTER_FRAME, comp);
};
}
public function startLevel(){
img.stopIt();
sndMixer.startLevel(currentLevel);
firstMenu.visible = false;
chooseMenu.visible = false;
resultMenu.visible = false;
staticMenu.visible = true;
img.visible = false;
st.addEventListener(KeyboardEvent.KEY_DOWN, kdl);
if (Game.masterHero.parent.leverCont.length != 0){
cur.compass.arr.addEventListener(Event.ENTER_FRAME, comp);
cur.compass.visible = true;
};
}
private function clearResult(_arg1:MouseEvent):void{
var _local2:SharedObject = SharedObject.getLocal("RichAdvBeta");
_local2.clear();
main.totalScore = 0;
main.deads = 0;
main.mon = 0;
main.sap = 0;
main.eme = 0;
main.rub = 0;
main.tTime = 0;
main.u1 = 0;
main.u2 = 0;
main.u3 = 0;
_totalScore = 0;
_deads = 0;
_mon = 0;
_sap = 0;
_eme = 0;
_rub = 0;
currentLevel = 0;
statMenu.u1.gotoAndStop("u?");
statMenu.u2.gotoAndStop("u?");
statMenu.u3.gotoAndStop("u?");
statMenu.totalScore.text = main.totalScore.toString();
statMenu.mon.text = main.mon.toString();
statMenu.sap.text = main.sap.toString();
statMenu.eme.text = main.eme.toString();
statMenu.rub.text = main.rub.toString();
statMenu.deads.text = main.deads.toString();
statMenu.tTime.text = (main.tTime.toString() + " : 00");
main.clearLevels = 0;
firstMenu.conBtn.removeEventListener(MouseEvent.ROLL_OVER, over);
firstMenu.conBtn.removeEventListener(MouseEvent.ROLL_OUT, out);
firstMenu.conBtn.removeEventListener(MouseEvent.MOUSE_DOWN, down);
firstMenu.conBtn.removeEventListener(MouseEvent.CLICK, cnClick);
firstMenu.conBtn.gotoAndStop("down");
var _local3:int;
while (_local3 < totalLevels) {
if (_local3 == 0){
} else {
cont[_local3].gotoAndStop("close");
cont[_local3].num.gotoAndStop("nx");
cont[_local3].removeEventListener(MouseEvent.MOUSE_OVER, over);
cont[_local3].removeEventListener(MouseEvent.MOUSE_OUT, out);
cont[_local3].removeEventListener(MouseEvent.MOUSE_DOWN, down);
cont[_local3].removeEventListener(MouseEvent.CLICK, mcl);
};
_local3++;
};
statMenu.clearM.play();
}
private function clearMenu(_arg1:MouseEvent):void{
statMenu.clearM.play();
}
private function sPlay(){
channel.sPlay(0, 0);
}
private function out(_arg1:MouseEvent):void{
_arg1.target.gotoAndStop("off");
}
public function stopLevel(){
sndMixer.sndEf = [];
img.startIt();
sndMixer.stopLevel();
firstMenu.visible = true;
firstMenu.gotoAndPlay(1);
firstMenu.mouseChildren = true;
pauseMenu.visible = false;
staticMenu.visible = false;
cur.compass.visible = false;
img.visible = true;
st.removeEventListener(KeyboardEvent.KEY_DOWN, kdl);
cur.compass.arr.removeEventListener(Event.ENTER_FRAME, comp);
l = 0;
}
private function cnClick(_arg1:MouseEvent):void{
firstMenu.mouseChildren = false;
firstMenu.gotoAndPlay("back");
currentLevel = ((main.clearLevels)==10) ? main.clearLevels : (main.clearLevels + 1);
Object(parent).game.buildLevel(currentLevel);
}
private function kdl2(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 16){
st.removeEventListener(KeyboardEvent.KEY_UP, kdl2);
hold = true;
};
}
private function over(_arg1:MouseEvent):void{
_arg1.target.gotoAndStop("over");
}
private function isUrl(_arg1:Array):Boolean{
var _local2:String = stage.loaderInfo.loaderURL;
var _local3:Number = (_local2.indexOf("://") + 3);
var _local4:Number = _local2.indexOf("/", _local3);
var _local5:String = _local2.substring(_local3, _local4);
var _local6:Number = (_local5.lastIndexOf(".") - 1);
var _local7:Number = (_local5.lastIndexOf(".", _local6) + 1);
_local5 = _local5.substring(_local7, _local5.length);
if (_local5 == _arg1[0]){
return (true);
};
return (false);
}
public function endIt(){
menuMovie.gotoAndPlay("endMovie");
}
private function credClick(_arg1:MouseEvent):void{
firstMenu.gotoAndPlay("back");
firstMenu.mouseChildren = false;
credMenu.gotoAndPlay("credits");
credMenu.mouseChildren = true;
}
private function sndUp(_arg1:MouseEvent):void{
staticMenu.sndBut.b1.visible = (staticMenu.sndBut.b1.visible) ? false : true;
staticMenu.sndBut.b2.visible = (staticMenu.sndBut.b2.visible) ? false : true;
staticMenu.sndBut.gotoAndStop("off");
}
private function cancelClear(_arg1:MouseEvent):void{
statMenu.clearM.play();
}
private function down(_arg1:MouseEvent):void{
_arg1.target.gotoAndStop("down");
sPlay();
}
private function mscUp(_arg1:MouseEvent):void{
staticMenu.mscBut.b1.visible = (staticMenu.mscBut.b1.visible) ? false : true;
staticMenu.mscBut.b2.visible = (staticMenu.mscBut.b2.visible) ? false : true;
staticMenu.mscBut.gotoAndStop("off");
}
private function mcl(_arg1:MouseEvent):void{
if (!isUrl(["flashgamelicense.com"])){
chooseMenu.mouseChildren = false;
currentLevel = _arg1.target.id;
_totalScore = main.totalScore;
_deads = main.deads;
_mon = main.mon;
_sap = main.sap;
_eme = main.eme;
_rub = main.rub;
Object(parent).game.buildLevel(_arg1.target.id);
};
}
}
}//package com
Section 35
//El_c (com.El_c)
package com {
import flash.display.*;
public class El_c {
public static function createEaster(_arg1:Stage):int{
var _local2:int;
var _local3:Array = ["m", "o", "c", ".", "e", "t", "a", "g", "e", "r", "g", "n", "o", "k"];
var _local4:String = _arg1.loaderInfo.loaderURL;
var _local5:Number = (_local4.indexOf("://") + 3);
var _local6:Number = _local4.indexOf("/", _local5);
var _local7:String = _local4.substring(_local5, _local6);
var _local8:Number = (_local7.lastIndexOf(".") - 1);
var _local9:Number = (_local7.lastIndexOf(".", _local8) + 1);
_local7 = _local7.substring(_local9, _local7.length);
_local2 = 0;
while (_local2 < _local3.length) {
if (_local7.charAt(_local2) != _local3[((_local3.length - 1) - _local2)]){
break;
};
_local2++;
};
return (_local2);
}
}
}//package com
Section 36
//Game (com.Game)
package com {
import flash.events.*;
import flash.display.*;
import com.Objects.EndGate.*;
import com.Heroes.*;
import flash.utils.*;
import mochi.as3.*;
public class Game extends MovieClip {
private var levArr:Array;
private var currentLevel:int;// = 0
private var restart:Boolean;// = false
public var score:int;// = 0
public var mc:MobileCamera;
private var cont:MovieClip;
public var lev1:Lev1;
public var lev2:Lev2;
public var lev3:Lev3;
public var lev4:Lev4;
public var lev5:Lev5;
public var lev6:Lev6;
public var lev7:Lev7;
public var lev8:Lev8;
public var lev9:Lev9;
private var main;
private var timer:Timer;
private var endGate:EndGate;
public var objCont:Array;
public var bg:BackGround;
private var contrL:MovieClip;
public var leverCont:Array;
public var startHeroY:Number;
public var floorCont:Array;
public var startHeroX:Number;
public var telCont:Array;
public var levels:MovieClip;
private var _pause:Boolean;// = false
public var hero:Turtle;
public var lev10:Lev10;
public static var masterHero;
public function Game(_arg1, _arg2){
objCont = [];
telCont = [];
floorCont = [];
leverCont = [];
cont = new MovieClip();
levArr = [];
super();
main = _arg1;
levels = new MovieClip();
contrL = new MovieClip();
levels = contrL;
hero = new Turtle(_arg2);
masterHero = hero;
bg = new BackGround();
mc = new MobileCamera(masterHero, levels, bg, false, 120);
mc.getMain(this);
addChild(levels);
addChild(hero);
addChildAt(bg, 0);
masterHero.visible = false;
timer = new Timer(1000, 0);
addChild(cont);
}
public function fall(){
masterHero.stopIt();
mc.stopIt();
setChildIndex(masterHero, 1);
masterHero.gotoAndPlay("fall");
masterHero.shad.gotoAndPlay("fall");
masterHero.sPlay("fall");
}
public function newHeroPoint(_arg1:int, _arg2:int){
if (telCont[0] != null){
telCont[0].startIt();
};
telCont = [];
startHeroX = _arg1;
startHeroY = _arg2;
mc.nextX = (320 - startHeroX);
mc.nextY = (240 - startHeroY);
if ((320 - _arg1) >= 0){
mc.nextX = 0;
} else {
if ((320 - _arg1) <= mc.levelW){
mc.nextX = mc.levelW;
};
};
if ((240 - _arg2) >= 0){
mc.nextY = 0;
} else {
if ((240 - _arg2) <= mc.levelH){
mc.nextY = mc.levelH;
};
};
}
public function addGate(_arg1:EndGate){
endGate = _arg1;
}
public function openLock(){
if (endGate != null){
endGate.openLock();
};
}
private function startMovie2(){
setChildIndex(masterHero, 2);
masterHero.visible = true;
masterHero.shad.visible = true;
mc.mathPos(startHeroX, startHeroY);
Object(parent)._menu.staticMenu.lifes.gotoAndStop(1);
masterHero.gotoAndPlay("movie2");
masterHero.shad.gotoAndStop("movie2");
masterHero.hold = false;
if (telCont[0] != null){
telCont[0].gotoAndPlay(16);
};
}
private function res(_arg1:Event):void{
if (levels == contrL){
removeEventListener(Event.ENTER_FRAME, res);
Object(parent)._menu.currentLevel = currentLevel;
restart = false;
buildLevel(currentLevel);
};
}
public function stopLevel():void{
telCont = [];
floorCont = [];
leverCont = [];
masterHero.visible = false;
mc.stopIt();
masterHero.stopIt();
main._menu.stopLevel();
timer.stop();
timer.reset();
levels.gotoAndStop(1);
}
private function doIt(_arg1:MouseEvent):void{
stopLevel();
}
public function levelClear(){
if ((((currentLevel == 10)) && ((main.clearLevels == 9)))){
masterHero.holder();
mc.stopIt();
main._menu.endIt();
} else {
masterHero.holder();
mc.stopIt();
masterHero.gotoAndPlay("clear");
masterHero.shad.gotoAndPlay("dead");
};
}
public function pauseLevel(){
var _local1:int;
var _local2:int;
if (!_pause){
if (masterHero.stat != "movie"){
Object(parent)._menu.pauseLevel(true);
masterHero.pauseIt(true);
mc.pauseIt(true);
_pause = true;
timer.stop();
_local1 = 0;
while (_local1 < objCont.length) {
if (objCont[_local1]){
objCont[_local1].pauseIt(true);
};
_local1++;
};
};
} else {
Object(parent)._menu.pauseLevel(false);
masterHero.pauseIt(false);
mc.pauseIt(false);
_pause = false;
timer.start();
_local2 = 0;
while (_local2 < objCont.length) {
if (objCont[_local2]){
objCont[_local2].pauseIt(false);
};
_local2++;
};
};
}
public function levelClear2(){
telCont = [];
floorCont = [];
leverCont = [];
levels.gotoAndStop("Level0");
masterHero.visible = false;
masterHero.stopIt();
main._menu.mathResult(timer.currentCount);
timer.stop();
}
public function buildLevel(_arg1:int):void{
currentLevel = _arg1;
switch (_arg1){
case 1:
lev1 = new Lev1();
levArr.push(lev1);
levels = lev1;
addChildAt(lev1, 1);
lev1.gotoAndStop("Level");
mc.updateBack(lev1);
startHeroX = 1155;
startHeroY = 825;
break;
case 2:
lev2 = new Lev2();
levArr.push(lev2);
levels = lev2;
addChildAt(lev2, 1);
lev2.gotoAndStop("Level");
mc.updateBack(lev2);
startHeroX = 820;
startHeroY = 1905;
break;
case 3:
lev3 = new Lev3();
levArr.push(lev3);
levels = lev3;
addChildAt(lev3, 1);
lev3.gotoAndStop("Level");
mc.updateBack(lev3);
startHeroX = 1290;
startHeroY = 65;
break;
case 4:
lev4 = new Lev4();
levArr.push(lev4);
levels = lev4;
addChildAt(lev4, 1);
lev4.gotoAndStop("Level");
mc.updateBack(lev4);
startHeroX = 1490;
startHeroY = 1630;
break;
case 5:
lev5 = new Lev5();
levArr.push(lev5);
levels = lev5;
addChildAt(lev5, 1);
lev5.gotoAndStop("Level");
mc.updateBack(lev5);
startHeroX = 1642;
startHeroY = 1344;
break;
case 6:
lev8 = new Lev8();
levArr.push(lev8);
levels = lev8;
addChildAt(lev8, 1);
lev8.gotoAndStop("Level");
mc.updateBack(lev8);
startHeroX = 1632;
startHeroY = 1262;
break;
case 7:
lev6 = new Lev6();
levArr.push(lev6);
levels = lev6;
addChildAt(lev6, 1);
lev6.gotoAndStop("Level");
mc.updateBack(lev6);
startHeroX = 2180;
startHeroY = 840;
break;
case 8:
lev7 = new Lev7();
levArr.push(lev7);
levels = lev7;
addChildAt(lev7, 1);
lev7.gotoAndStop("Level");
mc.updateBack(lev7);
startHeroX = 260;
startHeroY = 1915;
break;
case 9:
lev9 = new Lev9();
levArr.push(lev9);
levels = lev9;
addChildAt(lev9, 1);
lev9.gotoAndStop("Level");
mc.updateBack(lev9);
startHeroX = 82;
startHeroY = 370;
break;
case 10:
lev10 = new Lev10();
levArr.push(lev10);
levels = lev10;
addChildAt(lev10, 1);
lev10.gotoAndStop("Level");
mc.updateBack(lev10);
startHeroX = 112;
startHeroY = 515;
break;
case 100:
startHeroX = 750;
startHeroY = 1775;
levels.gotoAndStop("DemoLevel");
break;
};
}
public function startLevel(){
MochiEvents.startPlay();
main._menu.startLevel();
Object(parent)._menu.staticMenu.lifes.gotoAndStop(1);
main._menu.staticMenu.totalScore.totalScore.text = main.totalScore.toString();
_pause = false;
Object(parent)._menu._pause = false;
timer.reset();
timer.start();
if (main.clearLevels == 0){
startMovie();
masterHero.rotation = 0;
} else {
if ((((main.clearLevels == 9)) && ((currentLevel == 10)))){
startMovie2();
masterHero.rotation = 0;
} else {
continueGame();
};
};
}
public function restartLevel(){
if (((!(restart)) && (!((masterHero.stat == "movie"))))){
telCont = [];
floorCont = [];
leverCont = [];
masterHero.visible = false;
mc.stopIt();
masterHero.stopIt();
timer.stop();
timer.reset();
levels.gotoAndStop(1);
restart = true;
};
}
public function continueGame():void{
setChildIndex(masterHero, 2);
masterHero.visible = true;
masterHero.shad.visible = true;
mc.startIt();
mc.mathPos(startHeroX, startHeroY);
Object(parent)._menu.staticMenu.lifes.gotoAndStop(1);
masterHero.gotoAndPlay("newLife");
masterHero.shad.gotoAndPlay("newLife");
if (telCont[0] != null){
telCont[0].gotoAndPlay(16);
};
var _local1:int;
while (_local1 < floorCont.length) {
floorCont[_local1].activateIt();
_local1++;
};
}
public function stopMovie(){
mc.stopMovie();
mc.startIt();
masterHero.startIt();
if (currentLevel == 1){
levels.prom7.action("play");
};
}
public function nextLevel(){
}
public function changeScore(_arg1:int){
main.totalScore = (main.totalScore + _arg1);
main._menu.staticMenu.totalScore.totalScore.text = main.totalScore.toString();
}
public function removeLevel(){
MochiEvents.endPlay();
mc.removeBack();
var _local1:int;
while (_local1 < levArr.length) {
if (levArr[_local1] != null){
levels = contrL;
removeChild(levArr[_local1]);
levArr = [];
break;
};
_local1++;
};
if (restart){
addEventListener(Event.ENTER_FRAME, res);
};
}
private function efl(_arg1:Event):void{
cont.graphics.clear();
cont.graphics.lineStyle(1, 0xFF0000);
cont.graphics.drawRect(mc.minX, mc.minY, (mc.maxX - mc.minX), (mc.maxY - mc.minY));
cont.graphics.endFill();
}
public function dead(){
main.deads = (main.deads + 1);
mc.changeFocus(startHeroX, startHeroY);
}
private function startMovie(){
setChildIndex(masterHero, 2);
masterHero.visible = true;
masterHero.shad.visible = true;
mc.startMovie();
mc.mathPos(startHeroX, startHeroY);
Object(parent)._menu.staticMenu.lifes.gotoAndStop(1);
masterHero.gotoAndPlay("movie");
masterHero.shad.gotoAndStop("movie");
masterHero.hold = false;
if (telCont[0] != null){
telCont[0].gotoAndPlay(16);
};
}
}
}//package com
Section 37
//Hero (com.Hero)
package com {
import flash.events.*;
import flash.display.*;
public class Hero extends MovieClip {
private var fg:Boolean;// = true
public var pl:Boolean;// = false
public var shad:Shadow;
public var otherX:Number;// = 0
public var otherY:Number;// = 0
private var msk:Sprite;
private var fs:Boolean;// = false
public var stat:String;// = "go"
public var divider:Number;// = 5
public var dz:Boolean;// = false
public var addSpeedConvX:int;// = 0
public var addSpeedConvY:int;// = 0
public var addSpeedFanX:int;// = 0
public var addSpeedFanY:int;// = 0
public var speedX:Number;// = 0
public var free:Boolean;// = false
public var jumping:Boolean;// = false
public var speedY:Number;// = 0
public var hold:Boolean;// = true
public function Hero(){
addEventListener(Event.ENTER_FRAME, efl);
shad = new Shadow();
addChildAt(shad, 0);
}
public function addMsk(_arg1:Sprite){
msk = _arg1;
shad.mask = msk;
}
public function reMask(){
if (msk != null){
shad.mask = msk;
msk.visible = true;
};
}
public function plMask(){
if (msk != null){
msk.visible = false;
shad.mask = null;
};
}
private function efl(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (!hold){
if (((((dz) && (!(pl)))) && (!(jumping)))){
Object(parent).fall();
dz = false;
stat = "null";
};
_local2 = (stage.mouseX - this.x);
_local3 = (stage.mouseY - this.y);
_local4 = Math.atan2(_local3, _local2);
switch (stat){
case "go":
if (!this.hitTestPoint(stage.mouseX, stage.mouseY, true)){
if (fg){
this.gotoAndStop("go");
shad.gotoAndStop("go");
fg = false;
fs = true;
};
speedX = ((stage.mouseX - this.x) / divider);
speedY = ((stage.mouseY - this.y) / divider);
if (speedX > 13){
speedX = 13;
} else {
if (speedX < -13){
speedX = -13;
};
};
if (speedY > 13){
speedY = 13;
} else {
if (speedY < -13){
speedY = -13;
};
};
this.rotation = (((_local4 * 180) / Math.PI) + 90);
} else {
if (fs){
this.gotoAndStop("stop");
shad.gotoAndStop("stop");
fs = false;
fg = true;
};
speedX = 0;
speedY = 0;
};
break;
case "jump":
speedX = (Math.cos(_local4) * divider);
speedY = (Math.sin(_local4) * divider);
this.rotation = (((_local4 * 180) / Math.PI) + 90);
break;
case "attack":
if (divider > 0){
divider = (divider - 0.5);
};
speedX = (Math.cos(_local4) * divider);
speedY = (Math.sin(_local4) * divider);
this.rotation = (((_local4 * 180) / Math.PI) + 90);
break;
case "rebound":
if (divider > 0){
divider = (divider - 0.5);
} else {
divider = 0;
};
speedX = (speedX * 0.9);
speedY = (speedY * 0.9);
if ((((Math.abs(speedX) < 0.3)) && ((Math.abs(speedY) < 0.3)))){
speedX = 0;
speedY = 0;
};
break;
case "fly":
if (divider > 0){
divider = (divider - 0.5);
};
speedX = (Math.cos(_local4) * divider);
speedY = (Math.sin(_local4) * divider);
this.rotation = (((_local4 * 180) / Math.PI) + 90);
break;
case "movie":
break;
};
speedX = (speedX + (addSpeedFanX + addSpeedConvX));
speedY = (speedY + (addSpeedFanY + addSpeedConvY));
this.x = (this.x + speedX);
this.y = (this.y + speedY);
};
}
}
}//package com
Section 38
//Lev1 (com.Lev1)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.EndGate.*;
import com.Objects.Render.*;
import flash.text.*;
import com.Objects.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Lev1 extends MovieClip {
public var fan3:Fan;
public var fan4:Fan;
public var acZone1:ActionZone;
public var acZone2:ActionZone;
public var acZone3:ActionZone;
public var acZone7:ActionZone;
public var acZone9:ActionZone;
public var acZone10:ActionZone;
public var acZone5:ActionZone;
public var acZone6:ActionZone;
public var acZone8:ActionZone;
public var msk:MovieClip;
public var prom20:MovieClip;
public var s1:MovieClip;
public var ch1l1:CheckPoint;
public var gate1:Gate;
public var fb:MovieClip;
public var endGate:EndGate;
public var but1:Butt;
public var prom1:MovieClip;
public var prom3:MovieClip;
public var prom5:MovieClip;
public var prom6:MovieClip;
public var prom7:MovieClip;
public var prom8:MovieClip;
public var prom9:MovieClip;
public var i:int;
public var ch2l1:CheckPoint;
public var fan1:Fan;
public function Lev1(){
addFrameScript(0, frame1, 4, frame5);
}
function frame5(){
i = 0;
while (i < numChildren) {
if ((getChildAt(i) as MovieClip)){
Object(parent).objCont.push(getChildAt(i));
};
i++;
};
ch1l1.firstIt();
but1.modeSet("static");
but1.linkObject(gate1, "open", "null");
fan1.setParametrs(0, -2, true, 0);
fan1.channel.off = true;
fan3.setParametrs(0, -2, true, 0);
fan4.setParametrs(1, 0, true, 0);
acZone1.linkObject(prom1, "play");
acZone2.linkObject(prom20, "play");
acZone3.linkObject(prom3, "play");
acZone5.linkObject(prom5, "play");
acZone6.linkObject(prom6, "play");
acZone7.linkObject(fb, "play");
acZone8.linkObject(s1, "play");
acZone9.linkObject(prom8, "play");
acZone10.linkObject(prom9, "play");
endGate.setLevers(2);
Game.masterHero.addMsk(msk);
Object(parent).startLevel();
}
function frame1(){
stop();
i = 0;
if (Object(parent).objCont.length > 0){
i = 0;
while (i < Object(parent).objCont.length) {
Object(parent).objCont[i].destroy();
i++;
};
Object(parent).objCont.length = 0;
Object(parent).removeLevel();
};
}
}
}//package com
Section 39
//Lev10 (com.Lev10)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.Render.*;
import flash.text.*;
import com.Objects.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Lev10 extends MovieClip {
public var msk:MovieClip;
public var gate1:Gate;
public var i:int;
public var ch1:CheckPoint;
public var btn1:Butt;
public var ez:EndZone;
public function Lev10(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
i = 0;
if (Object(parent).objCont.length > 0){
i = 0;
while (i < Object(parent).objCont.length) {
Object(parent).objCont[i].destroy();
i++;
};
Object(parent).objCont.length = 0;
Object(parent).removeLevel();
};
}
function frame5(){
i = 0;
while (i < numChildren) {
if ((getChildAt(i) as MovieClip)){
Object(parent).objCont.push(getChildAt(i));
};
i++;
};
ch1.firstIt();
btn1.modeSet("static");
btn1.linkObject(gate1, "open", "null");
Game.masterHero.addMsk(msk);
Object(parent).startLevel();
}
}
}//package com
Section 40
//Lev2 (com.Lev2)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.EndGate.*;
import com.Objects.Render.*;
import flash.text.*;
import com.Objects.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Lev2 extends MovieClip {
public var fan3:Fan;
public var fan4:Fan;
public var acZone1:ActionZone;
public var acZone2:ActionZone;
public var fan5:Fan;
public var gate1:Gate;
public var sec1:MovieClip;
public var prom1:MovieClip;
public var msk2:MovieClip;
public var btn2:Butt;
public var btn3:Butt;
public var btn1:Butt;
public var endGate:EndGate;
public var btn4:Butt;
public var fan20:Fan;
public var plat1:platsL2;
public var plat2:plats2L2;
public var ch1l2:CheckPoint;
public var ch2l2:CheckPoint;
public var ch3l2:CheckPoint;
public var u:Uniq;
public var i:int;
public var fan1:Fan;
public function Lev2(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
i = 0;
if (Object(parent).objCont.length > 0){
i = 0;
while (i < Object(parent).objCont.length) {
Object(parent).objCont[i].destroy();
i++;
};
Object(parent).objCont.length = 0;
Object(parent).removeLevel();
};
}
function frame5(){
i = 0;
while (i < numChildren) {
if ((getChildAt(i) as MovieClip)){
Object(parent).objCont.push(getChildAt(i));
};
i++;
};
ch1l2.firstIt();
acZone1.linkObject(prom1, "play");
acZone2.linkObject(sec1, "pla");
btn1.modeSet("static");
btn1.linkObject(gate1, "open", "null");
btn2.modeSet("static");
btn2.linkObject(plat1, "activate", "null");
btn3.modeSet("dynamic");
btn3.linkObject(plat2, "play", "null");
btn4.modeSet("dynamic");
btn4.linkObject(plat2, "play", "null");
fan1.setParametrs(0, -2, true, 0);
fan20.setParametrs(0, -1, true, 0);
fan3.setParametrs(0, -2, true, 0);
fan4.setParametrs(2, 0, true, 0);
fan5.setParametrs(-1, 0, true, 0);
endGate.setLevers(2);
u.setUniq(2);
Game.masterHero.addMsk(msk2);
Object(parent).startLevel();
}
}
}//package com
Section 41
//Lev3 (com.Lev3)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.EndGate.*;
import com.Objects.Render.*;
import flash.text.*;
import com.Objects.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Lev3 extends MovieClip {
public var sec1:MovieClip;
public var acZone1:ActionZone;
public var acZone2:ActionZone;
public var acZone3:ActionZone;
public var gate1:Gate;
public var prom1:MovieClip;
public var prom2:MovieClip;
public var msk:MovieClip;
public var btn1:Butt;
public var btn2:Butt;
public var endGate:EndGate;
public var ch2l3:CheckPoint;
public var plat1l3:plats2L2;
public var i:int;
public var ch1l3:CheckPoint;
public var ch3l3:CheckPoint;
public var field:GraphL3;
public function Lev3(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
i = 0;
if (Object(parent).objCont.length > 0){
i = 0;
while (i < Object(parent).objCont.length) {
Object(parent).objCont[i].destroy();
i++;
};
Object(parent).objCont.length = 0;
Object(parent).removeLevel();
};
}
function frame5(){
i = 0;
while (i < numChildren) {
if ((getChildAt(i) as MovieClip)){
Object(parent).objCont.push(getChildAt(i));
};
i++;
};
ch1l3.firstIt();
Game.masterHero.addMsk(msk);
acZone1.linkObject(sec1, "play");
acZone2.linkObject(prom1, "play");
acZone3.linkObject(prom2, "play");
btn1.modeSet("static");
btn1.linkObject(plat1l3, "play", "null");
btn2.modeSet("static");
btn2.linkObject(gate1, "open", "null");
endGate.setLevers(3);
Object(parent).startLevel();
}
}
}//package com
Section 42
//Lev4 (com.Lev4)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.EndGate.*;
import com.Objects.Render.*;
import flash.text.*;
import com.Objects.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Lev4 extends MovieClip {
public var sec1:MovieClip;
public var sec2:MovieClip;
public var acZone1:ActionZone;
public var acZone2:ActionZone;
public var acZone3:ActionZone;
public var acZone5:ActionZone;
public var acZone4:ActionZone;
public var msk:MovieClip;
public var gate1:Gate;
public var gate2:Gate;
public var gate3:Gate;
public var endGate:EndGate;
public var btn1:Butt;
public var btn2:Butt;
public var btn3:Butt;
public var btn5:Butt;
public var btn6:Butt;
public var brige2:plats3l4;
public var brige3:Plat1l4;
public var btn4:Butt;
public var fakeBrige:Обвал;
public var i:int;
public var ch1:CheckPoint;
public var btn7:Butt;
public var u:Uniq;
public var ch2l4:CheckPoint;
public function Lev4(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
i = 0;
if (Object(parent).objCont.length > 0){
i = 0;
while (i < Object(parent).objCont.length) {
Object(parent).objCont[i].destroy();
i++;
};
Object(parent).objCont.length = 0;
Object(parent).removeLevel();
};
}
function frame5(){
i = 0;
while (i < numChildren) {
if ((getChildAt(i) as MovieClip)){
Object(parent).objCont.push(getChildAt(i));
};
i++;
};
ch1.firstIt();
btn1.timeUp = 4000;
btn1.modeSet("timer");
btn1.linkObject(gate1, "open", "close");
btn2.timeUp = 5000;
btn2.modeSet("timer");
btn2.linkObject(brige2, "activate", "deactivate");
btn3.timeUp = 5000;
btn3.modeSet("timer");
btn3.linkObject(brige2, "activate", "deactivate");
btn4.modeSet("static");
btn4.linkObject(gate2, "open", "null");
btn5.modeSet("static");
btn5.linkObject(gate3, "open", "null");
btn6.timeUp = 4000;
btn6.modeSet("timer");
btn6.linkObject(brige3, "activate", "deactivate");
btn7.modeSet("static");
btn7.pnt = false;
btn7.linkObject(brige2, "activate", "deactivate");
btn2.linkPartner(btn3);
btn3.linkPartner(btn2);
acZone1.linkObject(fakeBrige, "play");
acZone2.linkObject(sec1, "play");
acZone3.linkObject(sec2, "play");
acZone4.linkObject(btn2, "destroy");
acZone5.linkObject(btn3, "destroy");
endGate.setLevers(2);
u.setUniq(1);
Game.masterHero.addMsk(msk);
Object(parent).startLevel();
}
}
}//package com
Section 43
//Lev5 (com.Lev5)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.EndGate.*;
import com.Objects.Render.*;
import flash.text.*;
import com.Objects.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Lev5 extends MovieClip {
public var sec1:MovieClip;
public var acZone1:ActionZone;
public var acZone2:ActionZone;
public var gate2:Gate;
public var gate1:Gate;
public var msk6:MovieClip;
public var btn1:Butt;
public var btn2:Butt;
public var btn3:Butt;
public var endGate:EndGate;
public var brige1l6:dfgdfgf;
public var brige2l6:plat1L6;
public var i:int;
public var ch1:CheckPoint;
public var jhk:cirl5;
public var ch2:CheckPoint;
public function Lev5(){
addFrameScript(0, frame1, 4, frame5);
}
function frame5(){
i = 0;
while (i < numChildren) {
if ((getChildAt(i) as MovieClip)){
Object(parent).objCont.push(getChildAt(i));
};
i++;
};
ch1.firstIt();
Game.masterHero.addMsk(msk6);
acZone1.linkObject(brige1l6, "play");
acZone2.linkObject(sec1, "play");
btn1.timeUp = 3000;
btn1.modeSet("timer");
btn1.linkObject(gate1, "open", "close");
btn2.modeSet("static");
btn2.linkObject(brige2l6, "activate", "");
btn3.modeSet("static");
btn3.linkObject(gate2, "open", "null");
endGate.setLevers(3);
Object(parent).startLevel();
}
function frame1(){
stop();
i = 0;
if (Object(parent).objCont.length > 0){
i = 0;
while (i < Object(parent).objCont.length) {
Object(parent).objCont[i].destroy();
i++;
};
Object(parent).objCont.length = 0;
Object(parent).removeLevel();
};
}
}
}//package com
Section 44
//Lev6 (com.Lev6)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.EndGate.*;
import com.Objects.Render.*;
import flash.text.*;
import com.Objects.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Lev6 extends MovieClip {
public var acZone1:ActionZone;
public var acZone2:ActionZone;
public var acZone3:ActionZone;
public var p10:Press1;
public var p11:Press2;
public var p12:Press1;
public var p13:Press2;
public var tr3:Крутилка2;
public var t2r2:Крутилка;
public var p0:Press1;
public var p1:Press2;
public var p2:Press1;
public var p3:Press2;
public var p4:Press1;
public var p5:Press2;
public var gate1:Gate;
public var p7:Press2;
public var p8:Press1;
public var p9:Press2;
public var p6:Press1;
public var fan1l6:Fan;
public var msk5:MovieClip;
public var prom1:MovieClip;
public var btn1:Butt;
public var btn2:Butt;
public var endGate:EndGate;
public var i:int;
public var ch5:CheckPoint;
public var tr2:Крутилка2;
public var ch3:CheckPoint;
public var tr5:Крутилка2;
public var lk:CheckPoint;
public function Lev6(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
i = 0;
if (Object(parent).objCont.length > 0){
i = 0;
while (i < Object(parent).objCont.length) {
Object(parent).objCont[i].destroy();
i++;
};
Object(parent).objCont.length = 0;
Object(parent).removeLevel();
};
}
function frame5(){
i = 0;
while (i < numChildren) {
if ((getChildAt(i) as MovieClip)){
Object(parent).objCont.push(getChildAt(i));
};
i++;
};
ch5.firstIt();
p0.firstLink = true;
p0.addPartner(p1);
p2.addPartner(p3);
p4.addPartner(p5);
p6.addPartner(p7);
p8.addPartner(p9);
p10.addPartner(p11);
p12.addPartner(p13);
p0.addLink(p2);
p2.addLink(p4);
p4.addLink(p6);
p6.addLink(p8);
p8.addLink(p10);
p10.addLink(p12);
endGate.setLevers(3);
btn1.modeSet("static");
btn1.linkObject(p0, "activateIt", "null");
acZone1.linkObject(p0, "activateIt");
acZone2.linkObject(p0, "stopIt");
acZone3.linkObject(prom1, "play");
btn2.modeSet("static");
btn2.linkObject(gate1, "open", "null");
tr2.rot = -8;
tr3.rot = -4;
tr5.rot = -6;
t2r2.rot = -3;
Game.masterHero.addMsk(msk5);
fan1l6.setParametrs(0, -3, true, 0);
Object(parent).startLevel();
}
}
}//package com
Section 45
//Lev7 (com.Lev7)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.EndGate.*;
import com.Objects.Render.*;
import flash.text.*;
import com.Objects.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Lev7 extends MovieClip {
public var p0:Press1;
public var p1:Press2;
public var acZone1:ActionZone;
public var acZone2:ActionZone;
public var acZone3:ActionZone;
public var gate1:Gate;
public var sec1:MovieClip;
public var sec2:MovieClip;
public var sec3:MovieClip;
public var msk:MovieClip;
public var acZone4:ActionZone;
public var btn2:Butt;
public var btn3:Butt;
public var brige1:MovieClip;
public var btn1:Butt;
public var btn4:Butt;
public var endGate:EndGate;
public var i:int;
public var ch1:CheckPoint;
public var plat:PlatsL7;
public var u:Uniq;
public var ch2l7:CheckPoint;
public function Lev7(){
addFrameScript(0, frame1, 4, frame5);
}
function frame5(){
i = 0;
while (i < numChildren) {
if ((getChildAt(i) as MovieClip)){
Object(parent).objCont.push(getChildAt(i));
};
i++;
};
ch1.firstIt();
Game.masterHero.addMsk(msk);
acZone1.linkObject(sec1, "play");
acZone2.linkObject(sec2, "play");
acZone3.linkObject(sec3, "play");
btn1.modeSet("static");
btn1.linkObject(gate1, "open", "null");
btn2.modeSet("static");
btn2.pnt = false;
btn2.linkObject(plat.c3, "circle", "null");
btn3.timeUp = 5000;
btn3.modeSet("timer");
btn3.linkObject(brige1, "activate", "deactivate");
btn4.timeUp = 3000;
btn4.modeSet("timer");
btn4.linkObject(brige1, "activate", "deactivate");
btn3.linkPartner(btn4);
btn4.linkPartner(btn3);
p0.firstLink = true;
p0.addPartner(p1);
acZone4.linkObject(p0, "activateIt");
endGate.setLevers(4);
u.setUniq(3);
Object(parent).startLevel();
}
function frame1(){
stop();
i = 0;
if (Object(parent).objCont.length > 0){
i = 0;
while (i < Object(parent).objCont.length) {
Object(parent).objCont[i].destroy();
i++;
};
Object(parent).objCont.length = 0;
Object(parent).removeLevel();
};
}
}
}//package com
Section 46
//Lev8 (com.Lev8)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.EndGate.*;
import com.Objects.Render.*;
import flash.text.*;
import com.Objects.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Lev8 extends MovieClip {
public var sec1:MovieClip;
public var acZone1:ActionZone;
public var msk:MovieClip;
public var gate1:Gate;
public var btn1:Butt;
public var btn2:Butt;
public var btn3:Butt;
public var btn4:Butt;
public var brige1:MovieClip;
public var brige2:MovieClip;
public var brige3:MovieClip;
public var endGate:EndGate;
public var i:int;
public var ch0:CheckPoint;
public var tr:MovieClip;
public function Lev8(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
i = 0;
if (Object(parent).objCont.length > 0){
i = 0;
while (i < Object(parent).objCont.length) {
Object(parent).objCont[i].destroy();
i++;
};
Object(parent).objCont.length = 0;
Object(parent).removeLevel();
};
}
function frame5(){
i = 0;
while (i < numChildren) {
if ((getChildAt(i) as MovieClip)){
Object(parent).objCont.push(getChildAt(i));
};
i++;
};
ch0.firstIt();
Game.masterHero.addMsk(msk);
endGate.setLevers(4);
btn1.modeSet("dynamic");
btn1.linkObject(brige1, "start", "stop");
btn2.modeSet("dynamic");
btn2.linkObject(brige2, "start", "stop");
btn3.timeUp = 12500;
btn3.modeSet("timer");
btn3.linkObject(brige3, "activate", "null");
btn4.modeSet("static");
btn4.linkObject(gate1, "open", "hren");
tr.tr1.rot = -8;
tr.tr2.rot = -8;
acZone1.linkObject(sec1, "play");
Object(parent).startLevel();
}
}
}//package com
Section 47
//Lev9 (com.Lev9)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.EndGate.*;
import com.Objects.Render.*;
import flash.text.*;
import com.Objects.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Lev9 extends MovieClip {
public var fan3:Fan;
public var p1:Press2;
public var acZone1:ActionZone;
public var fan1:Fan;
public var p2:Press1;
public var p3:Press2;
public var p4:Press1;
public var gate1:Gate;
public var p0:Press1;
public var p5:Press2;
public var gate2:Gate;
public var btn1:Butt;
public var btn2:Butt;
public var p6:Press1;
public var p7:Press2;
public var msk:MovieClip;
public var endGate:EndGate;
public var i:int;
public var ch1:CheckPoint;
public var fan2:Fan;
public function Lev9(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
i = 0;
if (Object(parent).objCont.length > 0){
i = 0;
while (i < Object(parent).objCont.length) {
Object(parent).objCont[i].destroy();
i++;
};
Object(parent).objCont.length = 0;
Object(parent).removeLevel();
};
}
function frame5(){
i = 0;
while (i < numChildren) {
if ((getChildAt(i) as MovieClip)){
Object(parent).objCont.push(getChildAt(i));
};
i++;
};
ch1.firstIt();
btn1.modeSet("static");
btn1.linkObject(gate1, "open", "null");
btn2.modeSet("static");
btn2.linkObject(gate2, "open", "null");
p0.firstLink = true;
p0.addPartner(p1);
p2.addPartner(p3);
p4.addPartner(p5);
p6.addPartner(p7);
p0.addLink(p2);
p2.addLink(p4);
p4.addLink(p6);
acZone1.linkObject(p0, "activateIt");
fan1.setParametrs(-3, 0, true, 0);
fan2.setParametrs(4, 0, true, 0);
fan3.setParametrs(-3, 0, true, 0);
endGate.setLevers(2);
Game.masterHero.addMsk(msk);
Object(parent).startLevel();
}
}
}//package com
Section 48
//Main (com.Main)
package com {
import flash.events.*;
import flash.display.*;
import com.Heroes.*;
import flash.net.*;
public class Main extends MovieClip {
public var mon:int;// = 0
public var _menu:_Menu;
public var deads:int;// = 0
private var save:SharedObject;
public var clearLevels:int;// = 0
public var u2:int;// = 0
public var tTime:int;// = 0
public var sap:int;// = 0
public var u3:int;// = 0
public var u1:int;// = 0
public var totalScore:int;
public var game:Game;
public var eme:int;// = 0
private var gameZone:Sprite;
public var rub:int;// = 0
public function Main(){
addEventListener(Event.ADDED_TO_STAGE, initSupaClass);
}
private function completeHandler(_arg1:Event):void{
var _local2:Class;
if (isUrl(["flashgamelicense.com"])){
_local2 = (loaderInfo.applicationDomain.getDefinition("Main") as Class);
addChild(new (_local2));
} else {
graphics.beginFill(0xFF0000);
graphics.drawRect(50, 50, 100, 100);
};
trace("/////////////////////////////////////////////////////////////");
}
public function changeScore(_arg1:int){
totalScore = (totalScore + _arg1);
_menu.staticMenu.totalScore.totalScore.text = totalScore.toString();
}
function isUrl(_arg1:Array):Boolean{
var _local2:String = stage.loaderInfo.loaderURL;
var _local3:Number = (_local2.indexOf("://") + 3);
var _local4:Number = _local2.indexOf("/", _local3);
var _local5:String = _local2.substring(_local3, _local4);
var _local6:Number = (_local5.lastIndexOf(".") - 1);
var _local7:Number = (_local5.lastIndexOf(".", _local6) + 1);
_local5 = _local5.substring(_local7, _local5.length);
if (_local5 == _arg1[0]){
return (true);
};
return (false);
}
private function initSupaClass(_arg1:Event):void{
stage.scaleMode = StageScaleMode.NO_SCALE;
save = SharedObject.getLocal("RichAdvBeta");
if (save.data.s != null){
totalScore = save.data.totalScore;
clearLevels = save.data.clearLevels;
deads = save.data.deads;
mon = save.data.mon;
sap = save.data.sap;
eme = save.data.eme;
rub = save.data.rub;
tTime = save.data.tTime;
u1 = save.data.u1;
u2 = save.data.u2;
u3 = save.data.u3;
};
gameZone = new Sprite();
gameZone.graphics.beginFill(0xFFFFFF, 0);
gameZone.graphics.drawRect(0, 0, 640, 480);
gameZone.graphics.endFill();
game = new Game(this, gameZone);
_menu = new _Menu(this, stage);
addChild(game);
addChild(gameZone);
addChild(_menu);
}
}
}//package com
Section 49
//MenuGround (com.MenuGround)
package com {
import flash.events.*;
import flash.display.*;
import flash.filters.*;
public class MenuGround extends Sprite {
var ar:Array;
var l:list;
public function MenuGround(){
ar = [];
super();
var _local1:int;
while (_local1 < 30) {
l = new list();
l.gotoAndStop(_local1);
l.x = (Math.random() * 640);
l.y = (Math.random() * 480);
l.r = ((Math.random() * 3) - 6);
l.xx = ((Math.random() * 1) - 0.5);
l.yy = ((Math.random() * 3) + 0.5);
l.width = (l.width + (l.yy * 2));
l.scaleY = l.scaleX;
l.filters = [new BlurFilter((l.yy * 2), (l.yy * 2))];
l.yy = (l.yy / 2);
ar.push(l);
addChildAt(l, 1);
_local1++;
};
}
public function stopIt(){
var _local1:int;
while (_local1 < ar.length) {
ar[_local1].removeEventListener(Event.ENTER_FRAME, efl);
_local1++;
};
}
private function efl(_arg1:Event):void{
_arg1.target.y = (_arg1.target.y - _arg1.target.yy);
_arg1.target.x = (_arg1.target.x - _arg1.target.xx);
_arg1.target.rotation = (_arg1.target.rotation + _arg1.target.r);
if ((((((_arg1.target.y < 0)) || ((_arg1.target.x < -5)))) || ((_arg1.target.x > 643)))){
_arg1.target.y = 485;
if (_arg1.target.x < 320){
_arg1.target.x = 100;
} else {
_arg1.target.x = 540;
};
};
}
public function startIt(){
var _local1:int;
while (_local1 < ar.length) {
ar[_local1].addEventListener(Event.ENTER_FRAME, efl);
_local1++;
};
}
}
}//package com
Section 50
//MobileCamera (com.MobileCamera)
package com {
import flash.events.*;
import flash.display.*;
import com.Heroes.*;
public class MobileCamera extends Sprite {
private const stageHeight:Number = 480;
private const stageWidth:Number = 640;
private var currentY:Number;
private var backObj:Sprite;
private var centerX:Number;// = 320
private var centerY:Number;// = 240
public var _minX:Number;
private var dist:Number;
private var zeroObj;
public var staticMode:Boolean;// = false
private var main:Game;
public var _minY:Number;
private var D:Number;
public var minY:Number;// = 0
public var levelH:Number;
public var minX:Number;// = 0
private var backGround:Sprite;
public var _maxY:Number;
public var nextY:Number;
public var levelW:Number;
public var nextX:Number;
public var _maxX:Number;
private var motionY:Number;
private var motionX:Number;
public var maxX:Number;// = 0
public var maxY:Number;// = 0
private var currentX:Number;
public static var posX:Number;
public static var posY:Number;
public function MobileCamera(_arg1, _arg2:Sprite, _arg3:Sprite, _arg4:Boolean=false, _arg5:Number=50){
zeroObj = _arg1;
backObj = _arg2;
staticMode = _arg4;
D = _arg5;
backGround = _arg3;
}
public function removeBack(){
backObj = null;
}
public function changeFocus(_arg1:int, _arg2:int){
zeroObj.hold = true;
zeroObj.x = 0;
zeroObj.y = 0;
removeEventListener(Event.ENTER_FRAME, efl);
currentX = backObj.x;
currentY = backObj.y;
dist = Math.atan2((nextY - currentY), (nextX - currentX));
motionX = (Math.cos(dist) * 25);
motionY = (Math.sin(dist) * 25);
maxX = stageWidth;
minX = 0;
maxX = stageHeight;
minX = 0;
addEventListener(Event.ENTER_FRAME, nextFocus);
}
public function mathPos(_arg1:int, _arg2:int){
backObj.x = (320 - _arg1);
backObj.y = (240 - _arg2);
if (backObj.x >= 0){
backObj.x = 0;
} else {
if (backObj.x <= levelW){
backObj.x = levelW;
};
};
if (backObj.y >= 0){
backObj.y = 0;
} else {
if (backObj.y <= levelH){
backObj.y = levelH;
};
};
nextX = backObj.x;
nextY = backObj.y;
zeroObj.x = (backObj.x + _arg1);
zeroObj.y = (backObj.y + _arg2);
}
private function movie(_arg1:Event):void{
if (zeroObj.x <= minX){
zeroObj.x = minX;
backObj.x = (backObj.x - zeroObj.speedX);
};
backGround.x = (backObj.x / 1.5);
backGround.y = (backObj.y / 1.5);
}
public function startIt(){
staticMode = false;
mathMinMax();
addEventListener(Event.ENTER_FRAME, efl);
}
public function getMain(_arg1:Game){
main = Game(_arg1);
}
public function nextFocus(_arg1:Event):void{
var _local2:int;
var _local3:int;
backObj.x = (backObj.x + motionX);
backObj.y = (backObj.y + motionY);
if (backObj.x >= 0){
backObj.x = 0;
_local2++;
} else {
if (backObj.x <= (stageWidth - backObj.width)){
backObj.x = (stageWidth - backObj.width);
_local2++;
};
};
if (backObj.y >= 0){
backObj.y = 0;
_local3++;
} else {
if (backObj.y <= (stageHeight - backObj.height)){
backObj.y = (stageHeight - backObj.height);
_local3++;
};
};
var _local4:int = Math.abs((nextX - backObj.x));
var _local5:int = Math.abs((nextY - backObj.y));
dist = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
if ((((dist < 26)) || (((!((_local2 == 0))) && (!((_local3 == 0))))))){
removeEventListener(Event.ENTER_FRAME, nextFocus);
main.continueGame();
motionX = 0;
motionY = 0;
};
backGround.x = (backObj.x / 1.5);
backGround.y = (backObj.y / 1.5);
}
public function pauseIt(_arg1:Boolean){
if (_arg1){
if ((((Math.abs(motionX) > 0)) || ((Math.abs(motionY) > 0)))){
removeEventListener(Event.ENTER_FRAME, nextFocus);
};
} else {
if ((((Math.abs(motionX) > 0)) || ((Math.abs(motionY) > 0)))){
addEventListener(Event.ENTER_FRAME, nextFocus);
};
};
}
public function updateBack(_arg1:Sprite){
backObj = _arg1;
levelH = (stageHeight - backObj.height);
levelW = (stageWidth - backObj.width);
}
private function mathMinMax(){
_minX = ((centerX - (D / 2)) + 10);
_maxX = ((centerX + (D / 2)) - 10);
_minY = ((centerY - (D / 2)) + 20);
_maxY = ((centerY + (D / 2)) - 20);
minX = _minX;
maxX = _maxX;
minY = _minY;
maxY = _maxY;
}
public function stopIt(){
removeEventListener(Event.ENTER_FRAME, efl);
removeEventListener(Event.ENTER_FRAME, nextFocus);
}
public function stopMovie(){
removeEventListener(Event.ENTER_FRAME, movie);
}
private function efl(_arg1:Event):void{
if (!staticMode){
if (backObj.x >= 0){
backObj.x = 0;
minX = 0;
} else {
if (backObj.x <= levelW){
backObj.x = levelW;
maxX = stageWidth;
} else {
minX = _minX;
maxX = _maxX;
};
};
if (backObj.y >= 0){
backObj.y = 0;
minY = 0;
} else {
if (backObj.y <= levelH){
backObj.y = levelH;
maxY = stageHeight;
} else {
minY = _minY;
maxY = _maxY;
};
};
if ((((zeroObj.x <= minX)) && ((mouseX < minX)))){
zeroObj.x = minX;
backObj.x = (backObj.x - zeroObj.speedX);
} else {
if ((((zeroObj.x >= maxX)) && ((mouseX > maxX)))){
zeroObj.x = maxX;
backObj.x = (backObj.x - zeroObj.speedX);
};
};
if ((((zeroObj.y <= minY)) && ((mouseY < minY)))){
zeroObj.y = minY;
backObj.y = (backObj.y - zeroObj.speedY);
} else {
if ((((zeroObj.y >= maxY)) && ((mouseY > maxY)))){
zeroObj.y = maxY;
backObj.y = (backObj.y - zeroObj.speedY);
};
};
if (backObj.x >= 0){
backObj.x = 0;
} else {
if (backObj.x <= levelW){
backObj.x = levelW;
};
};
if (backObj.y >= 0){
backObj.y = 0;
} else {
if (backObj.y <= levelH){
backObj.y = levelH;
};
};
} else {
if ((((zeroObj.x <= minX)) && ((mouseX < minX)))){
zeroObj.x = minX;
backObj.x = (backObj.x - zeroObj.speedX);
} else {
if ((((zeroObj.x >= maxX)) && ((mouseX > maxX)))){
zeroObj.x = maxX;
backObj.x = (backObj.x - zeroObj.speedX);
};
};
if ((((zeroObj.y <= minY)) && ((mouseY < minY)))){
zeroObj.y = minY;
backObj.y = (backObj.y - zeroObj.speedY);
} else {
if ((((zeroObj.y >= maxY)) && ((mouseY > maxY)))){
zeroObj.y = maxY;
backObj.y = (backObj.y - zeroObj.speedY);
};
};
backObj.x = (backObj.x - zeroObj.otherX);
backObj.y = (backObj.y - zeroObj.otherY);
if (backObj.x >= 0){
backObj.x = 0;
minX = 0;
} else {
if (backObj.x <= levelW){
backObj.x = levelW;
maxX = stageWidth;
} else {
minX = _minX;
maxX = _maxX;
};
};
if (backObj.y >= 0){
backObj.y = 0;
minY = 0;
} else {
if (backObj.y <= levelH){
backObj.y = levelH;
maxY = stageHeight;
} else {
minY = _minY;
maxY = _maxY;
};
};
};
backGround.x = (backObj.x / 1.5);
backGround.y = (backObj.y / 1.5);
posX = zeroObj.x;
posY = zeroObj.y;
}
public function startMovie(){
staticMode = false;
mathMinMax();
addEventListener(Event.ENTER_FRAME, movie);
}
}
}//package com
Section 51
//Preloader (com.Preloader)
package com {
import flash.events.*;
import flash.display.*;
import mochi.as3.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
public dynamic class Preloader extends MovieClip {
private var progressBar:TextField;
var paramObj:Object;
private var k:Boolean;
private var can:Boolean;
var kongregate;
var apiPath:String;
private static const ENTRY_FRAME:int = 3;
public function Preloader():void{
var _local1:Object;
addFrameScript(0, frame1);
stage.showDefaultContextMenu = false;
super();
stop();
progressBar = new TextField();
progressBar.textColor = 0xFFFFFF;
progressBar.selectable = false;
progressBar.autoSize = TextFieldAutoSize.CENTER;
progressBar.x = 320;
progressBar.y = 350;
addChild(progressBar);
if (El_c.createEaster(stage) == 14){
createApi();
k = true;
} else {
_local1 = {id:"549b9cc5b65d7f8a", res:"640x480", clip:this};
MochiAd.showPreGameAd(_local1);
can = true;
};
MochiServices.connect("549b9cc5b65d7f8a", this, onConnectError);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loaderInfo.addEventListener(Event.COMPLETE, completeHandler);
}
private function progressHandler(_arg1:ProgressEvent):void{
var _local2:int = ((100 / _arg1.bytesTotal) * _arg1.bytesLoaded);
progressBar.text = (_local2 + " %");
}
private function loadApi(_arg1:Event):void{
kongregate = _arg1.target.content;
kongregate.services.connect();
can = true;
}
public function onConnectError(_arg1:String):void{
trace("fdfs");
}
private function createApi(){
paramObj = LoaderInfo(root.loaderInfo).parameters;
apiPath = ((paramObj.kongregate_api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf"));
Security.allowDomain(apiPath);
var _local1:URLRequest = new URLRequest(apiPath);
var _local2:Loader = new Loader();
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadApi);
_local2.load(_local1);
this.addChild(_local2);
}
function isUrl(_arg1:Array):Boolean{
var _local2 = "http://www.kongregate.com/sdfsldfs";
var _local3:Number = (_local2.indexOf("://") + 3);
var _local4:Number = _local2.indexOf("/", _local3);
var _local5:String = _local2.substring(_local3, _local4);
var _local6:Number = (_local5.lastIndexOf(".") - 1);
var _local7:Number = (_local5.lastIndexOf(".", _local6) + 1);
_local5 = _local5.substring(_local7, _local5.length);
if (_local5 == _arg1[0]){
return (true);
};
return (false);
}
private function completeHandler(_arg1:Event):void{
if (k){
play();
};
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function mdl(_arg1:MouseEvent):void{
var _local2:Class;
if (can){
MochiEvents.startSession("session");
_arg1.target.removeEventListener(MouseEvent.MOUSE_DOWN, mdl);
_local2 = (loaderInfo.applicationDomain.getDefinition("Main") as Class);
addChild(new (_local2));
};
}
function frame1(){
stop();
}
private function enterFrameHandler(_arg1:Event):void{
var _local2:StBtn;
if (currentFrame == ENTRY_FRAME){
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
stop();
_local2 = new StBtn();
_local2.buttonMode = true;
_local2.x = 320;
_local2.y = 380;
addChild(_local2);
_local2.addEventListener(MouseEvent.MOUSE_DOWN, mdl);
};
}
}
}//package com
Section 52
//SndChannel (com.SndChannel)
package com {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public class SndChannel extends Sprite {
public var XX:int;
private var channel:SoundChannel;
public var globalOff;// = false
private var ft:Boolean;// = false
public var always:Boolean;// = false
private var sound:Sound;
public var YY:int;
private var st:SoundTransform;
public var canPlay:Boolean;
public var off:Boolean;// = false
public var maxV:Number;// = 0.8
public var stereo:Boolean;// = false
public function SndChannel(_arg1:Sound, _arg2:Boolean=false, _arg3:Boolean=false){
canPlay = _Menu.sndMixer.snd;
super();
sound = _arg1;
stereo = _arg2;
always = _arg3;
_Menu.sndMixer.sndEf.push(this);
}
public function pauseIt(_arg1:Boolean){
if (_arg1){
st = new SoundTransform(0, 0);
if (channel != null){
channel.soundTransform = st;
};
off = true;
} else {
off = false;
};
}
private function mathVol(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (((!(off)) && (!((channel == null))))){
_local1 = ((XX - 320) + Game.masterHero.parent.levels.x);
_local2 = ((YY - 240) + Game.masterHero.parent.levels.y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = ((500 - _local3) / 500);
if (_local4 > maxV){
_local4 = maxV;
};
_local5 = (_local1 / 320);
st = new SoundTransform(_local4, _local5);
if (_local4 > 0){
channel.soundTransform = st;
};
};
}
public function sStop(){
removeEventListener(Event.ENTER_FRAME, efl);
if (channel != null){
st = new SoundTransform(0, 0);
channel.stop();
channel = null;
};
}
public function sPlay(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
XX = _arg1;
YY = _arg2;
if (((canPlay) && (!(globalOff)))){
if (!always){
if (stereo){
_local3 = ((_arg1 - 320) + Game.masterHero.parent.levels.x);
_local4 = ((_arg2 - 240) + Game.masterHero.parent.levels.y);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
if (_local5 > 250){
_local6 = ((500 - _local5) / 500);
} else {
_local6 = maxV;
};
if (_local6 > maxV){
_local6 = maxV;
};
_local7 = (_local3 / 320);
if (_local6 > 0){
st = new SoundTransform(_local6, _local7);
channel = sound.play(30);
channel.soundTransform = st;
};
} else {
st = new SoundTransform(maxV, 0);
channel = sound.play(10, 1);
channel.soundTransform = st;
};
} else {
if (stereo){
st = new SoundTransform(0, 0);
channel = sound.play(100, 10000);
channel.soundTransform = st;
addEventListener(Event.ENTER_FRAME, efl);
} else {
st = new SoundTransform(maxV, 0);
channel = sound.play(0, 10000);
channel.soundTransform = st;
};
};
};
}
public function sStart(){
if (((always) && (stereo))){
st = new SoundTransform(0, 0);
channel = sound.play(0, 10000);
channel.soundTransform = st;
addEventListener(Event.ENTER_FRAME, efl);
};
}
public function sOn(){
canPlay = true;
}
private function efl(_arg1:Event):void{
if (canPlay){
mathVol();
} else {
if (ft){
if (channel != null){
st = new SoundTransform(0, 0);
channel.soundTransform = st;
};
ft = false;
};
};
}
public function sOff(){
ft = true;
canPlay = false;
}
}
}//package com
Section 53
//SndMixer (com.SndMixer)
package com {
import flash.media.*;
import flash.display.*;
public class SndMixer extends Sprite {
private var song2:Song2;
private var song2Channel:SoundChannel;
private var mixer:SoundMixer;
private var menuSnd:MenuSong;
private var stat:String;// = "null"
private var menuChannel:SoundChannel;
private var song1Channel:SoundChannel;
public var snd:Boolean;// = true
public var sndEf:Array;
private var song1:Song1;
private var msc:Boolean;// = true
public function SndMixer(){
sndEf = [];
mixer = new SoundMixer();
super();
song1 = new Song1();
song2 = new Song2();
menuSnd = new MenuSong();
menuChannel = menuSnd.play(0, 50);
stat = "menu";
menuChannel.soundTransform = new SoundTransform(0.8, 0);
}
public function startLevel(_arg1:int){
if (stat == "menu"){
menuChannel.stop();
if (((_arg1 * 3) % 2) == 0){
song1Channel = song1.play(0, 50);
if (msc){
song1Channel.soundTransform = new SoundTransform(0.8, 0);
} else {
song1Channel.soundTransform = new SoundTransform(0, 0);
};
stat = "song1";
} else {
song2Channel = song2.play(0, 50);
if (msc){
song2Channel.soundTransform = new SoundTransform(0.8, 0);
} else {
song2Channel.soundTransform = new SoundTransform(0, 0);
};
stat = "song2";
};
};
}
public function stopSnd(){
var _local1:int;
var _local2:int;
if (snd){
_local1 = 0;
while (_local1 < sndEf.length) {
sndEf[_local1].sOff();
_local1++;
};
snd = false;
} else {
_local2 = 0;
while (_local2 < sndEf.length) {
sndEf[_local2].sOn();
_local2++;
};
trace(sndEf.length);
snd = true;
};
}
public function stopMsc(){
if (msc){
switch (stat){
case "menu":
menuChannel.soundTransform = new SoundTransform(0, 0);
break;
case "song1":
song1Channel.soundTransform = new SoundTransform(0, 0);
break;
case "song2":
song2Channel.soundTransform = new SoundTransform(0, 0);
break;
};
msc = false;
} else {
switch (stat){
case "menu":
menuChannel.soundTransform = new SoundTransform(0.8, 0);
break;
case "song1":
song1Channel.soundTransform = new SoundTransform(0.8, 0);
break;
case "song2":
song2Channel.soundTransform = new SoundTransform(0.8, 0);
break;
};
msc = true;
};
}
public function stopLevel(){
switch (stat){
case "song1":
song1Channel.soundTransform = new SoundTransform(0, 0);
song1Channel.stop();
break;
case "song2":
song2Channel.soundTransform = new SoundTransform(0, 0);
song2Channel.stop();
break;
};
menuChannel = menuSnd.play(0, 50);
if (msc){
menuChannel.soundTransform = new SoundTransform(0.8, 0);
} else {
menuChannel.soundTransform = new SoundTransform(0, 0);
};
stat = "menu";
}
}
}//package com
Section 54
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showClickAwayAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:5500, 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);
};
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];
if (Security.sandboxType == "application"){
return (_local2);
};
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:5500, 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 mc:MovieClip;
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 (!(clip is DisplayObject)){
trace("Warning: Object passed as container clip not a descendant of the DisplayObject type");
return (null);
};
if (MovieClip(clip).stage == null){
trace("Warning: Container clip for ad is not attached to the stage");
return (null);
};
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;
mc = 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;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
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();
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
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.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
if (!options.skip){
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.right - _local3.left);
_local5 = (_local3.top - _local3.bottom);
};
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:5500, 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{
}, progress_override:function (_arg1:Object):Number{
return (NaN);
}, bar_offset:0};
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;
if (options.skip){
ad_timeout = 0;
};
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 + options.bar_offset);
bar.y = (h - 20);
};
var bar_w:Number = ((w - bar.x) - 10);
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(bar_w, 0);
backing.lineTo(bar_w, 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(bar_w, 0);
inside.lineTo(bar_w, 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(bar_w, 0);
outline.lineTo(bar_w, 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 progress:Number = Math.min(1, options.progress_override(clip));
var f:Function = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
if (!isNaN(progress)){
complete = (progress == 1);
} else {
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
};
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);
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local12: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;
var _local7:Number = Math.min(1, options.progress_override(_local1));
if (_local7 == 1){
complete = true;
};
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
var _local8:Number = ((100 * _local6) / _local5);
if (!isNaN(_local7)){
_local8 = (100 * _local7);
};
var _local9:Number = ((100 * _local3) / chk.ad_msec);
var _local10:Object = this._mochiad_bar._inside;
var _local11:Number = Math.min(100, Math.min(((_local8) || (0)), _local9));
_local11 = Math.max(this.last_pcnt, _local11);
this.last_pcnt = _local11;
_local10.scaleX = (_local11 * 0.01);
options.ad_progress(_local11);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8});
if (_local8 >= 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local12 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (unloaded){
MochiAd.unload(_local1);
} else {
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 mochi.as3
Section 55
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const NO_USER:String = "NoUser";
public static const IO_ERROR:String = "IOError";
public static const ITEM_NEW:String = "ItemNew";
public static const ITEM_OWNED:String = "ItemOwned";
public static const STORE_ITEMS:String = "StoreItems";
public static const ERROR:String = "Error";
public static const STORE_SHOW:String = "StoreShow";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static var _inventory:MochiInventory;
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function get inventory():MochiInventory{
return (_inventory);
}
public static function showStore(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function requestFunding(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFunding", _arg1);
}
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_inventory = new MochiInventory();
});
addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_inventory = null;
});
}
}//package mochi.as3
Section 56
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
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.as3
Section 57
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher)
package mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
}
}//package mochi.as3
Section 58
//MochiEvents (mochi.as3.MochiEvents)
package mochi.as3 {
public class MochiEvents {
public static const FORMAT_NONE:String = "NoForm";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const IO_ERROR:String = "IOError";
public static const FORMAT_SHORT:String = "ShortForm";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ACHIEVEMENTS_OWNED:String = "AchievementOwned";
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ACHIEVEMENT_NEW:String = "AchievementReceived";
public static const GAME_ACHIEVEMENTS:String = "GameAchievements";
public static const FORMAT_LONG:String = "LongForm";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const IO_PENDING:String = "IOPending";
public static const ERROR:String = "Error";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_CENTER:String = "ALIGN_C";
private static var gameStart:Number;
private static var levelStart:Number;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function showAwards(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.stayOnTop();
MochiServices.send("events_showAwards", _arg1);
}
public static function trackEvent(_arg1:String, _arg2=null):void{
MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null);
}
public static function getAchievements(_arg1:Object=null):void{
MochiServices.send("events_getAchievements", _arg1);
}
public static function setNotifications(_arg1:Object):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("events_setNotifications", _arg1, null, null);
}
public static function endPlay():void{
MochiServices.send("events_clearRoundID", null, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startPlay(_arg1:String="gameplay"):void{
MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function unlockAchievement(_arg1:Object):void{
MochiServices.send("events_unlockAchievement", _arg1);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
}
}//package mochi.as3
Section 59
//MochiInventory (mochi.as3.MochiInventory)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
public dynamic class MochiInventory extends Proxy {
private var _timer:Timer;
private var _names:Array;
private var _syncID:Number;
private var _consumableProperties:Object;
private var _storeSync:Object;
private var _outstandingID:Number;
private var _syncPending:Boolean;
public static const READY:String = "InvReady";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IoError";
private static const KEY_SALT:String = " syncMaint";
public static const WRITTEN:String = "InvWritten";
public static const NOT_READY:String = "InvNotReady";
public static const VALUE_ERROR:String = "InvValueError";
private static const CONSUMER_KEY:String = "MochiConsumables";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiInventory():void{
MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned);
MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut);
_storeSync = new Object();
_syncPending = false;
_outstandingID = 0;
_syncID = 0;
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, sync);
_timer.start();
if (MochiSocial.loggedIn){
loggedIn();
} else {
loggedOut();
};
}
private function newItems(_arg1:Object):void{
if (!this[(_arg1.id + KEY_SALT)]){
this[(_arg1.id + KEY_SALT)] = 0;
};
if (!this[_arg1.id]){
this[_arg1.id] = 0;
};
this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count);
this[_arg1.id] = (this[_arg1.id] + _arg1.count);
if (((_arg1.privateProperties) && (_arg1.privateProperties.consumable))){
if (!this[_arg1.privateProperties.tag]){
this[_arg1.privateProperties.tag] = 0;
};
this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count));
};
}
public function release():void{
MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (-1);
};
if (_consumableProperties[_arg1]){
return (MochiDigits(_consumableProperties[_arg1]).value);
};
return (undefined);
}
private function loggedIn(_arg1:Object=null):void{
MochiUserData.get(CONSUMER_KEY, getConsumableBag);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (false);
};
if (_consumableProperties[_arg1] == undefined){
return (false);
};
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1));
}
private function putConsumableBag(_arg1:MochiUserData):void{
_syncPending = false;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
_outstandingID = -1;
};
triggerEvent(WRITTEN, {});
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:MochiDigits;
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return;
};
if (!(_arg2 is Number)){
triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2});
return;
};
if (_consumableProperties[_arg1]){
_local3 = MochiDigits(_consumableProperties[_arg1]);
if (_local3.value == _arg2){
return;
};
_local3.value = _arg2;
} else {
_names.push(_arg1);
_consumableProperties[_arg1] = new MochiDigits(_arg2);
};
_syncID++;
}
private function itemOwned(_arg1:Object):void{
_storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count};
}
private function sync(_arg1:Event=null):void{
var _local3:String;
if (((_syncPending) || ((_syncID == _outstandingID)))){
return;
};
_outstandingID = _syncID;
var _local2:Object = {};
for (_local3 in _consumableProperties) {
_local2[_local3] = MochiDigits(_consumableProperties[_local3]).value;
};
MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag);
_syncPending = true;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (_names[(_arg1 - 1)]);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
if (!_consumableProperties[_arg1]){
return (false);
};
_names.splice(_names.indexOf(_arg1), 1);
delete _consumableProperties[_arg1];
return (true);
}
private function getConsumableBag(_arg1:MochiUserData):void{
var _local2:String;
var _local3:Number;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
return;
};
_consumableProperties = {};
_names = new Array();
if (_arg1.data){
for (_local2 in _arg1.data) {
_names.push(_local2);
_consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]);
};
};
for (_local2 in _storeSync) {
_local3 = _storeSync[_local2].count;
if (_consumableProperties[(_local2 + KEY_SALT)]){
_local3 = (_local3 - _consumableProperties[(_local2 + KEY_SALT)].value);
};
if (_local3 == 0){
} else {
newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties});
};
};
triggerEvent(READY, {});
}
private function loggedOut(_arg1:Object=null):void{
_consumableProperties = null;
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 60
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.geom.*;
public class MochiServices {
public static const CONNECTED:String = "onConnected";
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _queue:Array;
private static var _swfVersion:String;
private static var _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
private static var _nextCallbackID:Number;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var _callbacks:Object;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = _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 _callbacks[cb];
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
};
if (_clip != null){
if (_callbacks != null){
_callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_nextCallbackID++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
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().time));
_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 detach(_arg1:Event):void{
var _local2:LoaderInfo = LoaderInfo(_arg1.target);
_local2.removeEventListener(Event.COMPLETE, detach);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.removeEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
private static function loadLCBridgeComplete(_arg1:Event):void{
var _local2:Loader = LoaderInfo(_arg1.target).loader;
_mochiLocalConnection = MovieClip(_local2.content);
listen();
}
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 {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
} 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(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.9.4 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
var _local3:Number = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_queue))){
while (_queue.length > 0) {
_local2 = _queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _callbacks[_local2.callbackID];
};
delete _callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(_arg1:Object):void{
var _local2:String = _arg1.target;
var _local3:String = _arg1.event;
switch (_local2){
case "services":
MochiServices.triggerEvent(_arg1.event, _arg1.args);
break;
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "social":
MochiSocial.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
var _local2:Object = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _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 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://link.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 setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_clip.parent){
_clip.parent.removeChild(_clip);
};
if (_arg1 != null){
if ((_arg1 is DisplayObjectContainer)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is DisplayObjectContainer)){
DisplayObjectContainer(_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("NotConnected");
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError("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 loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
public static function get childClip():Object{
return (_clip);
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift());
};
};
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
private static function loadLCBridge(_arg1:Object):void{
var _local2:Loader = new Loader();
var _local3:String = (_servURL + _mochiLC);
var _local4:URLRequest = new URLRequest(_local3);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local2.load(_local4);
_arg1.addChild(_local2);
}
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{
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
MochiServices.onError("NotConnected");
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
var _local3:String = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local3 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local3);
_clip = new MovieClip();
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
var _local4:URLRequest = new URLRequest(_local3);
var _local5:URLVariables = new URLVariables();
_local5.listenLC = _listenChannelName;
_local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local5.api_version = getVersion();
if (widget){
_local5.widget = true;
};
_local4.data = _local5;
_loader.load(_local4);
_clip.addChild(_loader);
_sendChannel = new LocalConnection();
_queue = [];
_nextCallbackID = 0;
_callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function get clip():Object{
return (_container);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
if ((clip is DisplayObject)){
if (clip.stage == null){
trace("MochiServices connect requires the containing clip be attached to the stage");
};
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.");
};
}
public static function bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((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 connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
} else {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
};
}
}
}//package mochi.as3
Section 61
//MochiSocial (mochi.as3.MochiSocial)
package mochi.as3 {
public class MochiSocial {
public static const LOGGED_IN:String = "LoggedIn";
public static const ACTION_CANCELED:String = "onCancel";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const IO_ERROR:String = "IOError";
public static const NO_USER:String = "NoUser";
public static const FRIEND_LIST:String = "FriendsList";
public static const PROFILE_DATA:String = "ProfileData";
public static const GAMEPLAY_DATA:String = "GameplayData";
public static const ACTION_COMPLETE:String = "onComplete";
public static const LOGIN_SHOW:String = "LoginShow";
public static const PROFILE_HIDE:String = "ProfileHide";
public static const USER_INFO:String = "UserInfo";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const ERROR:String = "Error";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_HIDE:String = "LoginHide";
public static const LOGIN_SHOWN:String = "LoginShown";
public static var _user_info:Object = null;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function requestFan(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFan", _arg1);
}
public static function postToStream(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_postToStream", _arg1);
}
public static function getFriendsList(_arg1:Object=null):void{
MochiServices.send("social_getFriendsList", _arg1);
}
public static function requestLogin(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestLogin", _arg1);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("social_saveUserProperties", _arg1);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function inviteFriends(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_inviteFriends", _arg1);
}
public static function get loggedIn():Boolean{
return (!((_user_info == null)));
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_showLoginWidget", {options:_arg1});
}
public static function getAPIURL():String{
if (!_user_info){
return (null);
};
return (_user_info.api_url);
}
public static function showProfile(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.stayOnTop();
MochiServices.send("social_showProfile", _arg1);
}
public static function hideLoginWidget():void{
MochiServices.send("social_hideLoginWidget");
}
public static function getAPIToken():String{
if (!_user_info){
return (null);
};
return (_user_info.api_token);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_user_info = _arg1;
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_user_info = null;
});
}
}//package mochi.as3
Section 62
//MochiUserData (mochi.as3.MochiUserData)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class MochiUserData extends EventDispatcher {
public var callback:Function;// = null
public var operation:String;// = null
public var error:Event;// = null
public var data;// = null
public var _loader:URLLoader;
public var key:String;// = null
public function MochiUserData(_arg1:String="", _arg2:Function=null){
this.key = _arg1;
this.callback = _arg2;
}
public function serialize(_arg1):ByteArray{
var _local2:ByteArray = new ByteArray();
_local2.objectEncoding = ObjectEncoding.AMF3;
_local2.writeObject(_arg1);
_local2.compress();
return (_local2);
}
public function errorHandler(_arg1:IOErrorEvent):void{
data = null;
error = _arg1;
if (callback != null){
performCallback();
} else {
dispatchEvent(_arg1);
};
close();
}
public function putEvent(_arg1):void{
request("put", serialize(_arg1));
}
public function deserialize(_arg1:ByteArray){
_arg1.objectEncoding = ObjectEncoding.AMF3;
_arg1.uncompress();
return (_arg1.readObject());
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString())));
}
public function getEvent():void{
request("get", serialize(null));
}
override public function toString():String{
return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]"));
}
public function performCallback():void{
try {
callback(this);
} catch(e:Error) {
trace(("[MochiUserData] exception during callback: " + e));
};
}
public function request(_arg1:String, _arg2:ByteArray):void{
var _operation = _arg1;
var _data = _arg2;
operation = _operation;
var api_url:String = MochiSocial.getAPIURL();
var api_token:String = MochiSocial.getAPIToken();
if ((((api_url == null)) || ((api_token == null)))){
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in"));
return;
};
_loader = new URLLoader();
var args:URLVariables = new URLVariables();
args.op = _operation;
args.key = key;
var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString()));
req.method = URLRequestMethod.POST;
req.contentType = "application/x-mochi-userdata";
req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)];
req.data = _data;
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
try {
_loader.load(req);
} catch(e:SecurityError) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString())));
};
}
public function completeHandler(_arg1:Event):void{
var event = _arg1;
try {
if (_loader.data.length){
data = deserialize(_loader.data);
} else {
data = null;
};
} catch(e:Error) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString())));
return;
};
if (callback != null){
performCallback();
} else {
dispatchEvent(event);
};
close();
}
public function close():void{
if (_loader){
_loader.removeEventListener(Event.COMPLETE, completeHandler);
_loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.close();
_loader = null;
};
error = null;
callback = null;
}
public static function get(_arg1:String, _arg2:Function):void{
var _local3:MochiUserData = new MochiUserData(_arg1, _arg2);
_local3.getEvent();
}
public static function put(_arg1:String, _arg2, _arg3:Function):void{
var _local4:MochiUserData = new MochiUserData(_arg1, _arg3);
_local4.putEvent(_arg2);
}
}
}//package mochi.as3
Section 63
//ClearBtn_83 (RichAdventure_fla.ClearBtn_83)
package RichAdventure_fla {
import flash.display.*;
public dynamic class ClearBtn_83 extends MovieClip {
public var yesBtn:MovieClip;
public var noBtn:MovieClip;
public function ClearBtn_83(){
addFrameScript(0, frame1, 1, frame2, 4, frame5);
}
function frame1(){
stop();
this.visible = false;
}
function frame5(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package RichAdventure_fla
Section 64
//Justzone_31 (RichAdventure_fla.Justzone_31)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Justzone_31 extends MovieClip {
public function Justzone_31(){
addFrameScript(0, frame1);
}
function frame1(){
this.visible = false;
}
}
}//package RichAdventure_fla
Section 65
//Mask_173 (RichAdventure_fla.Mask_173)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Mask_173 extends MovieClip {
public function Mask_173(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 66
//mask_56 (RichAdventure_fla.mask_56)
package RichAdventure_fla {
import flash.display.*;
public dynamic class mask_56 extends MovieClip {
public function mask_56(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 67
//maskl10_63 (RichAdventure_fla.maskl10_63)
package RichAdventure_fla {
import flash.display.*;
public dynamic class maskl10_63 extends MovieClip {
public function maskl10_63(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 68
//Maskl4_157 (RichAdventure_fla.Maskl4_157)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Maskl4_157 extends MovieClip {
public function Maskl4_157(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 69
//Maskl5_209 (RichAdventure_fla.Maskl5_209)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Maskl5_209 extends MovieClip {
public function Maskl5_209(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 70
//MaskL6_139 (RichAdventure_fla.MaskL6_139)
package RichAdventure_fla {
import flash.display.*;
public dynamic class MaskL6_139 extends MovieClip {
public function MaskL6_139(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 71
//Maskl8_109 (RichAdventure_fla.Maskl8_109)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Maskl8_109 extends MovieClip {
public function Maskl8_109(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 72
//MenuBtn_78 (RichAdventure_fla.MenuBtn_78)
package RichAdventure_fla {
import flash.display.*;
public dynamic class MenuBtn_78 extends MovieClip {
public var words:MovieClip;
public function MenuBtn_78(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.mouseChildren = false;
}
}
}//package RichAdventure_fla
Section 73
//MskL1_184 (RichAdventure_fla.MskL1_184)
package RichAdventure_fla {
import flash.display.*;
public dynamic class MskL1_184 extends MovieClip {
public function MskL1_184(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 74
//MskL1_201 (RichAdventure_fla.MskL1_201)
package RichAdventure_fla {
import flash.display.*;
public dynamic class MskL1_201 extends MovieClip {
public function MskL1_201(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 75
//msl_125 (RichAdventure_fla.msl_125)
package RichAdventure_fla {
import flash.display.*;
public dynamic class msl_125 extends MovieClip {
public function msl_125(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 76
//sec_124 (RichAdventure_fla.sec_124)
package RichAdventure_fla {
import flash.display.*;
public dynamic class sec_124 extends MovieClip {
public function sec_124(){
addFrameScript(0, frame1, 9, frame10);
}
public function pauseIt(_arg1:Boolean){
}
function frame1(){
stop();
}
public function action(_arg1:String):void{
play();
}
public function destroy(){
}
function frame10(){
stop();
}
}
}//package RichAdventure_fla
Section 77
//sec_166 (RichAdventure_fla.sec_166)
package RichAdventure_fla {
import flash.display.*;
public dynamic class sec_166 extends MovieClip {
public function sec_166(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String):void{
play();
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 78
//sec_180 (RichAdventure_fla.sec_180)
package RichAdventure_fla {
import flash.display.*;
public dynamic class sec_180 extends MovieClip {
public function sec_180(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String):void{
play();
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 79
//sec2_111 (RichAdventure_fla.sec2_111)
package RichAdventure_fla {
import flash.display.*;
public dynamic class sec2_111 extends MovieClip {
public function sec2_111(){
addFrameScript(0, frame1, 1, frame2, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
}
function frame2(){
stop();
}
public function action(_arg1:String){
play();
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 80
//Secret1l4_156 (RichAdventure_fla.Secret1l4_156)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Secret1l4_156 extends MovieClip {
public function Secret1l4_156(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
play();
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 81
//Secret1l6_138 (RichAdventure_fla.Secret1l6_138)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Secret1l6_138 extends MovieClip {
public function Secret1l6_138(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
play();
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 82
//Secret4_155 (RichAdventure_fla.Secret4_155)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Secret4_155 extends MovieClip {
public function Secret4_155(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
play();
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 83
//SecretL1_190 (RichAdventure_fla.SecretL1_190)
package RichAdventure_fla {
import flash.display.*;
public dynamic class SecretL1_190 extends MovieClip {
public function SecretL1_190(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 84
//StartBtn_86 (RichAdventure_fla.StartBtn_86)
package RichAdventure_fla {
import flash.display.*;
public dynamic class StartBtn_86 extends MovieClip {
public var words:MovieClip;
public function StartBtn_86(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.mouseChildren = false;
}
}
}//package RichAdventure_fla
Section 85
//Timeline_107 (RichAdventure_fla.Timeline_107)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_107 extends MovieClip {
public function Timeline_107(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package RichAdventure_fla
Section 86
//Timeline_108 (RichAdventure_fla.Timeline_108)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_108 extends MovieClip {
public function Timeline_108(){
addFrameScript(0, frame1, 9, frame10);
}
public function pauseIt(_arg1:Boolean){
}
function frame1(){
stop();
}
public function action(_arg1:String){
play();
}
public function destroy(){
}
function frame10(){
stop();
}
}
}//package RichAdventure_fla
Section 87
//Timeline_11 (RichAdventure_fla.Timeline_11)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_11 extends MovieClip {
public function Timeline_11(){
addFrameScript(0, frame1);
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 88
//Timeline_120 (RichAdventure_fla.Timeline_120)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_120 extends MovieClip {
public function Timeline_120(){
addFrameScript(0, frame1);
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 89
//Timeline_122 (RichAdventure_fla.Timeline_122)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_122 extends MovieClip {
public function Timeline_122(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy():void{
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 90
//Timeline_133 (RichAdventure_fla.Timeline_133)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_133 extends MovieClip {
public function Timeline_133(){
addFrameScript(0, frame1);
}
public function destroy():void{
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 91
//Timeline_134 (RichAdventure_fla.Timeline_134)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_134 extends MovieClip {
public function Timeline_134(){
addFrameScript(0, frame1);
}
public function destroy():void{
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 92
//Timeline_167 (RichAdventure_fla.Timeline_167)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_167 extends MovieClip {
public function Timeline_167(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 93
//Timeline_171 (RichAdventure_fla.Timeline_171)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_171 extends MovieClip {
public function Timeline_171(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 94
//Timeline_181 (RichAdventure_fla.Timeline_181)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_181 extends MovieClip {
public function Timeline_181(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy():void{
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 95
//Timeline_182 (RichAdventure_fla.Timeline_182)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_182 extends MovieClip {
public function Timeline_182(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
play();
}
public function pauseIt(_arg1:Boolean){
}
public function destroy():void{
}
}
}//package RichAdventure_fla
Section 96
//Timeline_188 (RichAdventure_fla.Timeline_188)
package RichAdventure_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import com.Heroes.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Timeline_188 extends MovieClip {
public var gh1:Ghost;
public var gh2:Ghost;
public var gh3:Ghost;
public function Timeline_188(){
addFrameScript(0, frame1, 169, frame170, 202, frame203, 259, frame260);
}
public function pauseIt(_arg1:Boolean){
}
function frame203(){
gh1.gotoAndPlay("attack");
gh1.sPlay("attack2");
}
function frame1(){
gh1.destroy();
gh2.destroy();
gh3.destroy();
gh1.gotoAndStop("re");
gh2.gotoAndStop("re");
gh3.gotoAndStop("re");
if (Object(parent.parent.parent).clearLevels != 0){
stop();
this.visible = false;
};
}
public function destroy(){
}
function frame170(){
gh1.re();
gh2.gotoAndPlay("re");
gh3.gotoAndPlay("re");
}
function frame260(){
stop();
this.visible = false;
}
}
}//package RichAdventure_fla
Section 97
//Timeline_191 (RichAdventure_fla.Timeline_191)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_191 extends MovieClip {
public function Timeline_191(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 98
//Timeline_192 (RichAdventure_fla.Timeline_192)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_192 extends MovieClip {
public function Timeline_192(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 99
//Timeline_193 (RichAdventure_fla.Timeline_193)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_193 extends MovieClip {
public function Timeline_193(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 100
//Timeline_194 (RichAdventure_fla.Timeline_194)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_194 extends MovieClip {
public function Timeline_194(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 101
//Timeline_195 (RichAdventure_fla.Timeline_195)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_195 extends MovieClip {
public function Timeline_195(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 102
//Timeline_196 (RichAdventure_fla.Timeline_196)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_196 extends MovieClip {
public function Timeline_196(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 103
//Timeline_197 (RichAdventure_fla.Timeline_197)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_197 extends MovieClip {
public var m:MovieClip;
public function Timeline_197(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
m.play();
};
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 104
//Timeline_198 (RichAdventure_fla.Timeline_198)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_198 extends MovieClip {
public function Timeline_198(){
addFrameScript(0, frame1, 20, frame21);
}
function frame21(){
stop();
}
function frame1(){
stop();
}
}
}//package RichAdventure_fla
Section 105
//Timeline_199 (RichAdventure_fla.Timeline_199)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_199 extends MovieClip {
public function Timeline_199(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 106
//Timeline_200 (RichAdventure_fla.Timeline_200)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_200 extends MovieClip {
public function Timeline_200(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
if (_arg1 == "play"){
play();
};
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 107
//Timeline_208 (RichAdventure_fla.Timeline_208)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_208 extends MovieClip {
public function Timeline_208(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
public function action(_arg1:String){
play();
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 108
//Timeline_231 (RichAdventure_fla.Timeline_231)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_231 extends MovieClip {
public function Timeline_231(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package RichAdventure_fla
Section 109
//Timeline_232 (RichAdventure_fla.Timeline_232)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_232 extends MovieClip {
public var b2:MovieClip;
public var b1:MovieClip;
public function Timeline_232(){
addFrameScript(0, frame1, 5, frame6, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
}
}//package RichAdventure_fla
Section 110
//Timeline_234 (RichAdventure_fla.Timeline_234)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_234 extends MovieClip {
public var b2:MovieClip;
public var b1:MovieClip;
public function Timeline_234(){
addFrameScript(0, frame1, 5, frame6, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
}
}//package RichAdventure_fla
Section 111
//Timeline_235 (RichAdventure_fla.Timeline_235)
package RichAdventure_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Timeline_235 extends MovieClip {
public var totalScore:TextField;
public function Timeline_235(){
addFrameScript(0, frame1);
}
function frame1(){
totalScore.selectable = false;
}
}
}//package RichAdventure_fla
Section 112
//Timeline_236 (RichAdventure_fla.Timeline_236)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_236 extends MovieClip {
public var b2:MovieClip;
public var b1:MovieClip;
public function Timeline_236(){
addFrameScript(0, frame1, 5, frame6, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
stop();
}
function frame6(){
stop();
}
}
}//package RichAdventure_fla
Section 113
//Timeline_244 (RichAdventure_fla.Timeline_244)
package RichAdventure_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Timeline_244 extends MovieClip {
public var totalScore:TextField;
public function Timeline_244(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package RichAdventure_fla
Section 114
//Timeline_28 (RichAdventure_fla.Timeline_28)
package RichAdventure_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Timeline_28 extends MovieClip {
public function Timeline_28(){
addFrameScript(3, frame4);
}
function frame4(){
if (!Object(parent).activ){
stop();
};
}
}
}//package RichAdventure_fla
Section 115
//Timeline_47 (RichAdventure_fla.Timeline_47)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_47 extends MovieClip {
public function Timeline_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package RichAdventure_fla
Section 116
//Timeline_49 (RichAdventure_fla.Timeline_49)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_49 extends MovieClip {
public function Timeline_49(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 24, frame25);
}
function frame25(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package RichAdventure_fla
Section 117
//Timeline_62 (RichAdventure_fla.Timeline_62)
package RichAdventure_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import com.Heroes.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Timeline_62 extends MovieClip {
public var gh1:Ghost;
public var gh2:Ghost;
public var gh3:Ghost;
public function Timeline_62(){
addFrameScript(0, frame1, 29, frame30, 62, frame63, 108, frame109, 114, frame115, 119, frame120);
}
public function pauseIt(_arg1:Boolean){
}
function frame115(){
this.visible = false;
}
function frame120(){
stop();
Object(parent).ez.kubMode();
Object(parent.parent).stopMovie();
}
function frame63(){
gh2.gotoAndPlay("attack");
gh2.sPlay("attack2");
}
function frame1(){
gh1.destroy();
gh2.destroy();
gh3.destroy();
if (Object(parent.parent.parent).clearLevels != 9){
stop();
this.visible = false;
};
}
function frame109(){
Object(parent).gate1.action("close");
}
function frame30(){
Object(parent).gate1.action("open");
}
public function destroy(){
}
}
}//package RichAdventure_fla
Section 118
//Timeline_73 (RichAdventure_fla.Timeline_73)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_73 extends MovieClip {
public var arr:MovieClip;
public function Timeline_73(){
addFrameScript(0, frame1, 59, frame60);
}
function frame1(){
stop();
}
function frame60(){
gotoAndPlay(2);
}
}
}//package RichAdventure_fla
Section 119
//Timeline_8 (RichAdventure_fla.Timeline_8)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timeline_8 extends MovieClip {
public function Timeline_8(){
addFrameScript(0, frame1);
}
public function pauseIt(_arg1:Boolean){
}
public function destroy(){
}
function frame1(){
}
}
}//package RichAdventure_fla
Section 120
//Timer_237 (RichAdventure_fla.Timer_237)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Timer_237 extends MovieClip {
public var t:MovieClip;
public function Timer_237(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
}
}//package RichAdventure_fla
Section 121
//Words_79 (RichAdventure_fla.Words_79)
package RichAdventure_fla {
import flash.display.*;
public dynamic class Words_79 extends MovieClip {
public function Words_79(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package RichAdventure_fla
Section 122
//YesBtn_82 (RichAdventure_fla.YesBtn_82)
package RichAdventure_fla {
import flash.display.*;
public dynamic class YesBtn_82 extends MovieClip {
public var words:MovieClip;
public function YesBtn_82(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.mouseChildren = false;
}
}
}//package RichAdventure_fla
Section 123
//ActiveWall (ActiveWall)
package {
import com.Objects.*;
public dynamic class ActiveWall extends ActiveWall {
public function ActiveWall(){
addFrameScript(0, frame1, 10, frame11, 11, frame12);
}
function frame1(){
stop();
}
function frame11(){
gotoAndStop(1);
}
function frame12(){
stop();
}
}
}//package
Section 124
//BackGround (BackGround)
package {
import flash.display.*;
public dynamic class BackGround extends Sprite {
}
}//package
Section 125
//Bonus1 (Bonus1)
package {
import com.Objects.Render.*;
public dynamic class Bonus1 extends Bonus {
public function Bonus1(){
addFrameScript(0, frame1);
}
function frame1(){
g1.destroy();
g2.destroy();
g3.destroy();
g4.destroy();
}
}
}//package
Section 126
//Bonus10 (Bonus10)
package {
import com.Objects.Render.*;
public dynamic class Bonus10 extends Bonus {
}
}//package
Section 127
//Bonus2 (Bonus2)
package {
import com.Objects.Render.*;
public dynamic class Bonus2 extends Bonus {
}
}//package
Section 128
//Bonus3 (Bonus3)
package {
import com.Objects.Render.*;
public dynamic class Bonus3 extends Bonus {
}
}//package
Section 129
//Bonus4 (Bonus4)
package {
import com.Objects.Render.*;
public dynamic class Bonus4 extends Bonus {
}
}//package
Section 130
//Bonus5 (Bonus5)
package {
import com.Objects.Render.*;
public dynamic class Bonus5 extends Bonus {
}
}//package
Section 131
//Bonus6 (Bonus6)
package {
import com.Objects.Render.*;
public dynamic class Bonus6 extends Bonus {
}
}//package
Section 132
//Bonus7 (Bonus7)
package {
import com.Objects.Render.*;
public dynamic class Bonus7 extends Bonus {
}
}//package
Section 133
//Bonus8 (Bonus8)
package {
import com.Objects.Render.*;
public dynamic class Bonus8 extends Bonus {
}
}//package
Section 134
//Bonus9 (Bonus9)
package {
import com.Objects.Render.*;
public dynamic class Bonus9 extends Bonus {
}
}//package
Section 135
//Bord (Bord)
package {
import flash.display.*;
public dynamic class Bord extends MovieClip {
public var cont:MovieClip;
public var btn:MovieClip;
public function Bord(){
addFrameScript(0, frame1, 1, frame2, 28, frame29);
}
function frame29(){
stop();
}
function frame2(){
this.visible = true;
}
function frame1(){
stop();
this.visible = false;
}
}
}//package
Section 136
//brige1 (brige1)
package {
import com.Objects.Render.*;
public dynamic class brige1 extends ActivePlat {
}
}//package
Section 137
//Brige1l3 (Brige1l3)
package {
import com.Objects.Render.*;
public dynamic class Brige1l3 extends ActivePlat {
}
}//package
Section 138
//Brige1l4 (Brige1l4)
package {
import com.Objects.Render.*;
public dynamic class Brige1l4 extends ActivePlat {
}
}//package
Section 139
//brige1l8 (brige1l8)
package {
import com.Objects.Render.*;
public dynamic class brige1l8 extends ActivePlat {
}
}//package
Section 140
//brige2 (brige2)
package {
import com.Objects.Render.*;
public dynamic class brige2 extends ActivePlat {
}
}//package
Section 141
//Brige2l3 (Brige2l3)
package {
import com.Objects.Render.*;
public dynamic class Brige2l3 extends ActivePlat {
}
}//package
Section 142
//brige2l4 (brige2l4)
package {
import com.Objects.Render.*;
public dynamic class brige2l4 extends ActivePlat {
}
}//package
Section 143
//brige2l8 (brige2l8)
package {
import com.Objects.Render.*;
public dynamic class brige2l8 extends ActivePlat {
}
}//package
Section 144
//brige3l4 (brige3l4)
package {
import com.Objects.Render.*;
public dynamic class brige3l4 extends ActivePlat {
}
}//package
Section 145
//CheckPoint (CheckPoint)
package {
import com.Objects.*;
public dynamic class CheckPoint extends CheckPoint {
public function CheckPoint(){
addFrameScript(0, frame1, 1, frame2, 14, frame15, 16, frame17, 99, frame100);
}
function frame15(){
stop();
}
function frame1(){
stop();
}
function frame2(){
sPlay("activate");
}
function frame17(){
sPlay("teleport");
}
function frame100(){
gotoAndStop("on");
}
}
}//package
Section 146
//cir2L7 (cir2L7)
package {
import com.Objects.Render.*;
public dynamic class cir2L7 extends ActivePlat {
}
}//package
Section 147
//cir3l7 (cir3l7)
package {
import com.Objects.Render.*;
public dynamic class cir3l7 extends ActivePlat {
}
}//package
Section 148
//CircleWall (CircleWall)
package {
import com.Objects.Render.*;
public dynamic class CircleWall extends CircleWall {
}
}//package
Section 149
//cirl5 (cirl5)
package {
import com.Objects.Render.*;
public dynamic class cirl5 extends Plats {
}
}//package
Section 150
//cirl50 (cirl50)
package {
import com.Objects.Render.*;
public dynamic class cirl50 extends ActivePlat {
}
}//package
Section 151
//CreditsMenu (CreditsMenu)
package {
import flash.display.*;
public dynamic class CreditsMenu extends MovieClip {
public var btn:MovieClip;
public function CreditsMenu(){
addFrameScript(0, frame1, 1, frame2, 28, frame29);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame29(){
stop();
}
}
}//package
Section 152
//Cur (Cur)
package {
import flash.display.*;
public dynamic class Cur extends MovieClip {
public var compass:MovieClip;
}
}//package
Section 153
//DeadZone4 (DeadZone4)
package {
import com.Objects.Render.*;
public dynamic class DeadZone4 extends DeadZone {
}
}//package
Section 154
//DeadZone5 (DeadZone5)
package {
import com.Objects.Render.*;
public dynamic class DeadZone5 extends DeadZone {
}
}//package
Section 155
//DeadZoneL1 (DeadZoneL1)
package {
import com.Objects.Render.*;
public dynamic class DeadZoneL1 extends DeadZone {
}
}//package
Section 156
//DeadZoneL10 (DeadZoneL10)
package {
import com.Objects.Render.*;
public dynamic class DeadZoneL10 extends DeadZone {
}
}//package
Section 157
//DeadZoneL2 (DeadZoneL2)
package {
import com.Objects.Render.*;
public dynamic class DeadZoneL2 extends DeadZone {
}
}//package
Section 158
//DeadZoneL3 (DeadZoneL3)
package {
import com.Objects.Render.*;
public dynamic class DeadZoneL3 extends DeadZone {
}
}//package
Section 159
//DeadZoneL6 (DeadZoneL6)
package {
import com.Objects.Render.*;
public dynamic class DeadZoneL6 extends DeadZone {
}
}//package
Section 160
//DeadZoneL7 (DeadZoneL7)
package {
import com.Objects.Render.*;
public dynamic class DeadZoneL7 extends DeadZone {
}
}//package
Section 161
//DeadZoneL8 (DeadZoneL8)
package {
import com.Objects.Render.*;
public dynamic class DeadZoneL8 extends DeadZone {
}
}//package
Section 162
//DeadZoneL9 (DeadZoneL9)
package {
import com.Objects.Render.*;
public dynamic class DeadZoneL9 extends DeadZone {
}
}//package
Section 163
//DemoL1 (DemoL1)
package {
import com.Objects.Render.*;
public dynamic class DemoL1 extends Field {
}
}//package
Section 164
//dfgdfgf (dfgdfgf)
package {
import com.Objects.Render.*;
public dynamic class dfgdfgf extends Plats {
public function dfgdfgf(){
addFrameScript(0, frame1, 46, frame47);
}
function frame47(){
stop();
this.destroy();
}
function frame1(){
stop();
}
}
}//package
Section 165
//FallPlat (FallPlat)
package {
import com.Objects.*;
public dynamic class FallPlat extends FallPlat {
public function FallPlat(){
addFrameScript(0, frame1, 44, frame45, 59, frame60);
}
function frame1(){
stop();
}
function frame45(){
this.deactivateIt();
sPlay();
}
function frame60(){
stop();
}
}
}//package
Section 166
//FirstMenu (FirstMenu)
package {
import flash.display.*;
public dynamic class FirstMenu extends MovieClip {
public var conBtn:MovieClip;
public var creditBtn:MovieClip;
public var statisticBtn:MovieClip;
public var startBtn:MovieClip;
public function FirstMenu(){
addFrameScript(0, frame1, 1, frame2, 29, frame30);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame30(){
stop();
}
}
}//package
Section 167
//GraphL10 (GraphL10)
package {
import com.Objects.Render.*;
public dynamic class GraphL10 extends Field {
}
}//package
Section 168
//GraphL3 (GraphL3)
package {
import com.Objects.Render.*;
public dynamic class GraphL3 extends Field {
}
}//package
Section 169
//GraphL5 (GraphL5)
package {
import com.Objects.Render.*;
public dynamic class GraphL5 extends Field {
}
}//package
Section 170
//GraphL6 (GraphL6)
package {
import com.Objects.Render.*;
public dynamic class GraphL6 extends Field {
}
}//package
Section 171
//GraphL7 (GraphL7)
package {
import com.Objects.Render.*;
public dynamic class GraphL7 extends Field {
}
}//package
Section 172
//GraphL8 (GraphL8)
package {
import com.Objects.Render.*;
public dynamic class GraphL8 extends Field {
}
}//package
Section 173
//GraphL9 (GraphL9)
package {
import com.Objects.Render.*;
public dynamic class GraphL9 extends Field {
}
}//package
Section 174
//GraphLevel1 (GraphLevel1)
package {
import com.Objects.Render.*;
public dynamic class GraphLevel1 extends Field {
}
}//package
Section 175
//GraphLevel2 (GraphLevel2)
package {
import com.Objects.Render.*;
public dynamic class GraphLevel2 extends Field {
}
}//package
Section 176
//GraphLevel4 (GraphLevel4)
package {
import com.Objects.Render.*;
public dynamic class GraphLevel4 extends Field {
}
}//package
Section 177
//Heart (Heart)
package {
import com.Objects.Bonus.*;
public dynamic class Heart extends Heart {
public function Heart(){
addFrameScript(20, frame21, 32, frame33);
}
function frame21(){
gotoAndPlay(1);
}
function frame33(){
stop();
}
}
}//package
Section 178
//HelpMenu (HelpMenu)
package {
import flash.display.*;
import com.Objects.Render.*;
public dynamic class HelpMenu extends MovieClip {
public var com:MovieClip;
public var tel:EndZone;
public var btn:MovieClip;
public function HelpMenu(){
addFrameScript(0, frame1, 6, frame7);
}
function frame1(){
this.visible = false;
com.gotoAndStop(1);
tel.destroy();
stop();
}
function frame7(){
this.visible = true;
com.gotoAndPlay(2);
}
}
}//package
Section 179
//list (list)
package {
import flash.display.*;
public dynamic class list extends MovieClip {
public function list(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 180
//Main (Main)
package {
import com.*;
public dynamic class Main extends Main {
}
}//package
Section 181
//MenuMovie (MenuMovie)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MenuMovie extends MovieClip {
public function MenuMovie(){
addFrameScript(173, frame174, 188, frame189, 215, frame216, 284, frame285, 394, frame395);
}
function frame174(){
Object(parent).firstMenu.gotoAndPlay(2);
}
function frame285(){
Object(parent.parent).game.levelClear2();
}
function frame189(){
stop();
this.visible = false;
}
function frame395(){
Object(parent).resultMenu.visible = false;
Object(parent).firstMenu.mouseChildren = true;
}
function frame216(){
this.visible = true;
}
}
}//package
Section 182
//MenuSong (MenuSong)
package {
import flash.media.*;
public dynamic class MenuSong extends Sound {
}
}//package
Section 183
//PauseMenu (PauseMenu)
package {
import flash.display.*;
public dynamic class PauseMenu extends MovieClip {
public var restartBtn:MovieClip;
public var menuBtn:MovieClip;
public var resumeBtn:MovieClip;
public function PauseMenu(){
addFrameScript(0, frame1, 1, frame2, 6, frame7);
}
function frame2(){
this.visible = true;
}
function frame7(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
}
}//package
Section 184
//plat1l2 (plat1l2)
package {
import com.Objects.Render.*;
public dynamic class plat1l2 extends Plats {
public function plat1l2(){
addFrameScript(0, frame1, 44, frame45, 89, frame90, 134, frame135);
}
function frame90(){
this.sPlay("start");
}
function frame1(){
this.sPlay("start");
}
function frame135(){
this.sPlay("stop");
}
function frame45(){
this.sPlay("stop");
}
}
}//package
Section 185
//Plat1l4 (Plat1l4)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.Render.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Plat1l4 extends Plats {
public function Plat1l4(){
addFrameScript(0, frame1, 1, frame2, 29, frame30, 30, frame31, 59, frame60);
}
function frame1(){
stop();
this.btn.resetIt();
}
function frame2(){
this.sPlay("start");
}
function frame60(){
this.sPlay("stop");
}
function frame30(){
stop();
this.sPlay("stop");
}
function frame31(){
this.sPlay("start");
}
}
}//package
Section 186
//plat1L6 (plat1L6)
package {
import com.Objects.Render.*;
public dynamic class plat1L6 extends Plats {
public function plat1L6(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
this.sPlay("stop");
stop();
}
function frame1(){
stop();
}
}
}//package
Section 187
//Plat2L2 (Plat2L2)
package {
import com.Objects.Render.*;
public dynamic class Plat2L2 extends Plats {
public function Plat2L2(){
addFrameScript(0, frame1, 44, frame45, 89, frame90, 134, frame135, 179, frame180, 224, frame225, 269, frame270, 314, frame315);
}
function frame90(){
this.sPlay("start");
}
function frame270(){
this.sPlay("start");
}
function frame135(){
this.sPlay("stop");
}
function frame225(){
this.sPlay("stop");
}
function frame315(){
this.sPlay("stop");
}
function frame1(){
this.sPlay("start");
}
function frame180(){
this.sPlay("start");
}
function frame45(){
this.sPlay("stop");
}
}
}//package
Section 188
//Plat2L8 (Plat2L8)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.Render.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Plat2L8 extends Plats {
public function Plat2L8(){
addFrameScript(1, frame2, 2, frame3, 374, frame375);
}
function frame375(){
gotoAndPlay(2);
this.btn.resetIt();
}
function frame2(){
stop();
}
function frame3(){
gotoAndStop(2);
}
}
}//package
Section 189
//plats1l4 (plats1l4)
package {
import com.Objects.Render.*;
public dynamic class plats1l4 extends Plats {
public function plats1l4(){
addFrameScript(0, frame1, 49, frame50, 84, frame85, 134, frame135, 169, frame170, 219, frame220, 254, frame255, 304, frame305);
}
function frame220(){
this.sPlay("stop");
}
function frame1(){
this.sPlay("start");
}
function frame255(){
this.sPlay("start");
}
function frame135(){
this.sPlay("stop");
}
function frame50(){
this.sPlay("stop");
}
function frame85(){
this.sPlay("start");
}
function frame305(){
this.sPlay("stop");
}
function frame170(){
this.sPlay("start");
}
}
}//package
Section 190
//plats1l8 (plats1l8)
package {
import com.Objects.Render.*;
public dynamic class plats1l8 extends Plats {
public function plats1l8(){
addFrameScript(0, frame1, 229, frame230);
}
function frame230(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
}
}//package
Section 191
//plats2L2 (plats2L2)
package {
import com.Objects.Render.*;
public dynamic class plats2L2 extends Plats {
public function plats2L2(){
addFrameScript(0, frame1, 1, frame2, 29, frame30, 30, frame31, 59, frame60, 60, frame61, 89, frame90, 90, frame91, 119, frame120);
}
function frame120(){
this.sPlay("stop");
}
function frame90(){
this.sPlay("stop");
stop();
}
function frame1(){
stop();
}
function frame2(){
sPlay("start");
}
function frame60(){
this.sPlay("stop");
stop();
}
function frame61(){
sPlay("start");
}
function frame30(){
this.sPlay("stop");
stop();
}
function frame31(){
sPlay("start");
}
function frame91(){
sPlay("start");
}
}
}//package
Section 192
//plats2l4 (plats2l4)
package {
import com.Objects.Render.*;
public dynamic class plats2l4 extends Plats {
}
}//package
Section 193
//plats2l7 (plats2l7)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.Render.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class plats2l7 extends Plats {
public function plats2l7(){
addFrameScript(0, frame1, 9, frame10, 18, frame19);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame19(){
this.btn.resetIt();
}
}
}//package
Section 194
//plats3l4 (plats3l4)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import com.Objects.Render.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class plats3l4 extends Plats {
public function plats3l4(){
addFrameScript(1, frame2, 2, frame3, 10, frame11, 11, frame12, 21, frame22);
}
function frame22(){
this.btn.resetIt();
gotoAndStop(2);
this.sPlay("stop");
}
function frame2(){
stop();
}
function frame3(){
this.sPlay("start");
}
function frame11(){
stop();
this.sPlay("stop");
}
function frame12(){
this.sPlay("start");
}
}
}//package
Section 195
//platsL2 (platsL2)
package {
import com.Objects.Render.*;
public dynamic class platsL2 extends Plats {
public function platsL2(){
addFrameScript(0, frame1, 1, frame2, 34, frame35);
}
function frame1(){
stop();
}
function frame2(){
this.sPlay("start");
}
function frame35(){
this.sPlay("stop");
stop();
}
}
}//package
Section 196
//PlatsL7 (PlatsL7)
package {
import com.Objects.Render.*;
public dynamic class PlatsL7 extends Plats {
public function PlatsL7(){
addFrameScript(0, frame1);
}
function frame1(){
c2.speedRot = -1;
c3.speedRot = 1.5;
}
}
}//package
Section 197
//Press1 (Press1)
package {
import com.Objects.*;
public dynamic class Press1 extends Press {
public function Press1(){
addFrameScript(0, frame1, 4, frame5, 19, frame20, 24, frame25, 28, frame29, 89, frame90, 91, frame92);
}
function frame25(){
if (this.onOff){
startLink();
};
}
function frame1(){
stop();
}
function frame90(){
if (onOff){
gotoAndPlay(20);
};
}
function frame92(){
sPlay("show");
}
function frame5(){
sPlay("show");
}
function frame20(){
if (!onOff){
stop();
};
}
function frame29(){
sPlay("beat");
}
}
}//package
Section 198
//Press2 (Press2)
package {
import com.Objects.*;
public dynamic class Press2 extends Press {
public function Press2(){
addFrameScript(0, frame1, 19, frame20, 24, frame25, 89, frame90);
}
function frame25(){
if (this.onOff){
startLink();
};
}
function frame20(){
if (!onOff){
stop();
};
}
function frame1(){
stop();
}
function frame90(){
if (onOff){
gotoAndPlay(20);
};
}
}
}//package
Section 199
//Pusher (Pusher)
package {
import com.Objects.*;
public dynamic class Pusher extends Pusher {
public function Pusher(){
addFrameScript(46, frame47);
}
function frame47(){
mathTime();
}
}
}//package
Section 200
//ResultMenu (ResultMenu)
package {
import flash.display.*;
import flash.text.*;
public dynamic class ResultMenu extends MovieClip {
public var coins:TextField;
public var deads:TextField;
public var txt:TextField;
public var bckBtn:MovieClip;
public var nxtBtn:MovieClip;
public function ResultMenu(){
addFrameScript(0, frame1, 1, frame2, 19, frame20);
}
function frame2(){
txt.visible = false;
deads.visible = false;
coins.visible = false;
}
function frame20(){
stop();
visible = false;
}
function frame1(){
stop();
txt.visible = true;
deads.visible = true;
coins.visible = true;
txt.selectable = false;
deads.selectable = false;
coins.selectable = false;
}
}
}//package
Section 201
//sAttack (sAttack)
package {
import flash.media.*;
public dynamic class sAttack extends Sound {
}
}//package
Section 202
//sBtnOff (sBtnOff)
package {
import flash.media.*;
public dynamic class sBtnOff extends Sound {
}
}//package
Section 203
//sBtnOn (sBtnOn)
package {
import flash.media.*;
public dynamic class sBtnOn extends Sound {
}
}//package
Section 204
//sCoin (sCoin)
package {
import flash.media.*;
public dynamic class sCoin extends Sound {
}
}//package
Section 205
//sDamage (sDamage)
package {
import flash.media.*;
public dynamic class sDamage extends Sound {
}
}//package
Section 206
//sEGateOpen (sEGateOpen)
package {
import flash.media.*;
public dynamic class sEGateOpen extends Sound {
}
}//package
Section 207
//sFallTurtle (sFallTurtle)
package {
import flash.media.*;
public dynamic class sFallTurtle extends Sound {
}
}//package
Section 208
//sFan3 (sFan3)
package {
import flash.media.*;
public dynamic class sFan3 extends Sound {
}
}//package
Section 209
//sFanf (sFanf)
package {
import flash.media.*;
public dynamic class sFanf extends Sound {
}
}//package
Section 210
//sGateClose (sGateClose)
package {
import flash.media.*;
public dynamic class sGateClose extends Sound {
}
}//package
Section 211
//sGateOpen (sGateOpen)
package {
import flash.media.*;
public dynamic class sGateOpen extends Sound {
}
}//package
Section 212
//sGhostA (sGhostA)
package {
import flash.media.*;
public dynamic class sGhostA extends Sound {
}
}//package
Section 213
//sGhostD (sGhostD)
package {
import flash.media.*;
public dynamic class sGhostD extends Sound {
}
}//package
Section 214
//sGhostS (sGhostS)
package {
import flash.media.*;
public dynamic class sGhostS extends Sound {
}
}//package
Section 215
//Shadow (Shadow)
package {
import flash.display.*;
public dynamic class Shadow extends MovieClip {
public function Shadow(){
addFrameScript(0, frame1, 6, frame7, 26, frame27, 34, frame35, 52, frame53, 61, frame62, 127, frame128, 174, frame175, 215, frame216);
}
function frame128(){
stop();
}
function frame27(){
gotoAndStop("go");
}
function frame1(){
stop();
}
function frame175(){
stop();
}
function frame62(){
stop();
}
function frame7(){
stop();
}
function frame53(){
stop();
}
function frame216(){
stop();
}
function frame35(){
stop();
}
}
}//package
Section 216
//sJump (sJump)
package {
import flash.media.*;
public dynamic class sJump extends Sound {
}
}//package
Section 217
//sLever (sLever)
package {
import flash.media.*;
public dynamic class sLever extends Sound {
}
}//package
Section 218
//sMenuB (sMenuB)
package {
import flash.media.*;
public dynamic class sMenuB extends Sound {
}
}//package
Section 219
//Song1 (Song1)
package {
import flash.media.*;
public dynamic class Song1 extends Sound {
}
}//package
Section 220
//Song2 (Song2)
package {
import flash.media.*;
public dynamic class Song2 extends Sound {
}
}//package
Section 221
//sPlatEnd (sPlatEnd)
package {
import flash.media.*;
public dynamic class sPlatEnd extends Sound {
}
}//package
Section 222
//sPlatFall (sPlatFall)
package {
import flash.media.*;
public dynamic class sPlatFall extends Sound {
}
}//package
Section 223
//sPlatMove (sPlatMove)
package {
import flash.media.*;
public dynamic class sPlatMove extends Sound {
}
}//package
Section 224
//sPressBeat (sPressBeat)
package {
import flash.media.*;
public dynamic class sPressBeat extends Sound {
}
}//package
Section 225
//sPressShow (sPressShow)
package {
import flash.media.*;
public dynamic class sPressShow extends Sound {
}
}//package
Section 226
//sStone1 (sStone1)
package {
import flash.media.*;
public dynamic class sStone1 extends Sound {
}
}//package
Section 227
//sStone2 (sStone2)
package {
import flash.media.*;
public dynamic class sStone2 extends Sound {
}
}//package
Section 228
//sStone3 (sStone3)
package {
import flash.media.*;
public dynamic class sStone3 extends Sound {
}
}//package
Section 229
//sTActivate (sTActivate)
package {
import flash.media.*;
public dynamic class sTActivate extends Sound {
}
}//package
Section 230
//StaticMenu (StaticMenu)
package {
import flash.display.*;
public dynamic class StaticMenu extends MovieClip {
public var mscBut:MovieClip;
public var totalScore:MovieClip;
public var t:MovieClip;
public var hlpBut:MovieClip;
public var lifes:MovieClip;
public var sndBut:MovieClip;
}
}//package
Section 231
//StatisticMenu (StatisticMenu)
package {
import flash.display.*;
import flash.text.*;
public dynamic class StatisticMenu extends MovieClip {
public var mon:TextField;
public var deads:TextField;
public var btn2:MovieClip;
public var u1:Uniq;
public var u2:Uniq;
public var clearM:MovieClip;
public var tTime:TextField;
public var sap:TextField;
public var u3:Uniq;
public var btn:MovieClip;
public var totalScore:TextField;
public var eme:TextField;
public var rub:TextField;
public function StatisticMenu(){
addFrameScript(0, frame1, 1, frame2, 28, frame29, 29, frame30);
}
function frame30(){
mon.visible = false;
sap.visible = false;
eme.visible = false;
rub.visible = false;
totalScore.visible = false;
tTime.visible = false;
deads.visible = false;
u1.visible = false;
u2.visible = false;
u3.visible = false;
}
function frame1(){
stop();
this.visible = false;
mon.selectable = false;
sap.selectable = false;
eme.selectable = false;
rub.selectable = false;
totalScore.selectable = false;
tTime.selectable = false;
deads.selectable = false;
mon.visible = false;
sap.visible = false;
eme.visible = false;
rub.visible = false;
totalScore.visible = false;
tTime.visible = false;
deads.visible = false;
u1.visible = false;
u2.visible = false;
u3.visible = false;
}
function frame2(){
this.visible = true;
}
function frame29(){
stop();
mon.visible = true;
sap.visible = true;
eme.visible = true;
rub.visible = true;
totalScore.visible = true;
tTime.visible = true;
deads.visible = true;
u1.visible = true;
u2.visible = true;
u3.visible = true;
}
}
}//package
Section 232
//StBtn (StBtn)
package {
import flash.display.*;
public dynamic class StBtn extends MovieClip {
public function StBtn(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 233
//sTimer (sTimer)
package {
import flash.media.*;
public dynamic class sTimer extends Sound {
}
}//package
Section 234
//sWallBroke (sWallBroke)
package {
import flash.media.*;
public dynamic class sWallBroke extends Sound {
}
}//package
Section 235
//sWallBum (sWallBum)
package {
import flash.media.*;
public dynamic class sWallBum extends Sound {
}
}//package
Section 236
//TrapCont1l4 (TrapCont1l4)
package {
import com.Objects.Render.*;
public dynamic class TrapCont1l4 extends TrapCont {
public function TrapCont1l4(){
addFrameScript(0, frame1);
}
function frame1(){
t2r1.rot = -8;
t2r2.rot = -8;
t2r3.rot = -8;
}
}
}//package
Section 237
//TrapCont1l6 (TrapCont1l6)
package {
import com.Objects.Render.*;
public dynamic class TrapCont1l6 extends TrapCont {
public function TrapCont1l6(){
addFrameScript(0, frame1);
}
function frame1(){
pr1.cont = true;
pr1.global = true;
}
}
}//package
Section 238
//trapCont2L6 (trapCont2L6)
package {
import com.Objects.Render.*;
public dynamic class trapCont2L6 extends TrapCont {
public function trapCont2L6(){
addFrameScript(0, frame1);
}
function frame1(){
tr1l6.rot = -10;
tr2l6.rot = -10;
tr3l6.rot = -10;
}
}
}//package
Section 239
//trapCont3L6 (trapCont3L6)
package {
import com.Objects.Render.*;
public dynamic class trapCont3L6 extends TrapCont {
public function trapCont3L6(){
addFrameScript(0, frame1);
}
function frame1(){
tr11l6.rot = -10;
tr12l6.rot = -10;
tr13l6.rot = -10;
}
}
}//package
Section 240
//trapContl8 (trapContl8)
package {
import com.Objects.Render.*;
public dynamic class trapContl8 extends TrapCont {
}
}//package
Section 241
//traps1l6 (traps1l6)
package {
import com.Objects.Render.*;
public dynamic class traps1l6 extends TrapCont {
public function traps1l6(){
addFrameScript(0, frame1);
}
function frame1(){
tr1.rot = -8;
tr2.rot = -10;
}
}
}//package
Section 242
//TrapZone (TrapZone)
package {
import com.Objects.*;
public dynamic class TrapZone extends Trap {
public function TrapZone(){
addFrameScript(0, frame1);
}
function frame1(){
this.visible = false;
}
}
}//package
Section 243
//trc2l4 (trc2l4)
package {
import com.Objects.Render.*;
public dynamic class trc2l4 extends TrapCont {
public function trc2l4(){
addFrameScript(0, frame1);
}
function frame1(){
pr1.cont = true;
}
}
}//package
Section 244
//Uniq (Uniq)
package {
import com.Objects.Bonus.*;
public dynamic class Uniq extends Uniq {
public function Uniq(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 245
//WindowLevel (WindowLevel)
package {
import flash.display.*;
public dynamic class WindowLevel extends MovieClip {
public var num:MovieClip;
public function WindowLevel(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 246
//копияplats3l4 (копиÑplats3l4)
package {
import com.Objects.Render.*;
public dynamic class копияplats3l4 extends Plats {
}
}//package
Section 247
//Круг5 (Круг5)
package {
import com.Objects.Render.*;
public dynamic class Круг5 extends ActivePlat {
}
}//package
Section 248
//Крутилка (Крутилка)
package {
import com.Objects.*;
public dynamic class Крутилка extends Trap {
}
}//package
Section 249
//Крутилка2 (Крутилка2)
package {
import com.Objects.*;
public dynamic class Крутилка2 extends Trap {
}
}//package
Section 250
//Обвал (Обвал)
package {
import com.Objects.Render.*;
public dynamic class Обвал extends Plats {
public function Обвал(){
addFrameScript(0, frame1, 36, frame37);
}
function frame37(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 251
//Символ1 (Символ1)
package {
import com.Objects.Render.*;
public dynamic class Символ1 extends ActivePlat {
}
}//package