Section 1
//Ball_83 (mummyball_en_fla.Ball_83)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Ball_83 extends MovieClip {
public var character:MovieClip;
public var damaged:MovieClip;
public function Ball_83(){
addFrameScript(0, frame1, 23, frame24, 54, frame55);
}
function frame1(){
stop();
}
function frame24(){
gotoAndStop(1);
}
function frame55(){
stop();
}
}
}//package mummyball_en_fla
Section 2
//Challenge_91 (mummyball_en_fla.Challenge_91)
package mummyball_en_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Challenge_91 extends MovieClip {
public var playerName:TextField;
public var playerEmail:TextField;
public var friendName:TextField;
public var friendEmail:TextField;
public var errorMessage:TextField;
}
}//package mummyball_en_fla
Section 3
//Countdown_85 (mummyball_en_fla.Countdown_85)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Countdown_85 extends MovieClip {
public function Countdown_85(){
addFrameScript(89, frame90);
}
function frame90(){
stop();
}
}
}//package mummyball_en_fla
Section 4
//Cursor_21 (mummyball_en_fla.Cursor_21)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Cursor_21 extends MovieClip {
public var wand:MovieClip;
public var stars:MovieClip;
public var boost:MovieClip;
}
}//package mummyball_en_fla
Section 5
//Easy1_Start_46 (mummyball_en_fla.Easy1_Start_46)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Easy1_Start_46 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 6
//Easy2_Start_47 (mummyball_en_fla.Easy2_Start_47)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Easy2_Start_47 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 7
//Easy3_Start_48 (mummyball_en_fla.Easy3_Start_48)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Easy3_Start_48 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 8
//Easy4_Start_49 (mummyball_en_fla.Easy4_Start_49)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Easy4_Start_49 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 9
//Easy5_Start_50 (mummyball_en_fla.Easy5_Start_50)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Easy5_Start_50 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 10
//Easy6_Start_51 (mummyball_en_fla.Easy6_Start_51)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Easy6_Start_51 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 11
//Easy7_Start_52 (mummyball_en_fla.Easy7_Start_52)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Easy7_Start_52 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 12
//Easy8_Start_53 (mummyball_en_fla.Easy8_Start_53)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Easy8_Start_53 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 13
//Easy9_Start_54 (mummyball_en_fla.Easy9_Start_54)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Easy9_Start_54 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 14
//FailBox_101 (mummyball_en_fla.FailBox_101)
package mummyball_en_fla {
import flash.display.*;
public dynamic class FailBox_101 extends MovieClip {
public var levelDone:MovieClip;
public var retry:MovieClip;
public function FailBox_101(){
addFrameScript(0, frame1, 39, frame40);
}
function frame1(){
stop();
}
function frame40(){
stop();
}
}
}//package mummyball_en_fla
Section 15
//gameLogo_5 (mummyball_en_fla.gameLogo_5)
package mummyball_en_fla {
import flash.display.*;
public dynamic class gameLogo_5 extends MovieClip {
public function gameLogo_5(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package mummyball_en_fla
Section 16
//Hard1_Start_64 (mummyball_en_fla.Hard1_Start_64)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Hard1_Start_64 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 17
//Hard2_Start_65 (mummyball_en_fla.Hard2_Start_65)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Hard2_Start_65 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 18
//Hard3_Start_66 (mummyball_en_fla.Hard3_Start_66)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Hard3_Start_66 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 19
//Hard4_Start_67 (mummyball_en_fla.Hard4_Start_67)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Hard4_Start_67 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 20
//Hard5_Start_68 (mummyball_en_fla.Hard5_Start_68)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Hard5_Start_68 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 21
//Hard6_Start_69 (mummyball_en_fla.Hard6_Start_69)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Hard6_Start_69 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 22
//Hard7_Start_72 (mummyball_en_fla.Hard7_Start_72)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Hard7_Start_72 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 23
//Hard8_Start_71 (mummyball_en_fla.Hard8_Start_71)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Hard8_Start_71 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 24
//Hard9_Start_70 (mummyball_en_fla.Hard9_Start_70)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Hard9_Start_70 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 25
//Highscores_44 (mummyball_en_fla.Highscores_44)
package mummyball_en_fla {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public dynamic class Highscores_44 extends MovieClip {
public var topNames:TextField;
public var gameitnow:SimpleButton;
public var myScore:TextField;
public var topScores:TextField;
public function Highscores_44(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
gameitnow.addEventListener(MouseEvent.MOUSE_UP, redirectUser);
}
public function redirectUser(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gameitnow.com/?utm_source=game&utm_medium=MummyBall&utm_campaign=link-MummyBall");
navigateToURL(_local2, "_new");
}
}
}//package mummyball_en_fla
Section 26
//Indicators_94 (mummyball_en_fla.Indicators_94)
package mummyball_en_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Indicators_94 extends MovieClip {
public var lifeBucket:MovieClip;
public var keysDisplay:TextField;
public var timeDisplay:TextField;
public var pointsDisplay:TextField;
public var retry:SimpleButton;
public var paintBucket:MovieClip;
public var back:SimpleButton;
}
}//package mummyball_en_fla
Section 27
//Intro_1 (mummyball_en_fla.Intro_1)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Intro_1 extends MovieClip {
public var gameitnow:SimpleButton;
public var startGame:MovieClip;
public function Intro_1(){
addFrameScript(0, frame1, 230, frame231, 286, frame287);
}
function frame287(){
stop();
startGame.play();
}
function frame1(){
startGame.visible = false;
}
function frame231(){
startGame.visible = true;
}
}
}//package mummyball_en_fla
Section 28
//lifeBucket_99 (mummyball_en_fla.lifeBucket_99)
package mummyball_en_fla {
import flash.display.*;
public dynamic class lifeBucket_99 extends MovieClip {
public var lifeBar:MovieClip;
}
}//package mummyball_en_fla
Section 29
//Normal1_Start_55 (mummyball_en_fla.Normal1_Start_55)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Normal1_Start_55 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 30
//Normal2_Start_61 (mummyball_en_fla.Normal2_Start_61)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Normal2_Start_61 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 31
//Normal3_Start_56 (mummyball_en_fla.Normal3_Start_56)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Normal3_Start_56 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 32
//Normal4_Start_58 (mummyball_en_fla.Normal4_Start_58)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Normal4_Start_58 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 33
//Normal5_Start_63 (mummyball_en_fla.Normal5_Start_63)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Normal5_Start_63 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 34
//Normal6_Start_62 (mummyball_en_fla.Normal6_Start_62)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Normal6_Start_62 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 35
//Normal7_Start_59 (mummyball_en_fla.Normal7_Start_59)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Normal7_Start_59 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 36
//Normal8_Start_57 (mummyball_en_fla.Normal8_Start_57)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Normal8_Start_57 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 37
//Normal9_Start_60 (mummyball_en_fla.Normal9_Start_60)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Normal9_Start_60 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 38
//paintBucket_95 (mummyball_en_fla.paintBucket_95)
package mummyball_en_fla {
import flash.display.*;
public dynamic class paintBucket_95 extends MovieClip {
public var paintBar:MovieClip;
}
}//package mummyball_en_fla
Section 39
//Scores_90 (mummyball_en_fla.Scores_90)
package mummyball_en_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Scores_90 extends MovieClip {
public var timeDisplay:TextField;
public var livesIcon:MovieClip;
public var coinsDisplay:TextField;
public var livesDisplay:TextField;
public var scoreDisplay:TextField;
}
}//package mummyball_en_fla
Section 40
//SummaryBox_86 (mummyball_en_fla.SummaryBox_86)
package mummyball_en_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class SummaryBox_86 extends MovieClip {
public var userData:SharedObject;
public var submitChallenge:MovieClip;
public var levelDone:MovieClip;
public var scores:MovieClip;
public var myVariables:URLVariables;
public var myRequest:URLRequest;
public var challenge:MovieClip;
public var nextLevel:MovieClip;
public var challengeBox:MovieClip;
public var myLoader:URLLoader;
public var domainControl:String;
public function SummaryBox_86(){
addFrameScript(0, frame1, 24, frame25, 74, frame75, 124, frame125);
}
function frame75(){
stop();
submitChallenge.addEventListener(MouseEvent.CLICK, sendChallenge);
}
function frame1(){
stop();
domainControl = "plox.info/";
userData = SharedObject.getLocal("Bounce_V1_1");
myLoader = new URLLoader();
myVariables = new URLVariables();
scores.livesIcon.gotoAndStop(userData.data.character);
}
function frame25(){
stop();
}
public function challengeDone(_arg1:Event){
var event = _arg1;
try {
myLoader.removeEventListener(Event.COMPLETE, challengeDone);
play();
} catch(error:Error) {
myLoader.removeEventListener(Event.COMPLETE, challengeDone);
challengeBox.submitBox.visible = false;
challengeBox.errorMessage.text = "Could not send challenge...";
};
}
function frame125(){
stop();
}
public function sendChallenge(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = challengeBox.playerEmail.text.indexOf("@");
_local3 = challengeBox.playerEmail.text.lastIndexOf(".");
_local4 = challengeBox.friendEmail.text.indexOf("@");
_local5 = challengeBox.friendEmail.text.lastIndexOf(".");
if (((((((!((_local2 == -1))) && (!((_local3 == -1))))) && (!((_local4 == -1))))) && (!((_local5 == -1))))){
if ((((_local3 < _local2)) && ((_local5 < _local4)))){
challengeBox.errorMessage.text = "Please verify the e-mail addresses";
} else {
submitChallenge.removeEventListener(MouseEvent.CLICK, sendChallenge);
myVariables.from = challengeBox.playerName.text;
myVariables.fromEmail = challengeBox.playerEmail.text;
myVariables.to = challengeBox.friendName.text;
myVariables.toEmail = challengeBox.friendEmail.text;
myVariables.score = scores.scoreDisplay.text;
if (parent.root.loaderInfo.url.indexOf(domainControl) != -1){
myRequest = new URLRequest("./sendEmailChallengeEN.php");
} else {
myRequest = new URLRequest("http://www.plox.info/~mattyq12/test/sendEmailChallengeEN.php");
};
myRequest.method = URLRequestMethod.POST;
myRequest.data = myVariables;
myLoader.addEventListener(Event.COMPLETE, challengeDone);
myLoader.load(myRequest);
};
} else {
challengeBox.errorMessage.text = "Please verify the e-mail addresses";
};
}
}
}//package mummyball_en_fla
Section 41
//TimeUp_104 (mummyball_en_fla.TimeUp_104)
package mummyball_en_fla {
import flash.display.*;
public dynamic class TimeUp_104 extends MovieClip {
public function TimeUp_104(){
addFrameScript(0, frame1, 59, frame60);
}
function frame1(){
stop();
}
function frame60(){
stop();
}
}
}//package mummyball_en_fla
Section 42
//Training1_Start_33 (mummyball_en_fla.Training1_Start_33)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Training1_Start_33 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 43
//Training2_Start_36 (mummyball_en_fla.Training2_Start_36)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Training2_Start_36 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 44
//Training3_Start_37 (mummyball_en_fla.Training3_Start_37)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Training3_Start_37 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 45
//Training4_Start_40 (mummyball_en_fla.Training4_Start_40)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Training4_Start_40 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 46
//Training5_Start_38 (mummyball_en_fla.Training5_Start_38)
package mummyball_en_fla {
import flash.display.*;
public dynamic class Training5_Start_38 extends MovieClip {
public var select:MovieClip;
public var locked:MovieClip;
}
}//package mummyball_en_fla
Section 47
//BallDieSound (BallDieSound)
package {
import flash.media.*;
public dynamic class BallDieSound extends Sound {
}
}//package
Section 48
//Cannon (Cannon)
package {
import flash.display.*;
public dynamic class Cannon extends MovieClip {
public function Cannon(){
addFrameScript(148, frame149);
}
function frame149(){
gotoAndPlay(75);
}
}
}//package
Section 49
//EnemyDieSound (EnemyDieSound)
package {
import flash.media.*;
public dynamic class EnemyDieSound extends Sound {
}
}//package
Section 50
//ErrorSound (ErrorSound)
package {
import flash.media.*;
public dynamic class ErrorSound extends Sound {
}
}//package
Section 51
//Flame (Flame)
package {
import flash.display.*;
public dynamic class Flame extends MovieClip {
}
}//package
Section 52
//Floor_Hill (Floor_Hill)
package {
import flash.display.*;
public dynamic class Floor_Hill extends MovieClip {
}
}//package
Section 53
//Floor_Square (Floor_Square)
package {
import flash.display.*;
public dynamic class Floor_Square extends MovieClip {
}
}//package
Section 54
//GetCoinSound (GetCoinSound)
package {
import flash.media.*;
public dynamic class GetCoinSound extends Sound {
}
}//package
Section 55
//GetKeySound (GetKeySound)
package {
import flash.media.*;
public dynamic class GetKeySound extends Sound {
}
}//package
Section 56
//GetLifeSound (GetLifeSound)
package {
import flash.media.*;
public dynamic class GetLifeSound extends Sound {
}
}//package
Section 57
//GetMagicSound (GetMagicSound)
package {
import flash.media.*;
public dynamic class GetMagicSound extends Sound {
}
}//package
Section 58
//Goal (Goal)
package {
import flash.display.*;
public dynamic class Goal extends MovieClip {
}
}//package
Section 59
//Heal (Heal)
package {
import flash.display.*;
public dynamic class Heal extends MovieClip {
public var char:MovieClip;
}
}//package
Section 60
//HitSound (HitSound)
package {
import flash.media.*;
public dynamic class HitSound extends Sound {
}
}//package
Section 61
//IntroTheme (IntroTheme)
package {
import flash.media.*;
public dynamic class IntroTheme extends Sound {
}
}//package
Section 62
//JumpSound (JumpSound)
package {
import flash.media.*;
public dynamic class JumpSound extends Sound {
}
}//package
Section 63
//Key (Key)
package {
import flash.display.*;
public dynamic class Key extends MovieClip {
}
}//package
Section 64
//LevelTheme (LevelTheme)
package {
import flash.media.*;
public dynamic class LevelTheme extends Sound {
}
}//package
Section 65
//LevelThemeEnd (LevelThemeEnd)
package {
import flash.media.*;
public dynamic class LevelThemeEnd extends Sound {
}
}//package
Section 66
//MenuTheme (MenuTheme)
package {
import flash.media.*;
public dynamic class MenuTheme extends Sound {
}
}//package
Section 67
//Mud (Mud)
package {
import flash.display.*;
public dynamic class Mud extends MovieClip {
}
}//package
Section 68
//Points (Points)
package {
import flash.display.*;
public dynamic class Points extends MovieClip {
}
}//package
Section 69
//Rainbow_Roller_v1_1 (Rainbow_Roller_v1_1)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
public class Rainbow_Roller_v1_1 extends MovieClip {
public var easy:SimpleButton;
private var theJumpSound:JumpSound;
private var drawing:Boolean;// = false
private var gradientBoxMatrix:Matrix;
public var normal2:MovieClip;
public var normal3:MovieClip;
public var normal4:MovieClip;
public var normal5:MovieClip;
public var normal7:MovieClip;
public var normal8:MovieClip;
public var normal9:MovieClip;
private var paintRefill:Number;// = 0.8
public var normal6:MovieClip;
private var playerScore:uint;// = 0
public var editProfile:SimpleButton;
private var startGameTimer:Timer;
private var theTrampolineSound:TrampolineSound;
public var highscores:MovieClip;
public var normal1:MovieClip;
public var cancelNews:SimpleButton;
public var easy1:MovieClip;
public var easy2:MovieClip;
public var easy3:MovieClip;
public var easy5:MovieClip;
public var easy6:MovieClip;
public var easy7:MovieClip;
public var easy8:MovieClip;
public var easy9:MovieClip;
public var easy4:MovieClip;
public var i:uint;
private var newPos:Object;
public var hard1:MovieClip;
public var hard2:MovieClip;
public var hard3:MovieClip;
public var hard4:MovieClip;
public var hard6:MovieClip;
public var hard7:MovieClip;
public var hard8:MovieClip;
public var hard9:MovieClip;
public var trainingInfo:MovieClip;
public var hard5:MovieClip;
private var gameMode:String;// = "menu"
public var newsletter:SimpleButton;
private var theWoodBreakSound:WoodBreakSound;
private var theHitSound:HitSound;
private var velocity:Object;
public var errorMessage:TextField;
public var normal:SimpleButton;
private var theStoneBreakSound:StoneBreakSound;
private var myLoader:URLLoader;
public var hard:SimpleButton;
public var hud:MovieClip;
private var theLevelThemeEnd:LevelThemeEnd;
public var introChannel:SoundChannel;
public var setGraphics:MovieClip;
public var playerName:TextField;
private var theStartSound:StartSound;
private var bgChannel:SoundChannel;
private var myVariables:URLVariables;
private var paintUsed:Number;// = 2
public var cursor_wand:MovieClip;
public var subscribe:SimpleButton;
private var theGetCoinSound:GetCoinSound;
public var emailInput:TextField;
private var paintTotal:uint;// = 100
public var selectedLevel:String;
private var totalScore:uint;
private var keysRequired:uint;// = 0
private var rainbow:MovieClip;
public var setSound:MovieClip;
private var gameTime:int;
private var lineThickness:uint;// = 10
public var ball:MovieClip;
public var theIntroTheme:IntroTheme;
public var ball1:SimpleButton;
public var ball2:SimpleButton;
public var ball4:SimpleButton;
public var ball3:SimpleButton;
private var userData:SharedObject;
private var ballFocus:Boolean;// = false
private var enemies:Array;
public var countdown:MovieClip;
private var theGetKeySound:GetKeySound;
private var boostDelayCounter:uint;
public var timeUp:MovieClip;
private var startTime:int;
private var paintAmount:Number;// = 100
public var theMenuTheme:MenuTheme;
private var theGetMagicSound:GetMagicSound;
public var intro:MovieClip;
public var showLevel:TextField;
public var training1:MovieClip;
public var training2:MovieClip;
public var training3:MovieClip;
public var training4:MovieClip;
public var training5:MovieClip;
private var theBallDieSound:BallDieSound;
public var menuChannel:SoundChannel;
private var damageObjects:Array;
private var playerLives:int;// = 3
public var failSummary:MovieClip;
public var gameLevel:MovieClip;
private var fixedObjects:Array;
private var pickupObjects:Array;
private var theEnemyDieSound:EnemyDieSound;
private var theErrorSound:ErrorSound;
private var myRequest:URLRequest;
public var ball_profile:MovieClip;
public var startGame:SimpleButton;
public var startLink:SimpleButton;
private var level:uint;
public var summary:MovieClip;
private var difficulty:String;
private var playerIndestructible:uint;// = 0
private var theGetLifeSound:GetLifeSound;
public var loaderText:TextField;
private var otherObjects:Array;
private var theLevelTheme:LevelTheme;
private var domainControl:String;// = "plox.info/"
public var nameInput:TextField;
static const boostDelay:uint = 10;
static const maxSpeed:uint = 24;
static const trampolineSpeedup:Number = 5;
static const restitution:Number = 0.6;
static const moveDistance:uint = 0;
static const gravity:Number = 1.2;
static const radius:Number = 25;
static const friction:Number = 0.95;
static const mudSlowdown:Number = 0.7;
public function Rainbow_Roller_v1_1(){
domainControl = "plox.info/";
newPos = {x:0, y:0};
velocity = {x:0, y:0};
ballFocus = false;
drawing = false;
paintTotal = 100;
paintAmount = 100;
paintUsed = 2;
paintRefill = 0.8;
lineThickness = 10;
gradientBoxMatrix = new Matrix();
fixedObjects = new Array();
damageObjects = new Array();
pickupObjects = new Array();
otherObjects = new Array();
enemies = new Array();
playerLives = 3;
playerIndestructible = 0;
playerScore = 0;
keysRequired = 0;
startGameTimer = new Timer(500);
gameMode = "menu";
userData = SharedObject.getLocal("Bounce_V1_1");
myLoader = new URLLoader();
myVariables = new URLVariables();
theLevelTheme = new LevelTheme();
theLevelThemeEnd = new LevelThemeEnd();
theStartSound = new StartSound();
theGetCoinSound = new GetCoinSound();
theGetKeySound = new GetKeySound();
theGetMagicSound = new GetMagicSound();
theGetLifeSound = new GetLifeSound();
theHitSound = new HitSound();
theJumpSound = new JumpSound();
theBallDieSound = new BallDieSound();
theEnemyDieSound = new EnemyDieSound();
theStoneBreakSound = new StoneBreakSound();
theTrampolineSound = new TrampolineSound();
theWoodBreakSound = new WoodBreakSound();
theErrorSound = new ErrorSound();
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 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, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39);
}
public function updateTimer(){
var _local1:int;
var _local2:int;
var _local3:String;
_local1 = (getTimer() - startTime);
_local2 = Math.floor((_local1 / 1000));
_local3 = String((gameTime - _local2));
hud.timeDisplay.text = _local3;
if (int(_local3) <= 0){
timeUp.visible = true;
timeUp.play();
ballDie();
};
}
public function gotoEasy(_arg1:MouseEvent):void{
gotoAndStop("easy");
}
public function updateBucket(){
if (paintAmount < paintTotal){
paintAmount = (paintAmount + paintRefill);
};
hud.paintBucket.paintBar.width = ((90 / paintTotal) * paintAmount);
}
public function Regenboog_Roller_v1_1(){
}
function frame11(){
prepareGameLevel("training", 4, 0);
}
function frame14(){
prepareGameLevel("easy", 2, 99);
}
public function nextLevel(_arg1:MouseEvent):void{
if (bgChannel){
bgChannel.stop();
};
gameMode = "menu";
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyboard);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
gotoAndStop("menu");
if (difficulty == "training"){
if (level == 5){
difficulty = "easy";
level = 0;
};
} else {
if (difficulty == "easy"){
if (level == 9){
difficulty = "normal";
level = 0;
};
} else {
if (difficulty == "normal"){
if (level == 9){
difficulty = "hard";
level = 0;
};
} else {
if (difficulty == "hard"){
if (level == 9){
difficulty = "hard";
level = 8;
};
};
};
};
};
gotoAndStop((difficulty + [(level + 1)]));
}
function frame16(){
prepareGameLevel("easy", 4, 99);
}
function frame12(){
prepareGameLevel("training", 5, 0);
}
public function gotoNormal(_arg1:MouseEvent):void{
gotoAndStop("normal");
}
function frame3(){
stop();
Mouse.hide();
selectedLevel = "";
playerName.text = userData.data.playerName;
ball_profile.gotoAndStop(userData.data.character);
editProfile.addEventListener(MouseEvent.CLICK, gotoProfile);
startGame.addEventListener(MouseEvent.CLICK, gotoGame);
newsletter.addEventListener(MouseEvent.CLICK, gotoNewsletter);
if ((((userData.data.normal[9] == true)) || ((difficulty == "hard")))){
gotoAndStop("hard");
} else {
if ((((userData.data.easy[9] == true)) || ((difficulty == "normal")))){
gotoAndStop("normal");
} else {
if ((((userData.data.training[5] == true)) || ((difficulty == "easy")))){
gotoAndStop("easy");
} else {
i = 0;
while (i < 5) {
this[("training" + (i + 1))].select.visible = false;
if (userData.data.training[i] == true){
this[("training" + (i + 1))].locked.visible = false;
selectedLevel = this[("training" + (i + 1))].name;
};
i++;
};
this[selectedLevel].select.visible = true;
this["training5"].locked.visible = false;
trainingInfo.gotoAndStop(selectedLevel);
};
};
};
training1.addEventListener(MouseEvent.CLICK, showTraining);
training2.addEventListener(MouseEvent.CLICK, showTraining);
training3.addEventListener(MouseEvent.CLICK, showTraining);
training4.addEventListener(MouseEvent.CLICK, showTraining);
training5.addEventListener(MouseEvent.CLICK, showTraining);
introChannel.stop();
if (menuChannel){
menuChannel.stop();
};
if (userData.data.sound == true){
menuChannel = theMenuTheme.play(0, 99);
};
}
function frame4(){
stop();
playerName.text = userData.data.playerName;
ball_profile.gotoAndStop(userData.data.character);
i = 0;
while (i < 9) {
this[("easy" + (i + 1))].select.visible = false;
if (userData.data.easy[i] == true){
this[("easy" + (i + 1))].locked.visible = false;
selectedLevel = this[("easy" + (i + 1))].name;
};
i++;
};
this[selectedLevel].select.visible = true;
if (this.root.loaderInfo.url.indexOf(domainControl) != -1){
requestScores();
} else {
highscores.gotoAndStop(2);
};
easy.addEventListener(MouseEvent.CLICK, gotoEasy);
normal.addEventListener(MouseEvent.CLICK, gotoNormal);
hard.addEventListener(MouseEvent.CLICK, gotoHard);
easy1.addEventListener(MouseEvent.CLICK, clickLevel);
easy2.addEventListener(MouseEvent.CLICK, clickLevel);
easy3.addEventListener(MouseEvent.CLICK, clickLevel);
easy4.addEventListener(MouseEvent.CLICK, clickLevel);
easy5.addEventListener(MouseEvent.CLICK, clickLevel);
easy6.addEventListener(MouseEvent.CLICK, clickLevel);
easy7.addEventListener(MouseEvent.CLICK, clickLevel);
easy8.addEventListener(MouseEvent.CLICK, clickLevel);
easy9.addEventListener(MouseEvent.CLICK, clickLevel);
}
function frame1(){
stop();
stage.showDefaultContextMenu = false;
this.addEventListener(Event.ENTER_FRAME, loadProgress);
Mouse.hide();
stage.addEventListener(Event.ENTER_FRAME, moveCursor);
cursor_wand.mouseEnabled = false;
cursor_wand.wand.mouseEnabled = false;
cursor_wand.stars.mouseEnabled = false;
cursor_wand.stars.visible = false;
cursor_wand.boost.mouseEnabled = false;
cursor_wand.boost.visible = false;
theIntroTheme = new IntroTheme();
theMenuTheme = new MenuTheme();
userData.data.sound = true;
introChannel = theIntroTheme.play(0, 99);
startLink.addEventListener(MouseEvent.CLICK, redirectUser);
setSound.addEventListener(MouseEvent.MOUSE_UP, toggleSound);
setGraphics.addEventListener(MouseEvent.MOUSE_UP, toggleGraphics);
intro.gameitnow.addEventListener(MouseEvent.CLICK, redirectUser);
userData.data.sound = true;
setSound.gotoAndStop(1);
setGraphics.gotoAndStop(1);
}
function frame2(){
stop();
Mouse.hide();
if (userData.data.playerName != undefined){
nameInput.text = userData.data.playerName;
};
ball1.addEventListener(MouseEvent.CLICK, chooseBall);
ball2.addEventListener(MouseEvent.CLICK, chooseBall);
ball3.addEventListener(MouseEvent.CLICK, chooseBall);
ball4.addEventListener(MouseEvent.CLICK, chooseBall);
}
public function enemyUnstun(_arg1:Event){
if (_arg1.target.stun >= 1){
_arg1.target.stun--;
} else {
_arg1.target.removeEventListener(Event.ENTER_FRAME, enemyUnstun);
_arg1.target.play();
};
}
function frame13(){
prepareGameLevel("easy", 1, 99);
}
function frame23(){
prepareGameLevel("normal", 2, 99);
}
function frame5(){
stop();
playerName.text = userData.data.playerName;
ball_profile.gotoAndStop(userData.data.character);
i = 0;
while (i < 9) {
this[("normal" + (i + 1))].select.visible = false;
if (userData.data.normal[i] == true){
this[("normal" + (i + 1))].locked.visible = false;
selectedLevel = this[("normal" + (i + 1))].name;
};
i++;
};
this[selectedLevel].select.visible = true;
if (this.root.loaderInfo.url.indexOf(domainControl) != -1){
requestScores();
} else {
highscores.gotoAndStop(2);
};
easy.addEventListener(MouseEvent.CLICK, gotoEasy);
normal.addEventListener(MouseEvent.CLICK, gotoNormal);
hard.addEventListener(MouseEvent.CLICK, gotoHard);
normal1.addEventListener(MouseEvent.CLICK, clickLevel);
normal2.addEventListener(MouseEvent.CLICK, clickLevel);
normal3.addEventListener(MouseEvent.CLICK, clickLevel);
normal4.addEventListener(MouseEvent.CLICK, clickLevel);
normal5.addEventListener(MouseEvent.CLICK, clickLevel);
normal6.addEventListener(MouseEvent.CLICK, clickLevel);
normal7.addEventListener(MouseEvent.CLICK, clickLevel);
normal8.addEventListener(MouseEvent.CLICK, clickLevel);
normal9.addEventListener(MouseEvent.CLICK, clickLevel);
}
function frame8(){
prepareGameLevel("training", 1, 0);
}
public function redirectDownload(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gameitnow.com/freegames");
navigateToURL(_local2, "_new");
}
function frame24(){
prepareGameLevel("normal", 3, 99);
}
public function startGameLevel(){
startTime = getTimer();
stage.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
}
function frame26(){
prepareGameLevel("normal", 5, 99);
}
function frame7(){
cancelNews.addEventListener(MouseEvent.CLICK, gotoMenu);
subscribe.addEventListener(MouseEvent.CLICK, subscribeNews);
}
function frame9(){
prepareGameLevel("training", 2, 0);
}
function frame30(){
prepareGameLevel("normal", 9, 99);
}
function frame10(){
prepareGameLevel("training", 3, 0);
}
function frame32(){
prepareGameLevel("hard", 2, 50);
}
function frame28(){
prepareGameLevel("normal", 7, 99);
}
function frame6(){
stop();
playerName.text = userData.data.playerName;
ball_profile.gotoAndStop(userData.data.character);
i = 0;
while (i < 9) {
this[("hard" + (i + 1))].select.visible = false;
if (userData.data.hard[i] == true){
this[("hard" + (i + 1))].locked.visible = false;
selectedLevel = this[("hard" + (i + 1))].name;
};
i++;
};
this[selectedLevel].select.visible = true;
if (this.root.loaderInfo.url.indexOf(domainControl) != -1){
requestScores();
} else {
highscores.gotoAndStop(2);
};
easy.addEventListener(MouseEvent.CLICK, gotoEasy);
normal.addEventListener(MouseEvent.CLICK, gotoNormal);
hard.addEventListener(MouseEvent.CLICK, gotoHard);
hard1.addEventListener(MouseEvent.CLICK, clickLevel);
hard2.addEventListener(MouseEvent.CLICK, clickLevel);
hard3.addEventListener(MouseEvent.CLICK, clickLevel);
hard4.addEventListener(MouseEvent.CLICK, clickLevel);
hard5.addEventListener(MouseEvent.CLICK, clickLevel);
hard6.addEventListener(MouseEvent.CLICK, clickLevel);
hard7.addEventListener(MouseEvent.CLICK, clickLevel);
hard8.addEventListener(MouseEvent.CLICK, clickLevel);
hard9.addEventListener(MouseEvent.CLICK, clickLevel);
}
function frame15(){
prepareGameLevel("easy", 3, 99);
}
function frame20(){
prepareGameLevel("easy", 8, 99);
}
function frame17(){
prepareGameLevel("easy", 5, 99);
}
function frame18(){
prepareGameLevel("easy", 6, 99);
}
function frame25(){
prepareGameLevel("normal", 4, 99);
}
function frame27(){
prepareGameLevel("normal", 6, 99);
}
function frame29(){
prepareGameLevel("normal", 8, 99);
}
public function examineLevel(){
var _local1:uint;
var _local2:*;
fixedObjects = new Array();
damageObjects = new Array();
pickupObjects = new Array();
otherObjects = new Array();
enemies = new Array();
_local1 = 0;
while (_local1 < this.gameLevel.numChildren) {
_local2 = this.gameLevel.getChildAt(_local1);
if ((((((((((((((_local2 is Floor_Square)) || ((_local2 is Floor_Hill)))) || ((_local2 is Stone)))) || ((_local2 is Ramp)))) || ((_local2 is Mud)))) || ((_local2 is Trampoline)))) || ((_local2 is Stone_Breakable)))){
fixedObjects.push(_local2);
} else {
if ((_local2 is Wood)){
_local2.addEventListener(MouseEvent.MOUSE_DOWN, removeObject);
fixedObjects.push(_local2);
} else {
if ((((((((((((_local2 is Spikes)) || ((_local2 is Spikes_Floating)))) || ((_local2 is Spikes_Wheel)))) || ((_local2 is Cannon)))) || ((_local2 is Trap)))) || ((_local2 is Flame)))){
damageObjects.push(_local2);
} else {
if ((((((_local2 is Points)) || ((_local2 is Key)))) || ((_local2 is Heal)))){
pickupObjects.push(_local2);
if ((_local2 is Key)){
keysRequired++;
} else {
if ((_local2 is Heal)){
_local2.char.gotoAndStop(userData.data.character);
};
};
} else {
if ((_local2 is Goal)){
otherObjects.push(_local2);
} else {
if ((_local2 is Walker)){
_local2.addEventListener(MouseEvent.MOUSE_UP, enemyStun);
_local2.addEventListener(MouseEvent.MOUSE_DOWN, enemyStun);
_local2.moveLeft = true;
enemies.push(_local2);
};
};
};
};
};
};
_local1++;
};
}
function frame34(){
prepareGameLevel("hard", 4, 50);
}
function frame19(){
prepareGameLevel("easy", 7, 99);
}
public function quitCountdown(_arg1:TimerEvent){
if (this.currentFrame > 7){
failSummary.levelDone.addEventListener(MouseEvent.CLICK, quitLevel);
failSummary.retry.addEventListener(MouseEvent.CLICK, retryLevel);
};
}
function frame35(){
prepareGameLevel("hard", 5, 50);
}
public function chooseBall(_arg1:MouseEvent){
var _local2:Array;
var _local3:Array;
var _local4:Array;
var _local5:Array;
if (((!((nameInput.text == ""))) && (!((nameInput.text == "Please enter a name"))))){
if (((((!((userData.data.playerName == nameInput.text))) && (!((userData.data.playerId == undefined))))) && (!((this.root.loaderInfo.url.indexOf(domainControl) == -1))))){
myVariables.id = userData.data.playerId;
myVariables.name = nameInput.text;
myRequest = new URLRequest("./player_update.php");
myRequest.method = URLRequestMethod.POST;
myRequest.data = myVariables;
myLoader.addEventListener(Event.COMPLETE, changePlayer);
myLoader.load(myRequest);
userData.data.playerName = nameInput.text;
userData.data.character = _arg1.target.name;
} else {
userData.data.playerName = nameInput.text;
userData.data.character = _arg1.target.name;
if (userData.data.training == undefined){
_local2 = new Array(true, false, false, false, false, false);
_local3 = new Array(true, false, false, false, false, false, false, false, false, false);
_local4 = new Array(true, false, false, false, false, false, false, false, false, false);
_local5 = new Array(true, false, false, false, false, false, false, false, false, false);
userData.data.training = _local2;
userData.data.easy = _local3;
userData.data.normal = _local4;
userData.data.hard = _local5;
};
if ((((userData.data.playerId == undefined)) && (!((this.root.loaderInfo.url.indexOf(domainControl) == -1))))){
myVariables.name = nameInput.text;
myRequest = new URLRequest("./player_add.php");
myRequest.method = URLRequestMethod.POST;
myRequest.data = myVariables;
myLoader.addEventListener(Event.COMPLETE, createPlayer);
myLoader.load(myRequest);
} else {
if (userData.flush() == "flushed"){
nextFrame();
};
};
};
} else {
nameInput.text = "Please enter a name";
};
}
function frame37(){
prepareGameLevel("hard", 7, 50);
}
function frame38(){
prepareGameLevel("hard", 8, 50);
}
function frame21(){
prepareGameLevel("easy", 9, 99);
}
function frame22(){
prepareGameLevel("normal", 1, 99);
}
function frame31(){
prepareGameLevel("hard", 1, 50);
}
function frame36(){
prepareGameLevel("hard", 6, 50);
}
function frame39(){
prepareGameLevel("hard", 9, 60);
}
function frame33(){
prepareGameLevel("hard", 3, 50);
}
public function enemyStun(_arg1:MouseEvent){
if ((((gameMode == "play")) && ((_arg1.target.currentFrame == 1)))){
_arg1.target.play();
_arg1.target.stun = 150;
_arg1.target.addEventListener(Event.ENTER_FRAME, enemyUnstun);
};
}
public function removeObject(_arg1:MouseEvent){
if (gameMode == "play"){
_arg1.target.removeEventListener(MouseEvent.MOUSE_DOWN, removeObject);
_arg1.target.parent.removeChild(_arg1.target);
playSound(theWoodBreakSound, 1);
drawing = true;
};
}
public function gotoHard(_arg1:MouseEvent):void{
gotoAndStop("hard");
}
public function levelComplete(){
if (gameMode == "play"){
gameMode = "complete";
playerIndestructible = 99999;
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyboard);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
if (drawing == true){
stage.removeEventListener(Event.ENTER_FRAME, startDrawing);
drawing = false;
};
hud.visible = false;
totalScore = 0;
totalScore = (totalScore + (playerLives * 250));
totalScore = (totalScore + (hud.pointsDisplay.text * 100));
totalScore = (totalScore + (hud.timeDisplay.text * 10));
if (summary.currentFrame == 1){
failSummary.visible = false;
summary.visible = true;
summary.scores.livesDisplay.text = playerLives;
summary.scores.coinsDisplay.text = hud.pointsDisplay.text;
summary.scores.timeDisplay.text = hud.timeDisplay.text;
summary.scores.scoreDisplay.text = 0;
summary.play();
};
this.addEventListener(Event.ENTER_FRAME, scoreCounter);
};
}
public function moveEnemies(){
var _local1:uint;
var _local2:uint;
_local1 = 0;
while (_local1 < enemies.length) {
_local2 = 0;
while (_local2 < fixedObjects.length) {
if (fixedObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) - (enemies[_local1].width / 2)), enemies[_local1].y, true)){
while (fixedObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) - (enemies[_local1].width / 2)), enemies[_local1].y, true)) {
enemies[_local1].x++;
};
enemies[_local1].moveLeft = !(enemies[_local1].moveLeft);
break;
};
if (fixedObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) + (enemies[_local1].width / 2)), enemies[_local1].y, true)){
while (fixedObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) + (enemies[_local1].width / 2)), enemies[_local1].y, true)) {
enemies[_local1].x--;
};
enemies[_local1].moveLeft = !(enemies[_local1].moveLeft);
break;
};
_local2++;
};
_local2 = 0;
while (_local2 < damageObjects.length) {
if (damageObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) - (enemies[_local1].width / 2)), enemies[_local1].y, true)){
while (damageObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) - (enemies[_local1].width / 2)), enemies[_local1].y, true)) {
enemies[_local1].x++;
};
enemies[_local1].moveLeft = !(enemies[_local1].moveLeft);
break;
};
if (damageObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) + (enemies[_local1].width / 2)), enemies[_local1].y, true)){
while (damageObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) + (enemies[_local1].width / 2)), enemies[_local1].y, true)) {
enemies[_local1].x--;
};
enemies[_local1].moveLeft = !(enemies[_local1].moveLeft);
break;
};
_local2++;
};
_local2 = 0;
while (_local2 < otherObjects.length) {
if (otherObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) - (enemies[_local1].width / 2)), enemies[_local1].y, true)){
while (otherObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) - (enemies[_local1].width / 2)), enemies[_local1].y, true)) {
enemies[_local1].x++;
};
enemies[_local1].moveLeft = !(enemies[_local1].moveLeft);
break;
};
if (otherObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) + (enemies[_local1].width / 2)), enemies[_local1].y, true)){
while (otherObjects[_local2].hitTestPoint(((enemies[_local1].x + gameLevel.x) + (enemies[_local1].width / 2)), enemies[_local1].y, true)) {
enemies[_local1].x--;
};
enemies[_local1].moveLeft = !(enemies[_local1].moveLeft);
break;
};
_local2++;
};
if ((((enemies[_local1].currentFrame == 1)) && ((enemies[_local1] is Walker)))){
if (enemies[_local1].moveLeft){
enemies[_local1].x = (enemies[_local1].x - 3);
} else {
enemies[_local1].x = (enemies[_local1].x + 3);
};
};
_local1++;
};
}
public function loadProgress(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:int;
_local2 = this.root.loaderInfo.bytesLoaded;
_local3 = this.root.loaderInfo.bytesTotal;
_local4 = Math.floor(((_local2 / _local3) * 100));
loaderText.text = (("Loading..." + _local4) + "%");
if (_local2 >= _local3){
this.removeEventListener(Event.ENTER_FRAME, loadProgress);
loaderText.text = "";
intro.startGame.addEventListener(MouseEvent.CLICK, redirectGame);
};
}
public function gotoMenu(_arg1:MouseEvent){
cancelNews.removeEventListener(MouseEvent.CLICK, gotoMenu);
subscribe.removeEventListener(MouseEvent.CLICK, subscribeNews);
gotoAndStop("menu");
}
public function prepareGameLevel(_arg1:String, _arg2:uint, _arg3:uint){
difficulty = _arg1;
level = _arg2;
gameTime = _arg3;
paintAmount = 100;
if (_arg1 == "training"){
showLevel.text = String(("Training " + _arg2));
} else {
if (_arg1 == "easy"){
showLevel.text = String(("Easy " + _arg2));
} else {
if (_arg1 == "normal"){
showLevel.text = String(("Normal " + _arg2));
} else {
if (_arg1 == "hard"){
showLevel.text = String(("Hard " + _arg2));
};
};
};
};
summary.visible = false;
failSummary.visible = false;
timeUp.visible = false;
gradientBoxMatrix.createGradientBox(gameLevel.width, gameLevel.height, 0, 0, 0);
rainbow = new MovieClip();
gameLevel.addChild(rainbow);
ball.character.gotoAndStop(userData.data.character);
ball.damaged.visible = false;
ball.rotation = 0;
ball.scaleX = 1;
velocity = {x:0, y:0};
drawing = false;
playerLives = 3;
playerIndestructible = 0;
playerScore = 0;
keysRequired = 0;
examineLevel();
hud.timeDisplay.text = _arg3;
updateLives();
addScore(0);
updateKeys();
updateBucket();
this.addEventListener(Event.ENTER_FRAME, gameLoop);
stage.addEventListener(KeyboardEvent.KEY_UP, handleKeyboard);
hud.back.addEventListener(MouseEvent.CLICK, quitLevel);
hud.retry.addEventListener(MouseEvent.CLICK, retryLevel);
startGameTimer.addEventListener(TimerEvent.TIMER, startCountdown);
startGameTimer.start();
countdown.play();
Mouse.hide();
cursor_wand.stars.visible = false;
cursor_wand.boost.visible = false;
if (userData.data.sound == true){
bgChannel = theLevelTheme.play(0, 15);
};
}
public function startDrawing(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
if (paintAmount > 0){
gameLevel.removeChild(rainbow);
_local2 = gameLevel.mouseX;
_local3 = gameLevel.mouseY;
if (_local2 > gameLevel.width){
_local2 = gameLevel.width;
};
if (_local3 > 480){
_local3 = 480;
};
rainbow.graphics.lineTo(_local2, _local3);
rainbow.timer = 180;
rainbow.addEventListener(Event.ENTER_FRAME, removeDrawing);
gameLevel.addChild(rainbow);
paintAmount = (paintAmount - paintUsed);
hud.paintBucket.paintBar.width = ((90 / paintTotal) * paintAmount);
} else {
stage.removeEventListener(Event.ENTER_FRAME, startDrawing);
playSound(theErrorSound, 1);
};
}
public function showScores(_arg1:Event){
var variables:URLVariables;
var event = _arg1;
try {
myLoader.removeEventListener(Event.COMPLETE, showScores);
myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
variables = new URLVariables(myLoader.data);
highscores.topNames.htmlText = variables.names;
highscores.topScores.htmlText = variables.scores;
highscores.myScore.htmlText = variables.personal;
} catch(error:Error) {
trace("Can not retrieve score!");
highscores.topScores.htmlText = "Can not retrieve highscores...";
};
}
public function handleMouseDown(_arg1:MouseEvent):void{
if (((((((((!((_arg1.target is Wood))) && (!((_arg1.target is Walker))))) && (!((_arg1.target.name == "retry"))))) && (!((_arg1.target.name == "paintBar"))))) && (!((((((((mouseX < (ball.x + 25))) && ((mouseX > (ball.x - 25))))) && ((mouseY < (ball.y + 25))))) && ((mouseY > (ball.y - 25)))))))){
if (rainbow.stage != null){
rainbow.timer = 0;
rainbow.addEventListener(Event.ENTER_FRAME, removeDrawing);
};
rainbow = new MovieClip();
rainbow.graphics.lineStyle(lineThickness);
rainbow.graphics.lineGradientStyle(GradientType.LINEAR, [7363140, 0, 11769207, 0, 12096882, 0, 11831128, 0, 11769207], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 32, 64, 92, 128, 160, 192, 224, 0xFF], gradientBoxMatrix);
rainbow.graphics.moveTo(gameLevel.mouseX, gameLevel.mouseY);
rainbow.timer = 180;
rainbow.addEventListener(Event.ENTER_FRAME, removeDrawing);
gameLevel.addChild(rainbow);
stage.addEventListener(MouseEvent.MOUSE_MOVE, stopJump);
} else {
if ((((((((mouseX < (ball.x + 25))) && ((mouseX > (ball.x - 25))))) && ((mouseY < (ball.y + 25))))) && ((mouseY > (ball.y - 25))))){
ballFocus = true;
cursor_wand.boost.visible = true;
};
};
}
public function retryLevel(_arg1:MouseEvent):void{
if (bgChannel){
bgChannel.stop();
};
gameMode = "menu";
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyboard);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
gotoAndStop("menu");
gotoAndStop((difficulty + level));
}
public function gameLoop(_arg1:Event){
if ((((gameMode == "play")) && (!((gameTime == 0))))){
updateTimer();
};
if ((((gameMode == "play")) || ((gameMode == "complete")))){
if ((((playerIndestructible == 0)) || ((gameMode == "complete")))){
ball.damaged.visible = false;
} else {
playerIndestructible--;
ball.damaged.visible = true;
};
if (drawing){
cursor_wand.stars.visible = true;
} else {
cursor_wand.stars.visible = false;
};
if (boostDelayCounter > 0){
boostDelayCounter--;
};
moveCharacter();
checkCollisions();
updateBucket();
};
moveEnemies();
}
public function redirectUser(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gameitnow.com/?utm_source=game&utm_medium=MummyBall&utm_campaign=link-MummyBall");
navigateToURL(_local2, "_new");
}
public function updateLives(){
var _local1:*;
_local1 = (30 * playerLives);
if (_local1 > 90){
_local1 = 90;
};
hud.lifeBucket.lifeBar.width = _local1;
}
public function redirectGame(_arg1:MouseEvent){
if (userData.data.playerName == undefined){
gotoAndStop("create");
} else {
gotoAndStop("menu");
};
}
public function ballDie(){
var _local1:Timer;
if (summary.visible == false){
if (bgChannel){
bgChannel.stop();
};
gameMode = "menu";
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyboard);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
if (drawing == true){
stage.removeEventListener(Event.ENTER_FRAME, startDrawing);
drawing = false;
};
ball.gotoAndPlay("die");
playSound(theBallDieSound, 1);
summary.visible = false;
failSummary.visible = true;
failSummary.play();
_local1 = new Timer(1000, 1);
_local1.addEventListener(TimerEvent.TIMER, quitCountdown);
_local1.start();
};
}
public function toggleGraphics(_arg1:MouseEvent){
if (stage.quality == "HIGH"){
stage.quality = "MEDIUM";
setGraphics.gotoAndStop(2);
} else {
if (stage.quality == "MEDIUM"){
stage.quality = "LOW";
setGraphics.gotoAndStop(3);
} else {
if (stage.quality == "LOW"){
stage.quality = "HIGH";
setGraphics.gotoAndStop(1);
};
};
};
}
public function toggleSound(_arg1:MouseEvent){
if (userData.data.sound == true){
userData.data.sound = false;
setSound.gotoAndStop(2);
if (introChannel){
introChannel.stop();
};
if (menuChannel){
menuChannel.stop();
};
if (bgChannel){
bgChannel.stop();
};
} else {
userData.data.sound = true;
setSound.gotoAndStop(1);
if (this.currentFrame == 1){
introChannel = theIntroTheme.play(0, 99);
} else {
if ((((((((((((this.currentFrame == 2)) || ((this.currentFrame == 3)))) || ((this.currentFrame == 4)))) || ((this.currentFrame == 5)))) || ((this.currentFrame == 6)))) || ((this.currentFrame == 7)))){
menuChannel = theMenuTheme.play(0, 99);
} else {
bgChannel = theLevelTheme.play(0, 15);
};
};
};
}
public function handleKeyboard(_arg1:KeyboardEvent){
if (_arg1.keyCode == 82){
if (bgChannel){
bgChannel.stop();
};
gameMode = "menu";
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyboard);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
gotoAndStop("menu");
gotoAndStop((difficulty + level));
} else {
if (_arg1.keyCode == 77){
if (bgChannel){
bgChannel.stop();
};
gameMode = "menu";
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyboard);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
gotoAndStop("menu");
};
};
}
public function playSound(_arg1:Object, _arg2:uint){
var _local3:SoundChannel;
if (userData.data.sound == true){
_local3 = _arg1.play(0, _arg2);
};
}
public function getObject(_arg1:uint){
if ((pickupObjects[_arg1] is Points)){
addScore(1);
gameLevel.removeChild(pickupObjects[_arg1]);
pickupObjects.splice(_arg1, 1);
playSound(theGetCoinSound, 1);
} else {
if ((pickupObjects[_arg1] is Key)){
keysRequired--;
gameLevel.removeChild(pickupObjects[_arg1]);
pickupObjects.splice(_arg1, 1);
updateKeys();
playSound(theGetKeySound, 1);
} else {
if ((pickupObjects[_arg1] is Heal)){
gameLevel.removeChild(pickupObjects[_arg1]);
pickupObjects.splice(_arg1, 1);
playerLives++;
updateLives();
playSound(theGetLifeSound, 1);
};
};
};
}
public function ballDamage(){
if (playerIndestructible == 0){
if (velocity.x > 0){
velocity.x = 6;
} else {
velocity.x = -6;
};
if (velocity.y > 0){
velocity.y = 6;
} else {
velocity.y = -6;
};
velocity.x = (velocity.x * -(restitution));
velocity.y = (velocity.y * -(restitution));
playerLives--;
if (playerLives <= 0){
playerLives = 0;
};
updateLives();
if (playerLives == 0){
ballDie();
} else {
playerIndestructible = 50;
playSound(theHitSound, 1);
};
};
}
public function moveCharacter(){
var _local1:Boolean;
var _local2:uint;
var _local3:uint;
var _local4:Boolean;
velocity.y = (velocity.y + gravity);
if (velocity.x > maxSpeed){
velocity.x = maxSpeed;
};
if (velocity.y > maxSpeed){
velocity.y = maxSpeed;
};
newPos.x = (ball.x + velocity.x);
newPos.y = (ball.y + velocity.y);
_local1 = false;
_local2 = 25;
while (_local2 >= 1) {
if (rainbow.hitTestPoint(newPos.x, (newPos.y + (radius / _local2)), true)){
while (rainbow.hitTestPoint(newPos.x, (newPos.y + (radius / _local2)), true)) {
newPos.y--;
};
if (velocity.x >= 0){
velocity.x = (velocity.x + 0.45);
} else {
velocity.x = (velocity.x - 0.45);
};
velocity.x = (velocity.x * friction);
velocity.y = (velocity.y * 0);
_local1 = true;
ball.play();
};
if (rainbow.hitTestPoint((newPos.x + (radius / _local2)), (newPos.y - radius), true)){
if (velocity.x > 0){
velocity.x = (velocity.x * -(restitution));
};
break;
};
if (rainbow.hitTestPoint((newPos.x - (radius / _local2)), (newPos.y - radius), true)){
if (velocity.x < 0){
velocity.x = (velocity.x * -(restitution));
};
break;
};
_local2--;
};
_local3 = 0;
while (_local3 < fixedObjects.length) {
_local4 = false;
if (fixedObjects[_local3].hitTestPoint(newPos.x, (newPos.y + radius), true)){
while (fixedObjects[_local3].hitTestPoint(newPos.x, (newPos.y + radius), true)) {
newPos.y--;
};
velocity.x = (velocity.x * friction);
velocity.y = (velocity.y * -(restitution));
if ((fixedObjects[_local3] is Mud)){
velocity.x = (velocity.x * mudSlowdown);
velocity.y = (velocity.y * mudSlowdown);
};
if ((fixedObjects[_local3] is Trampoline)){
if (velocity.y > 0){
velocity.y = (velocity.y * -1);
};
velocity.y = (velocity.y - trampolineSpeedup);
playSound(theTrampolineSound, 1);
};
if ((fixedObjects[_local3] is Stone_Breakable)){
fixedObjects[_local3].parent.removeChild(fixedObjects[_local3]);
playSound(theStoneBreakSound, 1);
};
};
if (fixedObjects[_local3].hitTestPoint((newPos.x + radius), (newPos.y - (radius / 2)), true)){
while (fixedObjects[_local3].hitTestPoint((newPos.x + radius), (newPos.y - (radius / 2)), true)) {
if ((((gameLevel.x < 0)) && ((ball.x == ((stage.stageWidth / 2) - moveDistance))))){
gameLevel.x++;
} else {
newPos.x--;
};
};
velocity.x = (velocity.x * -(restitution));
_local4 = true;
if ((fixedObjects[_local3] is Stone_Breakable)){
fixedObjects[_local3].parent.removeChild(fixedObjects[_local3]);
playSound(theStoneBreakSound, 1);
};
};
if (fixedObjects[_local3].hitTestPoint((newPos.x - radius), (newPos.y - (radius / 2)), true)){
while (fixedObjects[_local3].hitTestPoint((newPos.x - radius), (newPos.y - (radius / 2)), true)) {
if ((((gameLevel.x > -((gameLevel.width - stage.stageWidth)))) && ((ball.x == ((stage.stageWidth / 2) + moveDistance))))){
gameLevel.x--;
} else {
newPos.x++;
};
};
velocity.x = (velocity.x * -(restitution));
_local4 = true;
if ((fixedObjects[_local3] is Stone_Breakable)){
fixedObjects[_local3].parent.removeChild(fixedObjects[_local3]);
playSound(theStoneBreakSound, 1);
};
};
if (_local4 == true){
break;
};
if (((fixedObjects[_local3].hitTestPoint(newPos.x, (newPos.y - radius), true)) && ((newPos.y < ((stage.stageHeight - radius) - 30))))){
while (((fixedObjects[_local3].hitTestPoint(newPos.x, (newPos.y - radius), true)) && ((newPos.y < ((stage.stageHeight - radius) - 30))))) {
newPos.y++;
};
velocity.x = (velocity.x * friction);
velocity.y = (velocity.y * -(restitution));
if ((fixedObjects[_local3] is Stone_Breakable)){
fixedObjects[_local3].parent.removeChild(fixedObjects[_local3]);
playSound(theStoneBreakSound, 1);
};
};
_local3++;
};
if ((((newPos.x > ((stage.stageWidth / 2) + moveDistance))) && ((velocity.x > 0)))){
if ((gameLevel.x - velocity.x) > -((gameLevel.width - stage.stageWidth))){
gameLevel.x = (gameLevel.x - velocity.x);
newPos.x = ((stage.stageWidth / 2) + moveDistance);
} else {
gameLevel.x = -((gameLevel.width - stage.stageWidth));
if ((newPos.x + radius) > stage.stageWidth){
newPos.x = (stage.stageWidth - radius);
velocity.x = (velocity.x * -(restitution));
};
};
} else {
if ((((newPos.x < ((stage.stageWidth / 2) - moveDistance))) && ((velocity.x < 0)))){
if (((((gameLevel.x - velocity.x) < 0)) && ((velocity.x < 0)))){
gameLevel.x = (gameLevel.x - velocity.x);
newPos.x = ((stage.stageWidth / 2) - moveDistance);
} else {
gameLevel.x = 0;
if ((newPos.x - radius) < 0){
newPos.x = radius;
velocity.x = (velocity.x * -(restitution));
};
};
};
};
if ((newPos.y + radius) > (stage.stageHeight - 30)){
trace("Ball out of bounds");
ballDie();
};
ball.x = newPos.x;
if (((((ball.y - newPos.y) > 1)) || (((ball.y - newPos.y) < -1)))){
ball.y = newPos.y;
};
if (velocity.x > 1){
ball.scaleX = 1;
ball.rotation = (velocity.y * 1.5);
} else {
if (velocity.x < -1){
ball.scaleX = -1;
ball.rotation = (velocity.y * 1.5);
} else {
ball.rotation = 0;
};
};
}
public function gotoChallenge(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gameitnow.com/?utm_source=game&utm_medium=MummyBall&utm_campaign=link-MummyBall");
navigateToURL(_local2, "_new");
}
public function addScore(_arg1:uint){
playerScore = (playerScore + _arg1);
hud.pointsDisplay.text = String(playerScore);
}
public function updateKeys(){
hud.keysDisplay.text = String(keysRequired);
}
public function gotoNewsletter(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gameitnow.com/?utm_source=game&utm_medium=MummyBall&utm_campaign=link-MummyBall");
navigateToURL(_local2, "_new");
}
public function quitLevel(_arg1:MouseEvent):void{
if (bgChannel){
bgChannel.stop();
};
gameMode = "menu";
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyboard);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
gotoAndStop("menu");
}
public function moveCursor(_arg1:Event){
cursor_wand.x = mouseX;
cursor_wand.y = mouseY;
}
public function checkCollisions(){
var _local1:uint;
var _local2:int;
_local1 = 3;
while (_local1 >= 1) {
_local2 = (damageObjects.length - 1);
while (_local2 >= 0) {
if (((((((((damageObjects[_local2].hitTestPoint(ball.x, ball.y, true)) || (damageObjects[_local2].hitTestPoint(ball.x, (ball.y + (radius / _local1)), true)))) || (damageObjects[_local2].hitTestPoint((ball.x + (radius / _local1)), ball.y, true)))) || (damageObjects[_local2].hitTestPoint((ball.x - (radius / _local1)), ball.y, true)))) || (damageObjects[_local2].hitTestPoint(ball.x, (ball.y - (radius / _local1)), true)))){
ballDamage();
};
_local2--;
};
_local2 = (enemies.length - 1);
while (_local2 >= 0) {
if (((((((((enemies[_local2].hitTestPoint(ball.x, ball.y, true)) || (enemies[_local2].hitTestPoint(ball.x, (ball.y + (radius / _local1)), true)))) || (enemies[_local2].hitTestPoint((ball.x + (radius / _local1)), ball.y, true)))) || (enemies[_local2].hitTestPoint((ball.x - (radius / _local1)), ball.y, true)))) || (enemies[_local2].hitTestPoint(ball.x, (ball.y - (radius / _local1)), true)))){
if (enemies[_local2].currentFrame == 1){
ballDamage();
} else {
enemyDie(_local2);
};
};
_local2--;
};
_local1--;
};
_local2 = 0;
while (_local2 < pickupObjects.length) {
if (pickupObjects[_local2].hitTestObject(ball.character)){
getObject(_local2);
};
_local2++;
};
_local2 = 0;
while (_local2 < otherObjects.length) {
if (((otherObjects[_local2].hitTestObject(ball.character)) && ((otherObjects[_local2] is Goal)))){
if (keysRequired >= 1){
return;
};
levelComplete();
velocity.x = 3;
};
_local2++;
};
}
public function changePlayer(_arg1:Event){
var event = _arg1;
try {
myLoader.removeEventListener(Event.COMPLETE, changePlayer);
if (userData.flush() == "flushed"){
nextFrame();
};
} catch(error:Error) {
trace("Can not change player!");
};
}
public function gotoProfile(_arg1:MouseEvent):void{
gotoAndStop("create");
}
public function handleMouseUp(_arg1:MouseEvent):void{
if ((((((((drawing == false)) && ((boostDelayCounter == 0)))) && (!((_arg1.target is Walker))))) && ((ballFocus == true)))){
if (mouseY > (ball.y + radius)){
velocity.x = 0;
velocity.y = 0;
boostDelayCounter = boostDelay;
} else {
if ((((mouseX > (ball.x + radius))) && ((mouseY > (ball.y - radius))))){
velocity.x = 10;
boostDelayCounter = boostDelay;
ball.play();
playSound(theJumpSound, 1);
} else {
if (mouseX > (ball.x + radius)){
velocity.x = 6;
velocity.y = -16;
boostDelayCounter = boostDelay;
ball.play();
playSound(theJumpSound, 1);
} else {
if ((((mouseX < (ball.x - radius))) && ((mouseY > (ball.y - radius))))){
velocity.x = -10;
boostDelayCounter = boostDelay;
ball.play();
playSound(theJumpSound, 1);
} else {
if (mouseX < (ball.x - radius)){
velocity.x = -6;
velocity.y = -16;
boostDelayCounter = boostDelay;
ball.play();
playSound(theJumpSound, 1);
} else {
velocity.y = -12;
boostDelayCounter = boostDelay;
ball.play();
playSound(theJumpSound, 1);
};
};
};
};
};
};
ballFocus = false;
cursor_wand.boost.visible = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, stopJump);
stage.removeEventListener(Event.ENTER_FRAME, startDrawing);
drawing = false;
}
public function clickLevel(_arg1:MouseEvent):void{
if (((((!((_arg1.target.name == ""))) && (!((_arg1.target.name == "locked"))))) && (!((_arg1.target.name == "select"))))){
this[selectedLevel].select.visible = false;
selectedLevel = _arg1.target.name;
this[selectedLevel].select.visible = true;
if (this.root.loaderInfo.url.indexOf(domainControl) != -1){
requestScores();
};
};
}
public function showTraining(_arg1:MouseEvent):void{
if (((((!((_arg1.target.name == ""))) && (!((_arg1.target.name == "locked"))))) && (!((_arg1.target.name == "select"))))){
this[selectedLevel].select.visible = false;
selectedLevel = _arg1.target.name;
this[selectedLevel].select.visible = true;
trainingInfo.gotoAndStop(selectedLevel);
};
}
public function createPlayer(_arg1:Event){
var variables:URLVariables;
var event = _arg1;
try {
myLoader.removeEventListener(Event.COMPLETE, createPlayer);
myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
variables = new URLVariables(myLoader.data);
userData.data.playerId = variables.id;
if (userData.flush() == "flushed"){
nextFrame();
};
} catch(error:Error) {
trace("Can not create player!");
};
}
public function removeDrawing(_arg1:Event):void{
if (_arg1.target.timer > 0){
_arg1.target.timer--;
} else {
_arg1.target.alpha = (_arg1.target.alpha - 0.03);
if (_arg1.target.alpha < 0){
_arg1.target.removeEventListener(Event.ENTER_FRAME, removeDrawing);
_arg1.target.parent.removeChild(_arg1.target);
};
};
}
public function scoreCounter(_arg1:Event){
if ((((summary.currentFrame == 25)) && ((summary.scores.scoreDisplay.text < totalScore)))){
summary.scores.scoreDisplay.text = (int(summary.scores.scoreDisplay.text) + 75);
} else {
if (summary.scores.scoreDisplay.text >= totalScore){
userData.data[difficulty][level] = true;
userData.flush();
if (((!((difficulty == "training"))) && (!((this.root.loaderInfo.url.indexOf(domainControl) == -1))))){
myVariables.id = userData.data.playerId;
myVariables.level = (difficulty + level);
myVariables.score = totalScore;
myRequest = new URLRequest("./highscore_update.php");
myRequest.method = URLRequestMethod.POST;
myRequest.data = myVariables;
myLoader.load(myRequest);
};
summary.scores.scoreDisplay.text = totalScore;
this.removeEventListener(Event.ENTER_FRAME, scoreCounter);
summary.nextLevel.addEventListener(MouseEvent.CLICK, nextLevel);
summary.challenge.addEventListener(MouseEvent.CLICK, gotoChallenge);
summary.levelDone.addEventListener(MouseEvent.CLICK, quitLevel);
if (bgChannel){
bgChannel.stop();
};
if (userData.data.sound == true){
};
};
};
}
public function subscribeNews(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = emailInput.text.indexOf("@");
_local3 = emailInput.text.lastIndexOf(".");
if (((!((_local2 == -1))) && (!((_local3 == -1))))){
if (_local3 < _local2){
errorMessage.text = "Please verify the e-mail address";
} else {
cancelNews.removeEventListener(MouseEvent.CLICK, gotoMenu);
subscribe.removeEventListener(MouseEvent.CLICK, subscribeNews);
myVariables.email = emailInput.text;
if (this.root.loaderInfo.url.indexOf(domainControl) != -1){
myRequest = new URLRequest("./email_add.php");
} else {
myRequest = new URLRequest("http://www.plox.info/~mattyq12/test/email_add.php");
};
myRequest.method = URLRequestMethod.POST;
myRequest.data = myVariables;
myLoader.addEventListener(Event.COMPLETE, subscribeDone);
myLoader.load(myRequest);
};
} else {
errorMessage.text = "Please verify the e-mail address";
};
}
public function stopJump(_arg1:Event):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, stopJump);
stage.addEventListener(Event.ENTER_FRAME, startDrawing);
drawing = true;
}
public function requestScores(){
myVariables.id = userData.data.playerId;
myVariables.level = selectedLevel;
myRequest = new URLRequest("./highscore_view.php");
myRequest.method = URLRequestMethod.POST;
myRequest.data = myVariables;
myLoader.addEventListener(Event.COMPLETE, showScores);
myLoader.load(myRequest);
}
public function enemyDie(_arg1:uint){
gameLevel.removeChild(enemies[_arg1]);
enemies.splice(_arg1, 1);
playSound(theEnemyDieSound, 1);
}
public function startCountdown(_arg1:TimerEvent){
if (((((((((((((((!((this.currentFrame == 1))) && (!((this.currentFrame == 2))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && ((countdown.currentFrame >= 70)))){
startGameTimer.removeEventListener(TimerEvent.TIMER, startCountdown);
gameMode = "play";
startGameLevel();
playSound(theStartSound, 1);
};
}
public function subscribeDone(_arg1:Event){
var variables:URLVariables;
var event = _arg1;
try {
myLoader.dataFormat = URLLoaderDataFormat.TEXT;
variables = new URLVariables(myLoader.data);
if (variables.finish == 1){
myLoader.removeEventListener(Event.COMPLETE, subscribeDone);
gotoAndStop("menu");
};
} catch(error:Error) {
cancelNews.addEventListener(MouseEvent.CLICK, gotoMenu);
subscribe.addEventListener(MouseEvent.CLICK, subscribeNews);
errorMessage.text = "Can not subscribe, please try again later";
};
}
public function gotoGame(_arg1:MouseEvent):void{
if (((((!((selectedLevel == ""))) && (!((selectedLevel == "locked"))))) && (!((selectedLevel == "select"))))){
gotoAndStop(selectedLevel);
if (menuChannel){
menuChannel.stop();
};
};
}
}
}//package
Section 70
//Ramp (Ramp)
package {
import flash.display.*;
public dynamic class Ramp extends MovieClip {
}
}//package
Section 71
//Spikes (Spikes)
package {
import flash.display.*;
public dynamic class Spikes extends MovieClip {
}
}//package
Section 72
//Spikes_Floating (Spikes_Floating)
package {
import flash.display.*;
public dynamic class Spikes_Floating extends MovieClip {
}
}//package
Section 73
//Spikes_Wheel (Spikes_Wheel)
package {
import flash.display.*;
public dynamic class Spikes_Wheel extends MovieClip {
}
}//package
Section 74
//StartSound (StartSound)
package {
import flash.media.*;
public dynamic class StartSound extends Sound {
}
}//package
Section 75
//Stone (Stone)
package {
import flash.display.*;
public dynamic class Stone extends MovieClip {
}
}//package
Section 76
//Stone_Breakable (Stone_Breakable)
package {
import flash.display.*;
public dynamic class Stone_Breakable extends MovieClip {
}
}//package
Section 77
//StoneBreakSound (StoneBreakSound)
package {
import flash.media.*;
public dynamic class StoneBreakSound extends Sound {
}
}//package
Section 78
//Trampoline (Trampoline)
package {
import flash.display.*;
public dynamic class Trampoline extends MovieClip {
}
}//package
Section 79
//TrampolineSound (TrampolineSound)
package {
import flash.media.*;
public dynamic class TrampolineSound extends Sound {
}
}//package
Section 80
//Trap (Trap)
package {
import flash.display.*;
public dynamic class Trap extends MovieClip {
}
}//package
Section 81
//Walker (Walker)
package {
import flash.display.*;
public dynamic class Walker extends MovieClip {
public function Walker(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 82
//Wood (Wood)
package {
import flash.display.*;
public dynamic class Wood extends MovieClip {
}
}//package
Section 83
//WoodBreakSound (WoodBreakSound)
package {
import flash.media.*;
public dynamic class WoodBreakSound extends Sound {
}
}//package