Frame 1
MochiAd.showPreGameAd({id:"35161f8eb7d14a9e", res:"525x460"});
Frame 2
function openKill5() {
getURL ("http://www.kill5.com/home.php?from=pxlkck", "_blank");
}
this.onEnterFrame = function () {
var _local3 = this.getBytesTotal();
var _local2 = this.getBytesLoaded();
if (((_local2 >= _local3) && (_local2 >= 4)) && (loaderClip.done == true)) {
gotoAndPlay ("assets");
delete this.onEnterFrame;
} else {
var _local4 = (_local2 / _local3) * 100;
percentText.text = int(_local4) + "%";
}
};
createEmptyMovieClip("canvas_mc", 1700);
var movieWidth = 525;
var movieHeight = 460;
canvas_mc.lineStyle(1, 3355443);
canvas_mc.moveTo(0, 0);
canvas_mc.lineTo(movieWidth - 1, 0);
canvas_mc.lineTo(movieWidth - 1, movieHeight - 1);
canvas_mc.lineTo(0, movieHeight - 1);
canvas_mc.lineTo(0, 0);
loaderClip.onRelease = function () {
openKill5();
};
stop();
Frame 10
stopAllSounds();
Frame 20
stop();
buttonRollOver = function () {
playSound(click_snd);
this.gotoAndStop("over");
};
buttonRollOut = function () {
this.gotoAndStop("out");
};
buttonRelease = function () {
this.releaseFunction.apply(null, this.args);
};
et = mx.transitions.easing.None.easeNone;
newTween = function (tweenName, clip, property, easeType, begin, end, time, useSeconds, callBack, args) {
var _local2 = tweenName + "_tween";
this[_local2] = new mx.transitions.Tween(clip, property, easeType, begin, end, time, useSeconds);
this[_local2].onMotionFinished = function () {
callBack.apply(null, args);
};
return(this[_local2]);
};
stopTween = function (tweenName) {
var _local2 = tweenName + "_tween";
this[_local2].stop();
trace("TWEEN STOPPED");
};
_global.right = function (sIn, nLen) {
return(sIn.substr(sIn.length - nLen));
};
_global.timer = new Object();
timer.init = function () {
timer.paused = false;
timer.active = false;
timer.timeUp = false;
timer.startTime = null;
timer.endTime = null;
timer.pauseTime = null;
timer.duration = null;
};
timer.start = function (milliseconds) {
if (milliseconds > 0) {
timer.duration = milliseconds;
timer.startTime = new Date().getTime();
timer.endTime = timer.startTime + milliseconds;
timer.paused = false;
timer.active = true;
timer.timeUp = false;
} else {
timer.active = false;
timer.timeUp = true;
}
};
timer.stop = function () {
timer.init();
};
timer.pause = function () {
timer.checkTime();
if (timer.active) {
if (!timer.paused) {
timer.pauseTime = new Date().getTime();
timer.paused = true;
}
}
};
timer.resume = function () {
if (timer.paused) {
var _local2 = new Date().getTime();
var _local1 = timer.pauseTime - timer.startTime;
timer.startTime = _local2 - _local1;
timer.endTime = timer.startTime + timer.duration;
timer.pauseTime = null;
timer.paused = false;
}
};
timer.getTimeNumber = function () {
if (!timer.active) {
return(0);
}
if (timer.paused) {
var _local2 = timer.pauseTime;
} else {
var _local2 = new Date().getTime();
}
var _local1 = timer.endTime - _local2;
return(Math.max(_local1, 0));
};
timer.getTimeString = function () {
var _local1 = timer.getTimeNumber();
var _local2 = right("0" + Math.floor((_local1 % 1000) / 10), 2);
var _local4 = right("0" + (Math.floor(_local1 / 1000) % 60), 2);
var _local3 = Math.floor(_local1 / 60000);
return((((_local3 + ":") + _local4) + ":") + _local2);
};
timer.checkTime = function () {
var _local1 = false;
if (timer.paused) {
if (timer.pauseTime >= timer.endTime) {
_local1 = true;
}
} else {
var _local2 = new Date().getTime();
if (_local2 >= timer.endTime) {
_local1 = true;
}
}
if (_local1) {
timer.timeUp = true;
timer.active = false;
timer.onTimeUp();
}
};
timer.onTimeUp = function () {
trace("PLEEEASE?");
};
timer.measureSiriusB = function () {
var _local1 = new Object();
_local1.A = new Object();
_local1.B = new Object();
_local1.C = new Object();
_local1.A.orbitalOffset = 5.4;
_local1.B.orbitalOffset = 14.6;
_local1.distance = 2.6;
_local1.apparentMagnitude = -1.47;
if (_local1.B.anyNewInformation) {
return("Warning: Sirius B acting unexpectedly.");
}
return("Sirius B behaving normally.");
};
timer.init();
init = function () {
_quality = "HIGH";
initMainVars();
setSounds();
addStartScreen();
};
initMainVars = function () {
_global.userKeys = new Object();
_global.userKeys.up = new Object();
_global.userKeys.down = new Object();
_global.userKeys.left = new Object();
_global.userKeys.right = new Object();
_global.userKeys.a = new Object();
_global.userKeys.b = new Object();
_global.userKeys.up.code = 38;
_global.userKeys.down.code = 40;
_global.userKeys.left.code = 37;
_global.userKeys.right.code = 39;
_global.userKeys.a.code = 90;
_global.userKeys.b.code = 88;
_global.userKeys.up.charToDisplay = "UP";
_global.userKeys.down.charToDisplay = "DWN";
_global.userKeys.left.charToDisplay = "LEFT";
_global.userKeys.right.charToDisplay = "RHT";
_global.userKeys.a.charToDisplay = "z";
_global.userKeys.b.charToDisplay = "x";
defender1 = new Object();
defender1.x = 175;
defender1.y = 200;
defender2 = new Object();
defender2.x = 325;
defender2.y = 200;
striker1 = new Object();
striker1.x = 175;
striker1.y = 300;
striker2 = new Object();
striker2.x = 325;
striker2.y = 300;
goalie1 = new Object();
goalie1.x = 250;
goalie1.y = 50;
downPositions = [defender1, defender2, striker1, striker2, goalie1];
defender3 = new Object();
defender3.x = 175;
defender3.y = 530;
defender4 = new Object();
defender4.x = 325;
defender4.y = 530;
striker3 = new Object();
striker3.x = 175;
striker3.y = 435;
striker4 = new Object();
striker4.x = 325;
striker4.y = 435;
goalie2 = new Object();
goalie2.x = 250;
goalie2.y = 670;
upPositions = [defender3, defender4, striker3, striker4, goalie2];
};
openUrl = function (page, window) {
getURL (page, window);
};
addStartScreen = function () {
trace("ADD SCREEN");
attachMovie("startScreen_lib", "startScreen_mc", 10);
startScreen_mc._x = 250;
startScreen_mc._y = 50;
var _local1 = startScreen_mc;
_local1.play_mc.onRollOver = buttonRollOver;
_local1.play_mc.onRollOut = buttonRollOut;
_local1.play_mc.onRelease = buttonRelease;
_local1.play_mc.releaseFunction = startGame;
_local1.play_mc.args = [];
};
setStartScreen = function () {
var _local1 = startScreen_mc;
_local1.play_mc.onRollOver = buttonRollOver;
_local1.play_mc.onRollOut = buttonRollOut;
_local1.play_mc.onRelease = buttonRelease;
_local1.play_mc.releaseFunction = addThemePicker;
_local1.play_mc.args = [];
_local1.moreGames_mc.onRollOver = buttonRollOver;
_local1.moreGames_mc.onRollOut = buttonRollOut;
_local1.moreGames_mc.onRelease = buttonRelease;
_local1.moreGames_mc.releaseFunction = openUrl;
_local1.moreGames_mc.args = ["http://www.kill5.com/home.php?from=pxlkck", "_blank"];
_local1.k5Btn.onRelease = buttonRelease;
_local1.k5Btn.releaseFunction = openUrl;
_local1.k5Btn.args = ["http://www.kill5.com/home.php?from=pxlkck", "_blank"];
};
removeStartScreen = function () {
startScreen_mc.removeMovieClip();
};
gameSetUp = function () {
startScreen_mc.removeMovieClip();
attachMovie("setUp_lib", "setUp_mc", 20);
setUp_mc._x = 250;
setUp_mc._y = 50;
var _local2 = setUp_mc;
_local2.upChar_mc.onRelease = buttonRelease;
_local2.upChar_mc.releaseFunction = getNewButtonChar;
_local2.upChar_mc.args = ["up"];
_local2.downChar_mc.onRelease = buttonRelease;
_local2.downChar_mc.releaseFunction = getNewButtonChar;
_local2.downChar_mc.args = ["down"];
_local2.leftChar_mc.onRelease = buttonRelease;
_local2.leftChar_mc.releaseFunction = getNewButtonChar;
_local2.leftChar_mc.args = ["left"];
_local2.rightChar_mc.onRelease = buttonRelease;
_local2.rightChar_mc.releaseFunction = getNewButtonChar;
_local2.rightChar_mc.args = ["right"];
_local2.aChar_mc.onRelease = buttonRelease;
_local2.aChar_mc.releaseFunction = getNewButtonChar;
_local2.aChar_mc.args = ["a"];
_local2.bChar_mc.onRelease = buttonRelease;
_local2.bChar_mc.releaseFunction = getNewButtonChar;
_local2.bChar_mc.args = ["b"];
_local2.menu_mc.onRollOver = buttonRollOver;
_local2.menu_mc.onRollOut = buttonRollOut;
_local2.menu_mc.onRelease = buttonRelease;
_local2.menu_mc.releaseFunction = setUpFinished;
_local2.upChar_mc.textBox_txt.text = _global.userKeys.up.charToDisplay;
_local2.downChar_mc.textBox_txt.text = _global.userKeys.down.charToDisplay;
_local2.leftChar_mc.textBox_txt.text = _global.userKeys.left.charToDisplay;
_local2.rightChar_mc.textBox_txt.text = _global.userKeys.right.charToDisplay;
_local2.aChar_mc.textBox_txt.text = _global.userKeys.a.charToDisplay;
_local2.bChar_mc.textBox_txt.text = _global.userKeys.b.charToDisplay;
};
getNewButtonChar = function (button) {
var keyListener = new Object();
keyListener.onKeyDown = function () {
var _local1 = Key.getCode();
var _local2 = Key.getAscii();
keyCodeSelected(button, _local1, _local2);
Key.removeListener(keyListener);
};
Key.addListener(keyListener);
};
keyCodeSelected = function (button, code, ascii) {
if (ascii == 0) {
switch (code) {
case 37 :
charToDisplay = "LFT";
break;
case 38 :
charToDisplay = "UP";
break;
case 39 :
charToDisplay = "RHT";
break;
case 40 :
charToDisplay = "DWN";
}
} else {
charToDisplay = String.fromCharCode(ascii);
}
_global.userKeys[button].code = code;
_global.userKeys[button].charToDisplay = charToDisplay;
setUp_mc[button + "Char_mc"].textBox_txt.text = charToDisplay;
};
setUpFinished = function () {
removeSetUp();
addStartScreen();
};
removeSetUp = function () {
setUp_mc.removeMovieClip();
};
addConsole = function () {
attachMovie("console_lib", "console_mc", 16999);
console_mc._alpha = 75;
_global.console = true;
};
addThemePicker = function () {
removeStartScreen();
themePicker();
};
initVars = function () {
_global.keys = new Object();
_global.keys.left = false;
_global.keys.right = false;
_global.keys.up = false;
_global.keys.down = false;
_global.keys.space = false;
_global.keys.shift = false;
_global.keys.control = false;
scrollMode = 0;
sprites = new Array();
targetTime = 0;
HUMAN = 0;
CPU = 1;
UP = 0;
DOWN = 1;
LEFT = 2;
RIGHT = 3;
MISS = 2;
SAVE = 4;
DONE = 1;
CHASE = 0;
DRIBBLE = 1;
GOALIE = 0;
DEFENDER = 1;
STRIKER = 2;
CHECK = -2;
WAIT = -1;
SETKICKOFF = 0;
KICKOFF = 1;
INPLAY = 2;
SETUPGOALKICK = 3;
GOALKICK = 4;
SCOREGOAL = 5;
GOAL = 6;
SETENDOFHALF = 7;
CORNER = 8;
SETFREEKICK = 9;
FREEKICK = 10;
SETPENALTY = 11;
PENALTY = 12;
createThemes();
};
createGameHolder = function () {
createEmptyMovieClip("game_mc", 100);
game_mc._x = 9.5;
game_mc._y = 9.5;
};
createThemes = function () {
theme_sunday = new Object();
theme_sunday.teamALinkage = "teamA";
theme_sunday.teamBLinkage = "teamB";
theme_sunday.teamAGoalieLinkage = "goalieA";
theme_sunday.teamBGoalieLinkage = "goalieB";
theme_sunday.pitchLinkage = "pitch_lib";
theme_sunday.overlayLinkage = "";
theme_sunday.uiLinkage = "gameUi_lib";
theme_sunday.bgLoop = park_snd;
theme_bw = new Object();
theme_bw.teamALinkage = "teamA_bw";
theme_bw.teamBLinkage = "teamB_bw";
theme_bw.teamAGoalieLinkage = "goalieA_bw";
theme_bw.teamBGoalieLinkage = "goalieB_bw";
theme_bw.pitchLinkage = "greyPitch_lib";
theme_bw.overlayLinkage = "grain_lib";
theme_bw.uiLinkage = "gameUiBw_lib";
theme_bw.bgLoop = proj_snd;
themes = new Array();
themes.push(theme_sunday);
themes.push(theme_bw);
theme = themes[themeToUse];
};
removeGame = function () {
trace("REMOVE GAME");
game_mc.removeMovieClip();
};
createPitch = function () {
game_mc.attachMovie(theme.pitchLinkage, "pitch_mc", 50);
game_mc.attachMovie("pitchMask_lib", "pitchMask_mc", 55);
game_mc.pitch_mc.setMask(game_mc.pitchMask_mc);
game_mc.pitch_mc.attachMovie("topGoal_lib", "topGoalGraphic_mc", 160500);
game_mc.pitch_mc.topGoalGraphic_mc._x = 187;
game_mc.pitch_mc.topGoalGraphic_mc._y = -5;
game_mc.pitch_mc.attachMovie("btmGoal_lib", "btmGoalGraphic_mc", 160550);
game_mc.pitch_mc.btmGoalGraphic_mc._x = 187;
game_mc.pitch_mc.btmGoalGraphic_mc._y = 632;
game_mc.pitch_mc.btmGoalGraphic_mc._alpha = 35;
game_mc.pitch_mc._y = -118;
};
addOverlay = function () {
attachMovie(theme.overlayLinkage, "overlay_mc", 17000);
overlay_mc._alpha = 60;
};
removeOverlay = function () {
overlay_mc.removeMovieClip();
};
createTimer = function () {
game_mc.attachMovie("timer_lib", "timer_mc", 16500);
game_mc.timer_mc._x = 15;
game_mc.timer_mc._y = 390;
};
createPlayerTeam = function () {
playerType1 = new Object();
playerType1.id = 1;
playerType1.position = DEFENDER;
playerType1.ai = defence;
playerType1.reactions = 60;
playerType2 = new Object();
playerType2.id = 2;
playerType2.position = DEFENDER;
playerType2.ai = defence;
playerType2.reactions = 60;
playerType3 = new Object();
playerType3.id = 3;
playerType3.position = STRIKER;
playerType3.ai = attack;
playerType3.reactions = 40;
playerType4 = new Object();
playerType4.id = 4;
playerType4.position = STRIKER;
playerType4.ai = attack;
playerType4.reactions = 40;
playerTypes = new Array(playerType1, playerType2, playerType3, playerType4);
players = new Array();
var _local6 = 4;
var _local2 = 0;
_local2 = 0;
while (_local2 < _local6) {
var _local1 = new Object();
var _local3 = ("player_" + _local2) + "_mc";
var _local4 = ("playerRadar_" + _local2) + "_mc";
var _local8 = 500 + (_local2 * 2);
game_mc.pitch_mc.attachMovie(theme.teamALinkage, _local3, _local8);
game_mc.pitch_mc[_local3]._x = playerTypes[_local2].id * 16;
game_mc.pitch_mc[_local3]._y = 32;
game_mc.pitch_mc.attachMovie("playerRadar_lib", _local4, _local8 - 1);
_local1.sprite = game_mc.pitch_mc[_local3];
_local1.radar = game_mc.pitch_mc[_local4];
_local1.currentSprite = null;
_local1.xSpeed = 0;
_local1.ySpeed = 0;
_local1.kick = false;
_local1.kickLock = 0;
_local1.afterTouch = 0;
_local1.stun = false;
_local1.stunCount = 0;
_local1.tackle = false;
_local1.tackleCount = 0;
_local1.currentTargetX = 0;
_local1.currentTargetY = 0;
_local1.half = DOWN;
_local1.ai = playerTypes[_local2].ai;
_local1.reactions = playerTypes[_local2].reactions;
_local1.updateTarget = false;
_local1.distanceFromActive;
_local1.id = _local2;
_local1.sprite.textbox_txt.text = _local2;
players.push(_local1);
sprites.push(_local1.sprite);
_local2++;
}
_local2++;
var _local5 = new Object();
var _local7 = "playerGoalie_mc";
var _local8 = 500 + (_local2 * 2);
_local5.startPosX = 250;
_local5.startPosY = 40;
_local5.xSpeed = 0;
_local5.ySpeed = 0;
_local5.sprite = game_mc.pitch_mc.attachMovie(theme.teamAGoalieLinkage, _local7, _local8);
_local5.ai = goalie;
_local5.reactions = 30000000 /* 0x1C9C380 */;
_local5.kick = false;
_local5.kickLock = 0;
_local5.sprite._x = 80;
_local5.sprite._y = 32;
_local5.xTarget = 0;
_local5.yTarget = 0;
_local5.jump = null;
players.push(_local5);
sprites.push(_local5.sprite);
};
createCpuTeam = function () {
cpuType1 = new Object();
cpuType1.id = 1;
cpuType1.position = DEFENDER;
cpuType1.ai = defence;
cpuType1.label = "DEF";
cpuType1.reactions = 20;
cpuType2 = new Object();
cpuType2.id = 2;
cpuType2.position = DEFENDER;
cpuType2.ai = defence;
cpuType2.label = "DEF";
cpuType2.reactions = 20;
cpuType3 = new Object();
cpuType3.id = 3;
cpuType3.position = STRIKER;
cpuType3.ai = attack;
cpuType3.label = "ATT";
cpuType3.reactions = 20;
cpuType4 = new Object();
cpuType4.id = 4;
cpuType4.position = STRIKER;
cpuType4.ai = attack;
cpuType4.label = "ATT";
cpuType4.reactions = 20;
cpuTypes = new Array(cpuType1, cpuType2, cpuType3, cpuType4);
cpuPlayers = new Array();
var _local6 = 4;
var _local2 = 0;
_local2 = 0;
while (_local2 < _local6) {
var _local1 = new Object();
var _local3 = ("cpu_" + _local2) + "_mc";
var _local4 = ("cpuRadar_" + _local2) + "_mc";
var _local8 = 1000 + (_local2 * 2);
game_mc.pitch_mc.attachMovie(theme.teamBLinkage, _local3, _local8);
game_mc.pitch_mc[_local3]._x = cpuTypes[_local2].id * 16;
game_mc.pitch_mc[_local3]._y = 64;
game_mc.pitch_mc.attachMovie("playerRadar_lib", _local4, _local8 - 1);
_local1.sprite = game_mc.pitch_mc[_local3];
_local1.radar = game_mc.pitch_mc[_local4];
_local1.xSpeed = 0;
_local1.ySpeed = 0;
_local1.kick = false;
_local1.kickLock = 0;
_local1.stun = false;
_local1.stunCount = 0;
_local1.tackle = false;
_local1.tackleCount = 0;
_local1.currentTargetX = 0;
_local1.currentTargetY = 0;
_local1.last = CHASE;
_local1.half = UP;
_local1.ai = cpuTypes[_local2].ai;
_local1.reactions = cpuTypes[_local2].reactions;
_local1.updateTarget = false;
_local1.distanceFromActive;
_local1.id = _local2;
cpuPlayers.push(_local1);
sprites.push(_local1.sprite);
_local1.sprite.textbox_txt.text = cpuTypes[_local2].label;
_local2++;
}
_local2++;
var _local5 = new Object();
var _local7 = "cpuGoalie_mc";
var _local8 = 600 + (_local2 * 2);
_local5.startPosX = 250;
_local5.startPosY = 40;
_local5.xSpeed = 0;
_local5.ySpeed = 0;
_local5.sprite = game_mc.pitch_mc.attachMovie(theme.teamBGoalieLinkage, _local7, _local8);
_local5.ai = goalie;
_local5.kick = false;
_local5.kickLock = 0;
_local5.sprite._x = 80;
_local5.sprite._y = 64;
_local5.xTarget = 0;
_local5.yTarget = 0;
_local5.jump = false;
_local5.sprite.textbox_txt.text = "CPU";
cpuPlayers.push(_local5);
sprites.push(_local5.sprite);
game_mc.pitch_mc.attachMovie("cpuTarget_lib", "cpuTarget_mc", 1500);
game_mc.pitch_mc.cpuTarget_mc._alpha = 0;
};
newHalf = function () {
};
positionTeam = function (team, direction) {
team.direction = direction;
var _local4 = team.players;
if (direction == DOWN) {
var _local3 = downPositions;
team.goal = game.topGoal;
team.xGoalTarget = 250;
team.yGoalTarget = 600;
} else if (direction == UP) {
var _local3 = upPositions;
team.goal = game.btmGoal;
team.xGoalTarget = 250;
team.yGoalTarget = 175;
}
var _local6 = _local4.length;
var _local2 = 0;
_local2 = 0;
while (_local2 < _local6) {
var _local1 = _local4[_local2];
_local1.x = _local3[_local2].x;
_local1.y = _local3[_local2].y;
_local1.sprite._x = _local1.x;
_local1.sprite._y = _local1.y;
_local2++;
}
if (game.half == 1) {
game_mc.timer_mc.half_txt.text = "FIRST HALF";
} else if (game.half == 2) {
game_mc.timer_mc.half_txt.text = "SECOND HALF";
}
};
createBall = function () {
game.ball = new Object();
game.ball.sprite = game_mc.pitch_mc.attachMovie("ballHitter_lib", "ballHitter_mc", 56);
game.ballGraphic = new Object();
game.ballGraphic.sprite = game_mc.pitch_mc.attachMovie("ball_lib", "ball_mc", 55);
game.ball.sprite._x = 100;
game.ball.sprite._y = 350;
game.ball.sprite._alpha = 100;
game.ball.xSpeed = 10;
game.ball.ySpeed = 10;
ballHeightStack = [0, 1, 1.25, 1.5, 1.75, 2, 2.5, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 3.5, 3.25, 3, 2.75, 2.5, 2.25, 2, 1.75, 1.5, 1.25, 1];
game_mc.pitch_mc.ball_mc._x = 100;
game_mc.pitch_mc.ball_mc._y = 200;
sprites.push(game_mc.pitch_mc.ball_mc);
};
checkKeys = function () {
if (Key.isDown(_global.userKeys.left.code)) {
_global.keys.left = true;
} else {
_global.keys.left = false;
}
if (Key.isDown(_global.userKeys.right.code)) {
_global.keys.right = true;
} else {
_global.keys.right = false;
}
if (Key.isDown(_global.userKeys.up.code)) {
_global.keys.up = true;
} else {
_global.keys.up = false;
}
if (Key.isDown(_global.userKeys.down.code)) {
_global.keys.down = true;
} else {
_global.keys.down = false;
}
if (Key.isDown(_global.userKeys.a.code)) {
_global.keys.a = true;
} else {
_global.keys.a = false;
}
if (Key.isDown(_global.userKeys.b.code)) {
_global.keys.b = true;
} else {
_global.keys.b = false;
}
};
updateSprites = function () {
var _local1 = 0;
var _local2 = sprites.length;
_local1 = 0;
while (_local1 < _local2) {
sprites[_local1].swapDepths((sprites[_local1]._x * 16) + ((sprites[_local1]._y * 64) + _local1));
_local1++;
}
};
updateTimer = function () {
var _local1 = game_mc.timer_mc;
_local1.timer_txt.text = timer.getTimeString();
timer.checkTime();
};
startTimer = function () {
timer.start(50000);
timer.onTimeUp = function () {
game.state = SETENDOFHALF;
};
};
pauseTimer = function () {
timer.pause();
};
resumeTimer = function () {
timer.resume();
};
setGame = function (teamA, teamB, matchLength) {
game = new Object();
game.topGoalLine = 46;
game.midLine = 365;
game.btmGoalLine = 680;
game.leftPoint = 35;
game.centerPoint = 255;
game.rightPoint = 460;
game.goalWidth = 102;
game.topPenaltyLine = 160;
game.btmPenaltyLine = 575;
game.goalKickTeam = null;
game.activeGoalie = null;
game.cornerPlayer = null;
game.freeKickPlayer = null;
game.penaltyPlayer = null;
game.topGoal = game_mc.pitch_mc.topGoal_mc;
game.btmGoal = game_mc.pitch_mc.btmGoal_mc;
game.startOfHalf = true;
game.lastOwner = null;
game.teamA = new Object();
game.teamB = new Object();
game.teamA.players = teamA;
game.teamB.players = teamB;
game.teamA.activeAttack = false;
game.teamB.activeAttack = false;
var _local1 = 0;
var _local2 = game.teamA.players.length;
_local1 = 0;
while (_local1 < _local2) {
game.teamA.players[_local1].team = game.teamA;
_local1++;
}
_local1 = 0;
_local1 = 0;
while (_local1 < _local2) {
game.teamB.players[_local1].team = game.teamB;
_local1++;
}
game.teamA.activePlayer = null;
game.teamB.activePlayer = null;
game.teamA.activeControl = activeHuman;
game.teamB.activeControl = activeCpu;
game.teamA.control = HUMAN;
game.teamB.control = CPU;
game.teamA.AiTarget = null;
game.teamB.AiTarget = game_mc.pitch_mc.cpuTarget_mc;
game.teamA.score = 0;
game.teamB.score = 0;
game.teamA.playDirection = UP;
game.teamB.playDirection = DOWN;
game.teamA.goalKick = false;
game.teamB.goalKick = false;
game.timer = new MsTimer();
game.ballKicker = null;
game.length = matchLength;
game.half = 1;
game.cornerSide = null;
game.startTeam = game.teamA;
game.state = SETKICKOFF;
};
startGame = function () {
removeStartScreen();
initVars();
removeMenus();
createGameHolder();
addGameUi();
createPitch();
playBgLoop();
addOverlay();
createTimer();
createPlayerTeam();
createCpuTeam();
setGame(players, cpuPlayers, 5);
newHalf();
createBall();
createGameLoop();
startTimer();
};
endGame = function () {
trace("end game called...");
removeOverlay();
stopBgLoop();
removeGame();
removeGameUi();
removeGameLoop();
addStartScreen();
};
addGameUi = function () {
trace("GAME UI");
attachMovie(theme.uiLinkage, "gameUi_mc", 10);
gameUi_mc.blendMode = "darken";
};
removeGameUi = function () {
gameUi_mc.removeMovieClip();
};
setKickOff = function () {
game_mc.pitch_mc._y = -145;
positionTeam(game.teamA, game.teamA.playDirection);
positionTeam(game.teamB, game.teamB.playDirection);
var _local5 = game_mc.pitch_mc.ballHitter_mc;
var _local1 = game_mc.pitch_mc.ball_mc;
_local1._x = 250;
_local1._y = game.midLine;
_local5._x = _local1._x;
_local5._y = _local1._y;
var _local3 = game.startTeam;
var _local2 = game.startTeam.players[2];
if (_local3.direction == DOWN) {
_local2.sprite._x = _local1._x;
_local2.sprite._y = _local1._y - 6;
_local2.sprite.gotoAndStop("down");
} else if (_local3.direction == UP) {
_local2.sprite._x = _local1._x;
_local2.sprite._y = _local1._y + 6;
_local2.sprite.gotoAndStop("up");
}
var _local4 = game.startTeam.players[3];
if (_local3.direction == DOWN) {
_local4.sprite._y = _local1._y - 16;
_local4.sprite.gotoAndStop("down");
} else if (_local3.direction == UP) {
_local4.sprite._y = _local1._y + 16;
_local4.sprite.gotoAndStop("up");
}
game.timer.start();
game.state = KICKOFF;
};
kickOff = function () {
if (game.startOfHalf) {
}
if (game.startTeam.control == HUMAN) {
var _local3 = _global.keys;
if (_local3.a) {
firstKick(game.startTeam.players[2]);
}
} else {
var _local2 = int(Math.random() * 60);
if (_local2 == 10) {
firstKick(game.startTeam.players[2]);
}
}
};
setFreeKick = function () {
var _local2 = game.ball;
var _local1 = game.freeKickPlayer;
var _local3 = _local1.team;
positionTeam(game.teamA, game.teamA.playDirection);
positionTeam(game.teamB, game.teamB.playDirection);
if (_local3.playDirection == DOWN) {
_local1.sprite._x = _local2.sprite._x;
_local1.sprite._y = _local2.sprite._y - 6;
_local1.sprite.gotoAndStop("down");
} else if (_local3.playDirection == UP) {
_local1.sprite._x = _local2.sprite._x;
_local1.sprite._y = _local2.sprite._y + 6;
_local1.sprite.gotoAndStop("up");
}
game.state = FREEKICK;
};
updateFreeKick = function () {
updateTimer();
if (game.freeKickPlayer.team.control == HUMAN) {
var _local3 = _global.keys;
if (_local3.a) {
firstKick(4, 4);
}
} else {
var _local2 = int(Math.random() * 200);
if (_local2 == 10) {
firstKick(4, 4);
}
}
};
setPenalty = function () {
trace("SET PENALTY");
var _local3 = game.ball;
var _local1 = game.penaltyPlayer;
var _local2 = _local1.team;
positionTeam(game.teamA, game.teamA.playDirection);
positionTeam(game.teamB, game.teamB.playDirection);
_local1.sprite._x = game.centerPoint;
if (_local2.playDirection == UP) {
_local1.sprite._y = game.topPenaltyLine;
_local1.sprite.gotoAndStop("up");
} else if (_local2.playDirection == DOWN) {
_local1.sprite._y = game.btmPenaltyLine;
_local1.sprite.gotoAndStop("down");
}
lockBall(_local1);
game_mc.pitch_mc.attachMovie("cornerArrow_lib", "cornerArrow_mc", 20000);
game_mc.pitch_mc.cornerArrow_mc._x = _local1.sprite._x;
game_mc.pitch_mc.cornerArrow_mc._y = _local1.sprite._y;
game_mc.pitch_mc.cornerArrow_mc._xscale = 50;
game_mc.pitch_mc.cornerArrow_mc._yscale = 50;
movePenaltyArrow1();
game.state = PENALTY;
};
updatePenalty = function () {
var _local6 = _global.keys;
var _local2 = game.ball;
if (_local6.a) {
aT.stop();
var _local4 = game_mc.pitch_mc.cornerArrow_mc;
var _local5 = _local4._rotation;
var _local3 = _local5 * (Math.PI/180);
var _local8 = Math.cos(_local3) * 8;
var _local7 = Math.sin(_local3) * 8;
_local2.xSpeed = _local8;
_local2.ySpeed = _local7;
ballOwner = null;
game.penaltyPlayer.kick = true;
game.penaltyPlayer.kickLock = 20;
game.penaltyPlayer = null;
game_mc.pitch_mc.cornerArrow_mc.removeMovieClip();
game.state = INPLAY;
}
};
movePenaltyArrow1 = function () {
var _local1 = game_mc.pitch_mc.cornerArrow_mc;
if (game.penaltyPlayer.team.playDirection == UP) {
var _local2 = _local1._rotation - 180;
} else if (game.penaltyPlayer.team.playDirection == DOWN) {
var _local2 = _local1._rotation + 180;
}
aT = newTween("arrowRotate", _local1, "_rotation", et, _local1._rotation, _local2, 1, true, movePenaltyArrow2, []);
};
movePenaltyArrow2 = function () {
var _local1 = game_mc.pitch_mc.cornerArrow_mc;
if (game.penaltyPlayer.team.playDirection == UP) {
var _local2 = _local1._rotation + 180;
} else if (game.penaltyPlayer.team.playDirection == DOWN) {
var _local2 = _local1._rotation - 180;
}
aT = newTween("arrowRotate", _local1, "_rotation", et, _local1._rotation, _local2, 1, true, movePenaltyArrow1, []);
};
inPlay = function () {
updateTimer();
updatePlayers(game.teamA);
updatePlayers(game.teamB);
checkBall(game.teamA.activePlayer);
checkBall(game.teamB.activePlayer);
updateBall();
updatePushScroll();
};
updateGoalKick = function () {
updateBall();
updatePlayers(game.teamA);
updatePlayers(game.teamB);
};
endOfHalf = function () {
trace("END OF HALF");
if (game.teamA.score > game.teamB.score) {
var _local1 = "1UP WINS";
} else if (game.teamA.score < game.teamB.score) {
var _local1 = "CPU WINS";
} else {
var _local1 = "DRAW";
}
if (game.half == 1) {
showMessage("HALF TIME", halfTime, null);
} else if (game.half == 2) {
showMessage("FULL TIME\r" + _local1, fullTime, null, 5);
}
game.state = WAIT;
};
halfTime = function () {
game.half = 2;
if (game.teamA.playDirection == UP) {
game.teamA.playDirection = DOWN;
game.teamB.playDirection = UP;
} else if (game.teamA.playDirection == DOWN) {
game.teamA.playDirection = UP;
game.teamA.playDirection = DOWN;
}
positionTeam(game.teamA, game.teamA.playDirection);
positionTeam(game.teamB, game.teamB.playDirection);
game.startOfHalf = true;
startTimer();
game.state = SETKICKOFF;
};
fullTime = function () {
endGame();
};
setOverGoalLine = function () {
trace("CORNER PLAYER :" + game.cornerPlayer);
var _local3 = game.ball;
var _local5 = game.lastOwner;
var _local1 = _local5.team;
if (game.teamA.playDirection == _local3.half) {
var _local2 = game.teamA;
} else if (game.teamB.playDirection == _local3.half) {
var _local2 = game.teamB;
}
if ((_local1 == game.teamA) && (_local2 == game.teamA)) {
showMessage("CORNER", setUpCorner, [game.teamB]);
} else if ((_local1 == game.teamA) && (_local2 == game.teamB)) {
var _local4 = game.teamB.players[game.teamB.players.length - 1];
showMessage("GOAL KICK", goalKick, [_local4, _local4.team]);
} else if ((_local1 == game.teamB) && (_local2 == game.teamA)) {
var _local4 = game.teamA.players[game.teamA.players.length - 1];
showMessage("GOAL KICK", goalKick, [_local4, _local4.team]);
} else if ((_local1 == game.teamB) && (_local2 == game.teamB)) {
showMessage("CORNER", setUpCorner, [game.teamA]);
}
game.state = WAIT;
};
gameState = function () {
if (game.state == SETKICKOFF) {
setKickOff();
} else if (game.state == KICKOFF) {
kickOff();
} else if (game.state == INPLAY) {
inPlay();
} else if (game.state == GOALKICK) {
updateGoalKick();
} else if (game.state == SCOREGOAL) {
newGoal();
} else if (game.state == SETENDOFHALF) {
endOfHalf();
} else if (game.state == OVERGOALLINE) {
setOverGoalLine();
} else if (game.state == CORNER) {
updateCorner();
} else if (game.state == WAIT) {
} else if (game.state == SETFREEKICK) {
setFreeKick();
} else if (game.state == FREEKICK) {
updateFreeKick();
} else if (game.state == SETPENALTY) {
setPenalty();
} else if (game.state == PENALTY) {
updatePenalty();
}
};
gameLoopFunc = function () {
checkKeys();
gameState();
updateSprites();
};
createGameLoop = function () {
gameLoopInt = setInterval(gameLoopFunc, 20);
};
removeGameLoop = function () {
trace("REMOVE THE DAMN GAME LOOP");
clearInterval(gameLoopInt);
};
updateKickOffPlayer = function (startTeam) {
var _local2 = _global.keys;
var _local3 = startTeam.players[2];
if (_local2.left) {
_local3.sprite.gotoAndStop("left");
}
if (_local2.right) {
_local3.sprite.gotoAndStop("right");
}
if (_local2.down) {
_local3.sprite.gotoAndStop("down");
}
if (_local2.a) {
firstKick(0, 0);
}
if (_local2.b) {
firstKick(0, 0);
}
};
resetPlayers = function () {
var _local2 = 0;
var _local3 = game.teamA.players.length;
_local2 = 0;
while (_local2 < _local3) {
var _local1 = game.teamA.players[_local2];
_local1.kick = false;
_local1.kickLock = 0;
_local1.stun = false;
_local1.stunLock = 0;
_local2++;
}
_local2 = 0;
_local3 = game.teamB.players.length;
_local2 = 0;
while (_local2 < _local3) {
var _local1 = game.teamB.players[_local2];
_local1.kick = false;
_local1.kickLock = 0;
_local1.stun = false;
_local1.stunLock = 0;
_local2++;
}
};
firstKick = function (p, xVel, yVel) {
resetPlayers();
var _local1 = game.ball;
if (xVel != undefined) {
_local1.xSpeed = xVel;
_local1.ySpeed = yVel;
} else if (p.team.playDirection == UP) {
_local1.xSpeed = 6;
_local1.ySpeed = 0;
} else if (p.team.playDirection == DOWN) {
_local1.xSpeed = 6;
_local1.ySpeed = 0;
}
game.teamA.goalKick = false;
game.teamB.goalKick = false;
if (game.startOfHalf) {
game.startOfHalf = false;
}
p.kick = true;
p.kickLock = 20;
game.lastOwner = p;
game.state = INPLAY;
playSound(kickSoft_snd);
trace("IN PLAY");
};
updatePlayers = function (team) {
var _local5 = team.players;
var _local13 = game_mc.pitch_mc.ballHitter_mc;
var _local2 = 0;
var _local6 = _local5.length - 1;
_local2 = 0;
while (_local2 < _local6) {
var _local1 = _local5[_local2];
_local1.sprite.radar_mc._alpha = 0;
xDist = _local1.sprite._x - game_mc.pitch_mc.ballHitter_mc._x;
yDist = _local1.sprite._y - game_mc.pitch_mc.ballHitter_mc._y;
var _local7 = Math.sqrt((xDist * xDist) + (yDist * yDist));
_local1.dist = _local7;
_local2++;
}
var _local4 = null;
_local2 = 0;
while (_local2 < _local6) {
var _local1 = _local5[_local2];
if (_local1.stun == false) {
if (_local4 == null) {
activeFlag = _local2;
_local4 = _local1.dist;
} else if (_local1.dist < _local4) {
activeFlag = _local2;
_local4 = _local1.dist;
}
}
_local2++;
}
var _local10 = _local5[activeFlag];
team.activePlayer = _local10;
_local2 = 0;
while (_local2 < _local6) {
var _local1 = _local5[_local2];
if (_local1.stun == false) {
if (_local2 == activeFlag) {
if ((team.control == HUMAN) && (game.state == INPLAY)) {
var _local11 = false;
} else if ((team.control == CPU) || (game.state == GOALKICK)) {
var _local11 = true;
}
if (_local1 == ballOwner) {
var _local9 = 3;
} else {
var _local9 = 3.25;
}
if (_local1.kick == false) {
applyPhysics(_local1, false, false, _local9, _local9, 0.25, _local11, null, null, null, null);
}
if (game.state == INPLAY) {
team.activeControl.apply(null, [_local1, team]);
} else {
updateNonActivePlayer(_local1, team);
}
} else {
if (_local1.kick == false) {
applyPhysics(_local1, false, false, 3.25, 3.25, 0.25, true, null, null, null, null);
}
updateNonActivePlayer(_local1, team);
}
} else {
_local1.sprite.gotoAndStop("fallDown");
}
if (_local1.sprite._x < game.leftPoint) {
_local1.xSpeed = Math.abs(_local1.xSpeed);
} else if (_local1.sprite._x > game.rightPoint) {
_local1.xSpeed = -_local1.xSpeed;
}
if (_local1.sprite._y < game.topGoalLine) {
_local1.ySpeed = Math.abs(_local1.ySpeed);
} else if (_local1.sprite._y > game.btmGoalLine) {
_local1.ySpeed = -_local1.ySpeed;
}
if (_local1.kick == true) {
if (_local1.kickLock > 0) {
_local1.kickLock--;
} else {
_local1.kick = false;
}
}
if (_local1.stun == true) {
if (_local1.stunCount > 0) {
_local1.stunCount--;
} else {
if (_local1.xSpeed < 0) {
if (_local1.currentSprite != LEFT) {
_local1.sprite.gotoAndStop("left");
_local1.currentSprite = LEFT;
}
} else if (_local1.xSpeed > 0) {
if (_local1.currentSprite != RIGHT) {
_local1.sprite.gotoAndStop("right");
_local1.currentSprite = RIGHT;
}
} else if (_local1.ySpeed < 0) {
if (_local1.currentSprite != UP) {
_local1.sprite.gotoAndStop("up");
_local1.currentSprite = UP;
}
} else if (_local1.ySpeed > 0) {
if (_local1.currentSprite != DOWN) {
trace("DOWN SPRITE");
_local1.sprite.gotoAndStop("down");
_local1.currentSprite = DOWN;
}
} else {
_local1.sprite.gotoAndStop("down");
}
_local1.stun = false;
}
}
if (_local1.tackle == true) {
if (_local1.tackleCount > 0) {
_local1.tackleCount--;
} else {
_local1.tackle = false;
}
}
if (game.ballKicker == _local1) {
if (_local1.afterTouch > 0) {
_local1.afterTouch--;
} else {
game.ballKicker = null;
}
}
_local2++;
}
var _local8 = _local5[_local5.length - 1];
if (_local8.kick == true) {
if (_local8.kickLock > 0) {
_local8.kickLock--;
} else {
_local8.kick = false;
}
}
_local8.ai.apply(null, [_local8, team]);
if ((game.activeGoalie == _local8) && (game.goalKickTeam.control == HUMAN)) {
var _local11 = false;
} else {
var _local11 = true;
}
var _local9 = 3;
var _local12 = 0.5;
applyPhysics(_local8, false, true, _local9, _local9, _local12, _local11, 210, 290, null, null);
_local1.sprite._x = Math.min(_local1.sprite._x, game.rightPoint);
_local1.sprite._x = Math.max(_local1.sprite._x, game.leftPoint);
_local1.sprite._y = Math.min(_local1.sprite._y, game.btmGoalLine);
_local1.sprite._y = Math.max(_local1.sprite._y, game.topGoalLine);
};
updateNonActivePlayer = function (player, team) {
var _local1 = player;
var _local2 = game.ball;
_local1.sprite.hightlight_mc._alpha = 0;
if (_local1.sprite._y < _local2.sprite._y) {
if (_local1.currentSprite != DOWN) {
_local1.sprite.gotoAndStop("down");
_local1.sprite.anim_mc.gotoAndPlay(1);
_local1.currentSprite = DOWN;
}
} else if (_local1.sprite._y > _local2.sprite._y) {
if (_local1.currentSprite != UP) {
_local1.sprite.gotoAndStop("up");
_local1.sprite.anim_mc.gotoAndPlay(1);
_local1.currentSprite = UP;
}
}
_local1.ai.apply(null, [_local1, team]);
};
activeHuman = function (p) {
var _local4 = game.ball;
var _local5 = p.radar;
var _local3 = _global.keys;
p.sprite.radar_mc._visible = true;
p.sprite.hightlight_mc._alpha = 75;
if (_local3.left) {
p.xSpeed--;
if (game.ballKicker == p) {
_local4.xSpeed = _local4.xSpeed - 0.5;
}
} else if (_local3.right) {
p.xSpeed++;
if (game.ballKicker == p) {
_local4.xSpeed = _local4.xSpeed + 0.5;
}
}
if (_local3.up) {
p.ySpeed--;
if (game.ballKicker == p) {
}
}
if (_local3.down) {
p.ySpeed++;
if (p.currentSprite != DOWN) {
p.sprite.gotoAndStop("down");
p.sprite.anim_mc.gotoAndPlay(1);
p.currentSprite = DOWN;
}
if (game.ballKicker == p) {
}
}
if (_local3.a) {
if (p == ballOwner) {
kickBall(p);
} else if (p.sprite.radar_mc.hitTest(ballOwner.sprite.radar_mc)) {
tackle(p);
}
}
if (_local3.b) {
if (p == ballOwner) {
kickToNearestPlayer(p);
}
}
if ((p.xSpeed != 0) and (p.ySpeed > 0)) {
if (p.currentSprite != DOWN) {
p.sprite.gotoAndStop("down");
p.sprite.anim_mc.gotoAndPlay(1);
p.currentSprite = DOWN;
}
} else if ((p.xSpeed != 0) and (p.ySpeed < 0)) {
if (p.currentSprite != UP) {
p.sprite.gotoAndStop("up");
p.sprite.anim_mc.gotoAndPlay(1);
p.currentSprite = UP;
}
} else if (p.xSpeed < 0) {
if (p.currentSprite != LEFT) {
p.sprite.gotoAndStop("left");
p.sprite.anim_mc.gotoAndPlay(1);
p.currentSprite = LEFT;
}
} else if (p.xSpeed > 0) {
if (p.currentSprite != RIGHT) {
p.sprite.gotoAndStop("right");
p.sprite.anim_mc.gotoAndPlay(1);
p.currentSprite = RIGHT;
}
} else if (p.ySpeed < 0) {
if (p.currentSprite != UP) {
p.sprite.gotoAndStop("up");
p.sprite.anim_mc.gotoAndPlay(1);
p.currentSprite = UP;
}
} else if (p.ySpeed > 0) {
if (p.currentSprite != DOWN) {
p.sprite.gotoAndStop("down");
p.sprite.anim_mc.gotoAndPlay(1);
p.currentSprite = DOWN;
}
}
if ((p.xSpeed == 0) && (p.ySpeed == 0)) {
p.sprite.anim_mc.stop();
}
if (_local5.hitTest(_local4) && (!p.kick)) {
p.inKickRange = true;
} else {
p.inKickRange = false;
}
if (p.kick) {
if (p.kickLock > 0) {
p.kickLock--;
} else {
p.kick = false;
}
}
if (ballOwner == p) {
lockBall(p);
} else if (p.sprite.hitTest(ballOwer.sprite)) {
p.team.activeAttack = true;
} else {
p.team.activeAttack = false;
}
};
applyPhysics = function (object, xLock, yLock, xMax, yMax, friction, track, xBoundryRight, xBoundryLeft, yBoundryTop, yBoundryBottom) {
var _local1 = object;
_local1.xTarget = Math.max(_local1.xTarget, game.leftPoint);
_local1.xTarget = Math.min(_local1.xTarget, game.rightPoint);
if (track) {
if (_local1.xTarget > _local1.sprite._x) {
_local1.xSpeed++;
} else if (_local1.xTarget < _local1.sprite._x) {
_local1.xSpeed--;
}
if (_local1.yTarget > _local1.sprite._y) {
_local1.ySpeed++;
} else if (_local1.yTarget < _local1.sprite._y) {
_local1.ySpeed--;
}
}
var _local5 = -xMax;
var _local6 = -yMax;
_local1.xSpeed = Math.max(_local1.xSpeed, _local5);
_local1.xSpeed = Math.min(_local1.xSpeed, xMax);
_local1.ySpeed = Math.max(_local1.ySpeed, _local6);
_local1.ySpeed = Math.min(_local1.ySpeed, yMax);
if (_local1.xSpeed > 0) {
_local1.xSpeed = _local1.xSpeed - friction;
}
if (_local1.xSpeed < 0) {
_local1.xSpeed = _local1.xSpeed + friction;
}
if (_local1.ySpeed > 0) {
_local1.ySpeed = _local1.ySpeed - friction;
}
if (_local1.ySpeed < 0) {
_local1.ySpeed = _local1.ySpeed + friction;
}
var _local2 = _local1.sprite._x - _local1.xTarget;
var _local3 = _local1.sprite._y - _local1.yTarget;
if (xLock == false) {
if (_local2 > 0) {
_local1.xSpeed = Math.min(_local1.xSpeed, _local2);
} else if (_local2 < 0) {
_local1.xSpeed = Math.max(_local1.xSpeed, _local2);
}
_local1.sprite._x = _local1.sprite._x + _local1.xSpeed;
}
if (yLock == false) {
if (_local3 > 0) {
_local1.ySpeed = Math.min(_local1.ySpeed, _local3);
} else if (_local2 < 0) {
_local1.ySpeed = Math.max(_local1.ySpeed, _local3);
}
_local1.sprite._y = _local1.sprite._y + _local1.ySpeed;
}
if (xBoundryLeft != null) {
_local1.sprite._x = Math.min(_local1.sprite._x, xBoundryLeft);
}
if (xBoundryRight != null) {
_local1.sprite._x = Math.max(_local1.sprite._x, xBoundryRight);
}
if (yBoundryTop != null) {
_local1.sprite._y = Math.max(_local1.sprite._y, yBoundryTop);
}
if (yBoundryBottom != null) {
_local1.sprite._y = Math.min(_local1.sprite._y, yBoundryBottom);
}
};
checkBall = function (player) {
var _local1 = player;
var _local2 = game.ball;
var _local4 = player.sprite.ballLock_mc;
var _local5 = _local1.sprite;
if (_local2.sprite._y > 338) {
_local2.half = DOWN;
} else {
_local2.half = UP;
}
var _local3 = new Object();
_local3.x = _local2.sprite._x;
_local3.y = _local2.sprite._y;
ball.sprite.localToGlobal(_local3);
_local3.x = _local3.x - 9.5;
_local3.y = _local3.y - 9.5;
if ((_local2.sprite.hitTest(_local4) && (_local2.heightPos <= 0)) && (_local1.kick == false)) {
if ((_local1.xSpeed != 0) || (_local1.ySpeed != 0)) {
if ((ballOwner == null) || (ballOwner == _local1)) {
if (ballOwner == null) {
_local1.updateTarget = true;
}
ballOwner = _local1;
game.lastOwner = _local1;
_local2.xSpeed = 0;
_local2.ySpeed = 0;
}
} else if ((ballOwner == _local1) || (ballOwner == null)) {
ballOwner = null;
}
} else if ((ballOwner == _local1) || (ballOwner == null)) {
ballOwner = null;
}
};
updateBall = function () {
var _local1 = game.ball;
if ((ballOwner == null) || (game.ballKicker != null)) {
applyPhysics(_local1, false, false, 20, 20, 0.125, false);
}
if (game.state == INPLAY) {
if (_local1.sprite._x < game.leftPoint) {
_local1.xSpeed = Math.abs(_local1.xSpeed);
} else if (_local1.sprite._x > game.rightPoint) {
_local1.xSpeed = -_local1.xSpeed;
}
if (((_local1.sprite._y + _local1.ySpeed) < game.topGoalLine) || ((_local1.sprite._y + _local1.ySpeed) > game.btmGoalLine)) {
trace("CHECKING Y BOUNDRY");
var _local2 = checkGoals(_local1.half);
if (_local2 == MISS) {
trace("MISS");
if (_local1.ySpeed < 0) {
_local1.ySpeed = Math.abs(_local1.ySpeed);
} else if (_local1.ySpeed > 0) {
_local1.ySpeed = -_local1.ySpeed;
}
} else if (_local2 == SAVE) {
trace("SAVE");
if (game.teamA.playDirection == _local1.half) {
var _local3 = game.teamB.players[4];
} else if (game.teamB.playDirection == _local1.half) {
var _local3 = game.teamA.players[4];
}
deflectBall(_local3);
} else {
trace("TRIGGER GOAL");
goal(_local2);
}
}
}
game.ballGraphic.sprite._x = _local1.sprite._x;
game.ballGraphic.sprite._y = _local1.sprite._y;
if (_local1.heightPos > 0) {
_local1.heightPos--;
}
};
lockBall = function (playerToLock) {
var _local3 = playerToLock;
var _local2 = game.ball;
var _local1 = new Object();
_local1.x = _local3.sprite.ballLock_mc._x;
_local1.y = _local3.sprite.ballLock_mc._y - game_mc.pitch_mc._y;
_local3.sprite.localToGlobal(_local1);
_local1.x = _local1.x - 9.5;
_local1.y = _local1.y - 9.5;
_local2.sprite._x = _local1.x;
_local2.sprite._y = _local1.y;
game.ballGraphic.sprite._x = _local2.sprite._x;
game.ballGraphic.sprite._y = _local2.sprite._y;
};
kickBall = function (playerToKick, yVel) {
var _local2 = game.ball;
var _local1 = playerToKick;
if (ballOwner == _local1) {
if ((_local1.kick == false) && (_local1.tackle == false)) {
game.ballKicker = _local1;
_local1.afterTouch = 10;
_local1.kick = true;
_local1.kickLock = 20;
_local2.xSpeed = _local1.xSpeed * 2;
if (yVel != undefined) {
_local2.ySpeed = yVel;
} else {
_local2.ySpeed = _local1.ySpeed * 2;
}
playSound(kickSoft_snd);
}
}
};
shoot = function (playerToShoot, xVel, yVel) {
var _local2 = game.ball;
var _local1 = playerToShoot;
game.ballKicker = _local1;
_local1.afterTouch = 10;
_local1.kick = true;
_local1.kickLock = 50;
_local2.xSpeed = xVel;
_local2.ySpeed = yVel;
playSound(kickSoft_snd);
};
tackle = function (playerToTackle) {
var _local1 = playerToTackle;
if (_local1.ySpeed < 0) {
}
var _local2 = int(Math.random() * 50) + 20;
_local2 = 50;
if (_local2 <= 10) {
var _local4 = true;
var _local3 = false;
} else if (_local2 <= 66) {
trace("SUCCESSFUL TACKLE");
var _local4 = false;
var _local3 = true;
} else if (_local2 <= 100) {
var _local4 = false;
var _local3 = false;
_local1.ySpeed = _local1.ySpeed * 3;
_local1.xSpeed = _local1.xSpeed * 3;
}
if (_local4 == false) {
if (_local3 == true) {
tackled(ballOwner);
}
ballOwner = _local1;
ballOwner.tackle = true;
ballOwner.tackleCount = 20;
} else {
fouled(playerToTackle, ballOwner);
}
};
tackled = function (playerBeenTackled) {
var _local1 = playerBeenTackled;
_local1.stun = true;
_local1.stunCount = 50;
playSound(oof_snd);
};
fouled = function (player, playerBeenFouled) {
var _local1 = playerBeenFouled;
var _local4 = game_mc.pitch_mc.topPenaltyBox_mc;
var _local2 = game_mc.pitch_mc.btmPenaltyBox_mc;
if (_local1.sprite.hitTest(_local4)) {
var _local3 = UP;
} else if (_local1.sprite.hitTest(_local2)) {
var _local3 = DOWN;
} else {
var _local3 = null;
}
if (playerBeenFouled.team.playDirection == _local3) {
trace("PENALTY");
showMessage("PENALTY", awardPenalty, [_local1]);
} else {
showMessage("FREE KICK", freeKick, [_local1]);
}
game.state = WAIT;
};
deflectBall = function () {
var _local1 = game.ball;
if (_local1.xSpeed < 0) {
_local1.xSpeed = Math.abs(_local1.xSpeed);
} else if (_local1.xSpeed > 0) {
_local1.xSpeed = -_local1.xSpeed;
}
if (_local1.ySpeed < 0) {
_local1.ySpeed = Math.abs(_local1.ySpeed);
} else if (_local1.ySpeed > 0) {
_local1.ySpeed = -_local1.ySpeed;
}
};
freeKick = function (args) {
trace("__FREEKICK__");
game.freeKickPlayer = args[0];
game.state = SETFREEKICK;
};
awardPenalty = function (args) {
trace("___PENALTY___");
var _local1 = args[0];
game.penaltyPlayer = _local1;
game.state = SETPENALTY;
};
updatePushScroll = function () {
top_ball_margin = 200;
bottom_ball_margin = 220;
if (game_mc.pitch_mc.ball_mc._y < ((-game_mc.pitch_mc._y) + top_ball_margin)) {
game_mc.pitch_mc._y = Math.min((-game_mc.pitch_mc.ball_mc._y) + top_ball_margin, 0);
} else if (game_mc.pitch_mc.ball_mc._y > ((-game_mc.pitch_mc._y) + bottom_ball_margin)) {
game_mc.pitch_mc._y = Math.max((-game_mc.pitch_mc.ball_mc._y) + bottom_ball_margin, -328);
}
};
defence = function (player, team) {
var _local1 = player;
var _local2 = game.ball;
var _local4 = int(Math.random() * 30);
if (game.state == INPLAY) {
_local4 = 10;
if (_local4 == 10) {
if ((ballOwner == team.activePlayer) && (_local2.half == team.playDirection)) {
_local1.xTarget = _local1.x;
_local1.yTarget = game.midLine;
} else if (_local2.half != team.playDirection) {
var _local6 = int(Math.random() * 40);
var _local5 = int(Math.random() * 40);
var _local8 = int(Math.random() * 80);
var _local7 = int(Math.random() * 80);
if (_local1.team.control == HUMAN) {
_local1.xTarget = (ballOwner.sprite._x + _local6) - _local5;
_local1.yTarget = (ballOwner.sprite._y + _local8) - _local7;
} else {
_local1.xTarget = _local2.sprite._x;
_local1.yTarget = _local2.sprite._y;
}
} else {
_local1.xTarget = _local1.x;
_local1.yTarget = _local1.y;
}
}
} else if (game.state == GOALKICK) {
if (game.goalKickTeam == team) {
_local1.xTarget = _local1.x;
_local1.yTarget = _local1.y;
}
}
};
attack = function (player) {
var _local1 = player;
var _local3 = game.ball;
var _local7 = int(Math.random() * _local1.reactions);
var _local2 = _local1.team;
if (game.state == INPLAY) {
if (_local7 == 10) {
if (ballOwner == _local2.activePlayer) {
var _local6 = int(Math.random() * 80);
var _local5 = int(Math.random() * 80);
var _local10 = int(Math.random() * 40);
var _local9 = int(Math.random() * 40);
if (ballOwner.sprite._x < 250) {
_local1.xTarget = int((_local3.sprite._x + 100) + _local6);
} else {
_local1.xTarget = int((_local3.sprite._x - 100) - _local5);
}
if (_local1.team.playDirection == UP) {
trace("MARK GOAL");
_local1.yTarget = game.topGoalLine + _local6;
} else {
trace("MARK GOAL");
_local1.yTarget = game.btmGoalLine - _local6;
}
} else if (_local1.team.activeAttack) {
var _local6 = int(Math.random() * 80);
var _local5 = int(Math.random() * 80);
_local1.xTarget = (int(_local3.sprite._x) + _local6) - _local5;
_local1.yTarget = (int(_local3.sprite._y) + _local6) - _local5;
} else {
var _local6 = int(Math.random() * 80);
var _local5 = int(Math.random() * 80);
_local1.xTarget = (int(_local3.sprite._x) + _local6) - _local5;
_local1.yTarget = (int(_local3.sprite._y) + _local6) - _local5;
}
}
} else if (game.state == GOALKICK) {
if (game.goalKickTeam == _local2) {
var _local4 = game.activeGoalie;
var _local6 = int(Math.random() * 80);
var _local5 = int(Math.random() * 80);
var _local10 = int(Math.random() * 80);
var _local9 = int(Math.random() * 80);
if (_local4.sprite._x < 250) {
_local1.xTarget = int(250 - _local6);
} else {
_local1.xTarget = int(250 + _local6);
}
if (_local2.playDirection == UP) {
_local1.yTarget = int(game.midLine - _local10);
} else if (_local2.playDirection == DOWN) {
_local1.yTarget = int(game.midLine + _local9);
}
} else {
var _local8 = int(Math.random() * (_local1.reactions * 3));
if (_local8 == 10) {
var _local4 = game.activeGoalie;
var _local6 = int(Math.random() * 80);
var _local5 = int(Math.random() * 80);
var _local10 = int(Math.random() * 80) + 50;
var _local9 = int(Math.random() * 80) + 50;
_local1.xTarget = (_local4.sprite._x + _local6) - _local5;
if (_local2.playDirection == UP) {
_local1.yTarget = _local4.sprite._y + _local10;
} else if (_local2.playDirection == DOWN) {
_local1.yTarget = _local4.sprite._y - _local9;
}
}
}
}
};
goalie = function (player, team) {
var _local2 = player;
var _local3 = game.ball;
var _local6 = int(Math.random() * _local2.reactions);
if (_local2.sprite._y > game.midLine) {
_local2.sprite.gotoAndStop("up");
} else {
_local2.sprite.gotoAndStop("down");
}
if (game.state == INPLAY) {
_local6 = 10;
if (_local6 == 10) {
_local2.xTarget = int(_local3.sprite._x);
_local2.yTarget = int(_local3.sprite._y);
}
var _local9 = 140;
var _local11 = _local2.sprite._x - _local3.sprite._x;
var _local10 = _local2.sprite._y - _local3.sprite._y;
if (_local2.sprite.radar_mc.hitTest(_local3.sprite) && (_local2.kick == false)) {
goalKick(_local2);
}
} else if (game.state == GOALKICK) {
if (game.activeGoalie == _local2) {
if (team.control == HUMAN) {
var _local5 = _global.keys;
if (_local5.left) {
_local2.xSpeed--;
}
if (_local5.right) {
_local2.xSpeed++;
}
if (_local5.a) {
if (team.playDirection == UP) {
var _local8 = -10;
} else if (team.playDirection == DOWN) {
var _local8 = 10;
}
resetGoalKick();
firstKick(_local2, 0, _local8);
}
lockBall(_local2);
} else if (team.control == CPU) {
_local2.xTarget = 250;
lockBall(_local2);
var _local7 = int(Math.random() * 30);
if (_local7 == 10) {
if (team.playDirection == UP) {
var _local8 = -10;
} else if (team.playDirection == DOWN) {
var _local8 = 10;
}
firstKick(_local2, 0, _local8);
game.state = INPLAY;
}
}
}
}
};
activeCpu = function (p, team) {
var _local4 = game.ball;
var _local8 = int(Math.random() * p.reactions);
if (p.ySpeed > 0) {
if (p.currentSprite != DOWN) {
p.sprite.gotoAndStop("down");
p.sprite.anim_mc.gotoAndPlay(1);
p.currentSprite = DOWN;
}
} else if (p.ySpeed < 0) {
if (p.currentSprite != UP) {
p.sprite.gotoAndStop("up");
p.sprite.anim_mc.gotoAndPlay(1);
p.currentSprite = UP;
}
}
p.sprite.radar_mc._visible = true;
p.sprite.radar_mc._alpha = 0;
if (p != ballOwner) {
if (_local8 == 10) {
if (ballOwner == null) {
p.xTarget = int(_local4.sprite._x);
p.yTarget = int(_local4.sprite._y);
} else {
p.xTarget = ballOwner._x + (ballOwner.xSpeed * 6);
p.yTarget = ballOwner._y + (ballOwner.ySpeed * 6);
}
}
if (p.sprite.radar_mc.hitTest(ballOwner.sprite.radar_mc)) {
var _local5 = int(Math.random() * p.reactions);
_local5 = 10;
if (_local5 == 10) {
trace("CPU TACKLE");
if (p.team != ballOwner.team) {
tackle(p);
}
}
}
} else {
lockBall(p);
var _local10 = int(Math.random() * 100);
if ((_local10 == 10) || ((p.updateTarget == true) && (ballOwner == p))) {
var _local7 = int(Math.random() * 40);
var _local6 = int(Math.random() * 40);
p.xTarget = (team.xGoalTarget + _local7) - _local6;
p.yTarget = team.yGoalTarget;
p.updateTarget = false;
}
}
team.AiTarget._x = p.xTarget;
team.AiTarget._y = p.yTarget;
if (p == ballOwner) {
var _local3 = game.teamA.activePlayer;
var _local11 = int(Math.random() * 70);
if (_local11 == 10) {
if (p.sprite.aiRadar_mc.hitTest(_local3.sprite)) {
kickToNearestPlayer(p);
}
}
if (p.sprite.lookAheadLeft_mc.hitTest(_local3)) {
p.xTarget = p.xTarget + 10;
} else if (p.sprite.lookAheadRight_mc.hitTest(_local3)) {
p.xTarget = p.xTarget - 10;
}
var _local9 = int(Math.random() * p.reactions);
if ((_local9 == 10) || (p.sprite.hitTest(team.AiTarget))) {
cpuShoot(p);
}
}
};
kickToNearestPlayer = function (player) {
trace("PASS TO NEAREST PLAYER");
var _local3 = player;
var _local8 = _local3.team;
var _local2 = 0;
var _local9 = _local8.players.length - 1;
_local2 = 0;
while (_local2 < _local9) {
var _local1 = _local8.players[_local2];
if (_local3 != _local1) {
var _local6 = _local3.sprite._x - _local1.sprite._x;
var _local5 = _local3.sprite._y - _local1.sprite._y;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
_local1.distanceFromActive = _local7;
}
_local2++;
}
var _local4 = null;
_local2 = 0;
_local2 = 0;
while (_local2 < _local9) {
var _local1 = _local8.players[_local2];
if (_local3 != _local1) {
if (_local1.stun == false) {
if (_local4 == null) {
closestFlag = _local2;
_local4 = _local1.dist;
} else if (_local1.dist < _local4) {
closestFlag = _local2;
_local4 = _local1.dist;
}
}
}
_local2++;
}
var _local10 = _local8.players[closestFlag];
var _local11 = new Object();
trace(_local11.x);
_local10.sprite.localToGlobal(_local11);
trace(_local11.x);
kickToPoint(_local3, _local10.sprite._x, _local10.sprite._y);
};
kickToPoint = function (player, x, y) {
var _local1 = player;
var _local2 = game.ball;
var _local8 = Math.round((Math.atan2(y - _local1.sprite._y, x - player.sprite._x) * 180) / Math.PI);
var _local4 = _local8 * (Math.PI/180);
var _local7 = _local1.sprite._x - x;
var _local6 = _local1.sprite._y - y;
var _local10 = Math.sqrt((_local7 * _local7) + (_local6 * _local6));
var _local3 = 10;
_local3 = 10;
var _local9 = int(Math.cos(_local4) * _local3);
var _local5 = int(Math.sin(_local4) * _local3);
_local2.xSpeed = _local9;
_local2.ySpeed = _local5;
game.ballKicker = _local1;
_local1.afterTouch = 10;
_local1.kick = true;
_local1.kickLock = 20;
trace("yVel :" + _local5);
};
cpuShoot = function (p) {
if (p.team.playDirection == UP) {
var _local6 = -8;
var _local2 = game.topGoalLine;
} else if (p.team.playDirection == DOWN) {
var _local6 = 8;
var _local2 = game.btmGoalLine;
}
var _local4 = int(Math.random() * 50);
var _local3 = int(Math.random() * 50);
var _local5 = (p.team.xGoalTarget + _local4) - _local3;
kickToPoint(p, _local5, _local2);
trace("CPU SHOOT " + _local2);
};
goalKick = function (player) {
var _local1 = player;
_local1.jump = null;
team.activePlayer = null;
game.goalKickTeam = _local1.team;
game.activeGoalie = _local1;
game.state = GOALKICK;
};
resetGoalKick = function () {
game.activeGoalie.kick = true;
game.activeGoalie.kickLock = 20;
game.goalKickTeam = null;
game.activeGoalie = null;
};
cpuAiLoop = function () {
};
updateScores = function () {
gameUi_mc.teamA_txt.text = game.teamA.score;
gameUi_mc.teamB_txt.text = game.teamB.score;
};
checkGoals = function (direction) {
var _local1 = game.ball;
var _local2 = game.topGoal;
var _local5 = game.btmGoal;
if (game.teamA.playDirection == _local1.half) {
var _local4 = game.teamB.players[4];
} else if (game.teamB.playDirection == _local1.half) {
var _local4 = game.teamA.players[4];
}
if (_local4.sprite.radar_mc.hitTest(_local1.sprite)) {
var _local3 = SAVE;
} else if (direction == UP) {
trace("UP GOAL CHECK");
if ((_local1.sprite._x > _local2._x) && (_local1.sprite._x < (_local2._x + game.goalWidth))) {
trace("UP GOAL");
var _local3 = UP;
} else {
var _local3 = MISS;
}
} else if (direction == DOWN) {
trace("DOWN GOAL CHECK");
if ((_local1.sprite._x > _local2._x) && (_local1.sprite._x < (_local2._x + game.goalWidth))) {
var _local3 = DOWN;
} else {
var _local3 = MISS;
}
}
return(_local3);
};
goal = function (directionOfScore) {
trace("goal scored :" + directionOfScore);
if (directionOfScore == game.teamA.playDirection) {
trace("HUMAN SCORE");
game.teamA.score++;
game.startTeam = game.teamB;
} else if (directionOfScore == game.teamB.playDirection) {
trace("CPU SCORE");
game.teamB.score++;
game.startTeam = game.teamA;
}
updateScores();
game.state = SCOREGOAL;
};
newGoal = function () {
pauseTimer();
playSound(yay_snd);
showMessage("GOAL!!!", nextBall, null);
game.state = GOAL;
};
nextBall = function () {
resumeTimer();
game_mc.message_mc.removeMovieClip();
game.state = SETKICKOFF;
};
setUpCorner = function (args) {
var _local4 = args[0];
var _local2 = game.ball;
var _local3 = int(Math.random() * 4);
var _local1 = _local4.players[_local3];
game.cornerPlayer = _local1;
if (_local2.sprite._x < game.centerPoint) {
game.cornerSide = LEFT;
} else {
game.cornerSide = RIGHT;
}
if (game.cornerSide == LEFT) {
_local1.sprite._x = game.leftPoint;
} else if (game.cornerSide == RIGHT) {
_local1.sprite._x = game.rightPoint;
}
if (_local1.team.playDirection == UP) {
var _local5 = game.topGoalLine;
} else if (_local1.team.playDirection == DOWN) {
var _local5 = game.bottomGoalLine;
}
_local1.sprite._y = _local5;
game_mc.pitch_mc.attachMovie("cornerArrow_lib", "cornerArrow_mc", 20000);
game_mc.pitch_mc.cornerArrow_mc._x = _local1.sprite._x;
game_mc.pitch_mc.cornerArrow_mc._y = _local1.sprite._y;
if (game.cornerSide == LEFT) {
} else if (game.cornerSide == RIGHT) {
game_mc.pitch_mc.cornerArrow_mc._rotation = 180;
}
_local2.sprite._x = _local1.sprite._x;
if (_local1.team.playDirection == DOWN) {
_local2.sprite._y = _local1.sprite._y - 30;
} else if (_local1.team.playDirection == UP) {
_local2.sprite._y = _local1.sprite._y + 30;
}
game.ballGraphic.sprite._x = _local2.sprite._x;
game.ballGraphic.sprite._y = _local2.sprite._y;
game_mc.pitch_mc.cornerArrow_mc._alpha = 45;
arrowMoveDown();
game.state = CORNER;
};
updateCorner = function () {
var _local6 = _global.keys;
var _local2 = game.ball;
if (_local6.a) {
aT.stop();
var _local4 = game_mc.pitch_mc.cornerArrow_mc;
var _local5 = _local4._rotation;
var _local3 = _local5 * (Math.PI/180);
var _local8 = Math.cos(_local3) * 8;
var _local7 = Math.sin(_local3) * 8;
_local2.xSpeed = _local8;
_local2.ySpeed = _local7;
ballOwner = null;
game.cornerPlayer.kick = true;
game.cornerPlayer.kickLock = 20;
game.state = INPLAY;
}
};
arrowMoveDown = function () {
var _local1 = game_mc.pitch_mc.cornerArrow_mc;
if ((game.cornerSide == LEFT) && (game.cornerPlayer.team.playDirection == DOWN)) {
var _local2 = _local1._rotation - 90;
} else if ((game.cornerSide == RIGHT) && (game.cornerPlayer.team.playDirection == DOWN)) {
var _local2 = _local1._rotation + 90;
} else if ((game.cornerSide == LEFT) && (game.cornerPlayer.team.playDirection == UP)) {
var _local2 = _local1._rotation + 90;
} else if ((game.cornerSide == RIGHT) && (game.cornerPlayer.team.playDirection == UP)) {
var _local2 = _local1._rotation - 90;
}
aT = newTween("arrowRotate", _local1, "_rotation", et, _local1._rotation, _local2, 1, true, arrowMoveUp, []);
};
arrowMoveUp = function () {
var _local1 = game_mc.pitch_mc.cornerArrow_mc;
if ((game.cornerSide == LEFT) && (game.cornerPlayer.team.playDirection == DOWN)) {
var _local2 = _local1._rotation + 90;
} else if ((game.cornerSide == RIGHT) && (game.cornerPlayer.team.playDirection == DOWN)) {
var _local2 = _local1._rotation - 90;
} else if ((game.cornerSide == LEFT) && (game.cornerPlayer.team.playDirection == UP)) {
var _local2 = _local1._rotation - 90;
} else if ((game.cornerSide == RIGHT) && (game.cornerPlayer.team.playDirection == UP)) {
var _local2 = _local1._rotation + 90;
}
aT = newTween("arrowRotate", _local1, "_rotation", et, _local1._rotation, _local2, 1, true, arrowMoveDown, []);
};
showMessage = function (textToDisplay, callBack, args, secs) {
if (secs == undefined) {
secs = 2;
}
game.timer.stop();
game_mc.attachMovie("gameMessage_lib", "message_mc", 16000);
game_mc.message_mc.inner_mc.textbox_txt.text = textToDisplay;
game_mc.message_mc._x = 250;
game_mc.message_mc._y = 140;
newTween("messageFade", game_mc.message_mc, "_alpha", et, 0, 100, secs, true, messageFadeOut, [callBack, args]);
};
messageFadeOut = function (callBack, args) {
trace(callBack);
newTween("messageFade", game_mc.message_mc, "_alpha", et, 100, 0, 1, true, callBack, [args]);
};
setSounds = function () {
kickSoft_snd = new Sound(this);
kickSoft_snd.attachSound("kickSoft_lib");
ow_snd = new Sound(this);
ow_snd.attachSound("ow_lib");
oof_snd = new Sound(this);
oof_snd.attachSound("oof_lib");
proj_snd = new Sound(this);
proj_snd.attachSound("projector_lib");
park_snd = new Sound(this);
park_snd.attachSound("park_lib");
yay_snd = new Sound(this);
yay_snd.attachSound("yay_lib");
click_snd = new Sound(this);
click_snd.attachSound("click_lib");
};
playSound = function (soundId, loop) {
if (loop) {
soundId.start(0, 9999);
} else {
soundId.start(0, 0);
}
};
stopSound = function (soundId) {
soundId.stop();
};
playBgLoop = function () {
playSound(theme.bgLoop, true);
};
stopBgLoop = function () {
stopSound(theme.bgLoop);
};
themePicker = function () {
attachMovie("themePicker_lib", "themePicker_mc", 250);
themePicker_mc.theme1_mc.theme = 0;
themePicker_mc.theme2_mc.theme = 1;
themePicker_mc.theme1_mc.onRelease = themeSelected;
themePicker_mc.theme2_mc.onRelease = themeSelected;
themePicker_mc.theme1_mc.onRollOver = buttonRollOver;
themePicker_mc.theme2_mc.onRollOver = buttonRollOver;
themePicker_mc.theme1_mc.onRollOut = buttonRollOut;
themePicker_mc.theme2_mc.onRollOut = buttonRollOut;
themePicker_mc.k5Btn.onRelease = buttonRelease;
themePicker_mc.k5Btn.releaseFunction = openUrl;
themePicker_mc.k5Btn.args = ["http://www.kill5.com/home.php?from=pxlkck", "_blank"];
};
removeThemePicker = function () {
themePicker_mc.removeMovieClip();
};
themeSelected = function () {
themeToUse = this.theme;
removeThemePicker();
startGame();
};
init();
Symbol 7 MovieClip Frame 35
stop();
Symbol 71 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 35
stop();
Symbol 146 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 1
stop();
Symbol 151 MovieClip [startScreen_lib] Frame 41
_parent.setStartScreen();
Symbol 151 MovieClip [startScreen_lib] Frame 84
stop();
Symbol 176 MovieClip Frame 1
stop();
Symbol 468 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 469 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 470 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 471 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 472 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 188 MovieClip Frame 145
done = true;
stop();
Symbol 206 MovieClip [goalieA] Frame 1
stop();
Symbol 206 MovieClip [goalieA] Frame 88
stop();
Symbol 211 MovieClip [goalieA_bw] Frame 1
stop();
Symbol 211 MovieClip [goalieA_bw] Frame 88
stop();
Symbol 222 MovieClip [goalieB] Frame 1
stop();
Symbol 222 MovieClip [goalieB] Frame 57
stop();
Symbol 227 MovieClip [goalieB_bw] Frame 1
stop();
Symbol 235 MovieClip [teamA] Frame 1
stop();
Symbol 291 MovieClip [teamA_bw] Frame 1
stop();
Symbol 292 MovieClip [teamB] Frame 1
stop();
Symbol 292 MovieClip [teamB] Frame 35
stop();
Symbol 348 MovieClip [teamB_bw] Frame 1
stop();
Symbol 348 MovieClip [teamB_bw] Frame 35
stop();
Symbol 354 MovieClip Frame 1
stop();
Symbol 367 Button
on (release) {
previtem = "a";
gotoAndStop ("choose");
}
Symbol 369 Button
on (release) {
previtem = "b";
gotoAndStop ("choose");
}
Symbol 371 Button
on (release) {
previtem = "c";
gotoAndStop ("choose");
}
Symbol 373 Button
on (release) {
previtem = "d";
gotoAndStop ("choose");
}
Symbol 375 Button
on (release) {
previtem = "e";
gotoAndStop ("choose");
}
Symbol 378 Button
on (rollOver) {
gotoAndStop(previtem);
}
Symbol 381 Button
on (release) {
_parent.recentSetting = 100;
gotoAndStop ("e");
}
Symbol 382 Button
on (release) {
_parent.recentSetting = 75;
gotoAndStop ("b");
}
Symbol 383 Button
on (release) {
_parent.recentSetting = 50;
gotoAndStop ("c");
}
Symbol 384 Button
on (release) {
_parent.recentSetting = 25;
gotoAndStop ("d");
}
Symbol 385 Button
on (release) {
_parent.recentSetting = 10;
gotoAndStop ("a");
}
Symbol 386 Button
on (release) {
gotoAndStop(previtem);
}
Symbol 387 MovieClip Frame 1
stop();
Symbol 394 MovieClip Frame 1
var startTime = getTimer();
var numFrames = 0;
var recentSetting = 10;
var recentNumFrames = 0;
var recentStartTime = startTime;
function calcFPS() {
numFrames++;
var _local1 = getTimer();
elapsedSeconds = (_local1 - startTime) / 1000;
actualFPS = numFrames / elapsedSeconds;
recentNumFrames++;
if (recentNumFrames == recentSetting) {
var _local2 = (_local1 - recentStartTime) / 1000;
recentFPSoutput = recentNumFrames / _local2;
recentStartTime = _local1;
recentNumFrames = 0;
}
}
Instance of Symbol 393 MovieClip "callCalcFPS" in Symbol 394 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.calcFPS();
}
Symbol 441 MovieClip Frame 1
stop();
Symbol 441 MovieClip Frame 15
stop();
Symbol 446 MovieClip Frame 1
stop();
Symbol 446 MovieClip Frame 15
stop();
Symbol 466 MovieClip Frame 1
stop();