Frame 1
function preloader() {
var _local2 = this;
var mcContent = _local2.mcLoader.mcContent;
var data_txt = _local2.mcLoader.data_txt;
var k = 0;
var _local6 = _local2._currentframe + 1;
_local2.onEnterFrame = function () {
var _local4 = this.getBytesLoaded();
var _local3 = this.getBytesTotal();
if ((_local4 > 10) && (_local3 > 15)) {
var _local2 = Math.floor((_local4 / _local3) * 100);
mcContent._xscale = _local2;
data_txt.text = String(_local2) + "%";
if (_local2 >= 100) {
k++;
if (k > 20) {
delete this.onEnterFrame;
gotoAndPlay ("Start");
}
}
}
};
}
Stage.showMenu = false;
_global.gameData = new Object();
gameData.gameid = 573;
gameData.userid = "";
gameData.flag = false;
gameData.score = 0;
gameData.useridURL = "https://www.zapak.com/getuid.z";
gameData.scoreBoardURL = "https://www.zapak.com/getxmlscore.z";
preloader();
stop();
stopAllSounds();
Frame 2
Frame 101
stopAllSounds();
MovieClip.prototype.addSound = function (a) {
var snd_mc = addClip("snd_mc", this);
var a_snd = new Sound(snd_mc);
a_snd.onSoundComplete = function () {
delete a_snd;
snd_mc.removeMovieClip();
};
a_snd.attachSound(a);
a_snd.start();
};
Button.prototype.addSound = MovieClip.prototype.addSound;
ASSetPropFlags(MovieClip.prototype, "addSound", 1);
Frame 102
stop();
var select;
btnHelp.onRelease = function () {
this._parent.gotoAndPlay("help");
select = "help";
};
Frame 103
stop();
mcHelp.gotoAndPlay(3);
Frame 104
function timeer() {
var _local1 = new Date();
var _local12 = _local1.getUTCFullYear();
var _local2 = _local1.getUTCMonth() + 1;
var _local10 = String(_local2);
if (_local2 < 10) {
_local10 = String("0" + _local2);
}
var _local3 = _local1.getUTCDate();
var _local11 = String(_local3);
if (_local3 < 10) {
_local11 = String("0" + _local3);
}
var _local6 = _local1.getUTCHours();
var _local7 = String(_local6);
if (_local6 < 10) {
_local7 = String("0" + _local6);
}
var _local4 = _local1.getUTCMinutes();
var _local8 = String(_local4);
if (_local4 < 10) {
_local8 = String("0" + _local4);
}
var _local5 = _local1.getUTCSeconds();
var _local9 = String(_local5);
if (_local5 < 10) {
_local9 = String("0" + _local5);
}
startTime_str = String(((((((((((_local12 + "-") + _local10) + "-") + _local11) + "T") + _local7) + ":") + _local8) + ":") + _local9) + "Z");
}
fscommand ("showmenu", "false");
var startTime_str;
_root.gameover = false;
Instance of Symbol 175 MovieClip in Frame 104
onClipEvent (enterFrame) {
this.gotoAndStop(_root.level);
}
Frame 105
stop();
_root.level = 1;
_root.score1 = (_root.score2 = (_root.score3 = (_root.score4 = (_root.score5 = (_root.score6 = 0)))));
Frame 106
delete onEnterFrame;
stop();
_root.level = 1;
_root.count = 0;
timeer();
_root.totalarrow = 10;
_root.water_mc._visible = false;
var i = 1;
while (i <= 5) {
_root.ship = eval ("ship" + i);
_root.ship.onEnterFrame = function () {
if (!_root.gameover) {
this._y = this._y + (random(10) * 0.03);
if (this._y > 265) {
_root.gameover = true;
_root.gameover_mc.gotoAndStop(2);
_root.gameover_txt.gotoAndStop(2);
}
this._xscale = this._xscale + 0.03;
this._yscale = this._yscale + 0.03;
if ((this.hit.hitTest(_root.mc) and (_root.mc._height <= 18)) and (_root.hit eq false)) {
_root.hit = true;
_root.count = _root.count + 1;
this.onEnterFrame = function () {
this._y = this._y - 5;
this._xscale = this._xscale - 3;
this._yscale = this._yscale - 3;
if (this._yscale <= 20) {
trace("_root.count=" + _root.count);
if (_root.count >= 5) {
_root.level = 2;
_root.score1 = _root.val;
_root.gotoAndStop("levelcomplete");
}
this._visible = false;
}
};
}
}
};
i++;
}
_root.allsound = new Sound();
var frameToPlay;
Frame 109
delete onEnterFrame;
stop();
_root.level = 2;
_root.count = 0;
_root.totalarrow = 10;
_root.water_mc._visible = false;
var i = 0;
while (i <= 6) {
_root.gal = eval ("gal" + i);
_root.gal.onEnterFrame = function () {
if (!_root.gameover) {
this._y = this._y - (random(10) * 0.02);
trace("y=" + this._y);
if (this._y < 79) {
_root.gameover = true;
_root.gameover_mc.gotoAndStop(2);
_root.gameover_txt.gotoAndStop(2);
}
this._xscale = this._xscale - 0.03;
this._yscale = this._yscale - 0.03;
if ((this.hit.hitTest(_root.mc.hit) and (_root.mc._height <= 16)) and (_root.hit eq false)) {
_root.hit = true;
_root.count = _root.count + 1;
if (_root.count >= 5) {
_root.score2 = _root.val;
_root.level = 3;
_root.gotoAndStop("levelcomplete");
}
this.onEnterFrame = function () {
if (_root.hit) {
_root.mc._y = _root.mc._y + 50;
}
if (_root.mc._y > 500) {
_root.mc._y._visible = false;
}
this._y = this._y + 50;
if (this._x > 250) {
this._x = this._x - 10;
} else if (this._x < 250) {
this._x = this._x + 10;
}
};
}
}
};
i++;
}
stop();
var frameToPlay;
Frame 112
delete onEnterFrame;
_root.level = 3;
_root.count = 0;
_root.totalarrow = 10;
_root.water_mc._visible = false;
var i = 1;
while (i <= 9) {
_root.ship = eval ("ship" + i);
_root.ship.onEnterFrame = function () {
if (!_root.gameover) {
this._y = this._y + (random(10) * 0.03);
if (this._y > 265) {
_root.gameover = true;
_root.gameover_mc.gotoAndStop(2);
_root.gameover_txt.gotoAndStop(2);
}
this._xscale = this._xscale + 0.03;
this._yscale = this._yscale + 0.03;
if ((this.hit.hitTest(_root.mc) and (_root.mc._height <= 18)) and (_root.hit == false)) {
_root.hit = true;
_root.count = _root.count + 1;
this.onEnterFrame = function () {
this._y = this._y - 5;
this._xscale = this._xscale - 3;
this._yscale = this._yscale - 3;
if (this._yscale <= 20) {
if (_root.count >= 6) {
_root.score3 = _root.val;
_root.level = 4;
_root.gotoAndStop("levelcomplete");
}
this._visible = false;
}
};
}
}
};
i++;
}
var frameToPlay;
Frame 115
delete onEnterFrame;
stop();
_root.level = 4;
_root.count = 0;
_root.totalarrow = 10;
_root.water_mc._visible = false;
var i = 1;
while (i <= 10) {
_root.gal = eval ("gal" + i);
_root.gal.onEnterFrame = function () {
if (!_root.gameover) {
this._y = this._y - (random(10) * 0.02);
trace("y=" + this._y);
if (this._y < 79) {
_root.gameover = true;
_root.gameover_mc.gotoAndStop(2);
_root.gameover_txt.gotoAndStop(1);
}
this._xscale = this._xscale - 0.03;
this._yscale = this._yscale - 0.03;
if ((this.hit.hitTest(_root.mc.hit) and (_root.mc._height <= 16)) and (_root.hit eq false)) {
_root.hit = true;
_root.count = _root.count + 1;
if (_root.count >= 6) {
_root.score4 = _root.val;
_root.level = 5;
_root.gotoAndStop("levelcomplete");
}
this.onEnterFrame = function () {
this._y = this._y + 50;
if (_root.hit) {
_root.mc._y = _root.mc._y + 50;
}
if (_root.mc._y > 500) {
_root.mc._y._visible = false;
}
if (this._x > 250) {
this._x = this._x - 10;
} else if (this._x < 250) {
this._x = this._x + 10;
}
};
}
}
};
i++;
}
stop();
var frameToPlay;
Frame 118
delete onEnterFrame;
stop();
_root.level = 5;
_root.count = 0;
_root.totalarrow = 10;
_root.water_mc._visible = false;
var i = 1;
while (i <= 9) {
_root.ship = eval ("ship" + i);
_root.ship.onEnterFrame = function () {
if (!_root.gameover) {
this._y = this._y + (random(10) * 0.03);
if (this._y > 265) {
_root.gameover = true;
_root.gameover_mc.gotoAndStop(2);
_root.gameover_txt.gotoAndStop(2);
}
this._xscale = this._xscale + 0.03;
this._yscale = this._yscale + 0.03;
trace(" _root.mc=" + _root.mc._height);
if ((this.hit.hitTest(_root.mc) and (_root.mc._height <= 18)) and (_root.hit eq false)) {
_root.hit = true;
_root.pop_mc._x = this._x;
_root.pop_mc._y = this._y + 50;
_root.pop_mc.play();
_root.count = _root.count + 1;
this.onEnterFrame = function () {
this._y = this._y - 5;
this._xscale = this._xscale - 3;
this._yscale = this._yscale - 3;
if (this._yscale <= 20) {
trace("_root.count=" + _root.count);
if (_root.count >= 8) {
_root.level = 2;
_root.score5 = _root.val;
_root.gotoAndStop("levelcomplete");
}
this._visible = false;
}
};
}
}
};
i++;
}
var frameToPlay;
Frame 121
delete onEnterFrame;
stop();
_root.level = 6;
_root.count = 0;
_root.totalarrow = 10;
_root.water_mc._visible = false;
var i = 1;
while (i <= 10) {
_root.gal = eval ("gal" + i);
_root.gal.onEnterFrame = function () {
if (!_root.gameover) {
this._y = this._y - (random(10) * 0.02);
trace("y=" + this._y);
if (this._y < 79) {
_root.gameover = true;
_root.gameover_mc.gotoAndStop(2);
_root.gameover_txt.gotoAndStop(1);
}
this._xscale = this._xscale - 0.03;
this._yscale = this._yscale - 0.03;
if ((this.hit.hitTest(_root.mc.hit) and (_root.mc._height <= 16)) and (_root.hit eq false)) {
_root.hit = true;
_root.count = _root.count + 1;
if (_root.count >= 8) {
_root.score6 = _root.val;
_root.level = 5;
_root.gotoAndStop("levelcomplete");
}
this.onEnterFrame = function () {
this._y = this._y + 50;
if (_root.hit) {
_root.mc._y = _root.mc._y + 50;
}
if (_root.mc._y > 500) {
_root.mc._y._visible = false;
}
if (this._x > 250) {
this._x = this._x - 10;
} else if (this._x < 250) {
this._x = this._x + 10;
}
};
}
}
};
i++;
}
stop();
var frameToPlay;
Frame 125
stop();
Instance of Symbol 175 MovieClip in Frame 125
onClipEvent (enterFrame) {
this.gotoAndStop(_root.level);
}
Frame 128
stop();
_root.score = ((((_root.score1 + _root.score2) + _root.score3) + _root.score4) + _root.score5) + _root.score6;
Frame 130
stop();
commentTxt.text = "SUBMITTING SCORE";
gameId = 916;
var myDate = new Date();
_root.gettime = ((((((("2007-11-" + myDate.getDay()) + "T") + myDate.getHours()) + ":") + myDate.getMinutes()) + ":") + myDate.getSeconds()) + "Z";
trace("_root.gettime=" + _root.gettime);
trace("score " + _root.score);
xmlString = ((((("<?xml version=\"1.0\"?><zapakscorecaptureAPI version=\"1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><game evttype=\"end\" gameid=\"" + _root.gameId) + "\" gamestarttime=\"") + startTime_str) + "\" getscore=\"0\" getboard=\"1\"></game><scoredata><score>") + _root.score) + "</score></scoredata></zapakscorecaptureAPI>";
trace(xmlString);
scoreUrl = "https://www.zapak.com/getxmlscore.z";
returnXML = new XML();
sendXML = new XML(xmlString);
sendXML.parseXML();
sendXML.sendAndLoad(scoreUrl, returnXML);
returnXML.onLoad = function (success) {
trace(success);
trace("return XML : " + returnXML.toString());
outputTxt.text = returnXML.toString();
arrLen = returnXML.firstChild.childNodes[0].childNodes.length;
var _local1 = 0;
while (_local1 < arrLen) {
if (returnXML.firstChild.childNodes[0].childNodes[_local1].nodeName == "leaderboard") {
arrNum = _local1;
}
_local1++;
}
arrLength = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes.length;
_local1 = 0;
while (_local1 < arrLength) {
if (_local1 == 0) {
dayScore = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[_local1].firstChild;
} else if (_local1 == 1) {
topScore = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[_local1];
}
_local1++;
}
if (returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[2].attributes.userid != undefined) {
currentUser1 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[2].attributes.userid;
currentScore1 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[2].childNodes[1].firstChild;
}
if (returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[3].attributes.userid != undefined) {
currentUser2 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[3].attributes.userid;
currentScore2 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[3].childNodes[1].firstChild;
}
if (returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[4].attributes.userid != undefined) {
currentUser3 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[4].attributes.userid;
currentScore3 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[4].childNodes[1].firstChild;
}
if (returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[5].attributes.userid != undefined) {
currentUser4 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[5].attributes.userid;
currentScore4 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[5].childNodes[1].firstChild;
}
if (returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[6].attributes.userid != undefined) {
currentUser5 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[6].attributes.userid;
currentScore5 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[6].childNodes[1].firstChild;
}
if (returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[7].attributes.userid != undefined) {
currentUser6 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[7].attributes.userid;
currentScore6 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[7].childNodes[1].firstChild;
}
if (returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[8].attributes.userid != undefined) {
currentUser7 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[8].attributes.userid;
currentScore7 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[8].childNodes[1].firstChild;
}
if (returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[9].attributes.userid != undefined) {
currentUser8 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[9].attributes.userid;
currentScore8 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[9].childNodes[1].firstChild;
}
if (returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[10].attributes.userid != undefined) {
currentUser9 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[10].attributes.userid;
currentScore9 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[10].childNodes[1].firstChild;
}
if (returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[11].attributes.userid != undefined) {
currentUser10 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[11].attributes.userid;
currentScore10 = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[11].childNodes[1].firstChild;
}
commentTxt.text = "HIGHSCORES";
};
returnXML.onHTTPStatus = function (status_code) {
trace("status code : " + status_code);
};
stop();
Frame 194
stop();
Symbol 23 MovieClip Frame 1
mcContent._xscale = 0;
Symbol 297 MovieClip [__Packages.com.srs.bullycricket.Main] Frame 0
class com.srs.bullycricket.Main extends MovieClip
{
var strScore, strOver, strWicket, strTarget, mcPower, power, muteDown, quitDown, objGame, objScore, onMouseDown, onMouseUp, muteMc, onEnterFrame, mcBully;
function Main () {
super();
strScore = "0";
strOver = "0";
strWicket = "0";
strTarget = "0";
mcPower.gotoAndStop(1);
power = 0;
init();
muteDown = false;
quitDown = false;
}
function init() {
objGame = new com.srs.bullycricket.Game(this);
objScore = new com.srs.bullycricket.Score(this);
onMouseDown = function () {
trace("event1");
var _local2 = this.muteMc.hitTest(this._xmouse, this._ymouse);
var _local3 = this.quit.hitTest(this._parent._xmouse, this._parent._ymouse);
if (!_local2) {
this.mcPower.play();
}
trace("flag=" + _local2);
if (_local2) {
this.muteDown = true;
this.setMute();
} else if (_local3) {
this.quitDown = true;
this._parent.gotoAndPlay("Splash1");
} else {
this.power = 0;
this.mcPower.gotoAndStop(1);
this.onEnterFrame = this.generatePower;
}
};
onMouseUp = function () {
trace("event");
if (this.muteDown == false) {
delete this.onEnterFrame;
}
if (this.muteDown) {
this.muteDown = false;
} else if (this.quitDown) {
this.quitDown = false;
} else {
this.Shoot();
}
};
}
function setMute() {
if (muteMc._currentframe == 1) {
muteMc.gotoAndStop(2);
} else if (muteMc._currentframe == 2) {
muteMc.gotoAndStop(1);
}
}
function generatePower() {
if (!_root.gameover) {
if (power < 100) {
power = power + 2;
mcPower.gotoAndStop(Math.floor(power / 5) + 1);
}
}
}
function Shoot() {
delete onEnterFrame;
mcPower.gotoAndStop(1);
mcBully.throwMan();
mcBully.reSetBully();
}
var messageDisplayed = false;
var playerAnimRun = false;
}
Symbol 298 MovieClip [__Packages.com.srs.bullycricket.Game] Frame 0
class com.srs.bullycricket.Game
{
var refMain, runArr, isGameOver, tempRunCount, startRunCount, boolLimit, tempRunId, booleanMessageDelay, timeId;
function Game (ref) {
refMain = ref;
runArr = new Array();
changeTurn(_global.turnValue);
isGameOver = false;
trace("game reset");
}
function changeTurn(num) {
stopTimer();
oversRun = 0;
startTimer();
numInning++;
if (numInning == 2) {
oppTargetRun = totalRun + 1;
}
totalRun = 0;
playedOver = 0;
playedBall = 0;
strOver = (playedOver + ".") + playedBall;
if (num == 1) {
urBatting = 1;
currentSpectator = 1;
refMain.objScore.tempRun = 0;
} else {
urBatting = -1;
currentSpectator = 6;
refMain.objScore.tempRun = 6;
}
refMain.mcWave.gotoAndStop("spec" + currentSpectator);
refMain.mcWave["mcHit" + currentSpectator].gotoAndStop(2);
}
function startWave(tempRun) {
tempRunCount = tempRun;
startRunCount = ((urBatting >= 0) ? 0 : 7);
boolLimit = false;
refMain.addSound("wave");
refMain.mcPower.gotoAndStop(1);
tempRunId = setInterval(this, "generateRun", 500);
}
function generateRun() {
refMain.mcPower.gotoAndStop(1);
refMain.mcWave.gotoAndStop("spec" + startRunCount);
if (urBatting >= 0) {
if (!boolLimit) {
startRunCount++;
} else {
startRunCount--;
}
if (startRunCount > tempRunCount) {
boolLimit = true;
startRunCount = startRunCount - 1;
}
if (startRunCount == 0) {
trace("startcount0");
clearInterval(tempRunId);
tempRunId = null;
refMain.mcWave.gotoAndStop(1);
if (refMain.playerAnimRun == false) {
refMain.mcWave.gotoAndStop("spec" + currentSpectator);
refMain.mcWave["mcHit" + currentSpectator].gotoAndStop(2);
timeVar = 0;
startTimer();
}
}
} else {
if (boolLimit) {
startRunCount++;
} else {
startRunCount--;
}
if (startRunCount < (tempRunCount + 1)) {
boolLimit = true;
startRunCount = startRunCount + 1;
}
if (startRunCount == 7) {
clearInterval(tempRunId);
tempRunId = null;
refMain.mcWave.gotoAndStop(1);
if (refMain.playerAnimRun == false) {
refMain.mcWave.gotoAndStop("spec" + currentSpectator);
refMain.mcWave["mcHit" + currentSpectator].gotoAndStop(2);
timeVar = 0;
startTimer();
}
}
}
}
function updateOver() {
stopTimer();
playedBall = playedBall + 1;
if (playedBall == 6) {
playedOver++;
if (playedOver >= _global.playOvers) {
if (numInning >= 2) {
if ((totalRun < oppTargetRun) && (isGameOver == false)) {
if (_global.turnValue == 1) {
refMain.frameToPlay = "lose";
isGameOver = true;
} else {
refMain.frameToPlay = "win";
isGameOver = true;
}
refMain.mcScreen.gotoAndPlay(2);
}
} else {
refMain.frameToPlay = "inningOver";
refMain.mcWave.gotoAndStop(1);
}
} else if (numInning >= 2) {
if (totalRun < oppTargetRun) {
refMain.frameToPlay = "over";
}
} else {
refMain.frameToPlay = "over";
}
playedBall = 0;
booleanMessageDelay = false;
if (refMain.playerAnimRun) {
booleanMessageDelay = true;
} else {
refMain.mcScreen.gotoAndPlay(2);
}
}
strOver = (playedOver + ".") + playedBall;
if ((tempRunCount == 5) || (tempRunCount == 6)) {
if (urBatting == -1) {
startTimer();
}
} else {
startTimer();
}
}
function startTimer() {
stopTimer();
refMain.timeBar.gotoAndStop(1);
timeId = setInterval(this, "setTimeBar", 1000);
}
function stopTimer() {
refMain.timeBar.gotoAndStop(1);
clearInterval(timeId);
timeId = null;
}
function setTimeBar() {
if ((refMain.messageDisplayed == false) && (refMain.playerAnimRun == false)) {
timeVar = timeVar + 2;
refMain.timeBar.gotoAndStop(timeVar * 2);
if (timeVar >= maxTime) {
stopTimer();
currentSpectator = ((urBatting == 1) ? 1 : 6);
refMain.objScore.updateScore();
updateOver();
timeVar = 0;
}
}
}
function restrictDecimal(numVar, len) {
var _local1 = numVar.toString();
var _local2 = _local1.indexOf(".");
var _local3 = _local1.substr(0, _local2);
_local3 = _local3 + _local1.substr(_local2, len + 1);
var _local4 = Number(_local3);
return(_local4);
}
var urBatting = 1;
var currentSpectator = 1;
var playedOver = 0;
var playedBall = 0;
var totalRun = 0;
var targetRun = 0;
var strOver = "0.0";
var numWicket = 0;
var oppTargetRun = 0;
var numInning = 0;
var timeVar = 0;
var maxTime = 60;
var runWaveNum = 1;
var oversRun = 0;
}
Symbol 299 MovieClip [__Packages.com.srs.bullycricket.Score] Frame 0
class com.srs.bullycricket.Score
{
var mainRef;
function Score (ref) {
mainRef = ref;
tempRun = ((mainRef.objGame.urBatting == 1) ? 0 : 6);
updateScore.name = "updateScore";
}
function updateScore() {
mainRef.objGame.totalRun = mainRef.objGame.totalRun + tempRun;
mainRef.objGame.runArr[mainRef.objGame.playedBall] = tempRun;
mainRef.objGame.oversRun = mainRef.objGame.oversRun + tempRun;
mainRef.mcPower.gotoAndStop(1);
if (tempRun > 0) {
mainRef.objGame.startWave(tempRun);
runRun = tempRun;
mainRef.playerAnimRun = true;
mainRef.mcRunRun.mcBall.gotoAndPlay(2);
} else {
mainRef.mcWave.gotoAndStop("spec" + mainRef.objGame.currentSpectator);
mainRef.mcWave["mcHit" + mainRef.objGame.currentSpectator].gotoAndStop(2);
}
tempRun = ((mainRef.objGame.urBatting == 1) ? 0 : 6);
if (mainRef.objGame.numInning >= 2) {
if (mainRef.objGame.totalRun >= mainRef.objGame.oppTargetRun) {
if (_global.turnValue == 1) {
mainRef.frameToPlay = "win";
} else {
mainRef.frameToPlay = "lose";
}
mainRef.mcScreen.gotoAndPlay(2);
}
}
}
function countRun(mc1, mc2) {
if (chkForCollision(mc1, mc2)) {
mainRef.addSound("shot");
mainRef["mcCelb" + mainRef.objGame.currentSpectator].gotoAndPlay(2);
if (mainRef.objGame.urBatting == 1) {
if (mainRef.objGame.currentSpectator <= 5) {
mainRef.objGame.currentSpectator = mainRef.objGame.currentSpectator + mainRef.objGame.urBatting;
mainRef.mcWave.gotoAndStop("spec" + mainRef.objGame.currentSpectator);
mainRef.mcWave["mcHit" + mainRef.objGame.currentSpectator].gotoAndStop(2);
tempRun = tempRun + mainRef.objGame.urBatting;
} else {
mainRef.objGame.stopTimer();
tempRun = tempRun + mainRef.objGame.urBatting;
mainRef.objGame.currentSpectator = 1;
updateScore();
mainRef.objGame.updateOver();
mainRef.objGame.timeVar = 0;
}
} else if (mainRef.objGame.urBatting == -1) {
if (mainRef.objGame.currentSpectator > 1) {
mainRef.objGame.currentSpectator = mainRef.objGame.currentSpectator + mainRef.objGame.urBatting;
tempRun = tempRun + mainRef.objGame.urBatting;
mainRef.mcWave.gotoAndStop("spec" + mainRef.objGame.currentSpectator);
mainRef.mcWave["mcHit" + mainRef.objGame.currentSpectator].gotoAndStop(2);
} else {
mainRef.objGame.stopTimer();
tempRun = tempRun + mainRef.objGame.urBatting;
mainRef.objGame.currentSpectator = 6;
updateScore();
mainRef.objGame.updateOver();
mainRef.objGame.timeVar = 0;
}
}
}
}
function chkForCollision(mc1, mc2) {
return(mc1.hitTest(mc2));
}
var tempRun = 0;
var runRun = 0;
}
Symbol 300 MovieClip [__Packages.com.srs.bullycricket.Bully] Frame 0
class com.srs.bullycricket.Bully extends MovieClip
{
var onMouseMove, _parent, getNextHighestDepth, addSound, mcNakedManPos, onEnterFrame, _rotation;
function Bully () {
super();
onMouseMove = setBullyAngle;
}
function throwMan() {
_root.hit = false;
trace("_root.level=" + _root.level);
if (!_root.gameover) {
if (_root.totalarrow > 0) {
_root.totalarrow = _root.totalarrow - 1;
}
if (((_root.level == 1) or (_root.level == 3)) or (_root.level eq 5)) {
var _local3 = _parent.attachMovie("ball", "mc", getNextHighestDepth());
_local3._xscale = -200;
}
if (((_root.level eq 2) or (_root.level eq 4)) or (_root.level eq 6)) {
trace("_root.level2");
var _local3 = _parent.attachMovie("arrow", "mc", getNextHighestDepth());
_local3._xscale = 50;
}
addSound("canon");
_root.mc = _local3;
trace(_root.mc);
_parent.objGame.bullyRef = _local3;
var o = {x:0, y:0};
mcNakedManPos.localToGlobal(o);
_local3._x = o.x;
_local3._xscale = -200;
_local3._y = o.y;
var angle = (bullyAngle * (Math.PI/180));
var numTemp = -1;
var speed = (_parent.power / 8);
if (speed <= 0) {
_parent.power = 10;
}
var speedPart = (speed / 4);
_local3._xscale = -200;
_local3.ref = this;
_local3.onEnterFrame = function () {
if (((_root.level eq 2) or (_root.level eq 4)) or (_root.level eq 6)) {
_root.createEmptyMovieClip("line_mc", 10);
_root.line_mc.lineStyle(3, 6768694, 100);
_root.line_mc.moveTo(this._x, this._y - 10);
_root.line_mc.lineTo(o.x, o.y + 10);
}
var _local4 = speed * Math.cos(angle);
var _local3 = speed * Math.sin(angle);
this._height = (this._width = this._width - 0.4);
trace(this._height);
this._y = this._y + (numTemp * _local3);
_root.rop1._y = _root.rop1._y + (this._y * 0.5);
trace("y=" + this._y);
this._x = this._x + (numTemp * _local4);
speed = speed + (numTemp * 0.2);
if (speed < 0) {
numTemp = 1;
}
if ((numTemp == 1) && (speed > speedPart)) {
_root.line_mc._alpha = 0;
if (_root.totalarrow <= 0) {
_root.gameover = true;
_root.gameover_mc.gotoAndStop(2);
}
delete this.onEnterFrame;
if ((((_root.level == 1) or (_root.level == 3)) or (_root.level eq 5)) or (_root.hit == false)) {
this._alpha = 0;
}
if (((!_root.hit) and (this._y > 30)) and (this._y < 315)) {
_root.water_mc._visible = true;
_root.water_mc.play();
_root.water_mc._x = this._x;
_root.water_mc._width = this._width;
_root.water_mc._y = this._y;
_root.pop_mc._x = this._x;
_root.pop_mc._y = this._y + 50;
_root.pop_mc.play();
trace(_root.pop_mc);
}
if (this.ref.chkForOut(this._parent.objGame.bullyRef, _root.ship)) {
} else {
this._parent.objScore.countRun(this._parent.objGame.bullyRef, this._parent.mcWave["mcHit" + this._parent.objGame.currentSpectator]);
}
}
};
}
}
function setBullyAngle() {
onEnterFrame = function () {
if (!_root.gameover) {
var _local6 = this._y - _root._ymouse;
var _local5 = this._x - _root._xmouse;
var _local4 = Math.atan2(_local6, _local5);
var _local3 = Math.round((_local4 * 180) / Math.PI);
if (_local3 < 10) {
_local3 = 10;
} else if (_local3 > 160) {
_local3 = 160;
}
var _local7 = _local3 - this._rotation;
this._rotation = this._rotation + _local7;
this.bullyAngle = _local3;
}
};
}
function reSetBully() {
_rotation = 90;
}
function bullyStop() {
delete onEnterFrame;
}
function chkForOut(mc1, mc2) {
if (mc1.hitTest(mc2.hit1)) {
return(true);
}
if (mc1.hitTest(mc2.hit2)) {
return(true);
}
if (mc1.hitTest(mc2.hit3)) {
return(true);
}
if (mc1.hitTest(mc2.hit4)) {
return(true);
}
return(false);
}
var bullyAngle = 90;
}
Symbol 33 MovieClip Frame 21
stop();
Symbol 38 MovieClip [mcBully] Frame 1
#initclip 6
Object.registerClass("mcBully", com.srs.bullycricket.Bully);
#endinitclip
Symbol 41 MovieClip Frame 1
stop();
var l = new Array();
this.onEnterFrame = function () {
if (l.push((t = getTimer())) > 9) {
gotoAndStop (2);
}
};
Symbol 41 MovieClip Frame 2
stop();
this.onEnterFrame = function () {
l.push((t = getTimer()));
f.text = Math.round(100000 / (t - l.shift())) / 10;
};
Symbol 51 MovieClip Frame 1
stop();
_root.allsound.setVolume(100);
Instance of Symbol 45 MovieClip in Symbol 51 MovieClip Frame 1
on (release) {
_root.horse_music.stop();
_root.hero_music.stop();
_root.powerup_music.stop();
_root.button_click.stop();
if (_root._currentframe > 9) {
_root.game_music.stop();
} else {
_root.button_click.stop();
_root.menu_music.stop();
}
_parent.gotoAndStop(_currentframe + 1);
}
Symbol 51 MovieClip Frame 2
_root.allsound.setVolume(0);
Instance of Symbol 49 MovieClip in Symbol 51 MovieClip Frame 2
on (release) {
if ((_root._currentframe > 9) and (_root._currentframe < 14)) {
_root.game_music.start();
} else if ((((_root._currentframe == 9) or (_root._currentframe == 14)) or (_root._currentframe == 15)) or (_root._currentframe == 17)) {
_root.menu_music.start();
}
_parent.gotoAndStop(1);
}
Symbol 52 MovieClip [mainMC] Frame 1
#initclip 5
Object.registerClass("mainMC", com.srs.bullycricket.Main);
#endinitclip
stop();
var frameToPlay;
Instance of Symbol 41 MovieClip "dd" in Symbol 52 MovieClip [mainMC] Frame 1
on (press) {
trace("Click");
}
Symbol 70 MovieClip [msgWindow] Frame 1
stop();
Symbol 70 MovieClip [msgWindow] Frame 2
mcClose.onRelease = function () {
this._parent.gotoAndStop(1);
};
stop();
Symbol 71 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 11
stop();
Symbol 137 Button
on (release) {
_root.gotoAndPlay("playyyy");
}
Symbol 144 Button
on (release) {
_root.gotoAndPlay("playyyy");
}
Symbol 147 Button
on (release) {
_root.gotoAndPlay("playyyy");
}
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 2
stop();
this._parent.gotoAndPlay("main");
Symbol 153 MovieClip Frame 3
stop();
if (_parent.select == "help") {
custom.text = "play";
}
btnPlay.onRelease = function () {
_parent.gotoAndPlay("playyyy");
};
Symbol 175 MovieClip Frame 1
stop();
Symbol 175 MovieClip Frame 3
_root.line_mc.removeMovieClip();
Symbol 175 MovieClip Frame 6
_root.line_mc.removeMovieClip();
Symbol 178 Button
on (release) {
_root.gotoAndStop("gameStart");
_root.btn_mc.gotoAndPlay(1);
}
Symbol 207 MovieClip Frame 1
function tim() {
if (!_root.gameover) {
if (val >= 1) {
val--;
_root.val = val;
} else {
_root.gameover = true;
_root.gameover_mc.gotoAndStop(2);
}
}
}
val = 60;
timer = setInterval(tim, 1000);
Symbol 208 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 2
_root.gotoAndStop("gameover");
Symbol 212 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 75
this._visible = false;
Symbol 239 Button
on (release) {
_root.gotoAndStop("level" + _root.level);
}
Symbol 247 Button
on (release) {
_root.gotoAndPlay("playyyy");
}
Symbol 252 MovieClip Frame 2
stop();
Symbol 252 MovieClip Frame 3
stop();
Symbol 255 Button
on (release) {
_root.gotoAndPlay("HighScore");
}