Section 1
//ballBoard_15 (AshesDist_fla.ballBoard_15)
package AshesDist_fla {
import flash.display.*;
public dynamic class ballBoard_15 extends MovieClip {
public var shad:MovieClip;
public function ballBoard_15(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 9, frame10);
}
function frame10(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 2
//ballBoardHole_23 (AshesDist_fla.ballBoardHole_23)
package AshesDist_fla {
import flash.display.*;
public dynamic class ballBoardHole_23 extends MovieClip {
public function ballBoardHole_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AshesDist_fla
Section 3
//bgOVAL_1 (AshesDist_fla.bgOVAL_1)
package AshesDist_fla {
import flash.display.*;
public dynamic class bgOVAL_1 extends MovieClip {
public var sky:MovieClip;
}
}//package AshesDist_fla
Section 4
//boardTop_11 (AshesDist_fla.boardTop_11)
package AshesDist_fla {
import flash.display.*;
import flash.text.*;
public dynamic class boardTop_11 extends MovieClip {
public var bs1:MovieClip;
public var bs2:MovieClip;
public var batter:TextField;
public var b2:MovieClip;
public var b4:MovieClip;
public var bs3:MovieClip;
public var b6:MovieClip;
public var bowler:TextField;
public var b3:MovieClip;
public var moreBowlBut:SimpleButton;
public var b5:MovieClip;
public var ballName:TextField;
public var skills:TextField;
public var nextBut:SimpleButton;
public var batterName:TextField;
public var score:TextField;
public var bowlerName:TextField;
public var doneBut:SimpleButton;
public var fixBatBut:SimpleButton;
public var bh2:MovieClip;
public var bh3:MovieClip;
public var bh5:MovieClip;
public var bh6:MovieClip;
public var bh4:MovieClip;
public var moreBatBut:SimpleButton;
public var bs0:MovieClip;
}
}//package AshesDist_fla
Section 5
//bubText_73 (AshesDist_fla.bubText_73)
package AshesDist_fla {
import flash.display.*;
import flash.text.*;
public dynamic class bubText_73 extends MovieClip {
public var comm:TextField;
}
}//package AshesDist_fla
Section 6
//eyes_110 (AshesDist_fla.eyes_110)
package AshesDist_fla {
import flash.display.*;
public dynamic class eyes_110 extends MovieClip {
public function eyes_110(){
addFrameScript(31, frame32);
}
function frame32(){
gotoAndPlay(1);
}
}
}//package AshesDist_fla
Section 7
//GUI_getReady_95 (AshesDist_fla.GUI_getReady_95)
package AshesDist_fla {
import flash.display.*;
import flash.text.*;
public dynamic class GUI_getReady_95 extends MovieClip {
public var level:TextField;
}
}//package AshesDist_fla
Section 8
//GUI_ray_97 (AshesDist_fla.GUI_ray_97)
package AshesDist_fla {
import flash.display.*;
public dynamic class GUI_ray_97 extends MovieClip {
public var rayBub:MovieClip;
public function GUI_ray_97(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AshesDist_fla
Section 9
//guiHsClip_92 (AshesDist_fla.guiHsClip_92)
package AshesDist_fla {
import flash.display.*;
import flash.text.*;
public dynamic class guiHsClip_92 extends MovieClip {
public var playerName:TextField;
public var submitBut:SimpleButton;
public function guiHsClip_92(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 10
//lifeMeter_68 (AshesDist_fla.lifeMeter_68)
package AshesDist_fla {
import flash.display.*;
public dynamic class lifeMeter_68 extends MovieClip {
public var meterClip:MovieClip;
public function lifeMeter_68(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AshesDist_fla
Section 11
//meterClip_69 (AshesDist_fla.meterClip_69)
package AshesDist_fla {
import flash.display.*;
public dynamic class meterClip_69 extends MovieClip {
public var meterLine:MovieClip;
}
}//package AshesDist_fla
Section 12
//mouse_109 (AshesDist_fla.mouse_109)
package AshesDist_fla {
import flash.display.*;
public dynamic class mouse_109 extends MovieClip {
public function mouse_109(){
addFrameScript(6, frame7);
}
function frame7(){
gotoAndPlay(1);
}
}
}//package AshesDist_fla
Section 13
//mouse_112 (AshesDist_fla.mouse_112)
package AshesDist_fla {
import flash.display.*;
public dynamic class mouse_112 extends MovieClip {
public function mouse_112(){
addFrameScript(35, frame36);
}
function frame36(){
gotoAndPlay(1);
}
}
}//package AshesDist_fla
Section 14
//particleBang_53 (AshesDist_fla.particleBang_53)
package AshesDist_fla {
import flash.display.*;
public dynamic class particleBang_53 extends MovieClip {
public function particleBang_53(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package AshesDist_fla
Section 15
//particleFlesh_49 (AshesDist_fla.particleFlesh_49)
package AshesDist_fla {
import flash.display.*;
public dynamic class particleFlesh_49 extends MovieClip {
public function particleFlesh_49(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 16
//particleHelmet_58 (AshesDist_fla.particleHelmet_58)
package AshesDist_fla {
import flash.display.*;
public dynamic class particleHelmet_58 extends MovieClip {
public function particleHelmet_58(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 17
//particleSmoke_51 (AshesDist_fla.particleSmoke_51)
package AshesDist_fla {
import flash.display.*;
public dynamic class particleSmoke_51 extends MovieClip {
public function particleSmoke_51(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package AshesDist_fla
Section 18
//playerBat_82 (AshesDist_fla.playerBat_82)
package AshesDist_fla {
import flash.display.*;
public dynamic class playerBat_82 extends MovieClip {
public function playerBat_82(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 19
//rayBub_98 (AshesDist_fla.rayBub_98)
package AshesDist_fla {
import flash.display.*;
import flash.text.*;
public dynamic class rayBub_98 extends MovieClip {
public var rayText:TextField;
}
}//package AshesDist_fla
Section 20
//sky_2 (AshesDist_fla.sky_2)
package AshesDist_fla {
import flash.display.*;
public dynamic class sky_2 extends MovieClip {
public function sky_2(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 21
//spBub_71 (AshesDist_fla.spBub_71)
package AshesDist_fla {
import flash.display.*;
public dynamic class spBub_71 extends MovieClip {
public var bubText:MovieClip;
public function spBub_71(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AshesDist_fla
Section 22
//Symbol242_111 (AshesDist_fla.Symbol242_111)
package AshesDist_fla {
import flash.display.*;
public dynamic class Symbol242_111 extends MovieClip {
public function Symbol242_111(){
addFrameScript(0, frame1, 22, frame23);
}
function frame1(){
}
function frame23(){
stop();
}
}
}//package AshesDist_fla
Section 23
//zombieBlood_66 (AshesDist_fla.zombieBlood_66)
package AshesDist_fla {
import flash.display.*;
public dynamic class zombieBlood_66 extends MovieClip {
public function zombieBlood_66(){
addFrameScript(0, frame1, 19, frame20, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
function frame20(){
gotoAndStop(1);
}
}
}//package AshesDist_fla
Section 24
//zombieBody_60 (AshesDist_fla.zombieBody_60)
package AshesDist_fla {
import flash.display.*;
public dynamic class zombieBody_60 extends MovieClip {
public var blood:MovieClip;
public var bgFx:MovieClip;
public var zLeg:MovieClip;
public var head2:MovieClip;
public var body:MovieClip;
public var head:MovieClip;
public function zombieBody_60(){
addFrameScript(39, frame40, 48, frame49, 94, frame95);
}
function frame95(){
stop();
}
function frame40(){
gotoAndPlay("walk");
}
function frame49(){
gotoAndPlay("attack");
}
}
}//package AshesDist_fla
Section 25
//zombieBodyClip_64 (AshesDist_fla.zombieBodyClip_64)
package AshesDist_fla {
import flash.display.*;
public dynamic class zombieBodyClip_64 extends MovieClip {
public function zombieBodyClip_64(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 26
//zombieHeads_55 (AshesDist_fla.zombieHeads_55)
package AshesDist_fla {
import flash.display.*;
public dynamic class zombieHeads_55 extends MovieClip {
public function zombieHeads_55(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 27
//zombieLeg1_63 (AshesDist_fla.zombieLeg1_63)
package AshesDist_fla {
import flash.display.*;
public dynamic class zombieLeg1_63 extends MovieClip {
public function zombieLeg1_63(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 28
//ZombieLeg2_65 (AshesDist_fla.ZombieLeg2_65)
package AshesDist_fla {
import flash.display.*;
public dynamic class ZombieLeg2_65 extends MovieClip {
public function ZombieLeg2_65(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 29
//zombieLeg4_67 (AshesDist_fla.zombieLeg4_67)
package AshesDist_fla {
import flash.display.*;
public dynamic class zombieLeg4_67 extends MovieClip {
public function zombieLeg4_67(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package AshesDist_fla
Section 30
//zomFire_61 (AshesDist_fla.zomFire_61)
package AshesDist_fla {
import flash.display.*;
public dynamic class zomFire_61 extends MovieClip {
public function zomFire_61(){
addFrameScript(0, frame1, 55, frame56);
}
function frame1(){
stop();
}
function frame56(){
gotoAndStop(1);
}
}
}//package AshesDist_fla
Section 31
//Arrays (Arrays)
package {
public class Arrays {
public static const DayDATA:Array = new Array(["...and the undead are back out on the pitch on the ", "A lovely sunny morning here at Lords on the ", "And we're back again after a lovely lunch on the ", "...and the undead are back out on the pitch on the "], ["blank", "first", "second", "third", "fourth", "last"]);
public static const deadDATA:Array = new Array("Don Bradman", "Bert Oldfield", "Bill O'Reilly", "Bill Woodfull", "Bill Ponsford", "Stan McCabe", "Monty Noble", "Victor Trumper", "Clem Hill", "Hugh Trumble", "Warwick Armstrong", "Charlie Macartney", "Syd Gregory", "Warren Bardsley", "Bert Hopkins", "James Kelly", "Tibby Cotter", "Bill Whitty.", "Joe Darling");
public static const ballBoardDATA:Array = new Array("Regular Red Leather Classic - good for playing chin music with and block knocking", "Regular", "Metal Titanium - totally f**king hurts, developed by the US Army for use against wild bears.", "Spikey Timed Ball - comedy classic, instill a bit of panic before the inevitable", "Flamer - banned in 32 countries but still available for the Ashes.", "Bodyline Ball - Popular with Douglas Jardine, gives minimal air resistance & maximum Banging Power", "Frag Ball - Pretty Harmless until it blows up and showers everyone with FLAMING FIRE !");
public static const RayDATA:Array = new Array("I think that's a thrush over there just behind silly mid off", "And that's a lovely shot by the young man in his first test", "A wonderful cover drive somwhat reminicent of a young Chris Taverae", "A test book slice , marvellous..", "Sweetly struck, he's eyes a big as saucers for that one..", "and Again ! also thanks to Mrs Bridgeman of Tunbridge Wells for the wonderful cake", "and Again ! looks like he wants this over before tea !", "This boys got a left arm like a traction engine !", "I think they'll be picking that one out of a sweetshop window later..", "Simply Fabulous ! - he's really got his eye in now...", "A brutal but effective clubbing motion !", "Any more like that and we'll need the new ball immediately !", "Good grief, this battenburg cake is extraordinary !", "We're having chops tonight apparently..", "Has anyone seen my biro ?");
public static const levelDATA:Array = new Array([1, 1, 1], [1, 1, 1, 1], [2, 2, 1, 1, 2], [2, 3, 1, 2, 8, 2], [3, 3, 3], [3, 3, 1, 2, 3, 2], [3, 3, 2, 2, 3, 2, 1, 3], [4, 4, 3, 1, 8, 4, 4, 4, 2, 3, 4], [4, 4, 4, 1, 4, 1, 4, 2, 4, 3, 3], [4, 5, 2, 2, 2, 2, 2, 5], [5, 5, 4, 5, 4, 2, 4, 2, 4, 2, 4, 3, 5], [5, 5, 5, 2, 5, 2, 5], [5, 6, 6], [6, 6, 2, 2, 6, 2, 4, 2, 3, 6, 3, 6], [6, 6, 6, 2, 4, 3, 4, 2, 6, 2, 5, 8], [6, 8, 2, 6, 7]);
public static const batterDATA:Array = new Array("Prior", "Cook", "Collingwood", "Bell", "Strauss", "Trescothic", "Bopara", "Pieterson", "Botham", "Anderson", "Boycott", "Boycott");
public static const bowlerDATA:Array = new Array("Bresnan", "Panesar", "Broad", "Rashid", "Sidebottom", "Harmy", "Swann", "Anderson", "Onions", "Sir Fred", "Willis", "Willis", "Willis", "Willis");
public static const zomDATA:Array = new Array(["BLANK", 1, 100], ["Capped Player", 1, 100, 0.5], ["Helmetted Player", 1, 150, 0.5], ["Crocco", 1.3, 200, 0.75], ["Rolfaroo", 1, 50, 0.75], ["Kylie", 1.5, 350, 0.75], ["Russel", 1.5, 200, 0.75], ["Edna", 1.7, 600, 0.5], ["Punter", 1, 149, 0.75]);
}
}//package
Section 32
//Ashes (Ashes)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
public class Ashes extends MovieClip {
public var sndHitZom:s_hitZom;
private var zombLevel:int;
public var scoreObjects:Sprite;
private var clicked:int;
public var sndPop:s_pop;
private var lockURL:Array;
public var bg:MovieClip;
public var leftArrow;
private var ballTimer:int;
public var sndHitActivate:s_hitActivate;
private var levelBatter:int;
public var score:int;
public var myBoard:Board;
private var ballSeqList:Array;
private var zombKilled:int;
private var zombTimerLimit:int;
private var levelBowler:int;
public var gameObjects:Sprite;
public var sndHitFire:s_hitFire;
private var hitList:Array;
private var ballTimerLimit:int;
private var trigList:Array;
public var myBowler:Bowler;
public var testText:TextField;
public var sndHitSplat:s_hitSplat;
public var myInstruct:Instructions;
public var sndFreakDie:s_freakDie;
public var sndZombie1:s_zombie1;
public var sndZombie2:s_zombie2;
private var lock:Boolean;// = true
public var saveMem:MovieClip;
public var fuses:TextField;
public var testText2:TextField;
public var sndExplode:s_explode;
public var mySplash:MBSplash;
private var ballList:Array;
public var sndHitWood:s_hitWood;
public var sndFire:s_fire;
public var rightArrow:Boolean;
public var myUmpire:Umpire;
public var sndCheer:s_cheer;
private var levelScore:int;
public var sndMusic1:s_music1;
public var sndMusic2:s_music2;
public var sndZombie3:s_zombie3;
public var level:int;
public var sndHitGround:s_hitGround;
private var ballNext:int;
private var screenScore:int;
public var sndLevelUp:s_levelUp;
private var GUIStartFrame:int;// = 35
public var myPlayer:Player;
private var nextTrig:Timer;
public var sndGong:s_gong;
public var finalLevel:int;
private var zombLevelLimit:int;
public var sndHitMetal:s_hitMetal;
private var gameState:int;
private var zombDeathDist:int;
public var plays:int;
private var zombTimer:int;
private var zombieList:Array;
public var batDamage:int;
public var myGUI:GUI;
public function Ashes(){
lockURL = ["beta.www.mousebreaker.com", "www.mousebreaker.com", "www.mousebreaker.net", "www.magneticboots.com"];
lock = true;
GUIStartFrame = 35;
sndZombie1 = new s_zombie1();
sndZombie2 = new s_zombie2();
sndZombie3 = new s_zombie3();
sndHitWood = new s_hitWood();
sndHitZom = new s_hitZom();
sndHitMetal = new s_hitMetal();
sndHitFire = new s_hitFire();
sndHitGround = new s_hitGround();
sndHitSplat = new s_hitSplat();
sndHitActivate = new s_hitActivate();
sndGong = new s_gong();
sndCheer = new s_cheer();
sndPop = new s_pop();
sndExplode = new s_explode();
sndFire = new s_fire();
sndLevelUp = new s_levelUp();
sndFreakDie = new s_freakDie();
sndMusic1 = new s_music1();
sndMusic2 = new s_music2();
super();
addFrameScript(6, frame7);
trace("init");
trigList = new Array();
ballList = new Array();
zombieList = new Array();
hitList = new Array();
ballSeqList = new Array();
ballSeqList = [1, 2, 3];
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseDownFunction);
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUpFunction);
gameObjects = new Sprite();
addChild(gameObjects);
scoreObjects = new Sprite();
addChild(scoreObjects);
addEventListener(Event.ENTER_FRAME, gameBase);
finalLevel = 15;
level = 0;
gameState = 0;
levelBatter = 1;
levelBowler = 1;
plays = 0;
newBowler();
newUmpire();
addGUI(null);
myGUI.playBut.addEventListener(MouseEvent.CLICK, PlayButHit);
myGUI.hsClip.submitBut.addEventListener(MouseEvent.CLICK, Hscores);
myGUI.visible = false;
newPlayer();
myPlayer.gotoAndPlay(2);
if (lock == false){
};
MochiBot.track(this, "2fc982ae");
}
public function groan(_arg1){
switch (_arg1){
case 1:
sndZombie1.play();
break;
case 2:
sndZombie2.play();
break;
case 3:
sndZombie3.play();
break;
case 4:
sndFreakDie.play();
break;
};
}
public function getZombDeathDist(){
return (zombDeathDist);
}
public function makeParticles(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){
var _local8:int;
var _local9:Particle;
_local8 = _arg7;
while (_local8 >= 0) {
_local9 = new Particle(_arg1, ((_arg2 + JMath.getRand(90)) - 45), _arg3, _arg4, _arg5, _arg6);
addChild(_local9);
_local8--;
};
}
function handleLoadSuccessful(_arg1:Event):void{
trace("Message sent.");
}
public function Hscores(_arg1:MouseEvent){
var _local2:URLRequest;
var _local3:URLLoader;
var _local4:URLVariables;
_local2 = new URLRequest("highscores_ashes2asheszombiecricket.php?");
_local3 = new URLLoader();
_local4 = new URLVariables();
_local3.addEventListener(Event.COMPLETE, handleLoadSuccessful);
_local3.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError);
_local4.var1 = score;
_local4.var2 = myGUI.hsClip.playerName.text;
_local2.method = URLRequestMethod.POST;
_local2.data = _local4;
_local3.load(_local2);
myGUI.hsClip.gotoAndStop(2);
}
function frame7(){
stop();
}
public function goMouse(){
var url2:String;
var request:URLRequest;
url2 = "http://www.mousebreaker.com/games/ashes2asheszombiecricket/playgame";
request = new URLRequest(url2);
try {
navigateToURL(request, "_self");
} catch(e:Error) {
trace("Error occurred!");
};
}
public function removeBall(_arg1:Ball){
var _local2:*;
for (_local2 in ballList) {
if (ballList[_local2] == _arg1){
ballList.splice(_local2, 1);
break;
};
};
}
public function newPlayer(){
var _local1:String;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Player;
_local1 = "left";
_local2 = 380;
_local3 = 60;
_local4 = ((Math.random() * 150) + 150);
_local5 = new Player(_local1, _local4, _local2, _local3);
addChild(_local5);
myPlayer = _local5;
}
public function keyDownFunction(_arg1:KeyboardEvent){
if (_arg1.keyCode == 37){
leftArrow = true;
} else {
if (_arg1.keyCode == 39){
rightArrow = true;
} else {
if (_arg1.keyCode == 32){
};
};
};
}
public function newUmpire(){
var _local1:Umpire;
_local1 = new Umpire();
addChild(_local1);
myUmpire = _local1;
myUmpire.x = 160;
myUmpire.y = 312;
}
public function addGUI(_arg1:Event){
myGUI = new GUI();
addChild(myGUI);
myGUI.gotoAndStop(1);
myGUI.x = 20;
mySplash = new MBSplash();
addChild(mySplash);
mySplash.x = 320;
mySplash.y = 200;
}
public function playerDead(_arg1:Event){
if (myPlayer.currentFrame < 50){
sndGong.play();
zombDeathDist = (15 + 10);
myPlayer.gotoAndPlay("dead");
myBowler.gotoAndPlay("lose");
myUmpire.gotoAndStop("out");
myGUI.gotoAndPlay("gameOver");
gameState = 2;
};
}
private function siteLock(_arg1:Array):void{
var urlString:String;
var urlParts:Array;
var wwwPart:Array;
var i:uint;
var url2:String;
var request:URLRequest;
var url = _arg1;
urlString = stage.loaderInfo.url;
urlParts = urlString.split("://");
wwwPart = urlParts[1].split("/");
i = 0;
while (i < url.length) {
if (url[i] == wwwPart[0]){
lock = false;
};
i = (i + 1);
};
if (lock){
alpha = 0;
url2 = "http://www.mousebreaker.com";
request = new URLRequest(url2);
try {
navigateToURL(request, "_self");
} catch(e:Error) {
trace("Error occurred!");
};
};
}
public function newFireBall(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:int;
var _local6:Number;
var _local7:Number;
var _local8:Ball;
_local4 = 4;
_local5 = _arg3;
_local6 = _arg2;
_local7 = _arg1;
_local8 = new Ball(_local4, _local6, _local7, (5 * JMath.getY(_local5)), (5 * JMath.getX(_local5)));
addChild(_local8);
ballList.push(_local8);
}
public function setBallSeq(_arg1:Array, _arg2:int, _arg3:int){
levelBatter = _arg2;
levelBowler = _arg3;
ballSeqList = _arg1;
gameState = 0;
myGUI.gotoAndPlay("levLoop");
}
public function goMouse2(){
var url2:String;
var request:URLRequest;
url2 = "http://www.mousebreaker.com";
request = new URLRequest(url2);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
public function addInstruct(_arg1:Event){
myInstruct = new Instructions();
addChild(myInstruct);
myInstruct.x = 326;
myInstruct.y = 173;
}
public function keyUpFunction(_arg1:KeyboardEvent){
if (_arg1.keyCode == 37){
leftArrow = false;
} else {
if (_arg1.keyCode == 39){
rightArrow = false;
};
};
}
public function incScore(_arg1:Event, _arg2:int){
if (_arg2 == 3){
myUmpire.gotoAndPlay("four");
sndCheer.play();
};
if (_arg2 == 5){
myUmpire.gotoAndPlay("six");
sndCheer.play();
};
score = (score + _arg2);
}
public function checkForWhacks(_arg1:Event){
var _local2:int;
var _local3:*;
var _local4:int;
var _local5:*;
var _local6:*;
var _local7:int;
var _local8:Particle;
var _local9:int;
var _local10:Particle;
_local2 = (ballList.length - 1);
while (_local2 >= 0) {
_local5 = ballList[_local2];
if (_local5.hitTestObject(myPlayer.whoosh)){
_local5.hitMe(null, batDamage, levelBatter);
showRay(Arrays.RayDATA[JMath.getRand(Arrays.RayDATA.length)]);
};
_local2--;
};
if (batDamage == 2){
return;
};
_local3 = false;
_local4 = (zombieList.length - 1);
while (_local4 >= 0) {
_local6 = zombieList[_local4];
if (Math.abs((_local6.x - myPlayer.x)) < 60){
_local6.batMe(null);
_local3 = true;
_local7 = 2;
while (_local7 >= 0) {
_local8 = new Particle(3, JMath.getRand(90), (_local6.y - 108), _local6.x, 2, 0.5);
addChild(_local8);
_local7--;
};
};
_local4--;
};
if (_local3){
batDamage = (batDamage + 1);
myPlayer.bat.gotoAndStop(batDamage);
_local9 = 5;
while (_local9 >= 0) {
_local10 = new Particle(5, JMath.getRand(90), (myPlayer.y - 108), (myPlayer.x + 50), 3, 0.6);
addChild(_local10);
_local9--;
};
};
}
public function checkForHits(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:int;
var _local18:int;
var _local19:int;
var _local20:int;
var _local21:int;
var _local22:Boolean;
var _local23:int;
var _local24:int;
var _local25:Particle;
var _local26:Particle;
var _local27:int;
_local2 = -1000;
_local3 = -1000;
_local4 = (ballList.length - 1);
while (_local4 >= 0) {
_local5 = (zombieList.length - 1);
while (_local5 >= 0) {
_local6 = ballList[_local4];
_local7 = zombieList[_local5];
_local8 = (_local6.x - 10);
_local9 = _local6.y;
_local10 = (_local6.x + _local6.dx);
_local11 = (_local6.y + _local6.dy);
_local12 = _local7.x;
_local13 = (_local7.y + _local7.body.y);
_local14 = _local7.x;
_local15 = ((_local7.y + _local7.body.y) - (110 * _local7.scaleY));
_local16 = JMath.collCheck(_local8, _local10, _local9, _local11, _local12, _local14, _local13, _local15, 0);
if ((_local16 > 0)){
_local17 = JMath.getHyp(0, 0, _local6.dx, _local6.dy);
_local18 = JMath.getAngle(0, 0, _local6.dx, _local6.dy);
_local19 = _local6.getType();
_local20 = _local7.getType();
_local21 = (_local7.y - _local6.y);
_local22 = false;
if ((((_local20 == 6)) && ((_local21 < (82 * 1.5))))){
_local6.x = (_local7.x - 20);
_local6.dx = (-(_local6.dx) / 2);
_local6.dy = (-(_local6.dy) / 1.5);
sndHitMetal.play();
_local22 = true;
};
if (((!(_local22)) && ((_local7.body.currentFrame < 50)))){
if ((((_local17 < 10)) && ((_local17 > 2)))){
_local6.dx = (-(_local6.dx) / 2);
_local6.dy = (-(_local6.dy) / 1.5);
_local6.x = _local7.x;
};
if ((((_local17 > 9.999)) && ((_local19 < 3)))){
sndHitZom.play();
_local23 = 5;
while (_local23 >= 0) {
_local25 = new Particle((_local17 / 3), ((_local18 + JMath.getRand(90)) - 45), _local6.y, (_local7.x + 25), 1, 0.3);
addChild(_local25);
_local23--;
};
_local24 = 2;
while (_local24 >= 0) {
_local26 = new Particle((_local17 / 6), ((_local18 + JMath.getRand(90)) - 45), _local6.y, (_local7.x + 25), 2, 0.5);
addChild(_local26);
_local24--;
};
};
switch (_local19){
case 1:
if (_local17 > 9.99){
_local6.dx = (-(_local6.dx) / 10);
_local6.dy = (-(_local6.dy) / 1.5);
_local6.x = _local7.x;
};
break;
case 2:
_local17 = (_local17 * 1.25);
if (_local17 > 9.99){
_local6.dx = (_local6.dx * 0.3);
_local6.x = (_local7.x + 5);
};
break;
case 3:
_local6.x = 50000;
sndHitActivate.play();
break;
case 4:
sndFire.play();
_local6.x = 50000;
break;
case 5:
sndExplode.play();
_local6.x = 50000;
break;
case 6:
_local2 = _local6.x;
_local3 = _local6.y;
sndExplode.play();
_local6.x = 50000;
break;
};
_local7.hitMe(null, _local21, _local17, _local19);
};
};
_local5--;
};
_local4--;
};
if (_local2 != -1000){
_local27 = 3;
while (_local27 >= 0) {
newFireBall(_local2, _local3, (-90 + (_local27 * 45)));
_local27--;
};
};
}
function handleLoadError(_arg1:IOErrorEvent):void{
trace("Message failed.");
}
public function playerEaten(_arg1:Event){
var _local2:Particle;
_local2 = new Particle((3 + JMath.getRand(10)), (JMath.getRand(60) - 30), (myPlayer.y - 30), (myPlayer.x + (JMath.getRand(20) - 40)), 1, 0.5);
addChild(_local2);
}
public function getBallSeq(){
return (ballSeqList);
}
public function removeZombie(_arg1:Zombie){
var _local2:*;
zombKilled = (zombKilled + 1);
myGUI.score.text = String((zombLevelLimit - zombKilled));
if (zombKilled == zombLevelLimit){
sndCheer.play();
myBowler.gotoAndPlay("win");
if (level == finalLevel){
myGUI.gotoAndPlay("winGame");
showRay("What a turn up, England regain the Ashes ! OBEs all round again eh ?");
gameState = 4;
};
if (level < finalLevel){
showRay("Simply marvellous, we'll have a short break for sandwiches now I think");
myGUI.gotoAndPlay("levelUp");
gameState = 3;
};
};
for (_local2 in zombieList) {
if (zombieList[_local2] == _arg1){
zombieList.splice(_local2, 1);
break;
};
};
}
public function PlayButHit(_arg1:MouseEvent){
if (myGUI.currentFrame == 26){
myGUI.gotoAndPlay("gameStart");
trace("stopped");
};
if (gameState == 3){
level = (level + 1);
myBoard = new Board(levelBatter, levelBowler);
addChild(myBoard);
};
if ((((gameState == 2)) || ((gameState == 4)))){
plays = (plays + 1);
if (plays < 2000){
myGUI.gotoAndPlay(1);
gameState = 0;
removeAllZombies();
};
if (plays > 1999){
goMouse();
};
};
}
public function newBowler(){
var _local1:Bowler;
_local1 = new Bowler(312, 112);
addChild(_local1);
myBowler = _local1;
}
public function newBall(){
var _local1:*;
var _local2:Number;
var _local3:Number;
var _local4:Ball;
_local1 = ballSeqList[ballNext];
ballNext = (ballNext + 1);
if (ballNext > 3){
ballNext = 0;
};
_local2 = 200;
_local3 = 100;
_local4 = new Ball(_local1, _local2, _local3, (-3 - JMath.getRand(3)), 0);
addChild(_local4);
ballList.push(_local4);
}
public function gameBase(_arg1:Event){
var _local2:*;
var _local3:int;
var _local4:int;
if (gameState == 4){
myGUI.score.text = String(score);
};
if (gameState == 2){
myGUI.score.text = String(score);
};
if (gameState == 1){
if ((((clicked == 1)) && ((myPlayer.currentFrame < 14)))){
myPlayer.gotoAndPlay("hit");
checkForWhacks(null);
clicked = 0;
};
if (myBowler.currentFrame == 5){
if (gameState == 1){
newBall();
ballTimer = 0;
ballTimerLimit = 70;
};
};
ballTimer = (ballTimer + 1);
if (myBowler.currentFrame > 15){
_local2 = (15 + Math.floor(((ballTimer / ballTimerLimit) * 200)));
myBowler.gotoAndPlay(_local2);
};
if (ballTimer > ballTimerLimit){
myBowler.gotoAndPlay(1);
ballTimer = 0;
};
zombTimer = (zombTimer + 1);
if ((((zombTimer > zombTimerLimit)) && ((zombLevel < zombLevelLimit)))){
zombLevel = (zombLevel + 1);
zombTimer = 0;
newZombie();
zombTimerLimit = (150 + JMath.getRand(100));
};
myGUI.score.text = String((zombLevelLimit - zombKilled));
checkForHits(null);
};
if (gameState == 0){
myGUI.getReady.level.text = String(("Level " + level));
if (mySplash.currentFrame == 130){
mySplash.visible = false;
myGUI.gotoAndPlay(2);
myGUI.visible = true;
};
if (myGUI.currentFrame == 25){
addInstruct(null);
};
if (myGUI.currentFrame == GUIStartFrame){
ballSeqList = [1, 1, 1, 1];
ballNext = 0;
score = 0;
level = 1;
batDamage = 1;
levelBatter = 0;
levelBowler = 0;
myUmpire.gotoAndStop(1);
myPlayer.gotoAndPlay(1);
myPlayer.bat.gotoAndStop(batDamage);
zombDeathDist = 15;
myInstruct.deleteMe();
};
if (myGUI.currentFrame == (GUIStartFrame + 1)){
myGUI.hsClip.gotoAndStop(1);
gameState = 1;
ballTimer = 0;
ballTimerLimit = (80 - (levelBowler * 2));
zombTimer = 150;
zombTimerLimit = (150 + JMath.getRand(50));
zombLevel = 0;
zombLevelLimit = (Arrays.levelDATA[level].length - 2);
zombKilled = 0;
myBowler.gotoAndStop((myBowler.currentFrame + 1));
myPlayer.bat.gotoAndStop(batDamage);
_local3 = Math.ceil((level / 3));
_local4 = (level - (3 * Math.floor((level / 3))));
showRay(((Arrays.DayDATA[0][_local4] + Arrays.DayDATA[1][_local3]) + " day of the Second Test"));
this.bg.sky.gotoAndStop((_local4 + 1));
};
};
}
public function newZombie(){
var _local1:Number;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Zombie;
groan((JMath.getRand(3) + 1));
_local1 = Arrays.levelDATA[level][(zombLevel + 1)];
if (_local1 > 8){
_local1 = 8;
};
_local2 = Arrays.zomDATA[_local1][2];
_local3 = 380;
_local4 = 640;
_local5 = Arrays.zomDATA[_local1][3];
_local6 = Arrays.zomDATA[_local1][1];
_local7 = new Zombie(_local2, _local5, _local3, _local4, _local1, _local6);
addChild(_local7);
zombieList.push(_local7);
}
public function removeAllZombies(){
var _local1:int;
_local1 = (zombieList.length - 1);
while (_local1 >= 0) {
zombieList[_local1].removeMeGO();
zombieList.splice(_local1, 1);
_local1--;
};
}
public function showRay(_arg1){
myGUI.ray.gotoAndPlay(2);
myGUI.ray.rayBub.rayText.text = String(_arg1);
}
public function getClicked(){
return (clicked);
}
public function MouseDownFunction(_arg1:MouseEvent){
clicked = 1;
}
public function removeAllBalls(){
var _local1:int;
while (_local1 < ballList.length) {
ballList[_local1].deleteBall();
ballList.splice(_local1, 1);
_local1++;
};
}
public function MouseUpFunction(_arg1:MouseEvent){
clicked = 0;
}
trace("class");
}
}//package
Section 33
//Ball (Ball)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Ball extends MovieClip {
public var shad:MovieClip;
private var lastTime:int;
private var hitTimer:Number;
public var dy:Number;
private var grav:Number;
public var dx:Number;
private var bType:Number;
public function Ball(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
dx = _arg5;
dy = _arg4;
grav = 0.3;
hitTimer = 0;
bType = _arg1;
this.y = _arg2;
this.x = _arg3;
this.scaleX = 0.3;
this.scaleY = 0.3;
this.gotoAndStop(bType);
addEventListener(Event.ENTER_FRAME, moveMe);
lastTime = getTimer();
}
public function moveMe(_arg1:Event){
var _local2:*;
_local2 = JMath.getAngle(0, 0, dx, dy);
if (this.scaleX < 1){
this.scaleX = (this.scaleX + 0.05);
this.scaleY = (this.scaleY + 0.05);
};
this.x = (this.x + dx);
this.y = (this.y + dy);
dy = (dy + grav);
this.rotation = (this.rotation + (dx * 5));
this.shad.rotation = (360 - this.rotation);
switch (bType){
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
this.shad.rotation = ((_local2 + 180) + (360 - this.rotation));
break;
case 5:
break;
};
if (this.y > 380){
this.y = 380;
dy = (-(dy) / 1.5);
if ((((Math.abs(dy) < 2)) && ((hitTimer < 500)))){
hitTimer = 1000;
dx = 0;
};
};
hitTimer = (hitTimer - 1);
if (hitTimer == 990){
deleteMe();
};
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
public function hitMe(_arg1:Event, _arg2, _arg3){
var _local4:*;
var _local5:*;
if ((hitTimer < 1)){
hitTimer = 100;
_local4 = JMath.getAngle(MovieClip(parent).myPlayer.x, (MovieClip(parent).myPlayer.y - 70), this.x, this.y);
_local5 = (20 - Math.abs((this.y - (MovieClip(parent).myPlayer.y - 70))));
_local5 = (_local5 + _arg3);
if (_arg2 == 2){
_local5 = (_local5 * 0.25);
};
if (_local5 < 0){
_local5 = 0;
};
dx = ((10 + _local5) * JMath.getX(_local4));
dy = ((10 + _local5) * JMath.getY(_local4));
switch (bType){
case 1:
MovieClip(parent).sndHitWood.play();
break;
case 2:
MovieClip(parent).sndHitMetal.play();
break;
case 3:
MovieClip(parent).sndHitMetal.play();
break;
case 4:
MovieClip(parent).sndHitFire.play();
this.shad.rotation = (360 - this.rotation);
break;
case 5:
MovieClip(parent).sndHitWood.play();
break;
case 6:
MovieClip(parent).sndHitMetal.play();
break;
};
};
}
public function getType(){
return (bType);
}
public function deleteMe(){
removeEventListener(Event.ENTER_FRAME, moveMe);
MovieClip(parent).removeBall(this);
parent.removeChild(this);
}
}
}//package
Section 34
//BasicButton (BasicButton)
package {
import flash.display.*;
public dynamic class BasicButton extends SimpleButton {
}
}//package
Section 35
//Board (Board)
package {
import flash.display.*;
import flash.events.*;
public class Board extends MovieClip {
private var boardBallSeqList:Array;
private var ballHovered:int;
private var clicked:int;
private var boardY:int;
public var boardFace:MovieClip;
private var ballChosen:int;
private var lastTime:int;
private var levelBatter:int;
private var levelBowler:int;
private var levelSkills:int;
public function Board(_arg1:int, _arg2:int){
var _local3:int;
var _local4:*;
super();
levelSkills = 1;
levelBatter = _arg1;
levelBowler = _arg2;
boardY = 0;
ballChosen = null;
ballHovered = 0;
clicked = 0;
addEventListener(Event.ENTER_FRAME, moveMe);
this.boardFace.fixBatBut.addEventListener(MouseEvent.CLICK, fixBat);
this.boardFace.moreBatBut.addEventListener(MouseEvent.CLICK, moreBat);
this.boardFace.moreBowlBut.addEventListener(MouseEvent.CLICK, moreBowl);
this.boardFace.nextBut.addEventListener(MouseEvent.CLICK, nextStuff);
this.boardFace.doneBut.addEventListener(MouseEvent.CLICK, doneStuff);
_local3 = 6;
while (_local3 >= 2) {
_local4 = boardFace[("b" + _local3)];
_local4.gotoAndStop(_local3);
_local3--;
};
boardBallSeqList = new Array();
boardBallSeqList = [1, 1, 1];
}
public function moveMe(_arg1:Event){
var _local2:int;
var _local3:*;
var _local4:int;
var _local5:Boolean;
var _local6:*;
boardFace.score.text = String(MovieClip(parent).score);
boardFace.batter.text = String(levelBatter);
boardFace.bowler.text = String(levelBowler);
boardFace.skills.text = String(levelSkills);
boardFace.batterName.text = String(Arrays.batterDATA[levelBatter]);
boardFace.bowlerName.text = String(Arrays.bowlerDATA[levelBowler]);
boardFace.ballName.text = String(Arrays.ballBoardDATA[ballHovered]);
if (Math.abs((boardFace.y - boardY)) > 4){
boardFace.y = (boardFace.y + ((boardY - boardFace.y) / 10));
};
clicked = MovieClip(parent).getClicked();
_local2 = 6;
while (_local2 >= 2) {
_local3 = boardFace[("b" + _local2)];
if (((((_local3.hitTestPoint(mouseX, mouseY, true)) && (_local3.visible))) && ((ballChosen == 0)))){
ballHovered = _local2;
if (clicked == 1){
_local4 = 2;
while (_local4 >= 0) {
if (boardBallSeqList[_local4] == _local2){
boardBallSeqList[_local4] = 1;
};
_local4--;
};
ballChosen = _local2;
};
};
_local2--;
};
if (ballChosen != 0){
_local3 = boardFace[("b" + ballChosen)];
_local3.x = (mouseX - 40);
_local3.y = (mouseY - boardFace.y);
if (clicked == 0){
_local5 = false;
_local4 = 2;
while (_local4 >= 0) {
_local6 = boardFace[("bs" + _local4)];
if (JMath.getHyp(_local6.x, _local6.y, _local3.x, _local3.y) < 65){
_local3.x = _local6.x;
_local3.y = _local6.y;
if (boardBallSeqList[_local4] != 1){
boardFace[("b" + boardBallSeqList[_local4])].x = boardFace[("bh" + boardBallSeqList[_local4])].x;
boardFace[("b" + boardBallSeqList[_local4])].y = boardFace[("bh" + boardBallSeqList[_local4])].y;
};
boardBallSeqList[_local4] = ballChosen;
ballChosen = 0;
_local5 = true;
};
_local4--;
};
if (!_local5){
_local3.x = boardFace[("bh" + ballChosen)].x;
_local3.y = boardFace[("bh" + ballChosen)].y;
ballChosen = 0;
};
};
};
}
public function moreBat(_arg1:MouseEvent){
if ((((levelSkills > 0)) && ((levelBatter < 9)))){
levelSkills = (levelSkills - 1);
levelBatter = (levelBatter + 1);
};
}
public function doneStuff(_arg1:MouseEvent){
MovieClip(parent).setBallSeq(boardBallSeqList, levelBatter, levelBowler);
deleteMe();
}
public function deleteMe(){
removeEventListener(Event.ENTER_FRAME, moveMe);
parent.removeChild(this);
}
public function nextStuff(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
var _local4:*;
boardBallSeqList = MovieClip(parent).getBallSeq();
_local2 = 3;
while (_local2 >= 0) {
ballChosen = boardBallSeqList[_local2];
if (ballChosen != 1){
boardFace[("b" + ballChosen)].x = boardFace[("bs" + _local2)].x;
boardFace[("b" + ballChosen)].y = boardFace[("bs" + _local2)].y;
};
boardFace[("bs" + _local2)].gotoAndStop(1);
_local2--;
};
_local3 = 6;
while (_local3 >= 2) {
trace(("BALL ALLOWED" + Arrays.levelDATA[MovieClip(parent).level][0]));
_local4 = boardFace[("b" + _local3)];
if (_local3 > Arrays.levelDATA[MovieClip(parent).level][0]){
_local4.visible = false;
};
_local3--;
};
boardY = -400;
ballChosen = 0;
}
public function fixBat(_arg1:MouseEvent){
if ((((levelSkills > 0)) && ((MovieClip(parent).batDamage == 2)))){
levelSkills = (levelSkills - 1);
MovieClip(parent).batDamage = 1;
};
}
public function moreBowl(_arg1:MouseEvent){
if ((((levelSkills > 0)) && ((levelBowler < 9)))){
levelSkills = (levelSkills - 1);
levelBowler = (levelBowler + 1);
};
}
}
}//package
Section 36
//Bowler (Bowler)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Bowler extends MovieClip {
private var frame;
private var lastTime:int;
private var dy:Number;
public var body:MovieClip;
private var dx:Number;
public function Bowler(_arg1:Number, _arg2:Number){
addFrameScript(214, frame215, 215, frame216, 216, frame217);
dx = -8;
dy = -24;
this.y = _arg1;
this.x = _arg2;
frame = 1;
this.gotoAndStop("wait");
addEventListener(Event.ENTER_FRAME, moveBowler);
lastTime = getTimer();
}
function frame215(){
gotoAndPlay(1);
}
function frame217(){
stop();
}
function frame216(){
stop();
}
public function moveBowler(_arg1:Event){
frame = (frame + 1);
if ((((((this.currentFrame > 15)) && ((this.currentFrame < 139)))) || ((((this.currentFrame > 145)) && ((this.currentFrame < 215)))))){
this.body.gotoAndStop(frame);
};
if (frame > 8){
frame = 0;
};
}
}
}//package
Section 37
//GUI (GUI)
package {
import flash.display.*;
import flash.text.*;
public dynamic class GUI extends MovieClip {
public var ray:MovieClip;
public var hsClip:MovieClip;
public var score:TextField;
public var playBut:BasicButton;
public var getReady:MovieClip;
public function GUI(){
addFrameScript(25, frame26, 57, frame58, 70, frame71, 83, frame84, 96, frame97);
}
function frame71(){
stop();
}
function frame84(){
stop();
}
function frame97(){
stop();
}
function frame26(){
stop();
}
function frame58(){
stop();
}
}
}//package
Section 38
//Instructions (Instructions)
package {
import flash.display.*;
import flash.events.*;
public class Instructions extends MovieClip {
public var moreBut:SimpleButton;
public var instructBut:BasicButton;
public function Instructions(){
addFrameScript(0, frame1, 1, frame2);
addEventListener(Event.ENTER_FRAME, moveMe);
this.instructBut.addEventListener(MouseEvent.CLICK, doneStuff);
this.moreBut.addEventListener(MouseEvent.CLICK, goMore);
}
public function moveMe(_arg1:Event){
}
public function goMore(_arg1:MouseEvent){
MovieClip(parent).goMouse2();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function doneStuff(_arg1:MouseEvent){
if (this.currentFrame == 2){
this.gotoAndStop(1);
return;
};
if (this.currentFrame == 1){
this.gotoAndPlay(2);
};
}
public function deleteMe(){
removeEventListener(Event.ENTER_FRAME, moveMe);
parent.removeChild(this);
}
}
}//package
Section 39
//JMath (JMath)
package {
public class JMath {
public function JMath(){
trace("init");
}
public function rangeTest(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int){
if ((((Math.abs((_arg1 - _arg3)) < _arg5)) && ((Math.abs((_arg2 - _arg4)) < _arg5)))){
return (true);
};
return (false);
}
public static function getX(_arg1:int){
var _local2:*;
_local2 = (_arg1 * (Math.PI / 180));
return (Math.sin(_local2));
}
public static function getY(_arg1:int){
var _local2:*;
_local2 = (_arg1 * (Math.PI / 180));
return (-(Math.cos(_local2)));
}
public static function getHyp(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
var _local5:*;
_local5 = Math.sqrt((((_arg1 - _arg3) * (_arg1 - _arg3)) + ((_arg2 - _arg4) * (_arg2 - _arg4))));
return (_local5);
}
public static function getRand(_arg1){
var _local2:*;
_local2 = Math.floor((Math.random() * _arg1));
return (_local2);
}
public static function collCheck(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int, _arg9:int){
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
_local10 = (_arg2 - _arg1);
_local11 = (_arg4 - _arg3);
_local12 = (_arg6 - _arg5);
_local13 = (_arg8 - _arg7);
_local14 = (((-(_local11) * (_arg1 - _arg5)) + (_local10 * (_arg3 - _arg7))) / ((-(_local12) * _local11) + (_local10 * _local13)));
_local15 = (((_local12 * (_arg3 - _arg7)) - (_local13 * (_arg1 - _arg5))) / ((-(_local12) * _local11) + (_local10 * _local13)));
_local16 = -1;
if ((((((((_local14 > 0)) && ((_local14 < 1)))) && ((_local15 > 0)))) && ((_local15 < 1)))){
_local16 = _local15;
};
return (_local16);
}
public static function getAngle(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
var _local5:*;
var _local6:*;
_local5 = Math.sqrt((((_arg1 - _arg3) * (_arg1 - _arg3)) + ((_arg2 - _arg4) * (_arg2 - _arg4))));
_local6 = ((180 / Math.PI) * Math.acos(((_arg2 - _arg4) / _local5)));
if (_arg1 > _arg3){
_local6 = (360 - ((180 / Math.PI) * Math.acos(((_arg2 - _arg4) / _local5))));
};
return (_local6);
}
}
}//package
Section 40
//MBSplash (MBSplash)
package {
import flash.display.*;
public dynamic class MBSplash extends MovieClip {
public var exp:MovieClip;
public function MBSplash(){
addFrameScript(170, frame171);
}
function frame171(){
stop();
}
}
}//package
Section 41
//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 42
//monkey (monkey)
package {
import flash.display.*;
public dynamic class monkey extends MovieClip {
}
}//package
Section 43
//More (More)
package {
import flash.display.*;
public dynamic class More extends MovieClip {
public var moreBut:BasicButton;
public function More(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 44
//Particle (Particle)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Particle extends MovieClip {
private var bodyType:Number;
private var parType:Number;
private var ground:Number;
private var hitTimer:Number;
private var dy:Number;
private var grav:Number;
private var type:Number;
public var body:MovieClip;
private var dx:Number;
private var lastTime:int;
public function Particle(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int, _arg6:Number){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
dx = (_arg1 * JMath.getX(_arg2));
dy = (_arg1 * JMath.getY(_arg2));
grav = _arg6;
hitTimer = 200;
parType = _arg5;
bodyType = (1 + JMath.getRand(4));
ground = (380 + JMath.getRand(15));
this.y = _arg3;
this.x = _arg4;
this.gotoAndStop(parType);
addEventListener(Event.ENTER_FRAME, moveMe);
lastTime = getTimer();
}
public function moveMe(_arg1:Event){
var _local2:*;
var _local3:*;
this.x = (this.x + dx);
this.y = (this.y + dy);
_local2 = JMath.getHyp(0, 0, dx, dy);
_local3 = JMath.getAngle(0, 0, dx, dy);
dy = (dy + grav);
switch (parType){
case 1:
if (grav != 0){
if (_local2 < 1){
_local2 = 1;
};
if (_local2 > 5){
_local2 = 5;
};
this.scaleY = _local2;
this.rotation = _local3;
if (this.y > ground){
this.y = ground;
this.scaleY = 1;
this.scaleX = 3;
this.rotation = (grav = (dx = (dy = 0)));
};
};
break;
case 2:
this.rotation = (this.rotation + (dx * 5));
this.body.gotoAndStop(bodyType);
break;
case 3:
this.rotation = (this.rotation + (dx * 5));
break;
case 4:
break;
case 5:
break;
case 6:
this.rotation = (this.rotation + (dx * 5));
break;
case 7:
this.rotation = (this.rotation + (dx * 5));
this.body.gotoAndStop(bodyType);
break;
};
if (this.y > ground){
this.y = ground;
dx = (dx * 0.5);
dy = (-(dy) / 2);
if (Math.abs(dy) < 1){
dy = (grav = (dx = 0));
};
};
hitTimer = (hitTimer - 1);
if (hitTimer < 20){
this.alpha = (hitTimer / 20);
};
if (hitTimer == 0){
deleteMe();
};
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
public function hitMe(_arg1:Event){
var _local2:*;
var _local3:*;
if ((hitTimer < 1)){
hitTimer = 100;
_local2 = JMath.getAngle(MovieClip(parent).myPlayer.x, (MovieClip(parent).myPlayer.y - 70), this.x, this.y);
_local3 = (20 - Math.abs((this.y - (MovieClip(parent).myPlayer.y - 70))));
if (_local3 < 0){
_local3 = 0;
};
dx = ((10 + _local3) * JMath.getX(_local2));
dy = ((10 + _local3) * JMath.getY(_local2));
};
}
function frame2(){
stop();
}
public function deleteMe(){
removeEventListener(Event.ENTER_FRAME, moveMe);
parent.removeChild(this);
}
}
}//package
Section 45
//Player (Player)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Player extends MovieClip {
public var bat:MovieClip;
private var lastTime:int;
public var whoosh:MovieClip;
private var dx:Number;
private var dy:Number;
public function Player(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number){
addFrameScript(12, frame13, 27, frame28, 73, frame74);
dx = -8;
dy = -24;
this.y = _arg3;
this.x = _arg4;
this.gotoAndStop(1);
addEventListener(Event.ENTER_FRAME, movePlayer);
lastTime = getTimer();
}
public function movePlayer(_arg1:Event){
}
function frame74(){
stop();
}
public function hitPlayer(_arg1:Event){
trace("VAG");
}
function frame13(){
gotoAndPlay(1);
}
public function deleteTrig(){
removeEventListener(Event.ENTER_FRAME, moveTrig);
parent.removeChild(this);
}
public function moveTrig(_arg1:Event){
var _local2:int;
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
}
public function TrigHit(){
removeEventListener(Event.ENTER_FRAME, moveTrig);
MovieClip(parent).removeTrig(this);
}
function frame28(){
gotoAndPlay(1);
}
}
}//package
Section 46
//s_cheer (s_cheer)
package {
import flash.media.*;
public dynamic class s_cheer extends Sound {
}
}//package
Section 47
//s_explode (s_explode)
package {
import flash.media.*;
public dynamic class s_explode extends Sound {
}
}//package
Section 48
//s_fire (s_fire)
package {
import flash.media.*;
public dynamic class s_fire extends Sound {
}
}//package
Section 49
//s_freakDie (s_freakDie)
package {
import flash.media.*;
public dynamic class s_freakDie extends Sound {
}
}//package
Section 50
//s_gong (s_gong)
package {
import flash.media.*;
public dynamic class s_gong extends Sound {
}
}//package
Section 51
//s_hitActivate (s_hitActivate)
package {
import flash.media.*;
public dynamic class s_hitActivate extends Sound {
}
}//package
Section 52
//s_hitFire (s_hitFire)
package {
import flash.media.*;
public dynamic class s_hitFire extends Sound {
}
}//package
Section 53
//s_hitGround (s_hitGround)
package {
import flash.media.*;
public dynamic class s_hitGround extends Sound {
}
}//package
Section 54
//s_hitMetal (s_hitMetal)
package {
import flash.media.*;
public dynamic class s_hitMetal extends Sound {
}
}//package
Section 55
//s_hitSplat (s_hitSplat)
package {
import flash.media.*;
public dynamic class s_hitSplat extends Sound {
}
}//package
Section 56
//s_hitWood (s_hitWood)
package {
import flash.media.*;
public dynamic class s_hitWood extends Sound {
}
}//package
Section 57
//s_hitZom (s_hitZom)
package {
import flash.media.*;
public dynamic class s_hitZom extends Sound {
}
}//package
Section 58
//s_levelUp (s_levelUp)
package {
import flash.media.*;
public dynamic class s_levelUp extends Sound {
}
}//package
Section 59
//s_music1 (s_music1)
package {
import flash.media.*;
public dynamic class s_music1 extends Sound {
}
}//package
Section 60
//s_music2 (s_music2)
package {
import flash.media.*;
public dynamic class s_music2 extends Sound {
}
}//package
Section 61
//s_pop (s_pop)
package {
import flash.media.*;
public dynamic class s_pop extends Sound {
}
}//package
Section 62
//s_zombie1 (s_zombie1)
package {
import flash.media.*;
public dynamic class s_zombie1 extends Sound {
}
}//package
Section 63
//s_zombie2 (s_zombie2)
package {
import flash.media.*;
public dynamic class s_zombie2 extends Sound {
}
}//package
Section 64
//s_zombie3 (s_zombie3)
package {
import flash.media.*;
public dynamic class s_zombie3 extends Sound {
}
}//package
Section 65
//Trig (Trig)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Trig extends MovieClip {
private var lastTime:int;
private var dy:Number;
private var dx:Number;
public function Trig(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number){
dx = -8;
dy = -24;
this.visible = false;
this.y = _arg3;
this.x = _arg4;
this.gotoAndStop(1);
addEventListener(Event.ENTER_FRAME, moveTrig);
lastTime = getTimer();
}
public function miveTrig(_arg1:Event){
trace("htrtho");
}
public function deleteTrig(){
removeEventListener(Event.ENTER_FRAME, moveTrig);
parent.removeChild(this);
}
public function moveTrig(_arg1:Event){
var _local2:int;
var _local3:*;
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
this.x = (this.x + dx);
this.y = (this.y + dy);
if ((((this.x < 0)) || ((this.x > 400)))){
dx = -(dx);
_local3 = (((this.y / 400) * 50) - 25);
MovieClip(parent).newStar(_local3);
};
if ((((this.y < 0)) || ((this.y > 400)))){
dy = -(dy);
this.scaleX = (this.scaleX - (2 / 100));
if (this.scaleX < (10 / 100)){
this.scaleX = (100 / 100);
MovieClip(parent).newTrig();
};
};
}
public function TrigHit(){
removeEventListener(Event.ENTER_FRAME, moveTrig);
MovieClip(parent).removeTrig(this);
}
}
}//package
Section 66
//Umpire (Umpire)
package {
import flash.display.*;
public dynamic class Umpire extends MovieClip {
public function Umpire(){
addFrameScript(0, frame1, 44, frame45, 91, frame92, 92, frame93);
}
function frame93(){
stop();
}
function frame1(){
stop();
}
function frame92(){
gotoAndStop(1);
}
function frame45(){
gotoAndStop(1);
}
}
}//package
Section 67
//Zombie (Zombie)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Zombie extends MovieClip {
public var power:int;
private var noise:int;
private var powerMax:int;
private var zomType:Number;
private var odx:Number;
public var attack:Boolean;
private var myName:String;
private var lastTime:int;
private var hitTimer:Number;
public var meter:MovieClip;
private var grav:Number;
public var body:MovieClip;
private var dx:Number;
private var dy:Number;
private var bombTimer:Number;
public var spBub:MovieClip;
public function Zombie(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){
dx = -(_arg2);
dy = 0;
grav = 0;
power = _arg1;
powerMax = _arg1;
hitTimer = 0;
bombTimer = 0;
zomType = _arg5;
attack = false;
myName = String(Arrays.zomDATA[_arg5][0]);
noise = (1 + JMath.getRand(3));
if (_arg5 == 8){
noise = 4;
};
if (_arg5 < 3){
myName = String(Arrays.deadDATA[JMath.getRand(Arrays.deadDATA.length)]);
};
this.y = _arg3;
this.x = _arg4;
this.meter.alpha = 0;
this.gotoAndPlay(1);
this.body.head.gotoAndStop(_arg5);
this.body.body.gotoAndStop(_arg5);
this.body.head2.visible = false;
this.scaleX = _arg6;
this.scaleY = _arg6;
addEventListener(Event.ENTER_FRAME, moveMe);
lastTime = getTimer();
}
public function removeMeGO(){
removeEventListener(Event.ENTER_FRAME, moveMe);
parent.removeChild(this);
}
public function removeMe(){
MovieClip(parent).incScore(null, 1);
MovieClip(parent).showRay((("Thats the last we'll see of " + this.myName) + " today."));
removeEventListener(Event.ENTER_FRAME, moveMe);
MovieClip(parent).removeZombie(this);
parent.removeChild(this);
}
public function moveMe(_arg1:Event){
var _local2:*;
var _local3:*;
if (this.meter.alpha > 0){
this.meter.alpha = (this.meter.alpha - 0.05);
this.meter.meterClip.meterLine.width = (50 * (power / powerMax));
};
if ((((((((JMath.getRand(100) > 90)) && ((this.zomType == 4)))) && ((grav == 0)))) && ((this.body.currentFrame < 40)))){
dy = -10;
grav = 0.5;
};
if (bombTimer > 0){
bombTimer = (bombTimer + 1);
_local2 = ((this.y + this.body.y) + (this.body.blood.y * this.scaleX));
if (bombTimer == 30){
power = (power - 50);
bombTimer = 0;
this.body.blood.gotoAndStop(1);
MovieClip(parent).sndHitActivate.play();
MovieClip(parent).sndExplode.play();
MovieClip(parent).makeParticles(0, 0, _local2, this.x, 5, 0, 1);
MovieClip(parent).makeParticles(3, 0, _local2, this.x, 2, 0.3, 3);
hitTimer = 30;
if ((((this.body.blood.y < -90)) && ((zomType < 3)))){
MovieClip(parent).incScore(null, 5);
trace("6!!!!");
batMe(null);
};
if ((((this.body.blood.y < -90)) && ((zomType == 8)))){
MovieClip(parent).incScore(null, 5);
trace("6!!!!");
batMe(null);
};
};
if (bombTimer == 200){
power = (power - 90);
bombTimer = 0;
MovieClip(parent).sndExplode.play();
MovieClip(parent).makeParticles(0, 0, (_local2 - 30), this.x, 5, 0, 1);
MovieClip(parent).makeParticles(0, 0, _local2, this.x, 5, 0, 1);
MovieClip(parent).makeParticles(3, 0, _local2, this.x, 2, 0.3, 3);
if (bombTimer == 0){
this.body.blood.gotoAndStop(1);
if (power < 1){
MovieClip(parent).makeParticles(5, 0, ((this.y - this.body.y) - 30), this.x, 1, 0.3, 3);
removeMe();
};
};
};
};
if ((((this.body.bgFx.currentFrame > 1)) && ((this.body.bgFx.currentFrame < 40)))){
power = (power - 1);
};
if ((((power < 1)) && ((hitTimer < 900)))){
hitTimer = 990;
this.body.gotoAndPlay("die");
this.body.blood.visible = false;
this.spBub.gotoAndPlay(2);
this.spBub.bubText.comm.text = String("STREUUUTH !");
};
if (hitTimer > 0){
hitTimer = (hitTimer - 1);
this.body.rotation = hitTimer;
if (hitTimer > 899){
this.body.rotation = 0;
if (this.body.currentFrame == 95){
removeMe();
};
};
};
if (grav != 0){
this.body.y = (this.body.y + dy);
dy = (dy + grav);
if ((((dy > 0)) && ((this.body.y > 0)))){
this.body.y = 0;
dy = 0;
grav = 0;
};
};
if (hitTimer < 1){
this.x = (this.x + dx);
_local3 = MovieClip(parent).getZombDeathDist();
if ((((((((this.x < (_local3 + MovieClip(parent).myPlayer.x))) && ((grav == 0)))) && (!((zomType == 8))))) && ((this.body.currentFrame < 40)))){
MovieClip(parent).playerDead(null);
this.body.gotoAndPlay("attack");
this.body.head2.gotoAndStop(zomType);
this.body.head.visible = false;
this.body.head2.visible = true;
attack = true;
hitTimer = -1000;
dx = 0;
dy = 0;
};
if (this.x < -100){
removeMe();
};
};
if (((attack) && ((JMath.getRand(20) > 17)))){
MovieClip(parent).playerEaten(null);
};
}
public function hitMe(_arg1:Event, _arg2:int, _arg3:int, _arg4:int){
if (hitTimer < 1){
hitTimer = _arg3;
if ((((_arg3 > 10)) && ((grav == 0)))){
MovieClip(parent).groan(noise);
this.spBub.gotoAndPlay(2);
this.spBub.bubText.comm.text = String("BRAINNNSS !");
if (zomType == 8){
this.spBub.bubText.comm.text = String("Aw,REK AWF!");
};
};
switch (_arg4){
case 1:
if (bombTimer == 0){
this.body.blood.gotoAndPlay("blood");
};
if ((((((_arg2 > 87)) && ((_arg4 < 3)))) && ((_arg3 > 10)))){
MovieClip(parent).sndHitSplat.play();
if ((((zomType == 1)) || ((zomType == 8)))){
batMe(null);
MovieClip(parent).incScore(null, 3);
trace("4!!!");
MovieClip(parent).makeParticles(6, 45, ((this.y - this.body.y) - 110), this.x, 6, 0.6, 0);
};
if (zomType == 2){
zomType = 1;
this.body.head.gotoAndStop(zomType);
MovieClip(parent).makeParticles(3, 15, ((this.y - this.body.y) - 110), this.x, 7, 0.3, 2);
};
};
break;
case 2:
if (bombTimer == 0){
this.body.blood.gotoAndPlay("blood");
};
break;
case 3:
if (bombTimer == 0){
this.body.blood.gotoAndStop("sticky");
bombTimer = 1;
};
_arg3 = 0;
break;
case 4:
MovieClip(parent).sndFire.play();
this.body.bgFx.gotoAndPlay("fire");
break;
case 5:
bombTimer = 199;
break;
case 6:
bombTimer = 199;
break;
};
this.body.blood.y = (-((_arg2 * (1 / this.scaleY))) - this.body.y);
power = (power - _arg3);
this.meter.alpha = 2;
};
}
public function batMe(_arg1:Event){
var _local2:*;
power = (power - 150);
_local2 = ((this.y + this.body.y) + (this.body.blood.y * this.scaleX));
MovieClip(parent).makeParticles(5, 0, _local2, this.x, 1, 0.3, 5);
if ((((hitTimer < 800)) && ((power < 0)))){
hitTimer = 990;
dx = 0;
this.body.gotoAndPlay("die");
this.body.head.visible = false;
};
}
public function getType(){
return (zomType);
}
public function getMeDx(_arg1:Event){
trace(("mydx " + dx));
return (dx);
}
}
}//package