Section 1
//btnGrpCredits_9 (seoGame03_fla.btnGrpCredits_9)
package seoGame03_fla {
import flash.display.*;
public dynamic class btnGrpCredits_9 extends MovieClip {
public var crBtn:SimpleButton;
public function btnGrpCredits_9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package seoGame03_fla
Section 2
//btnGrpLang_6 (seoGame03_fla.btnGrpLang_6)
package seoGame03_fla {
import flash.display.*;
public dynamic class btnGrpLang_6 extends MovieClip {
public var lgBtn:SimpleButton;
public function btnGrpLang_6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package seoGame03_fla
Section 3
//btnGrpMMenu_18 (seoGame03_fla.btnGrpMMenu_18)
package seoGame03_fla {
import flash.display.*;
public dynamic class btnGrpMMenu_18 extends MovieClip {
public var mmBtn:SimpleButton;
public function btnGrpMMenu_18(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package seoGame03_fla
Section 4
//btnGrpPlay_3 (seoGame03_fla.btnGrpPlay_3)
package seoGame03_fla {
import flash.display.*;
public dynamic class btnGrpPlay_3 extends MovieClip {
public var plButton:SimpleButton;
public function btnGrpPlay_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package seoGame03_fla
Section 5
//creditsClp_23 (seoGame03_fla.creditsClp_23)
package seoGame03_fla {
import flash.display.*;
public dynamic class creditsClp_23 extends MovieClip {
public function creditsClp_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package seoGame03_fla
Section 6
//creditsTClp_22 (seoGame03_fla.creditsTClp_22)
package seoGame03_fla {
import flash.display.*;
public dynamic class creditsTClp_22 extends MovieClip {
public function creditsTClp_22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package seoGame03_fla
Section 7
//GameLevel1_32 (seoGame03_fla.GameLevel1_32)
package seoGame03_fla {
import flash.display.*;
public dynamic class GameLevel1_32 extends MovieClip {
public var hero:MovieClip;
public var enemy1:MovieClip;
public var enemy2:MovieClip;
public var enemy3:MovieClip;
public var glBG:MovieClip;
}
}//package seoGame03_fla
Section 8
//GameLevel2_48 (seoGame03_fla.GameLevel2_48)
package seoGame03_fla {
import flash.display.*;
public dynamic class GameLevel2_48 extends MovieClip {
public var hero:MovieClip;
public var router1:MovieClip;
public var enemy1:MovieClip;
public var enemy2:MovieClip;
public var glBG:MovieClip;
}
}//package seoGame03_fla
Section 9
//GameLevel3_56 (seoGame03_fla.GameLevel3_56)
package seoGame03_fla {
import flash.display.*;
public dynamic class GameLevel3_56 extends MovieClip {
public var hero:MovieClip;
public var router1:MovieClip;
public var router2:MovieClip;
public var enemy1:MovieClip;
public var enemy2:MovieClip;
public var enemy3:MovieClip;
public var glBG:MovieClip;
}
}//package seoGame03_fla
Section 10
//GameLevel4_60 (seoGame03_fla.GameLevel4_60)
package seoGame03_fla {
import flash.display.*;
public dynamic class GameLevel4_60 extends MovieClip {
public var hero:MovieClip;
public var router1:MovieClip;
public var router2:MovieClip;
public var enemy1:MovieClip;
public var enemy2:MovieClip;
public var glBG:MovieClip;
}
}//package seoGame03_fla
Section 11
//GameLevel5_64 (seoGame03_fla.GameLevel5_64)
package seoGame03_fla {
import flash.display.*;
public dynamic class GameLevel5_64 extends MovieClip {
public var hero:MovieClip;
public var usb2:MovieClip;
public var usb1:MovieClip;
public var glBG:MovieClip;
}
}//package seoGame03_fla
Section 12
//glBackgroundClp_33 (seoGame03_fla.glBackgroundClp_33)
package seoGame03_fla {
import flash.display.*;
public dynamic class glBackgroundClp_33 extends MovieClip {
public function glBackgroundClp_33(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package seoGame03_fla
Section 13
//instructionsClp_21 (seoGame03_fla.instructionsClp_21)
package seoGame03_fla {
import flash.display.*;
public dynamic class instructionsClp_21 extends MovieClip {
public function instructionsClp_21(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package seoGame03_fla
Section 14
//lv3IntroClp_58 (seoGame03_fla.lv3IntroClp_58)
package seoGame03_fla {
import flash.display.*;
public dynamic class lv3IntroClp_58 extends MovieClip {
public function lv3IntroClp_58(){
addFrameScript(44, frame45);
}
function frame45(){
MovieClip(parent).nextFrame();
}
}
}//package seoGame03_fla
Section 15
//lv4IntroClp_61 (seoGame03_fla.lv4IntroClp_61)
package seoGame03_fla {
import flash.display.*;
public dynamic class lv4IntroClp_61 extends MovieClip {
public function lv4IntroClp_61(){
addFrameScript(44, frame45);
}
function frame45(){
MovieClip(parent).nextFrame();
}
}
}//package seoGame03_fla
Section 16
//lv5IntroClp_68 (seoGame03_fla.lv5IntroClp_68)
package seoGame03_fla {
import flash.display.*;
public dynamic class lv5IntroClp_68 extends MovieClip {
public function lv5IntroClp_68(){
addFrameScript(44, frame45);
}
function frame45(){
MovieClip(parent).nextFrame();
}
}
}//package seoGame03_fla
Section 17
//lvl1IntroClp_46 (seoGame03_fla.lvl1IntroClp_46)
package seoGame03_fla {
import flash.display.*;
public dynamic class lvl1IntroClp_46 extends MovieClip {
public function lvl1IntroClp_46(){
addFrameScript(44, frame45);
}
function frame45(){
MovieClip(parent).nextFrame();
}
}
}//package seoGame03_fla
Section 18
//lvl2IntroClp_53 (seoGame03_fla.lvl2IntroClp_53)
package seoGame03_fla {
import flash.display.*;
public dynamic class lvl2IntroClp_53 extends MovieClip {
public function lvl2IntroClp_53(){
addFrameScript(44, frame45);
}
function frame45(){
MovieClip(parent).nextFrame();
}
}
}//package seoGame03_fla
Section 19
//motoClp_44 (seoGame03_fla.motoClp_44)
package seoGame03_fla {
import flash.display.*;
public dynamic class motoClp_44 extends MovieClip {
public function motoClp_44(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
stop();
}
}
}//package seoGame03_fla
Section 20
//mpClp_12 (seoGame03_fla.mpClp_12)
package seoGame03_fla {
import flash.display.*;
public dynamic class mpClp_12 extends MovieClip {
public function mpClp_12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package seoGame03_fla
Section 21
//regClp_31 (seoGame03_fla.regClp_31)
package seoGame03_fla {
import flash.display.*;
public dynamic class regClp_31 extends MovieClip {
public function regClp_31(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package seoGame03_fla
Section 22
//soundCtrlClp_13 (seoGame03_fla.soundCtrlClp_13)
package seoGame03_fla {
import flash.display.*;
public dynamic class soundCtrlClp_13 extends MovieClip {
public var soundOn:SimpleButton;
public function soundCtrlClp_13(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package seoGame03_fla
Section 23
//Arial (Arial)
package {
import flash.text.*;
public dynamic class Arial extends Font {
}
}//package
Section 24
//BasicButton (BasicButton)
package {
import flash.display.*;
public dynamic class BasicButton extends SimpleButton {
}
}//package
Section 25
//Chest (Chest)
package {
import flash.display.*;
public dynamic class Chest extends MovieClip {
public function Chest(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 26
//Dialog (Dialog)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Dialog extends MovieClip {
public var message:TextField;
public var okButton:BasicButton;
public function Dialog(){
addFrameScript(0, frame1);
}
function frame1(){
okButton.addEventListener(MouseEvent.CLICK, MovieClip(parent).clickButton);
}
}
}//package
Section 27
//Door (Door)
package {
import flash.display.*;
public dynamic class Door extends MovieClip {
public function Door(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 28
//Floor (Floor)
package {
import flash.display.*;
public dynamic class Floor extends MovieClip {
public function Floor(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 29
//GameOver (GameOver)
package {
import flash.display.*;
public dynamic class GameOver extends SimpleButton {
}
}//package
Section 30
//GameOverFR (GameOverFR)
package {
import flash.display.*;
public dynamic class GameOverFR extends SimpleButton {
}
}//package
Section 31
//HeroDeath (HeroDeath)
package {
import flash.display.*;
public dynamic class HeroDeath extends SimpleButton {
}
}//package
Section 32
//HeroDeathFR (HeroDeathFR)
package {
import flash.display.*;
public dynamic class HeroDeathFR extends SimpleButton {
}
}//package
Section 33
//Key (Key)
package {
import flash.display.*;
public dynamic class Key extends MovieClip {
}
}//package
Section 34
//KeyO (KeyO)
package {
import flash.display.*;
public dynamic class KeyO extends MovieClip {
}
}//package
Section 35
//LevelComplete (LevelComplete)
package {
import flash.display.*;
public dynamic class LevelComplete extends SimpleButton {
}
}//package
Section 36
//LevelCompleteFR (LevelCompleteFR)
package {
import flash.display.*;
public dynamic class LevelCompleteFR extends SimpleButton {
}
}//package
Section 37
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 38
//PlatformGame (PlatformGame)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.media.*;
import flash.utils.*;
import flash.net.*;
public class PlatformGame extends MovieClip {
private var enemies:Array;
public var bgMMenu:MovieClip;
public var sndBtn:MovieClip;
public var oText:TextField;
public var ctTxt:TextField;
private var gameSound:String;// = "soundOn"
private var routers:Array;
public var urlString:String;
public var rcBtn:SimpleButton;
public var ebBtn:SimpleButton;
private var lastTime:Number;// = 0
public var mpClp:MovieClip;
public var request:URLRequest;
public var bgCredits:MovieClip;
public var jiBtn:Sponsor2;
public var levelDisplay:TextField;
public var emTxt:TextField;
private var playerLives:int;
private var gameMode:String;// = "start"
private var gameLevel:int;
public var spBtn:SimpleButton;
public var gamelevel:MovieClip;
public var enBtn:SimpleButton;
public var credClp:MovieClip;
public var instClp:MovieClip;
private var hd:SimpleButton;
private var playerObjects:Array;
public var bgPlay:MovieClip;
private var fixedObjects:Array;
public var timeDisplay:TextField;
public var rpBtn:MovieClip;
public var iBtn:SimpleButton;
public var domE:int;
private var timer:Timer;
public var site:String;
public var domS:int;
public var sndChannel:SoundChannel;
private var city:String;// = ""
public var lgoBtn:Sponsor1;
private var gameLanguage:String;// = "English"
public var mzBtn:SimpleButton;
public var domStr:String;
public var bgdSound:TechnoLoop;
private var usbs:Array;
public var variables:URLVariables;
private var email:String;// = ""
public var trn:SoundTransform;
public var livesDisplay:TextField;
private var gameScore:int;
public var creditsTClp:MovieClip;
public var scoreDisplay:TextField;
public var whBtn:Sponsor3;
public var bgLang:MovieClip;
private var otherObjects:Array;
private var gameTime:int;
public var regClp:MovieClip;
private var hero:Object;
static const edgeDistance:Number = 120;
static const gravity:Number = 0.0035;
public function PlatformGame(){
gameMode = "start";
lastTime = 0;
gameLanguage = "English";
gameSound = "soundOn";
email = "";
city = "";
super();
addFrameScript(0, frame1, 1, frame2, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
public function showLives(){
livesDisplay.text = String(playerLives);
}
public function heroDie(){
playerLives--;
if (playerLives == 0){
gameMode = "gameover";
if (gameLanguage == "English"){
hd = new GameOver();
} else {
hd = new GameOverFR();
};
hd.x = 183.5;
hd.y = 150;
addChild(hd);
hd.addEventListener(MouseEvent.CLICK, hdResponse);
} else {
gameMode = "dead";
if (gameLanguage == "English"){
hd = new HeroDeath();
} else {
hd = new HeroDeathFR();
};
hd.x = 183.5;
hd.y = 150;
addChild(hd);
hd.addEventListener(MouseEvent.CLICK, hdResponse);
};
hero.mc.gotoAndPlay("die");
timer.stop();
}
public function getObject(_arg1:int){
var _local2:PointBurst;
if ((otherObjects[_arg1] is Treasure)){
_local2 = new PointBurst(gamelevel, 100, otherObjects[_arg1].x, otherObjects[_arg1].y);
gamelevel.removeChild(otherObjects[_arg1]);
otherObjects.splice(_arg1, 1);
addScore(100);
} else {
if ((otherObjects[_arg1] is Key)){
_local2 = new PointBurst(gamelevel, "Got Key!", otherObjects[_arg1].x, otherObjects[_arg1].y);
playerObjects.push("Key");
gamelevel.removeChild(otherObjects[_arg1]);
otherObjects.splice(_arg1, 1);
} else {
if ((((((otherObjects[_arg1] is Sponsor1)) || ((otherObjects[_arg1] is Sponsor2)))) || ((otherObjects[_arg1] is Sponsor3)))){
_local2 = new PointBurst(gamelevel, 500, otherObjects[_arg1].x, otherObjects[_arg1].y);
gamelevel.removeChild(otherObjects[_arg1]);
otherObjects.splice(_arg1, 1);
addScore(500);
} else {
if ((otherObjects[_arg1] is Door)){
if (playerObjects.indexOf("Key") == -1){
return;
};
if (otherObjects[_arg1].currentFrame == 1){
otherObjects[_arg1].gotoAndPlay("open");
levelComplete();
};
} else {
if ((otherObjects[_arg1] is Chest)){
otherObjects[_arg1].gotoAndStop("open");
gameComplete();
};
};
};
};
};
}
public function addEnemies(){
var _local1:int;
var _local2:*;
enemies = new Array();
_local1 = 1;
while (true) {
if (gamelevel[("enemy" + _local1)] == null){
break;
};
_local2 = new Object();
_local2.mc = gamelevel[("enemy" + _local1)];
_local2.dx = 0;
_local2.dy = 0;
_local2.inAir = false;
_local2.direction = 1;
_local2.animstate = "stand";
_local2.walkAnimation = new Array(1);
_local2.animstep = 0;
_local2.jump = false;
_local2.flying = false;
_local2.moveRight = true;
_local2.moveLeft = false;
_local2.jumpSpeed = 1;
_local2.walkSpeed = 0.08;
_local2.width = 33;
_local2.height = 55;
enemies.push(_local2);
_local1++;
};
}
function frame14(){
stop();
startGameLevel();
}
function frame16(){
stop();
startGameLevel();
}
public function moveCharacter(_arg1:Object, _arg2:Number){
var _local3:Number;
var _local4:*;
var _local5:String;
var _local6:int;
var _local7:Number;
var _local8:int;
var _local9:Number;
if (_arg2 < 1){
return;
};
_local3 = ((_arg1.dy * _arg2) + (_arg2 * gravity));
if (_local3 > 15){
_local3 = 15;
};
_arg1.dy = (_arg1.dy + (_arg2 * gravity));
if (_arg1.flying == true){
_arg1.dy = 0;
_local3 = 0;
};
_local4 = 0;
_local5 = "stand";
_local6 = _arg1.direction;
if (_arg1.moveLeft){
_local4 = (-(_arg1.walkSpeed) * _arg2);
_local5 = "walk";
_local6 = -1;
} else {
if (_arg1.moveRight){
_local4 = (_arg1.walkSpeed * _arg2);
_local5 = "walk";
_local6 = 1;
};
};
if (_arg1.jump){
_arg1.jump = false;
_arg1.dy = -(_arg1.jumpSpeed);
_local3 = -(_arg1.jumpSpeed);
_local5 = "jump";
};
_arg1.hitWallRight = false;
_arg1.hitWallLeft = false;
_arg1.inAir = true;
_local7 = (_arg1.mc.y + _local3);
_local8 = 0;
while (_local8 < fixedObjects.length) {
if (((((_arg1.mc.x + (_arg1.width / 2)) > fixedObjects[_local8].leftside)) && (((_arg1.mc.x - (_arg1.width / 2)) < fixedObjects[_local8].rightside)))){
if ((((_arg1.mc.y <= fixedObjects[_local8].topside)) && ((_local7 > fixedObjects[_local8].topside)))){
_local7 = fixedObjects[_local8].topside;
_arg1.dy = 0;
_arg1.inAir = false;
break;
};
};
_local8++;
};
_local9 = (_arg1.mc.x + _local4);
_local8 = 0;
while (_local8 < fixedObjects.length) {
if ((((_local7 > fixedObjects[_local8].topside)) && (((_local7 - _arg1.height) < fixedObjects[_local8].bottomside)))){
if (((((_arg1.mc.x - (_arg1.width / 2)) >= fixedObjects[_local8].rightside)) && (((_local9 - (_arg1.width / 2)) <= fixedObjects[_local8].rightside)))){
_local9 = (fixedObjects[_local8].rightside + (_arg1.width / 2));
_arg1.hitWallLeft = true;
break;
};
if (((((_arg1.mc.x + (_arg1.width / 2)) <= fixedObjects[_local8].leftside)) && (((_local9 + (_arg1.width / 2)) >= fixedObjects[_local8].leftside)))){
_local9 = (fixedObjects[_local8].leftside - (_arg1.width / 2));
_arg1.hitWallRight = true;
break;
};
};
_local8++;
};
_arg1.mc.x = _local9;
_arg1.mc.y = _local7;
if (_arg1.inAir){
_local5 = "jump";
};
_arg1.animstate = _local5;
if (_arg1.animstate == "walk"){
_arg1.animstep = (_arg1.animstep + (_arg2 / 60));
if (_arg1.animstep > _arg1.walkAnimation.length){
_arg1.animstep = 0;
};
_arg1.mc.gotoAndStop(_arg1.walkAnimation[Math.floor(_arg1.animstep)]);
} else {
_arg1.mc.gotoAndStop(_arg1.animstate);
};
if (_local6 != _arg1.direction){
_arg1.direction = _local6;
_arg1.mc.scaleX = _arg1.direction;
};
}
function frame10(){
stop();
startGameLevel();
}
public function clRC(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.rc2i.net"));
}
function frame17(){
stop();
showGameBackground();
}
function frame18(){
stop();
startGameLevel();
}
function frame2(){
urlString = this.root.loaderInfo.url;
domS = (urlString.indexOf("://") + 3);
domE = urlString.indexOf("/", domS);
domStr = urlString.substring(domS, domE);
site = "";
if ((((domStr == "www.mz150.com")) || ((domStr == "mz150.com")))){
site = "mz150";
gameLanguage = "French";
};
MochiBot.track(this, "4728a206");
bgdSound = new TechnoLoop();
sndChannel = bgdSound.play(0, int.MAX_VALUE);
trn = new SoundTransform();
trn.volume = 0.6;
sndChannel.soundTransform = trn;
}
public function clickSound(_arg1:MouseEvent){
if (gameSound == "soundOff"){
gameSound = "soundOn";
sndChannel = bgdSound.play(0, int.MAX_VALUE);
} else {
gameSound = "soundOff";
sndChannel.stop();
};
sndBtn.gotoAndStop(gameSound);
}
function frame5(){
instClp.gotoAndStop(gameLanguage);
bgMMenu.gotoAndStop(gameLanguage);
bgMMenu.addEventListener(MouseEvent.CLICK, clickMenu);
}
public function addRouters(){
var _local1:int;
var _local2:*;
routers = new Array();
_local1 = 1;
while (true) {
if (gamelevel[("router" + _local1)] == null){
break;
};
_local2 = new Object();
_local2.mc = gamelevel[("router" + _local1)];
routers.push(_local2);
_local1++;
};
}
function frame4(){
stop();
sndBtn.gotoAndStop(gameSound);
sndBtn.addEventListener(MouseEvent.CLICK, clickSound);
mpClp.gotoAndStop(gameLanguage);
bgPlay.gotoAndStop(gameLanguage);
bgLang.gotoAndStop(gameLanguage);
bgCredits.gotoAndStop(gameLanguage);
bgPlay.addEventListener(MouseEvent.CLICK, clickStart);
iBtn.addEventListener(MouseEvent.CLICK, clickInstructions);
spBtn.addEventListener(MouseEvent.CLICK, clickSponsor);
bgCredits.addEventListener(MouseEvent.CLICK, clickCredits);
bgLang.addEventListener(MouseEvent.CLICK, clickLanguage);
}
function frame11(){
stop();
showGameBackground();
}
public function startGameLevel(){
createHero();
addEnemies();
addRouters();
addUsbs();
playerObjects = new Array();
examineLevel();
this.addEventListener(Event.ENTER_FRAME, gameLoop);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
timer.start();
gameMode = "play";
addScore(0);
showLevel();
showLives();
showTime();
}
public function addScore(_arg1:int){
gameScore = (gameScore + _arg1);
scoreDisplay.text = String(gameScore);
}
function frame1(){
stop();
stage.showDefaultContextMenu = false;
stage.scaleMode = StageScaleMode.NO_SCALE;
addEventListener(Event.ENTER_FRAME, loadProgress);
}
function frame19(){
stop();
}
function frame9(){
stop();
startPlatformGame();
showGameBackground();
}
public function clickSponsor(_arg1:MouseEvent){
gotoAndStop("sponsor");
}
function frame7(){
bgMMenu.gotoAndStop(gameLanguage);
bgMMenu.addEventListener(MouseEvent.CLICK, clickMenu);
mzBtn.addEventListener(MouseEvent.CLICK, clMZ);
lgoBtn.addEventListener(MouseEvent.CLICK, clLGO);
jiBtn.addEventListener(MouseEvent.CLICK, clJI);
whBtn.addEventListener(MouseEvent.CLICK, clWH);
enBtn.addEventListener(MouseEvent.CLICK, clEN);
rcBtn.addEventListener(MouseEvent.CLICK, clRC);
ebBtn.addEventListener(MouseEvent.CLICK, clEB);
}
public function startPlatformGame(){
playerObjects = new Array();
gameScore = 0;
gameLevel = 1;
gameMode = "play";
gameTime = 0;
playerLives = 3;
timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, clockTick);
}
function frame15(){
stop();
showGameBackground();
}
function frame8(){
regClp.gotoAndStop(gameLanguage);
rpBtn.gotoAndStop(gameLanguage);
rpBtn.addEventListener(MouseEvent.CLICK, register);
}
public function keyDownFunction(_arg1:KeyboardEvent){
if (gameMode != "play"){
return;
};
if (_arg1.keyCode == 37){
hero.moveLeft = true;
} else {
if (_arg1.keyCode == 39){
hero.moveRight = true;
} else {
if (_arg1.keyCode == 32){
if (!hero.inAir){
hero.jump = true;
};
};
};
};
}
public function showLevel(){
levelDisplay.text = String(gameLevel);
}
public function register(_arg1:MouseEvent){
email = emTxt.text;
city = ctTxt.text;
gotoAndStop("play");
}
function frame20(){
stop();
if ((((email.length > 0)) && ((city.length > 0)))){
request = new URLRequest("http://www.mz150.com/seoSubmit.php");
variables = new URLVariables();
variables.email = email;
variables.city = city;
variables.level = gameLevel;
variables.lives = playerLives;
variables.score = gameScore;
variables.time = gameTime;
request.data = variables;
sendToURL(request);
};
gotoAndStop("start");
}
public function hdPicked(){
var _local1:int;
removeChild(hd);
if (gameMode == "dead"){
showLives();
hero.mc.x = hero.startx;
hero.mc.y = hero.starty;
_local1 = (usbs.length - 1);
while (_local1 >= 0) {
usbs[_local1].mc.x = usbs[_local1].startx;
_local1--;
};
gameMode = "play";
timer.start();
} else {
if (gameMode == "gameover"){
cleanUp();
gotoAndStop("dead");
} else {
if (gameMode == "done"){
cleanUp();
nextFrame();
};
};
};
stage.focus = stage;
}
function frame6(){
bgMMenu.gotoAndStop(gameLanguage);
creditsTClp.gotoAndStop(gameLanguage);
credClp.gotoAndStop(gameLanguage);
bgMMenu.addEventListener(MouseEvent.CLICK, clickMenu);
}
public function checkCollisions(){
var _local1:int;
_local1 = (enemies.length - 1);
while (_local1 >= 0) {
if (hero.mc.hitTestObject(enemies[_local1].mc)){
if (((hero.inAir) && ((hero.dy > 0)))){
enemyDie(_local1);
} else {
heroDie();
};
};
_local1--;
};
_local1 = (routers.length - 1);
while (_local1 >= 0) {
if (hero.mc.hitTestObject(routers[_local1].mc)){
heroDie();
};
_local1--;
};
_local1 = (usbs.length - 1);
while (_local1 >= 0) {
if (hero.mc.hitTestObject(usbs[_local1].mc)){
heroDie();
};
_local1--;
};
_local1 = (otherObjects.length - 1);
while (_local1 >= 0) {
if (hero.mc.hitTestObject(otherObjects[_local1])){
getObject(_local1);
};
_local1--;
};
}
function frame12(){
stop();
startGameLevel();
}
function frame13(){
stop();
showGameBackground();
}
public function cleanUp(){
removeChild(gamelevel);
this.removeEventListener(Event.ENTER_FRAME, gameLoop);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
}
public function examineLevel(){
var _local1:int;
var _local2:*;
var _local3:Object;
fixedObjects = new Array();
otherObjects = new Array();
_local1 = 0;
while (_local1 < this.gamelevel.numChildren) {
_local2 = this.gamelevel.getChildAt(_local1);
if ((((_local2 is Floor)) || ((_local2 is Wall)))){
_local3 = new Object();
_local3.mc = _local2;
_local3.leftside = _local2.x;
_local3.rightside = (_local2.x + _local2.width);
_local3.topside = _local2.y;
_local3.bottomside = (_local2.y + _local2.height);
fixedObjects.push(_local3);
} else {
if ((((((((((((((_local2 is Treasure)) || ((_local2 is Key)))) || ((_local2 is Door)))) || ((_local2 is Sponsor1)))) || ((_local2 is Sponsor2)))) || ((_local2 is Sponsor3)))) || ((_local2 is Chest)))){
otherObjects.push(_local2);
};
};
_local1++;
};
}
public function clEB(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.eurybooks.com"));
}
public function clockTick(_arg1:TimerEvent){
gameTime++;
showTime();
}
public function clEN(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.eurynet.com"));
}
public function clickButton(_arg1:MouseEvent){
removeChild(MovieClip(_arg1.currentTarget.parent));
if (gameMode == "dead"){
showLives();
hero.mc.x = hero.startx;
hero.mc.y = hero.starty;
gameMode = "play";
timer.start();
} else {
if (gameMode == "gameover"){
cleanUp();
gotoAndStop("dead");
} else {
if (gameMode == "done"){
cleanUp();
nextFrame();
};
};
};
stage.focus = stage;
}
public function levelComplete(){
gameMode = "done";
timer.stop();
if (gameLevel == 5){
gameComplete();
} else {
gameLevel++;
if (gameLanguage == "English"){
hd = new LevelComplete();
} else {
hd = new LevelCompleteFR();
};
hd.x = 183.5;
hd.y = 150;
addChild(hd);
hd.addEventListener(MouseEvent.CLICK, hdResponse);
};
}
public function clickLanguage(_arg1:MouseEvent){
if (gameLanguage == "English"){
gameLanguage = "French";
} else {
gameLanguage = "English";
};
bgPlay.gotoAndStop(gameLanguage);
bgLang.gotoAndStop(gameLanguage);
bgCredits.gotoAndStop(gameLanguage);
mpClp.gotoAndStop(gameLanguage);
}
public function clWH(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.webmaster-hub.com"));
}
public function clickMenu(_arg1:MouseEvent){
gotoAndStop("start");
}
public function moveEnemies(_arg1:int){
var _local2:int;
_local2 = 0;
while (_local2 < enemies.length) {
moveCharacter(enemies[_local2], _arg1);
if (enemies[_local2].hitWallRight){
enemies[_local2].moveLeft = true;
enemies[_local2].moveRight = false;
} else {
if (enemies[_local2].hitWallLeft){
enemies[_local2].moveLeft = false;
enemies[_local2].moveRight = true;
};
};
_local2++;
};
_local2 = 0;
while (_local2 < usbs.length) {
moveCharacter(usbs[_local2], _arg1);
if (usbs[_local2].hitWallRight){
usbs[_local2].moveLeft = true;
usbs[_local2].moveRight = false;
} else {
if (usbs[_local2].hitWallLeft){
usbs[_local2].moveLeft = false;
usbs[_local2].moveRight = true;
};
};
_local2++;
};
}
public function clLGO(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.guide-optimisation.com"));
}
public function showGameBackground(){
var _local1:int;
var _local2:*;
this.gamelevel.glBG.gotoAndStop(gameLevel);
_local1 = 0;
while (_local1 < this.gamelevel.numChildren) {
_local2 = this.gamelevel.getChildAt(_local1);
if ((((_local2 is Floor)) || ((_local2 is Wall)))){
_local2.gotoAndStop(gameLevel);
};
_local1++;
};
}
public function createHero(){
hero = new Object();
hero.mc = gamelevel.hero;
hero.dx = 0;
hero.dy = 0;
hero.inAir = false;
hero.direction = 1;
hero.animstate = "stand";
hero.walkAnimation = new Array(2, 3, 4, 5, 6, 7, 8, 9);
hero.animstep = 0;
hero.jump = false;
hero.moveLeft = false;
hero.moveRight = false;
hero.jumpSpeed = 0.9;
hero.walkSpeed = 0.15;
hero.width = 15;
hero.height = 50;
hero.startx = hero.mc.x;
hero.starty = hero.mc.y;
hero.flying = false;
}
public function loadProgress(_arg1:Event){
if (this.root.loaderInfo.bytesLoaded >= this.root.loaderInfo.bytesTotal){
removeEventListener(Event.ENTER_FRAME, loadProgress);
play();
};
}
public function clickInstructions(_arg1:MouseEvent){
gotoAndStop("instructions");
}
public function keyUpFunction(_arg1:KeyboardEvent){
if ((((gameMode == "dead")) || ((gameMode == "done")))){
if (_arg1.keyCode == 32){
hdPicked();
};
};
if (_arg1.keyCode == 37){
hero.moveLeft = false;
} else {
if (_arg1.keyCode == 39){
hero.moveRight = false;
};
};
}
public function hdResponse(_arg1:MouseEvent){
hdPicked();
}
public function gameComplete(){
var _local1:Dialog;
gameMode = "gameover";
_local1 = new Dialog();
_local1.x = 175;
_local1.y = 100;
addChild(_local1);
if (gameLanguage == "English"){
_local1.message.text = "You and MoteurZine have achieved Search Engine Optimization.";
} else {
_local1.message.text = "Vous et MoteurZine avez réussi votre quête du Référencement.";
};
}
public function clJI(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.jeux-internet.com"));
}
public function showTime(){
var _local1:int;
var _local2:String;
_local1 = (gameTime % 60);
_local2 = String(_local1);
if (_local1 < 10){
_local2 = ("0" + _local2);
};
timeDisplay.text = ((String(Math.floor((gameTime / 60))) + ":") + _local2);
}
public function gameLoop(_arg1:Event){
var _local2:int;
if (lastTime == 0){
lastTime = getTimer();
};
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
if (gameMode == "play"){
moveCharacter(hero, _local2);
moveEnemies(_local2);
checkCollisions();
scrollWithHero();
};
}
public function addUsbs(){
var _local1:int;
var _local2:*;
usbs = new Array();
_local1 = 1;
while (true) {
if (gamelevel[("usb" + _local1)] == null){
break;
};
_local2 = new Object();
_local2.mc = gamelevel[("usb" + _local1)];
_local2.dx = 0;
_local2.dy = 0;
_local2.moveRight = true;
_local2.moveLeft = false;
_local2.walkSpeed = 0.2;
_local2.width = 85;
_local2.height = 25;
_local2.inAir = false;
_local2.direction = 1;
_local2.animstate = "stand";
_local2.walkAnimation = new Array(1);
_local2.animstep = 0;
_local2.jump = false;
_local2.jumpSpeed = 0;
_local2.flying = true;
_local2.startx = _local2.mc.x;
_local2.starty = _local2.mc.y;
usbs.push(_local2);
_local1++;
};
}
public function clickStart(_arg1:MouseEvent){
if (site == "mz150"){
gotoAndStop("register");
} else {
gotoAndStop("play");
};
}
public function scrollWithHero(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (gamelevel.x + hero.mc.x);
_local2 = (stage.stageWidth - edgeDistance);
_local3 = edgeDistance;
if (_local1 > _local2){
gamelevel.x = (gamelevel.x - (_local1 - _local2));
if (gamelevel.x < -((gamelevel.width - stage.stageWidth))){
gamelevel.x = -((gamelevel.width - stage.stageWidth));
};
};
if (_local1 < _local3){
gamelevel.x = (gamelevel.x + (_local3 - _local1));
if (gamelevel.x > 0){
gamelevel.x = 0;
};
};
}
public function clMZ(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.moteurzine.com"));
}
public function enemyDie(_arg1:int){
var _local2:PointBurst;
_local2 = new PointBurst(gamelevel, 50, enemies[_arg1].mc.x, (enemies[_arg1].mc.y - 20));
gamelevel.removeChild(enemies[_arg1].mc);
enemies.splice(_arg1, 1);
addScore(50);
}
public function clickCredits(_arg1:MouseEvent){
gotoAndStop("credits");
}
}
}//package
Section 39
//PointBurst (PointBurst)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
public class PointBurst extends Sprite {
private var burstSprite:Sprite;
private var animTimer:Timer;
private var parentMC:MovieClip;
private var tField:TextField;
static const animStepTime:int = 50;
static const fontSize:int = 20;
static const fontFace:String = "Arial";
static const fontBold:Boolean = true;
static const animSteps:int = 10;
static const startScale:Number = 0;
static const fontColor:Number = 4858786;
static const endScale:Number = 2;
public function PointBurst(_arg1:MovieClip, _arg2:Object, _arg3, _arg4:Number){
var _local5:TextFormat;
super();
_local5 = new TextFormat();
_local5.font = fontFace;
_local5.size = fontSize;
_local5.bold = fontBold;
_local5.color = fontColor;
_local5.align = "center";
tField = new TextField();
tField.embedFonts = true;
tField.selectable = false;
tField.defaultTextFormat = _local5;
tField.autoSize = TextFieldAutoSize.CENTER;
tField.text = String(_arg2);
tField.x = -((tField.width / 2));
tField.y = -((tField.height / 2));
burstSprite = new Sprite();
burstSprite.x = _arg3;
burstSprite.y = _arg4;
burstSprite.scaleX = startScale;
burstSprite.scaleY = startScale;
burstSprite.alpha = 0;
burstSprite.addChild(tField);
parentMC = _arg1;
parentMC.addChild(burstSprite);
animTimer = new Timer(animStepTime, animSteps);
animTimer.addEventListener(TimerEvent.TIMER, rescaleBurst);
animTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removeBurst);
animTimer.start();
}
public function removeBurst(_arg1:TimerEvent){
burstSprite.removeChild(tField);
parentMC.removeChild(burstSprite);
tField = null;
burstSprite = null;
delete ??getglobalscope
[this];
}
public function rescaleBurst(_arg1:TimerEvent){
var _local2:Number;
_local2 = (_arg1.target.currentCount / animSteps);
burstSprite.scaleX = (((1 - _local2) * startScale) + (_local2 * endScale));
burstSprite.scaleY = (((1 - _local2) * startScale) + (_local2 * endScale));
burstSprite.alpha = (1 - (_local2 / 2));
}
}
}//package
Section 40
//Sponsor1 (Sponsor1)
package {
import flash.display.*;
public dynamic class Sponsor1 extends MovieClip {
}
}//package
Section 41
//Sponsor2 (Sponsor2)
package {
import flash.display.*;
public dynamic class Sponsor2 extends MovieClip {
}
}//package
Section 42
//Sponsor3 (Sponsor3)
package {
import flash.display.*;
public dynamic class Sponsor3 extends MovieClip {
}
}//package
Section 43
//TechnoLoop (TechnoLoop)
package {
import flash.media.*;
public dynamic class TechnoLoop extends Sound {
}
}//package
Section 44
//Treasure (Treasure)
package {
import flash.display.*;
public dynamic class Treasure extends MovieClip {
}
}//package
Section 45
//Wall (Wall)
package {
import flash.display.*;
public dynamic class Wall extends MovieClip {
public function Wall(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 46
//WallO (WallO)
package {
import flash.display.*;
public dynamic class WallO extends MovieClip {
}
}//package