STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228059
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2560 · P5120

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/29441477?noj=FRM29441477-26DC" width="1" height="1"></div>

Coke Zero Retro Electro Football.swf

This is the info page for
Flash #121727

(Click the ID number above for more basic data on this flash file.)


Text
I thought you might like this

FIELD
GOAL

CLICK "KICK" TO ATTEMPT A FIELD GOAL
- - OR - -
CHANGE FORMATION TO GO FOR IT

KICK
OFF

READY FOR SOME VIBRATING FOOTBALL?
• CLICK “KICKOFF” TO GET STARTED.
• YOU GET THE BALL FIRST.

PUNT

CLICK “KICK” TO PUNT THE BALL
- - OR - -
CHANGE FORMATION TO GO FOR IT

EXTRA
POINT

CLICK “KICK” FOR AN EXTRA POINT
- - OR - -
CHANGE FORMATION AND GO FOR 2

DEFENSE

1. PICK FORMATION & DRAG PLAYERS
2. CLICK “VIBRATE” TO RUN PLAY

OFFENSE

1. PICK FORMATION & DRAG PLAYERS
2. CLICK “VIBRATE” TO RUN PLAY
3. USE MOUSE TO TARGET PASS

<p align="center"></p>

4-3 COVER

5-2 COVER

DIME

4-3 BLITZ

SHOTGUN-PASS

WING-PASS

I FORM-RUN

PISTOL-RUN

FIELD GOAL

PUNT

8

8

8

<p align="center"><font face="DS-Digital" size="30" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="30" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="20" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="20" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="20" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="20" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="30" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

<p align="center"><font face="DS-Digital" size="30" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>

:

WHITE

RED

VS

WIN?

WHO WILL

CHOOSE YOUR TEAM

ITS GOOD

TOUCHDOWN

!

D

E

K

C

A

S

FIRST

DOWN!

SECOND
DOWN!

THIRD
DOWN!

INTERCEPTION!

END OF
QUARTER

INCOMPLETE PASS

FOURTH
DOWN!

KICK OFF!

TACKLED!

TACKLED!

BALL ON LAST
FORWARD
PROGRESS

NO GOOD

2pt CONVERSION

GOOD!

PLAYER
TURNED AROUND

BALL PLACED
AT FORWARD
PROGRESS

SAFETY!

OUT OF
BOUNDS

TURNOVER

ON

DOWNS!

TIE!

YOU

GUEST

END OF QUARTER

<p align="center"><font face="Gotham Black" size="32" color="#d82916" letterSpacing="0.000000" kerning="1">00</font></p>

<p align="center"><font face="Gotham Black" size="32" color="#d82916" letterSpacing="0.000000" kerning="1">00</font></p>

HALFTIME

FINAL

ActionScript [AS1/AS2]

Frame 1
function muteGame() { if (muted == false) { mute = new Sound(_root); mute.setVolume(0); _root.game.userInterface.muteButton.gotoAndStop(2); muted = true; } else { mute = new Sound(_root); mute.setVolume(100); _root.game.userInterface.muteButton.gotoAndStop(1); muted = false; } } stop(); _level0.ffgamesSend.setGame("retro"); if (this != _root) { stop(); } if (this != _root) { this._lockroot = true; } var muted = false; onEnterFrame = function () { if (Key.isDown(32)) { } if ((game.vibrate == true) and (game.paused == false)) { } }; this._lockroot;
Instance of Symbol 25 MovieClip in Frame 1
onClipEvent (enterFrame) { if (_root.getBytesLoaded() == _root.getBytesTotal()) { _parent.gotoAndStop(2); } } onClipEvent (enterFrame) { if (_alpha > 0) { _alpha = (100 - _root.game._alpha); } }
Instance of Symbol 28 MovieClip in Frame 2
onClipEvent (enterFrame) { if ((_parent.game.getBytesLoaded() == _parent.game.getBytesTotal()) and (_alpha < 100)) { if (_alpha < 100) { _alpha = (_alpha + 10); gotoAndStop (2); } } }
Instance of Symbol 494 MovieClip "game" in Frame 2
onClipEvent (load) { _alpha = 0; } onClipEvent (enterFrame) { if ((getBytesLoaded() == getBytesTotal()) and (_alpha < 100)) { if (_alpha < 100) { _alpha = (_alpha + 10); gotoAndStop (2); } } }
Symbol 8 MovieClip [message textfield] Frame 1
#initclip 11 Object.registerClass("message textfield", MessageFormInput); #endinitclip stop();
Symbol 8 MovieClip [message textfield] Frame 18
stop();
Symbol 8 MovieClip [message textfield] Frame 38
stop();
Symbol 13 MovieClip [Generic FormInput] Frame 1
#initclip 10 Object.registerClass("Generic FormInput", FormInput); #endinitclip stop();
Symbol 13 MovieClip [Generic FormInput] Frame 18
stop();
Symbol 13 MovieClip [Generic FormInput] Frame 38
stop();
Instance of Symbol 21 MovieClip in Symbol 22 MovieClip Frame 1
onClipEvent (enterFrame) { _width = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 50); }
Instance of Symbol 17 MovieClip in Symbol 25 MovieClip Frame 1
onClipEvent (load) { targetX = 0; } onClipEvent (enterFrame) { targetX = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 600) - _parent._x; _x = (_x + ((targetX - _x) / 5)); }
Symbol 495 MovieClip [__Packages.FormInput] Frame 0
class FormInput extends MovieClip { var variable_p, form_mc, _parent, restrict_p, tf, maxChars_p, tabIndex_p, text, value, gotoAndPlay; function FormInput () { super(); variable = variable_p; isRequired = required_p; initTF(); form_mc = _parent; var _local3 = 0; while (_local3 < 10) { if (form_mc instanceof FormMC) { break; } form_mc = form_mc._parent; _local3++; } form_mc.regFormInput(this); recallValue(); } function initTF() { tf.restrict = restrict_p; tf.maxChars = maxChars_p; tf.onSetFocus = mx.utils.Delegate.create(this, onSetFocus); tf.onKillFocus = mx.utils.Delegate.create(this, onKillFocus); tf.tabIndex = tabIndex_p; } function onSetFocus() { setNormal(); } function onKillFocus() { setValue(text); } function recallValue() { if (!remember_p) { return(undefined); } trace(" # recallValue"); var _local2 = rememberInfo_t[variable]; trace(" tValue:" + _local2); if (_local2 != undefined) { setValue(_local2); text = _local2; } } function setValue(value_a) { value = value_a; if (remember_p) { rememberInfo_t[variable] = value; } } function setError() { if (status == "error") { return(undefined); } status = "error"; gotoAndPlay("error"); } function setNormal() { if (status == "normal") { return(undefined); } status = "normal"; gotoAndPlay("normal"); } function clear() { setValue(null); text = ""; } function validate() { if (isRequired && ((value == "") || (value == undefined))) { setError(); return(false); } if ((value == "") || (value == undefined)) { return(true); } if (isEmail_p && (!validateEmail())) { setError(); return(false); } return(true); } function validateEmail() { var _local3 = value.indexOf("@"); var _local2 = value.lastIndexOf("."); if ((_local3 < 0) || (_local2 < 0)) { return(false); } if (_local3 > _local2) { return(false); } if (_local3 < 1) { return(false); } if ((_local2 - _local3) < 1) { return(false); } if ((value.length - _local2) <= 1) { return(false); } return(true); } function focus() { Selection.setFocus(tf); } function onUnload() { form_mc.removeFormInput(this); } function toString() { return("[FormInput]"); } var variable = ""; var isRequired = false; var status = "normal"; static var rememberInfo_t = new Object(); var required_p = false; var isEmail_p = false; var remember_p = false; }
Symbol 496 MovieClip [__Packages.FormMC] Frame 0
class FormMC extends MovieClip { var input_t, gotoAndPlay, _parent, content_mc, errorCode; function FormMC () { super(); trace(" # FormMC"); input_t = new Object(); } function show(sendMessage_a) { sendMessage = sendMessage_a; if (isShowing) { return(undefined); } isShowing = true; status = "normal"; gotoAndPlay("show"); } function hide() { if (!isShowing) { return(undefined); } isShowing = false; status = "normal"; _parent.extraPanel_mc.onFormHide(); gotoAndPlay("hide"); } function regFormInput(mc_a) { input_t[mc_a.variable] = mc_a; } function removeFormInput(mc_a) { delete input_t[mc_a.variable]; } function submit() { trace(" # submit"); var _local3 = true; for (var _local4 in input_t) { var _local2 = input_t[_local4]; if (_local2 == undefined) { continue; } if (!_local2.validate()) { trace((" " + _local2.variable) + " is invalid"); _local3 = false; } } if (_local3) { send(); } } function send() { trace(" # send"); content_mc.gotoAndPlay("sending"); getDataID(); } function getDataID() { trace(" # getDataID"); var _local2 = Params.dataAppUrl; trace(" tDataUrl:" + _local2); Params.data = new FanCardModel(_local2); var _local3 = {onSave:function (a) { trace(" data saved:" + a); if (Params.data.isError) { trace(" error"); this.obj.onError(); } else { trace(" returned id:" + Params.data.id); this.obj.onDataIDLoad(); } }, obj:this}; Params.data.addEventListener("onSave", _local3); status = "sending"; Params.data.message = sendMessage; trace(" sending:" + sendMessage); Params.data.save(); } function onDataIDLoad() { sendEmail(); } function sendEmail() { trace(" # sendEmail"); var _local10 = Params.emailAppUrl; var _local12 = Params.emailAppMethod; trace(" tUrl:" + _local10); trace(" tMethod:" + _local12); var _local4 = new LoadVars(); var _local8 = new LoadVars(); _local4.fromEmail = input_t.fromEmail.value; _local4.subject = Params.emailSubject; _local4.captchaCode = input_t.captchaCode.value; var _local6 = Params.emailMessage; var _local9 = Params.receiverUrl; _local9 = Util.replace(_local9, "##DATA_ID##", Params.data.id); _local6 = Util.replace(_local6, "##ADD_MESSAGE##", input_t.addMessage.value); _local6 = Util.replace(_local6, "##LINK##", _local9); _local4.messageText = _local6; trace(" tMessageText:" + _local6); var _local5 = input_t.toEmail1.value; var _local2 = 2; while (_local2 < 5) { var _local3 = input_t["toEmail" + _local2].value; if (_local3 == undefined) { } else { _local5 = _local5 + ("," + _local3); } _local2++; } _local4.toEmail = _local5; trace(" sending:" + _local4); content_mc.debug_mc.sentOut = _local4; _local8.obj = this; _local8.onLoad = function (success_a) { trace(" # onLoad"); this.obj.content_mc.debug_mc.receivedOut = this.toString(); trace(" received:" + success_a); trace(" this:" + this); trace(" success:" + this.success); trace(" test:" + this.success.indexOf("true")); trace(" test:" + (this.success.indexOf("true") >= 0)); var _local3 = (this.success != undefined) && (this.success.indexOf("true") >= 0); var _local2 = this.errorCode; trace(" tScriptSuccess:" + _local3); trace(" tErrorCode:" + _local2); if (!success_a) { _local2 = "connection_failure"; this.obj.onError(_local2, "Url must be bad"); } else if (!_local3) { this.obj.onError(_local2, "script did not work"); } else { this.obj.onSendLoad(_local2); } }; _local4.sendAndLoad(_local10, _local8, _local12); } function onSendLoad(success_a) { status = "success"; content_mc.gotoAndPlay("success"); } function onError(errorCode_a, info_a) { trace(" # onError"); status = "error"; errorCode = errorCode_a; if (errorCode.indexOf("captcha_incorrect") >= 0) { content_mc.captcha_mc.loadImage(); content_mc.captchaCode_mc.clear(); content_mc.gotoAndPlay("form_error"); } else { content_mc.out_text = (((content_mc.out_text.raw_data + "\r") + errorCode_a) + ":") + info_a; content_mc.gotoAndPlay("error"); } trace(" error_text:" + content_mc.error_text); } var isShowing = false; var sendMessage = ""; var status = "normal"; var error_text = ""; }
Symbol 497 MovieClip [__Packages.Params] Frame 0
class Params extends Object { function Params () { super(); } }
Symbol 498 MovieClip [__Packages.FanCardModel] Frame 0
class FanCardModel { var _url, _currId, _currMsg, dispatchEvent; function FanCardModel (u) { mx.events.EventDispatcher.initialize(this); _url = u; } function load() { var _local2 = new LoadVars(); _local2.onData = mx.utils.Delegate.create(this, function (response) { if (response == undefined) { this._error = true; this.onLoad(false); } else { this._error = false; this.handleLoad(response); } }); _local2.id = _currId; _local2.op = "load"; _local2.sendAndLoad(_url, _local2, "POST"); } function handleLoad(msg) { _currMsg = msg; dispatchEvent({type:"onLoad", target:this}); } function save() { var _local2 = new LoadVars(); _local2.onData = mx.utils.Delegate.create(this, function (response) { if (response == undefined) { this._error = true; this.onLoad(false); this.handleSave(0); } else { this._error = false; this.handleSave(response); } }); _local2.type = _type; _local2.dataString = _currMsg; _local2.op = "save"; _local2.sendAndLoad(_url, _local2, "POST"); } function handleSave(id) { _currId = id; dispatchEvent({type:"onSave", target:this}); } function get isError() { return(_error); } function get id() { return(_currId); } function set id(id) { _currId = id; //return(this.id); } function get message() { return(_currMsg); } function set message(msg) { _currMsg = msg; //return(message); } var _type = 1; var _error = true; }
Symbol 499 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher { function EventDispatcher () { } static function _removeEventListener(queue, event, handler) { if (queue != undefined) { var _local4 = queue.length; var _local1; _local1 = 0; while (_local1 < _local4) { var _local2 = queue[_local1]; if (_local2 == handler) { queue.splice(_local1, 1); return(undefined); } _local1++; } } } static function initialize(object) { if (_fEventDispatcher == undefined) { _fEventDispatcher = new mx.events.EventDispatcher(); } object.addEventListener = _fEventDispatcher.addEventListener; object.removeEventListener = _fEventDispatcher.removeEventListener; object.dispatchEvent = _fEventDispatcher.dispatchEvent; object.dispatchQueue = _fEventDispatcher.dispatchQueue; } function dispatchQueue(queueObj, eventObj) { var _local7 = "__q_" + eventObj.type; var _local4 = queueObj[_local7]; if (_local4 != undefined) { var _local5; for (_local5 in _local4) { var _local1 = _local4[_local5]; var _local3 = typeof(_local1); if ((_local3 == "object") || (_local3 == "movieclip")) { if (_local1.handleEvent != undefined) { _local1.handleEvent(eventObj); } if (_local1[eventObj.type] != undefined) { if (exceptions[eventObj.type] == undefined) { _local1[eventObj.type](eventObj); } } } else { _local1.apply(queueObj, [eventObj]); } } } } function dispatchEvent(eventObj) { if (eventObj.target == undefined) { eventObj.target = this; } this[eventObj.type + "Handler"](eventObj); dispatchQueue(this, eventObj); } function addEventListener(event, handler) { var _local3 = "__q_" + event; if (this[_local3] == undefined) { this[_local3] = new Array(); } _global.ASSetPropFlags(this, _local3, 1); _removeEventListener(this[_local3], event, handler); this[_local3].push(handler); } function removeEventListener(event, handler) { var _local2 = "__q_" + event; _removeEventListener(this[_local2], event, handler); } static var _fEventDispatcher = undefined; static var exceptions = {move:1, draw:1, load:1}; }
Symbol 500 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object { var func; function Delegate (f) { super(); func = f; } static function create(obj, func) { var _local2 = function () { var _local2 = arguments.callee.target; var _local3 = arguments.callee.func; return(_local3.apply(_local2, arguments)); }; _local2.target = obj; _local2.func = func; return(_local2); } function createDelegate(obj) { return(create(obj, func)); } }
Symbol 501 MovieClip [__Packages.Util] Frame 0
class Util extends Object { function Util () { super(); } static function replace(str_a, find_a, replace_a) { var _local2 = str_a.split(find_a); var _local1 = _local2.join(replace_a); return(_local1); } static function trimWhite(str_a) { while ((str_a.charCodeAt(0) < 33) && (str_a.charCodeAt(0) > 4)) { str_a = str_a.substring(1, str_a.length); } while ((str_a.charCodeAt(str_a.length - 1) < 33) && (str_a.charCodeAt(str_a.length - 1) > 4)) { str_a = str_a.substring(0, str_a.length - 1); } return(str_a); } }
Symbol 502 MovieClip [__Packages.MessageFormInput] Frame 0
class MessageFormInput extends FormInput { var value, text; function MessageFormInput () { super(); value = text; } function toString() { return("[MessageFormInput]"); } var variable_p = "addMessage"; var maxChars_p = 200; var required_p = true; var isEmail_p = false; var tabIndex_p = 10; }
Symbol 503 MovieClip [__Packages.MouseChecker] Frame 0
class MouseChecker extends MovieClip { static var instance, overList_t; var btn, nextFrame, _parent, hitTest, onEnterFrame; function MouseChecker () { super(); instance = this; overList_t = new Object(); btn.useHandCursor = false; } function onMouseOverBanner() { mouseIsOver = true; nextFrame(); _parent.onMouseOverUnit(); } function onMouseOutBanner() { mouseIsOver = false; _parent.onMouseOutUnit(); } function onHitRollOver() { tempMouseIsOver = true; onMouseOverBanner(); } function onHitRollOut() { tempMouseIsOver = false; checkNextFrame(); } function onMouseMove() { if (hitTest(_root._xmouse, _root._ymouse)) { _parent.onInt(); } } function onMouseDown() { if (hitTest(_root._xmouse, _root._ymouse)) { _parent.onInt(); } } function onKeyDown() { _parent.onInt(); } static function overItem(id_a) { overList_t[id_a] = true; instance.onMouseOverBanner(); } static function outItem(id_a) { delete overList_t[id_a]; instance.checkNextFrame(); } function checkNextFrame() { checkTimer = 0; onEnterFrame = function () { this.checkTimer++; if (this.checkTimer > this.checkWait) { delete this.onEnterFrame; var _local2 = false; for (var _local3 in MouseChecker.overList_t) { _local2 = true; break; } if ((!this.tempMouseIsOver) && (!_local2)) { this.onMouseOutBanner(); } } }; } var tempMouseIsOver = false; var mouseIsOver = false; var checkWait = 3; var checkTimer = 0; }
Symbol 36 MovieClip Frame 10
stop();
Symbol 51 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 2
stop();
Symbol 52 MovieClip Frame 1
stop(); allowChange = 0; onEnterFrame = function () { if (_parent._currentframe == 1) { allowChange = allowChange + 1; } else { allowChange = 0; gotoAndStop (1); } if (allowChange > 5) { if (((_root.game.gameMode == "fieldGoal") and (_root.game.tdMode == false)) and (_root.game.ball.target.team == 1)) { if (_currentframe != 2) { cover.gotoAndPlay(1); } gotoAndStop ("fieldGoal"); } if ((_root.game.tdMode != false) and (_root.game.ball.target.team == _root.game.playersTeam)) { if (_currentframe != 5) { cover.gotoAndPlay(1); } gotoAndStop ("extraPoint"); } if ((_root.game.gameMode == "punt") and (_root.game.ball.target.team == _root.game.playersTeam)) { if (_currentframe != 4) { cover.gotoAndPlay(1); } gotoAndStop ("punt"); } if ((((_root.game.ball.target.team == _root.game.playersTeam) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.tdMode == false)) { if (_currentframe != 7) { cover.gotoAndPlay(1); } gotoAndStop ("offense"); } if (((_root.game.ball.target.team == _root.game.compTeam) and (_root.game.gameMode == "scrum")) || (_root.game.ball.target.team == _root.game.compTeam)) { if (_currentframe != 6) { cover.gotoAndPlay(1); } gotoAndStop ("defense"); } } if (_root.game.gameMode == "kickOff") { if (_parent._currentframe != 22) { _parent.play(); } } if ((((_parent._currentframe == 22) and (_root.game.gameMode != "kickOff")) and (_root.game.showInstructions == true)) and (_root.game.gameMode != "plays")) { _parent.play(); } if (_root.game.gameMode == "plays") { } };
Instance of Symbol 36 MovieClip "cover" in Symbol 52 MovieClip Frame 1
onClipEvent (load) { storedFrame = _parent._currentframe; } onClipEvent (enterFrame) { if (_parent._currentframe != storedFrame) { gotoAndPlay (1); storedFrame = _parent._currentframe; } }
Instance of Symbol 51 MovieClip in Symbol 52 MovieClip Frame 7
onClipEvent (enterFrame) { if (_root.game.playType == "passing") { gotoAndStop (1); } else { gotoAndStop (2); } }
Symbol 60 Button
on (release, keyPress "<Enter>") { onHitRelease(); } on (rollOver) { onHitRollOver(); MouseChecker.overItem("view"); } on (rollOut) { onHitRollOut(); MouseChecker.outItem("view"); }
Symbol 66 MovieClip Frame 1
function onHitRollOver() { gotoAndPlay ("over"); } function onHitRollOut() { if (_parent.isInTF) { gotoAndPlay ("pulse_out"); } else { gotoAndPlay ("out"); } } function startPulse() { gotoAndPlay ("pulse_start"); } gotoAndStop ("idle");
Symbol 66 MovieClip Frame 27
stop();
Symbol 66 MovieClip Frame 43
gotoAndStop ("idle");
Instance of Symbol 66 MovieClip in Symbol 67 MovieClip Frame 1
onClipEvent (enterFrame) { function onHitRelease() { if ((_root.game.vibrate == false) and (_root.game.gameMode == "scrum")) { _root.game.vibrate = true; _root.game.gameMode = "plays"; } if (((_root.game.vibrate == false) and (_root.game.gameMode == "punt")) || ((_root.game.vibrate == false) and (_root.game.gameMode == "fieldGoal"))) { _root.game.vibrate = true; } if (_root.game.started == false) { _root.game.started = true; } if ((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == 1)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == 1))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == 1))) { _root.game.powerBar.kickBall(); _root.game.vibrate = true; } if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 1)) { _root.game.powerBar.kickBall(); _root.game.vibrate = true; } if ((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == 2)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == 2))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == 2))) { _root.game.powerBar.kickBall2(); _root.game.vibrate = true; } if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 2)) { _root.game.powerBar.kickBall2(); _root.game.vibrate = true; } } label.text = "VIBRATE"; }
Instance of Symbol 66 MovieClip in Symbol 67 MovieClip Frame 2
onClipEvent (enterFrame) { function onHitRelease() { if ((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == 2)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == 2))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == 2))) { _root.game.powerBar.kickBall2(); _root.game.vibrate = true; } if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 2)) { _root.game.powerBar.kickBall2(); _root.game.vibrate = true; } if ((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == 1)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == 1))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == 1))) { _root.game.powerBar.kickBall(); _root.game.vibrate = true; } if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 1)) { _root.game.powerBar.kickBall(); _root.game.vibrate = true; } } label.text = "KICK"; }
Instance of Symbol 66 MovieClip in Symbol 67 MovieClip Frame 3
onClipEvent (enterFrame) { function onHitRelease() { if ((_root.game.quarter == 1) and (_root.game.secs == 45)) { } if (_root.game.makeKick == false) { _root.game.makeKick = true; } _root.game.started = true; if ((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == 2)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == 2))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == 2))) { _root.game.powerBar.kickBall2(); _root.game.vibrate = true; } if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 2)) { _root.game.powerBar.kickBall2(); _root.game.vibrate = true; } if ((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == 1)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == 1))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == 1))) { _root.game.powerBar.kickBall(); _root.game.vibrate = true; } if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 1)) { _root.game.powerBar.kickBall(); _root.game.vibrate = true; } } label.text = "KICK OFF"; }
Instance of Symbol 66 MovieClip in Symbol 67 MovieClip Frame 4
onClipEvent (enterFrame) { function onHitRelease() { if ((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == 2)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == 2))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == 2))) { _root.game.powerBar.kickBall2(); _root.game.vibrate = true; } if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 2)) { _root.game.powerBar.kickBall2(); _root.game.vibrate = true; } if ((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == 1)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == 1))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == 1))) { _root.game.powerBar.kickBall(); _root.game.vibrate = true; } if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 1)) { _root.game.powerBar.kickBall(); _root.game.vibrate = true; } } label.text = "PUNT"; }
Instance of Symbol 67 MovieClip in Symbol 68 MovieClip Frame 1
onClipEvent (enterFrame) { if (_root.game.gameMode == "kickOff") { gotoAndStop (3); } else { if (((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == _root.game.playersTeam)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == _root.game.playersTeam))) || ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == _root.game.playersTeam))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == _root.game.playersTeam))) { if (_root.game.gameMode == "fieldGoal") { gotoAndStop (2); } else { gotoAndStop (4); } } else { gotoAndStop (1); } if ((((((_root.game.gameMode == "scrum") and (_root.game.paused == false)) || ((_currentframe == 2) and (_root.game.paused == false))) || (((_root.game.ball.target.team == _root.game.compTeam) and (_root.game.gameMode != "plays")) and (_root.game.paused == false))) || ((_root.game.gameMode == "fieldGoal") and (_root.game.paused == false))) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) { if (_alpha < 100) { _alpha = (_alpha + 10); } } else if (_alpha > 0) { } } }
Symbol 70 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 1
stop();
Instance of Symbol 70 MovieClip in Symbol 74 MovieClip Frame 1
onClipEvent (load) { gotoAndStop (2); }
Symbol 74 MovieClip Frame 10
stop();
Symbol 76 Button
on (release) { play(); _root.game.showInstructions = false; }
Symbol 77 Button
on (release) { if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 1)) { } else { _parent.play(); _root.game.showInstructions = true; } }
Symbol 81 MovieClip Frame 1
stop(); sym.gotoAndStop(2);
Symbol 81 MovieClip Frame 22
stop(); sym.gotoAndStop(2);
Instance of Symbol 78 MovieClip in Symbol 81 MovieClip Frame 22
onClipEvent (enterFrame) { if ((((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 2)) and (_root.game.quarter == 1)) and (_root.game.secs == _root.game.defaultSecs)) { _alpha = 0; } else { _alpha = 100; } }
Instance of Symbol 80 MovieClip in Symbol 81 MovieClip Frame 22
onClipEvent (enterFrame) { if ((((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 2)) and (_root.game.quarter == 1)) and (_root.game.secs == _root.game.defaultSecs)) { _alpha = 0; } else { _alpha = 100; } }
Symbol 81 MovieClip Frame 44
gotoAndStop (1);
Symbol 84 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 1
function onHitRollOver() { gotoAndPlay ("over"); } function onHitRollOut() { if (_parent.isInTF) { gotoAndPlay ("pulse_out"); } else { gotoAndPlay ("out"); } } function startPulse() { gotoAndPlay ("pulse_start"); } gotoAndStop ("idle");
Symbol 94 MovieClip Frame 27
stop();
Symbol 94 MovieClip Frame 43
gotoAndStop ("idle");
Symbol 105 Button
on (release) { stopAllSounds(); _root.game.newMatch(2); gotoAndStop (1); }
Symbol 108 Button
on (release) { stopAllSounds(); _root.game.newMatch(1); gotoAndStop (1); }
Instance of Symbol 81 MovieClip in Symbol 109 MovieClip Frame 1
onClipEvent (load) { gotoAndStop (22); }
Instance of Symbol 90 MovieClip "muteButton" in Symbol 109 MovieClip Frame 1
on (release) { _root.muteGame(); } on (rollOver) { glow.gotoAndStop(2); } on (rollOut, dragOut) { glow.gotoAndStop(1); }
Instance of Symbol 94 MovieClip in Symbol 109 MovieClip Frame 2
onClipEvent (enterFrame) { function onHitRelease() { _parent.stopAllSounds(); _parent.gotoAndStop(3); } label.text = "START GAME"; }
Symbol 112 Button
on (release) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _parent._xmouse; _parent.ball.targetY = _parent._ymouse - 6; var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; }
Symbol 137 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 59
stop();
Symbol 142 Button
on (press) { var offsetX = (_parent._x - _root.game._xmouse); var offsetY = (_parent._y - _root.game._ymouse); dragging = true; } on (release, releaseOutside) { dragging = false; }
Symbol 143 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 1
stop();
Symbol 198 MovieClip Frame 1
stop();
Instance of Symbol 143 MovieClip in Symbol 198 MovieClip Frame 1
onClipEvent (load) { dragging = false; } onClipEvent (enterFrame) { var amount = -5; if (((_root.game.gameMode == "scrum") and (_parent.team == _root.game.playersTeam)) || (((_root.game.gameMode == "fieldGoal") and (_parent.team == _root.game.playersTeam)) and (_root.game.ball.target.team != _root.game.playersTeam))) { gotoAndStop (2); } else { gotoAndStop (1); } if (dragging == true) { if (_root.game.scrimmageHit.hitTest(_root._xmouse, _root._ymouse + 10, true) || (_root.game.walls.hitTest(_root._xmouse, _root._ymouse + 10, true))) { dragging = false; } else { _parent._x = _root.game._xmouse + offsetX; _parent._y = _root.game._ymouse + offsetY; } } if ((_root.game.scrimmageHit.hitTest(_parent.xpos - 5, _parent.ypos, true) and (_currentframe == 2)) and (_parent.team == 2)) { _parent._x = _parent._x + 2; } if ((_root.game.scrimmageHit.hitTest(_parent.xpos + 5, _parent.ypos, true) and (_currentframe == 2)) and (_parent.team == 1)) { _parent._x = _parent._x - 2; } if ((_root.game.walls.hitTest(_parent.xpos + 10, _parent.ypos, true) and (_currentframe == 2)) and (_parent._x > 425)) { _parent._x = _parent._x - 2; } if (_root.game.walls.hitTest(_parent.xpos, _parent.ypos - 5, true) and (_currentframe == 2)) { _parent._y = _parent._y + 2; } if (_root.game.walls.hitTest(_parent.xpos, _parent.ypos + 5, true) and (_currentframe == 2)) { _parent._y = _parent._y - 2; } }
Symbol 209 Button
on (press) { knob._x = _xmouse; }
Symbol 218 MovieClip Frame 10
stop();
Symbol 219 MovieClip Frame 1
stop();
Instance of Symbol 215 MovieClip in Symbol 219 MovieClip Frame 1
onClipEvent (enterFrame) { if ((_root.game.vibrate == true) and (_root.game.paused == false)) { play(); } else { gotoAndStop (1); } }
Instance of Symbol 218 MovieClip in Symbol 219 MovieClip Frame 2
onClipEvent (load) { if (_currentframe == 1) { play(); } }
Instance of Symbol 219 MovieClip "knob" in Symbol 220 MovieClip Frame 1
onClipEvent (enterFrame) { var offset = 5; _root.game.vibrationVal = (((_x - _parent.bar._x) / (_parent.bar._width / 2)) / 2) + 0.5; if (drag == true) { if ((_parent._xmouse < (_parent.bar._x + (_parent.bar._width - offset))) and (_parent._xmouse > (_parent.bar._x + offset))) { _x = _parent._xmouse; } if (_parent._xmouse < (_parent.bar._x + offset)) { _x = (_parent.bar._x + offset); } if (_parent._xmouse > (_parent.bar._x + (_parent.bar._width - offset))) { _x = (_parent.bar._x + (_parent.bar._width - offset)); } } } on (press) { var drag = true; } on (release, releaseOutside) { var drag = false; } on (rollOver, dragOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); }
Symbol 227 Button
on (release) { if ((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == 2)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == 2))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == 2))) { _root.game.powerBar.kickBall2(); _root.game.vibrate = true; } if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 2)) { _root.game.powerBar.kickBall2(); _root.game.vibrate = true; } if ((((_root.game.gameMode == "punt") and (_root.game.ball.target.team == 1)) || ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == 1))) || ((_root.game.gameMode == "puntSafety") and (_root.game.ball.target.team == 1))) { _root.game.powerBar.kickBall(); _root.game.vibrate = true; } if ((_root.game.gameMode == "kickOff") and (_root.game.ball.target.team == 1)) { _root.game.powerBar.kickBall(); _root.game.vibrate = true; } }
Symbol 229 MovieClip Frame 1
stop();
Instance of Symbol 228 MovieClip in Symbol 229 MovieClip Frame 1
onClipEvent (enterFrame) { if (_parent._alpha == 100) { gotoAndStop (2); } else { gotoAndStop (1); } }
Symbol 229 MovieClip Frame 30
stop();
Symbol 242 MovieClip Frame 1
onPress = function () { gotoAndStop (3); }; onRelease = function () { gotoAndStop (2); }; var rolledOff = true; stop();
Symbol 245 MovieClip Frame 45
stop();
Symbol 257 MovieClip Frame 1
_root.game.changeMode = false; _root.game.situation = false; changeTimer = 0; changeTimer2 = 0; setFormation = ""; chosenFormation = ""; setupType = ""; this.onEnterFrame = function () { if ((_currentframe != 1) and (_root.game.tdMode == true)) { _root.game.downs = 0; } changeTimer = changeTimer + 1; changeTimer2 = changeTimer2 + 1; if (setupType == "quarterFix") { if (changeTimer2 == 1) { if ((_root.game.quarterChange == true) and (_root.game.compPlayType != "defense")) { var _local2 = random(2); if (_local2 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(compTeam, _root.game.formationShotgun, tackleX, 0); } else { _root.game.compPlayType = "running"; _root.game.setupLine(compTeam, _root.game.formationI, tackleX, 0); } } } if (changeTimer2 == 2) { if (_root.game.compPlayType == "running") { if (_root.game.playersTeam == 1) { } } else if (_root.game.playersTeam == 1) { } } } if (setupType == "regular") { if (changeTimer == 1) { _root.game.setupLine(_root.game.playersTeam, chosenFormation, _root.game.scrimmage, 0); if ((_root.game.goForIt == true) || (_root.game.quarterChange == true)) { var _local2 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local2], _root.game.scrimmage, 0); } } if (changeTimer == 2) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { } } else if (_root.game.playersTeam == 1) { } } } else if (setupType == "punt") { if ((changeTimer == 5) || (changeTimer == 2)) { _root.game.setupPunt(2, scrimmage); } } if ((_root.game.gameMode == "kickOff") || (_root.game.paused == true)) { lastPlay = ""; } }; if ((_root.game.gameMode == "kickOff") || (_root.game.paused == true)) { lastPlay = ""; } stop(); _root.game.blitz = false;
Symbol 257 MovieClip Frame 2
_root.game.playType = "defense"; _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _root.game.scrimmage, 0); setupType = "quarterFix"; changeTimer2 = 0; lastPlay = "4-3 COVER"; _root.game.blitz = false;
Instance of Symbol 242 MovieClip in Symbol 257 MovieClip Frame 2
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { _parent.nextFrame(); }
Instance of Symbol 242 MovieClip "changeF" in Symbol 257 MovieClip Frame 2
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { _parent.gotoAndStop(5); } onClipEvent (enterFrame) { function beingPressed() { _parent.nextFrame(); } }
Instance of Symbol 246 MovieClip in Symbol 257 MovieClip Frame 2
/* no clip actions */
Symbol 257 MovieClip Frame 3
_root.game.playType = "defense"; _root.game.setupLine(_root.game.playersTeam, _root.game.formation52, _root.game.scrimmage, 0); setupType = "quarterFix"; changeTimer2 = 0; lastPlay = "5-2 COVER"; _root.game.blitz = false;
Instance of Symbol 242 MovieClip "changeF" in Symbol 257 MovieClip Frame 3
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { _parent.prevFrame(); } onClipEvent (enterFrame) { function beingPressed() { _parent.nextFrame(); } }
Symbol 257 MovieClip Frame 4
_root.game.playType = "defense"; _root.game.setupLine(_root.game.playersTeam, _root.game.formationDefence3, _root.game.scrimmage, 0); setupType = "quarterFix"; changeTimer2 = 0; lastPlay = "DIME"; _root.game.blitz = false;
Symbol 257 MovieClip Frame 5
_root.game.playType = "defense"; _root.game.setupLine(_root.game.playersTeam, _root.game.formationDefence4, _root.game.scrimmage, 0); setupType = "quarterFix"; changeTimer2 = 0; lastPlay = "4-3 BLITZ"; _root.game.blitz = true;
Instance of Symbol 242 MovieClip in Symbol 257 MovieClip Frame 5
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { _parent.gotoAndStop(2); }
Instance of Symbol 242 MovieClip "changeF" in Symbol 257 MovieClip Frame 5
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { _parent.prevFrame(); } onClipEvent (enterFrame) { function beingPressed() { _parent.gotoAndStop(2); } }
Symbol 257 MovieClip Frame 10
_root.game.playType = "passing"; if (((_root.game.gameMode == "punt") || (_root.game.gameMode == "fieldGoal")) || (_root.game.tdMode != false)) { _root.game.changeMode = true; _root.game.goForIt = true; } storedFrame = _currentframe; lastPlay = "SHOTGUN-PASS"; setupType = "regular"; changeTimer = 0; chosenFormation = _root.game.formationShotgun;
Instance of Symbol 242 MovieClip in Symbol 257 MovieClip Frame 10
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { _parent.nextFrame(); }
Instance of Symbol 242 MovieClip "changeF" in Symbol 257 MovieClip Frame 10
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { if ((_root.game.situation == false) and (_root.game.tdMode == false)) { _parent.gotoAndStop(13); } else if ((_root.game.situation == "fieldGoal") || ((_root.game.tdMode != false) and (_root.game.downs == 0))) { _parent.gotoAndStop(20); } else { _parent.gotoAndStop(21); } } onClipEvent (enterFrame) { function beingPressed() { _parent.nextFrame(); } }
Symbol 257 MovieClip Frame 11
_root.game.playType = "passing"; if (((_root.game.gameMode == "punt") || (_root.game.gameMode == "fieldGoal")) || (_root.game.tdMode != false)) { _root.game.changeMode = true; _root.game.goForIt = true; } storedFrame = _currentframe; lastPlay = "WING-PASS"; setupType = "regular"; changeTimer = 0; chosenFormation = _root.game.formationPass2;
Instance of Symbol 242 MovieClip "changeF" in Symbol 257 MovieClip Frame 11
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { _parent.prevFrame(); } onClipEvent (enterFrame) { function beingPressed() { _parent.nextFrame(); } }
Symbol 257 MovieClip Frame 12
_root.game.playType = "running"; if (((_root.game.gameMode == "punt") || (_root.game.gameMode == "fieldGoal")) || (_root.game.tdMode != false)) { _root.game.changeMode = true; _root.game.goForIt = true; } storedFrame = _currentframe; lastPlay = "I FORM-RUN"; setupType = "regular"; changeTimer = 0; chosenFormation = _root.game.formationI;
Symbol 257 MovieClip Frame 13
_root.game.playType = "running"; if (((_root.game.gameMode == "punt") || (_root.game.gameMode == "fieldGoal")) || (_root.game.tdMode != false)) { _root.game.goForIt = true; _root.game.changeMode = true; } storedFrame = _currentframe; lastPlay = "PISTOL-RUN"; setupType = "regular"; changeTimer = 0; chosenFormation = _root.game.formationRun2;
Instance of Symbol 242 MovieClip in Symbol 257 MovieClip Frame 13
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { if ((_root.game.situation == false) and (_root.game.tdMode == false)) { _parent.gotoAndStop(10); } else if ((_root.game.situation == "fieldGoal") || ((_root.game.tdMode != false) and (_root.game.downs == 0))) { _parent.gotoAndStop(20); } else { _parent.gotoAndStop(21); } }
Instance of Symbol 242 MovieClip "changeF" in Symbol 257 MovieClip Frame 13
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { _parent.prevFrame(); } onClipEvent (enterFrame) { function beingPressed() { if ((_root.game.situation == false) and (_root.game.tdMode == false)) { _parent.gotoAndStop(10); } else if ((_root.game.situation == "fieldGoal") || ((_root.game.tdMode != false) and (_root.game.downs == 0))) { _parent.gotoAndStop(20); } else { _parent.gotoAndStop(21); } } }
Symbol 257 MovieClip Frame 20
if (_root.game.gameMode != "fieldGoal") { _root.game.playType = "kick"; _root.game.downCounted = true; _root.game.changeMode = false; _root.game.gameMode = "resetKick"; if (_root.game.tdMode == false) { } }
Instance of Symbol 242 MovieClip in Symbol 257 MovieClip Frame 20
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { _parent.gotoAndStop(10); }
Instance of Symbol 242 MovieClip "changeF" in Symbol 257 MovieClip Frame 20
on (rollOver) { gotoAndStop (2); } on (rollOut, dragOut) { gotoAndStop (1); } on (release) { _parent.gotoAndStop(13); } onClipEvent (enterFrame) { function beingPressed() { _parent.gotoAndStop(10); } }
Symbol 257 MovieClip Frame 21
if (_root.game.gameMode != "punt") { _root.game.playType = "kick"; _root.game.downCounted = true; _root.game.changeMode = false; _root.game.gameMode = "resetKick"; }
Symbol 288 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 239
Symbol 370 MovieClip Frame 1
_parent.stop();
Symbol 370 MovieClip Frame 67
_root.game.goalScored(_root.game.ball.target.team); _parent.gotoAndStop(1);
Symbol 388 MovieClip Frame 1
_parent.stop();
Symbol 388 MovieClip Frame 63
_parent.gotoAndStop(1);
Symbol 393 MovieClip Frame 39
stop();
Symbol 399 MovieClip Frame 1
_parent.stop();
Instance of Symbol 393 MovieClip in Symbol 399 MovieClip Frame 1
onClipEvent (enterFrame) { if (_root.game.lastTeam == 1) { _xscale = -100; } else { _xscale = 100; } }
Symbol 399 MovieClip Frame 101
_parent.gotoAndStop(1);
Symbol 405 MovieClip Frame 1
_parent.stop();
Symbol 405 MovieClip Frame 91
_parent.gotoAndStop(1);
Symbol 411 MovieClip Frame 1
_parent.stop();
Symbol 411 MovieClip Frame 82
_parent.gotoAndStop(1);
Symbol 419 MovieClip Frame 1
_parent.stop();
Symbol 419 MovieClip Frame 24
stop(); _parent.play();
Symbol 429 MovieClip Frame 1
_parent.stop();
Symbol 429 MovieClip Frame 59
_root.game.goalScored(_root.game.ball.target.team); _parent.gotoAndStop(1);
Symbol 441 MovieClip Frame 1
_parent.stop();
Symbol 441 MovieClip Frame 140
stop(); _parent.gotoAndStop(1);
Symbol 444 MovieClip Frame 1
_parent.stop();
Symbol 444 MovieClip Frame 85
_parent.gotoAndStop(1);
Symbol 445 MovieClip Frame 1
stop();
Instance of Symbol 333 MovieClip "tutorial" in Symbol 445 MovieClip Frame 1
onClipEvent (enterFrame) { if (_root.game.demoMode == false) { gotoAndStop (17); } }
Symbol 445 MovieClip Frame 62
gotoAndStop (1);
Symbol 445 MovieClip Frame 116
_root.game.goalScored(_root.game.ball.target.team); gotoAndStop (1);
Symbol 445 MovieClip Frame 156
gotoAndStop (1);
Symbol 445 MovieClip Frame 220
gotoAndStop (1);
Symbol 445 MovieClip Frame 259
gotoAndStop (1);
Symbol 445 MovieClip Frame 290
gotoAndStop (1);
Symbol 445 MovieClip Frame 320
gotoAndStop (1);
Symbol 445 MovieClip Frame 350
gotoAndStop (1);
Symbol 445 MovieClip Frame 395
gotoAndStop (1);
Symbol 445 MovieClip Frame 425
gotoAndStop (1);
Symbol 445 MovieClip Frame 455
gotoAndStop (1);
Symbol 445 MovieClip Frame 485
gotoAndStop (1);
Symbol 445 MovieClip Frame 515
gotoAndStop (1);
Symbol 445 MovieClip Frame 555
gotoAndStop (1);
Symbol 445 MovieClip Frame 618
gotoAndStop (1);
Symbol 445 MovieClip Frame 660
_root.game.goalScored(_root.game.ball.target.team); gotoAndStop (1);
Symbol 445 MovieClip Frame 701
gotoAndStop (1);
Symbol 445 MovieClip Frame 761
gotoAndStop (1);
Symbol 445 MovieClip Frame 795
gotoAndStop (1);
Symbol 445 MovieClip Frame 825
gotoAndStop (1);
Symbol 453 Button
on (release) { getURL ("http://www.cokezero.com", _blank); }
Instance of Symbol 288 MovieClip "tutorial" in Symbol 454 MovieClip Frame 1
onClipEvent (enterFrame) { if (((((oshown and dshown) and kshown) and pshown) and fshown) and eshown) { gotoAndStop (1); } if (_root.game.demoMode == true) { _visible = false; } else if (_visible == false) { _visible = true; } }
Instance of Symbol 446 MovieClip "bigscreen" in Symbol 454 MovieClip Frame 1
onClipEvent (load) { ani.cacheAsBitmap = true; lights.cacheAsBitmap = true; ani.setMask(lights); ani.cacheAsBitmap = true; lights.cacheAsBitmap = true; } onClipEvent (enterFrame) { if (_root.game.demoMode == true) { } else { _alpha = 100; } }
Instance of Symbol 451 MovieClip in Symbol 454 MovieClip Frame 1
onClipEvent (enterFrame) { if (_root.game.ball.target.team == _root.game.playersTeam) { _root.game.lastTeam = _root.game.playersTeam; } if (_root.game.lastTeam == _root.game.playersTeam) { gotoAndStop (2); } else { gotoAndStop (1); } }
Instance of Symbol 451 MovieClip in Symbol 454 MovieClip Frame 1
onClipEvent (enterFrame) { if (_root.game.ball.target.team == _root.game.compTeam) { _root.game.lastTeam = _root.game.compTeam; } if (_root.game.lastTeam == _root.game.compTeam) { gotoAndStop (2); } else { gotoAndStop (1); } }
Symbol 457 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 3
gotoAndStop (2);
Symbol 457 MovieClip Frame 5
gotoAndStop (2);
Symbol 457 MovieClip Frame 7
gotoAndStop (2);
Symbol 458 MovieClip Frame 72
gotoAndPlay (1);
Symbol 490 MovieClip Frame 1
stop();
Instance of Symbol 94 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (load) { function onHitRelease() { _root.game.screens.gotoAndStop(1); } label.text = "CONTINUE GAME"; }
Instance of Symbol 94 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (load) { function onHitRelease() { getURL ("http://www.cokezero.com", _blank); } label.text = "COKEZERO.COM"; }
Instance of Symbol 487 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (load) { if (_root.game.chosenColour == 1) { gotoAndStop (1); } else { gotoAndStop (2); } }
Instance of Symbol 487 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (load) { if (_root.game.chosenColour == 1) { gotoAndStop (2); } else { gotoAndStop (1); } }
Instance of Symbol 94 MovieClip in Symbol 490 MovieClip Frame 3
onClipEvent (load) { function onHitRelease() { _root.game.gotoAndPlay(3); } label.text = "PLAY AGAIN"; }
Instance of Symbol 490 MovieClip in Symbol 491 MovieClip Frame 19
onClipEvent (load) { hscoreD = _root.game.screens.hscoreD; gscoreD = _root.game.screens.gscoreD; gotoAndStop(_root.game.screens._currentframe - 1); }
Symbol 491 MovieClip Frame 36
stop();
Instance of Symbol 490 MovieClip in Symbol 491 MovieClip Frame 36
onClipEvent (load) { hscoreD = _root.game.screens.hscoreD; gscoreD = _root.game.screens.gscoreD; gotoAndStop(_root.game.screens._currentframe - 1); }
Symbol 493 MovieClip Frame 1
stop(); if (_root.game.demoMode == false) { stopAllSounds(); }
Symbol 493 MovieClip Frame 2
stop();
Symbol 493 MovieClip Frame 5
_level0.ffgamesSend.show(); gotoAndStop (1); stop();
Symbol 494 MovieClip Frame 1
if (_alpha == 0) { stop(); } cleanUp = false;
Symbol 494 MovieClip Frame 2
function lineUp(person) { if (((gameMode != "kickOff") || (tdMode != false)) || (quarterChanged == true)) { var _local3 = (scrimmage - halfPitchX) / 4; person._x = person._x - _local3; } var _local2 = ((person._y - 10) * (person._x - halfPitchX)) / 4000; person._x = person._x + (_local2 * 7); person._y = person._y + 7; } function goalScored(team) { downs = 0; if (tdMode != false) { if (timeOut == false) { tdMode = false; startKickoff(team); } else { removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; } } else { tdMode = team; if (team == 1) { scrimmage = 500; setupFieldGoal(team, scrimmage); } else { scrimmage = 125; setupFieldGoal(team, scrimmage); } } } function startKickoff(team) { downs = 0; tdMode = false; if (team == 2) { setupKickoff(2, formation44, 0); setupRecieve(1, formationRecieve, 230); } else { setupKickoff(1, formation44, 190); setupRecieve(2, formationRecieve, -30); } } function checkScrimmage() { if (ball.target.team == 1) { if ((((downline < scrimmage) and (downline < endZoneR)) and (downline > endZoneL)) || (downline == -200)) { downline = scrimmage + tenYards; downs = downs - 0.5; downs = 1; } } if (ball.target.team == 2) { if ((((downline > scrimmage) and (downline < endZoneR)) and (downline > endZoneL)) || (downline == -200)) { downline = scrimmage - tenYards; downs = downs - 0.5; downs = 1; } } } function handBall() { if (parseInt(ball.target.team) == compTeam) { if (_root.game.compPlayType == "passing") { if (compTeam == 1) { ball.target = player11; } else { ball.target = player22; } } else if (compTeam == 1) { ball.target = player6; } else { ball.target = player17; } } else if (_root.game.playType == "passing") { if (playersTeam == 1) { ball.target = player11; } else { ball.target = player22; } } else if (playersTeam == 1) { ball.target = player6; } else { ball.target = player17; } } function setupLine(team, formation, lineX, downed) { if (((((downs < 4) and (tdDown == 0)) || (gameMode == "punt")) || (gameMode == "fieldGoal")) || (goForIt == true)) { var _local5 = true; if (((changeMode == false) and (timeOut == false)) and (quarterChanged == false)) { if (lastTeam == 1) { if (lineX < endZoneL) { if (downs < 1) { lineX = twentyYardLineL; scrimmage = twentyYardLineL; var _local4 = true; } else { _root.game.addMessage("Safety"); if (lastTeam != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } _local5 = false; removeTackles(); } } else { var _local4 = false; } if (lineX > endZoneR) { lineX = endZoneR; scrimmage = endZoneR; } } else { if (lineX < endZoneL) { lineX = endZoneL; scrimmage = endZoneL; } if (lineX > endZoneR) { if (downs < 1) { lineX = twentyYardLineR; scrimmage = twentyYardLineR; } else { _root.game.addMessage("Safety"); if (lastTeam != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } _local5 = false; removeTackles(); } var _local4 = true; } else { var _local4 = false; } } if (timeOut == false) { if (downs < 1) { downs = 1; } else { downs = downs + downed; } if (ball.target.team == 1) { if ((downline < scrimmage) || (downline == -200)) { downline = scrimmage + tenYards; if ((_local4 != true) and (timeOut == false)) { downs = downs - 0.5; downs = 1; } } } if (ball.target.team == 2) { if ((downline > scrimmage) || (downline == -200)) { downline = scrimmage - tenYards; if ((_local4 != true) and (timeOut == false)) { downs = downs - 0.5; downs = 1; } } } } } else { if (downs == 0) { downs = 1; } if (ball.target.team == 1) { if ((downline < scrimmage) || (downline == -200)) { downline = scrimmage + tenYards; } } if (ball.target.team == 2) { if ((downline > scrimmage) || (downline == -200)) { downline = scrimmage - tenYards; } } } if (_local5 == true) { passesNum = 0; gameMode = "scrum"; vibrate = false; handBall(); if (team == 1) { i = 1; while (i < 12) { if (ball.target.team == 1) { _root.game["player" + i]._x = (lineX - 10) - ((formation[i - 1][0] / 2) * 1.2); } else { _root.game["player" + i]._x = (lineX - 10) - ((formation[i - 1][0] / 2) * 1.2); } _root.game["player" + i]._y = -5 + (formation[i - 1][1] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(10); i = i + 1; } } if (team == 2) { i = 12; while (i < 23) { _root.game["player" + i]._y = -5 + ((formation[i - 12][1] + 3) * 1.2); if (ball.target.team == 2) { _root.game["player" + i]._x = (lineX + 10) + ((formation[i - 12][0] / 2) * 1.2); } else { _root.game["player" + i]._x = (lineX + 10) + ((formation[i - 12][0] / 2) * 1.2); } lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(1); i = i + 1; } } } } } function setupKickoff(team, formation, lineX) { tdMode = false; downs = 0; passesNum = 0; gameMode = "kickOff"; vibrate = false; if (playersTeam == team) { powerBar.playerControlled = true; } else { powerBar.playerControlled = false; } if (team == 1) { powerBar.target = player11; i = 1; while (i < 12) { _root.game["player" + i]._y = -5 + ((formationKickOff[i - 1][1] + 5) * 1.2); _root.game["player" + i]._x = (lineX + 55) - (formationKickOff[i - 1][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(10); i = i + 1; } ball.target = player11; } if (team == 2) { powerBar.target = player22; i = 12; while (i < 23) { _root.game["player" + i]._y = -5 + (formationKickOff[i - 12][1] * 1.2); _root.game["player" + i]._x = (lineX + 387) + (formationKickOff[i - 12][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(1); i = i + 1; } ball.target = player22; } } function setupSafetyKick(team) { passesNum = 0; vibrate = false; gameMode = "puntSafety"; if (playersTeam == team) { powerBar.playerControlled = true; } else { powerBar.playerControlled = false; } if (team == 1) { kickingTeam = 1; powerBar.target = player11; i = 1; while (i < 12) { _root.game["player" + i]._y = -5 + ((formationPuntNew[i - 1][1] + 5) * 1.2); _root.game["player" + i]._x = (endZoneL - 10) - (formationPuntNew[i - 1][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(10); i = i + 1; } ball.target = player11; scrimmage = endZoneL; setupRecievePuntSafety(2, formationRecieve, 250); } if (team == 2) { kickingTeam = 2; powerBar.target = player22; i = 12; while (i < 23) { _root.game["player" + i]._y = -5 + ((formationPuntNew[i - 12][1] + 3) * 1.2); _root.game["player" + i]._x = (endZoneR + 10) + (formationPuntNew[i - 12][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(1); i = i + 1; } ball.target = player22; scrimmage = endZoneR; setupRecievePuntSafety(1, formationRecieve, 250); } } function setupRecieve(team, formation, lineX) { if (team == 1) { i = 1; while (i < 12) { _root.game["player" + i]._y = -5 + ((formation[i - 1][1] + 3) * 1.2); _root.game["player" + i]._x = (lineX - 50) - (formation[i - 1][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(10); i = i + 1; } } if (team == 2) { i = 12; while (i < 23) { _root.game["player" + i]._y = -5 + ((formation[i - 12][1] + 3) * 1.2); _root.game["player" + i]._x = (lineX + 470) + (formation[i - 12][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(1); i = i + 1; } } } function setupRecieve2(team, formation, lineX) { if (team == 1) { i = 1; while (i < 12) { _root.game["player" + i]._y = -5 + ((formation[i - 1][1] + 3) * 1.2); _root.game["player" + i]._x = (lineX - 10) - (formation[i - 1][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(10); i = i + 1; } } if (team == 2) { i = 12; while (i < 23) { _root.game["player" + i]._y = -5 + ((formation[i - 12][1] + 3) * 1.2); _root.game["player" + i]._x = (lineX + 10) + (formation[i - 12][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(1); i = i + 1; } } } function setupFieldGoal(team, lineX) { passesNum = 0; gameMode = "fieldGoal"; vibrate = false; if (playersTeam == team) { powerBar.playerControlled = true; } else { powerBar.playerControlled = false; } if (team == 1) { powerBar.target = player11; i = 1; while (i < 12) { _root.game["player" + i]._y = -5 + ((formationFieldGoal[i - 1][1] + 5) * 1.2); _root.game["player" + i]._x = (lineX - 10) - (formationFieldGoal[i - 1][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(10); i = i + 1; } ball.target = player11; setupRecieve2(2, formationKickOff, lineX); } if (team == 2) { powerBar.target = player22; i = 12; while (i < 23) { _root.game["player" + i]._y = -5 + ((formationFieldGoal[i - 12][1] + 3) * 1.2); _root.game["player" + i]._x = (lineX + 10) + (formationFieldGoal[i - 12][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(1); i = i + 1; } ball.target = player22; setupRecieve2(1, formationKickOff, lineX); } } function setupRecievePuntSafety(team, formation, lineX) { if (team == 1) { i = 1; while (i < 12) { if (i < 5) { _root.game["player" + i]._y = -5 + (formationRecievePuntBack[i - 1][1] * 1.2); _root.game["player" + i]._x = halfPitchX - (formationRecievePuntBack[i - 1][0] * 1.2); } else { _root.game["player" + i]._y = -5 + (formationRecievePuntFront[i - 5][1] * 1.2); _root.game["player" + i]._x = scrimmage - 10; } lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(10); i = i + 1; } } if (team == 2) { i = 12; while (i < 23) { if (i < 16) { _root.game["player" + i]._y = -5 + (formationRecievePuntBack[i - 12][1] * 1.2); _root.game["player" + i]._x = halfPitchX + (formationRecievePuntBack[i - 12][0] * 1.2); } else { _root.game["player" + i]._y = -5 + (formationRecievePuntFront[i - 16][1] * 1.2); _root.game["player" + i]._x = scrimmage + 10; } lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(1); i = i + 1; } } } function setupRecievePunt(team, formation, lineX) { if (team == 1) { i = 1; while (i < 12) { if (i < 5) { _root.game["player" + i]._y = -5 + (formationRecievePuntBack[i - 1][1] * 1.2); _root.game["player" + i]._x = (twentyYardLineL + 50) - (formationRecievePuntBack[i - 1][0] * 1.2); } else { _root.game["player" + i]._y = -5 + (formationRecievePuntFront[i - 5][1] * 1.2); _root.game["player" + i]._x = scrimmage - 10; } lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(10); i = i + 1; } } if (team == 2) { i = 12; while (i < 23) { if (i < 16) { _root.game["player" + i]._y = -5 + (formationRecievePuntBack[i - 12][1] * 1.2); _root.game["player" + i]._x = (twentyYardLineR - 50) + (formationRecievePuntBack[i - 12][0] * 1.2); } else { _root.game["player" + i]._y = -5 + (formationRecievePuntFront[i - 16][1] * 1.2); _root.game["player" + i]._x = scrimmage + 10; } lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(1); i = i + 1; } } } function setupPunt(team, lineX) { passesNum = 0; gameMode = "punt"; vibrate = false; if (playersTeam == team) { powerBar.playerControlled = true; } else { powerBar.playerControlled = false; } if (team == 1) { kickingTeam = 1; powerBar.target = player11; i = 1; while (i < 12) { _root.game["player" + i]._y = -5 + ((formationPunt[i - 1][1] + 5) * 1.2); _root.game["player" + i]._x = (lineX - 10) - (formationPunt[i - 1][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(10); i = i + 1; } ball.target = player11; setupRecievePunt(2, formationRecieve, -50); } if (team == 2) { kickingTeam = 2; powerBar.target = player22; i = 12; while (i < 23) { _root.game["player" + i]._y = -5 + ((formationPunt[i - 12][1] + 3) * 1.2); _root.game["player" + i]._x = (lineX + 10) + (formationPunt[i - 12][0] * 1.2); lineUp(_root.game["player" + i]); _root.game["player" + i].xspeed = 0; _root.game["player" + i].yspeed = 0; _root.game["player" + i].rot = _root.game["player" + i].origRot; _root.game["player" + i].rotVel = 0; _root.game["player" + i].rotInc = 0; _root.game["player" + i].ani.gotoAndStop(1); i = i + 1; } ball.target = player22; setupRecievePunt(1, formationRecieve, 250); } } function turnOver() { addMessage("turnOver"); var _local2 = scrimmage; if (parseInt(lastTeam) == 1) { ball.target = player22; if (compTeam == 2) { var _local3 = random(2); if (_local3 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(compTeam, _root.game.formationShotgun, _local2, 0); } else { _root.game.compPlayType = "running"; _root.game.setupLine(compTeam, _root.game.formationI, _local2, 0); } _root.game.playType = "defense"; _root.game.setupLine(playersTeam, _root.game.formation43, _local2, 0); } else { var _local3 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(compTeam, _root.game["formationDefence" + _local3], _local2, 0); _root.game.setupLine(playersTeam, _root.game.formationShotgun, _local2, 0); } } else { ball.target = player11; if (compTeam == 1) { var _local3 = random(2); if (_local3 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(compTeam, _root.game.formationShotgun, _local2, 0); } else { _root.game.compPlayType = "running"; _root.game.setupLine(compTeam, _root.game.formationI, _local2, 0); } _root.game.playType = "defense"; _root.game.setupLine(playersTeam, _root.game.formation43, _local2, 0); } else { var _local3 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(compTeam, _root.game["formationDefence" + _local3], _local2, 0); _root.game.setupLine(playersTeam, _root.game.formationShotgun, _local2, 0); } } handBall(); downs = 0; } function switchOver() { _parent.addMessage("turnover"); var _local3 = scrimmage; if (parseInt(lastTeam) == 1) { ball.target = player22; if (compTeam == 2) { var _local4 = random(2); if (_local4 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(compTeam, _root.game.formationShotgun, _local3, 0); } else { _root.game.compPlayType = "running"; _root.game.setupLine(compTeam, _root.game.formationI, _local3, 0); } _root.game.playType = "defense"; _root.game.setupLine(playersTeam, _root.game.formation43, _local3, 0); } else { var _local4 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(compTeam, _root.game["formationDefence" + _local4], _local3, 0); _root.game.setupLine(playersTeam, _root.game.formationShotgun, _local3, 0); } } else { ball.target = player11; if (compTeam == 1) { var _local4 = random(2); if (_local4 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(compTeam, _root.game.formationShotgun, _local3, 0); } else { _root.game.compPlayType = "running"; _root.game.setupLine(compTeam, _root.game.formationI, _local3, 0); } _root.game.playType = "defense"; _root.game.setupLine(playersTeam, _root.game.formation43, _local3, 0); } else { var _local4 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(compTeam, _root.game["formationDefence" + _local4], _local3, 0); _root.game.setupLine(playersTeam, _root.game.formationShotgun, _local3, 0); } } handBall(); } function tackleNew(downCount) { if ((_root.game.gameMode == "plays") and (downs <= 3)) { if (downCount != 1) { } _parent.addMessage("tackled"); var _local3 = scrimmage; if (parseInt(lastTeam) != playersTeam) { if (compTeam == 1) { ball.target = player11; } else { ball.target = player22; } var _local5 = random(2); if (parseInt(_local5) == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(compTeam, _root.game.formationShotgun, _local3, downCount / 2); } else { _root.game.compPlayType = "running"; _root.game.setupLine(compTeam, _root.game.formationI, _local3, downCount / 2); } _root.game.setupLine(playersTeam, _root.game.formation43, _local3, downCount / 2); } else { if (playersTeam == 1) { ball.target = player11; } else { ball.target = player22; } var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(1, _root.game["formationDefence" + _local5], _local3, downCount / 2); _root.game.setupLine(2, _root.game.formationShotgun, _local3, downCount / 2); } } else if (changeMode == false) { downs = downs + 1; } } function looseBall() { if (_root.game.tdMode != false) { if (timeOut == false) { startKickoff(_root.game.playersTeam); removeTackles(); _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } } else if (parseInt(downs) < 4) { if (timeOut == true) { removeTackles(); if (quarter == 2) { startKickoff(_root.game.playersTeam); } else { if ((downsAdded == false) and (storedDownsNew != downs)) { trace("clubskfjlds"); downs = downs + 0.5; downsAdded = true; var storedDownsNew = downs; } tackleNew(0); } removeTackles(); } else { tackleNew(1); } } else if (changeMode == false) { downs = downs + 1; } } function removeTackles() { i = 1; while (i < 23) { _root.game["player" + i].tackled = false; i = i + 1; } pauseTime = 0; paused = false; } function newMatch(colour) { _root.game.sound.gotoAndPlay("whistle"); demoMode = false; removeTackles(); scoreboard.bigscreen.ani.gotoAndStop(1); i = messageList.length; while (i > 0) { messageList.pop(); i = messageList.length; } hscore = 0; gscore = 0; downs = 0; vibrate = false; gameMode = "scrum"; passesNum = 0; downs = 0; shotTimer = 0; counter = 0; secs = defaultSecs; mins = defaultMins; quarter = 1; scrimmage = 0; started = false; startTimer = 0; chosenColour = colour; playersTeam = 1; compTeam = 2; ball.downTimer = 0; ball.downTimer2 = 0; ball.downTimer3 = 0; i = 12; while (i < 23) { _root.game["player" + i].gotoAndStop(colour); i = i + 1; } if (colour == 1) { i = 1; while (i < 12) { _root.game["player" + i].gotoAndStop(2); i = i + 1; } } else { i = 1; while (i < 12) { _root.game["player" + i].gotoAndStop(1); i = i + 1; } } setupKickoff(2, formation44, 0); setupRecieve(1, formationRecieve, 250); removeTackles(); } function updateTeams() { if (playersTeam == 1) { playersTeam = 2; compTeam = 1; } else { playersTeam = 1; compTeam = 2; } if (chosenColour == 1) { var _local2 = 2; chosenColour = 2; } else { var _local2 = 1; chosenColour = 1; } i = 12; while (i < 23) { _root.game["player" + i].gotoAndStop(_local2); i = i + 1; } if (_local2 == 1) { i = 1; while (i < 12) { _root.game["player" + i].gotoAndStop(2); i = i + 1; } } else { i = 1; while (i < 12) { _root.game["player" + i].gotoAndStop(1); i = i + 1; } } } function switchSides() { if (playersTeam == 1) { playersTeam = 2; compTeam = 1; } else { playersTeam = 1; compTeam = 2; } if (chosenColour == 1) { var _local2 = 2; chosenColour = 2; } else { var _local2 = 1; chosenColour = 1; } i = 12; while (i < 23) { _root.game["player" + i].gotoAndStop(_local2); i = i + 1; } if (_local2 == 1) { i = 1; while (i < 12) { _root.game["player" + i].gotoAndStop(2); i = i + 1; } } else { i = 1; while (i < 12) { _root.game["player" + i].gotoAndStop(1); i = i + 1; } } switchOver(); } function addMessage(messageName) { messageList.push(messageName); } function forceQuarter() { if ((mins <= 0) and (secs <= 0)) { downs = 0; quarter = quarter + 1; mins = defaultMins; secs = defaultSecs; updateTeams(); if (parseInt(lastTeam) == 1) { setupKickoff(2, formation44, 0); setupRecieve(1, formationRecieve, 250); } else { setupKickoff(1, formation44, 190); setupRecieve(2, formationRecieve, -50); } removeTackles(); } } stop(); blitz = false; downsAdded = false; pitchBackWidth = 368; pitchFrontWidth = 472; gameWidth = 600; pitchDepth = 150; pitchBackY = 40; pitchFrontY = pitchBackY + pitchDepth; horizon = 1000; vibrationVal = 1; vibrate = false; playerNum = 0; gameMode = "scrum"; passesNum = 0; downs = 0; shotTimer = 0; counter = 0; defaultSecs = 45; defaultMins = 0; secs = defaultSecs; mins = defaultMins; quarter = 1; scrimmage = 0; started = true; startTimer = 0; downline = -200; togo = 0; ballon = 0; demoMode = true; hscore = 0; gscore = 0; myTeam = 1; pauseTime = 0; paused = false; doneFunction = true; var messageList = new Array(); messagesToShow = 0; formationOffset = 20; viewTime = 0; sentMessage = false; halfPitchX = 320; scored = false; playType = "passing"; compPlayType = "passing"; downCounted = false; tdMode = false; tdDown = 0; changeMode = false; goForIt = false; situation = false; makeKick = false; showInstructions = true; lastTeam = 0; endZoneR = 530; endZoneL = 84; twentyYardLineL = 168; twentyYardLineR = 428; tenYards = 43; playersTeam = 1; compTeam = 2; nextQuarterIn = 0; timeOut = false; lastGameMode = ""; chosenColour = 0; demoScoreTimer = 0; safed = false; kickingTeam = 0; storedDowns = 0; touchBack = false; mouseIsDown = false; storedDownline = downline; intercepted = false; if (gameCompleted == undefined) { gameCompleted = false; } var formation44 = new Array(new Array(35, 26), new Array(42, 73), new Array(45, 86), new Array(47, 99), new Array(50, 112), new Array(63, 86), new Array(52, 47), new Array(40, 60), new Array(55, 143), new Array(80, 86), new Array(100, 86)); var formationT = new Array(new Array(10, 59), new Array(12, 72), new Array(14, 86), new Array(17, 99), new Array(21, 113), new Array(33, 86), new Array(46, 75), new Array(8, 45), new Array(22, 126), new Array(52, 97), new Array(50, 86)); var formationKickOff = new Array(new Array(0, 81), new Array(0, 69), new Array(0, 58), new Array(0, 137), new Array(0, 114), new Array(0, 103), new Array(0, 126), new Array(0, 35), new Array(0, 149), new Array(0, 47), new Array(0, 92)); var formationFieldGoal = new Array(new Array(0, 81), new Array(0, 69), new Array(0, 58), new Array(0, 137), new Array(0, 114), new Array(0, 103), new Array(0, 126), new Array(0, 35), new Array(0, 149), new Array(0, 47), new Array(35, 92)); var formationRecieve = new Array(new Array(0, 77), new Array(0, 68), new Array(0, 89), new Array(0, 99), new Array(0, 110), new Array(20, 88), new Array(20, 119), new Array(0, 38), new Array(0, 144), new Array(19, 59), new Array(43, 88)); var formationPunt = new Array(new Array(0, 68), new Array(0, 51), new Array(19, 137), new Array(17, 44), new Array(0, 116), new Array(0, 100), new Array(0, 84), new Array(0, 35), new Array(0, 149), new Array(0, 132), new Array(40, 89)); var formationPuntNew = new Array(new Array(0, 81), new Array(0, 69), new Array(0, 58), new Array(0, 137), new Array(0, 114), new Array(0, 103), new Array(0, 126), new Array(0, 35), new Array(0, 149), new Array(0, 47), new Array(15, 92)); var formationRecievePuntBack = new Array(new Array(0, 88), new Array(0, 119), new Array(0, 59), new Array(30, 88)); var formationRecievePuntFront = new Array(new Array(0, 81), new Array(0, 69), new Array(0, 114), new Array(0, 103), new Array(0, 35), new Array(0, 149), new Array(0, 92)); var formationGoalKick = new Array(new Array(53, 51), new Array(13, 65), new Array(25, 82), new Array(17, 100), new Array(7, 118), new Array(43, 82), new Array(43, 64), new Array(0, 51), new Array(53, 102), new Array(71, 119), new Array(84, 82)); var formationShotgun = new Array(new Array(0, 59), new Array(0, 71), new Array(0, 83), new Array(0, 95), new Array(0, 108), new Array(33, 107), new Array(0, 120), new Array(0, 38), new Array(0, 144), new Array(17, 54), new Array(33, 94)); var formationI = new Array(new Array(0, 59), new Array(0, 71), new Array(0, 83), new Array(0, 95), new Array(0, 108), new Array(60, 93), new Array(0, 120), new Array(0, 38), new Array(0, 144), new Array(38, 104), new Array(28, 94)); var formation43 = new Array(new Array(0, 64), new Array(0, 32), new Array(0, 149), new Array(27, 111), new Array(0, 78), new Array(0, 91), new Array(27, 58), new Array(52, 70), new Array(52, 98), new Array(0, 105), new Array(27, 84)); var formation44New = new Array(new Array(12, 59), new Array(0, 70), new Array(0, 83), new Array(0, 97), new Array(0, 110), new Array(45, 93), new Array(14, 119), new Array(0, 38), new Array(0, 144), new Array(18, 80), new Array(19, 98)); var formation52 = new Array(new Array(0, 64), new Array(0, 32), new Array(0, 149), new Array(24, 97), new Array(0, 76), new Array(0, 87), new Array(24, 72), new Array(50, 61), new Array(50, 108), new Array(0, 98), new Array(0, 109)); var formationPass2 = new Array(new Array(0, 75), new Array(0, 63), new Array(18, 131), new Array(18, 47), new Array(0, 111), new Array(0, 99), new Array(0, 87), new Array(0, 35), new Array(0, 149), new Array(28, 94), new Array(48, 84)); var formationRun2 = new Array(new Array(0, 75), new Array(0, 63), new Array(0, 99), new Array(18, 131), new Array(0, 111), new Array(56, 86), new Array(0, 87), new Array(0, 35), new Array(0, 149), new Array(18, 49), new Array(28, 86)); var formationDefence1 = new Array(new Array(0, 64), new Array(0, 32), new Array(0, 149), new Array(24, 97), new Array(0, 76), new Array(0, 87), new Array(24, 72), new Array(50, 61), new Array(50, 108), new Array(0, 98), new Array(0, 109)); var formationDefence2 = new Array(new Array(0, 64), new Array(0, 32), new Array(0, 149), new Array(27, 111), new Array(0, 78), new Array(0, 91), new Array(27, 58), new Array(52, 70), new Array(52, 98), new Array(0, 105), new Array(27, 84)); var formationDefence3 = new Array(new Array(0, 64), new Array(12, 32), new Array(12, 149), new Array(12, 131), new Array(0, 78), new Array(0, 91), new Array(12, 47), new Array(51, 56), new Array(51, 113), new Array(0, 105), new Array(26, 84)); var formationDefence4 = new Array(new Array(0, 64), new Array(0, 32), new Array(0, 149), new Array(27, 111), new Array(0, 78), new Array(0, 91), new Array(27, 58), new Array(52, 70), new Array(52, 98), new Array(0, 105), new Array(27, 84)); var formationDefence5 = new Array(new Array(0, 64), new Array(12, 32), new Array(12, 149), new Array(12, 131), new Array(0, 78), new Array(0, 91), new Array(12, 47), new Array(51, 56), new Array(51, 113), new Array(0, 105), new Array(26, 84)); onMouseDown = function () { mouseIsDown = true; }; onMouseUp = function () { mouseIsDown = false; }; setupKickoff(2, formation44, 0); setupRecieve(1, formationRecieve, 250); this.onEnterFrame = function () { if (demoMode == false) { if (((pauseTime > 10) and (messageList.length > 0)) || ((scoreboard.bigscreen.ani._currentframe != 1) and (pauseTime > 10))) { pauseTime = 15; } } if (demoMode == true) { if (gameMode == "celebration") { demoScoreTimer = demoScoreTimer + 1; } if (demoScoreTimer > 40) { goalScored(_root.game.ball.target.team); demoScoreTimer = 0; } } else { demoScoreTimer = 0; } if (((((downs < 4) and (gameMode != "scrum")) and (gameMode != "punt")) and (gameMode != "fieldGoal")) and (gameMode != "puntSafety")) { goForIt = false; } if (gameMode == "plays") { vibrate = true; if (paused == false) { downsAdded = false; var _local6 = 0; } } if ((compPlayType == "running") and (parseInt(ball.storedOwner.team) != compTeam)) { compPlayType = "defense"; } if ((playType == "running") and (parseInt(ball.storedOwner.team) != playersTeam)) { playType = "defense"; } if (pauseTime > 0) { gameMode = "paused"; pauseTime = pauseTime - 1; paused = true; } else { paused = false; } if (gameMode != "plays") { lastGameMode = gameMode; } if (((((parseInt(downs) == 4) and (gameMode != "punt")) and (gameMode != "fieldGoal")) and (gameMode != "4thDown")) and (goForIt == false)) { i = 1; while (i < 23) { _root.game["player" + i].tackled = false; i = i + 1; } downCounted = true; } if (parseInt(downs) == 5) { turnOver(); downs = 0; } if (((scoreboard.bigscreen.ani._currentframe == 1) and (messageList.length > 0)) and (demoMode == false)) { viewTime = viewTime + 1; } if (viewTime > 1) { scoreboard.bigscreen.ani.gotoAndPlay(messageList[0]); if (messageList[0] == messageList[1]) { i = 0; while (i < messageList.length) { messageList[i] = messageList[i + 1]; i = i + 1; } messageList.pop(); } i = 0; while (i < messageList.length) { messageList[i] = messageList[i + 1]; i = i + 1; } messageList.pop(); viewTime = 0; } if (gameMode == "kickOff") { if (sentMessage == false) { addMessage("kickOff"); sentMessage = true; } } else { sentMessage = false; } if ((demoMode == true) and (gameMode == "scrum")) { vibrate = true; gameMode = "plays"; } var _local5 = (fieldR._x - fieldL._x) / 100; if (gameMode == "scrum") { if (ball.target.team == 1) { ballon = (fieldR._x - fieldL._x) - (scrimmage - fieldL._x); } else if (ball.target.team == 2) { ballon = scrimmage - fieldL._x; } ballon = Math.round(ballon / _local5); if ((ballon > 99) || (ballon < 0)) { ballon = 0; } } if (ballon > 50) { ballon = 50 - (ballon - 50); } if (downline != -200) { if (downline > endZoneR) { downline = endZoneR; } else if (downline < endZoneL) { downline = endZoneL; } } if ((scrimmage > downline) and (downline != -200)) { togo = scrimmage - downline; } else if (downline != -200) { togo = downline - scrimmage; } togo = Math.round(togo / _local5); if ((downs == 0) and (timeOut == false)) { downline = -200; } if (startTimer < 0) { startTimer = startTimer + 1; } if (gameMode == "shot") { if (scored == false) { if ((ball.ypos > goal1B._y) and (ball.ypos < goal1F._y)) { if (ball._x < goal1F._x) { if ((ball.zpos > 20) and (messageList[messageList.length] != "goal")) { if (tdMode != false) { if (playersTeam == 2) { hscore = hscore + 1; } else { gscore = gscore + 1; } tdMode = false; } else if (playersTeam == 2) { hscore = hscore + 3; } else { gscore = gscore + 3; } addMessage("goal"); scored = true; } else if (messageList[messageList.length] != "goalMissed") { addMessage("goalMissed"); scored = true; } } } if (((ball.ypos > goal1B._y) and (ball.ypos < goal1F._y)) and (messageList[messageList.length] != "goal")) { if (ball._x > goal2F._x) { if ((ball.zpos > 20) and (messageList[messageList.length] != "goal")) { if (tdMode != false) { if (playersTeam == 1) { hscore = hscore + 1; } else { gscore = gscore + 1; } tdMode = false; } else if (playersTeam == 1) { hscore = hscore + 3; } else { gscore = gscore + 3; } addMessage("goal"); scored = true; } else if (messageList[messageList.length] != "goalMissed") { addMessage("goalMissed"); scored = true; } } } } } else { scored = false; } if (((((downCounted == true) and (gameMode != "punt")) and (gameMode != "fieldGoal")) and (gameMode != "4thDown")) and (changeMode == false)) { downCounted = false; gameMode = "4thdown"; pauseTime = 0; paused = false; if (fieldGoalArea.hitTest(_root.game._x + ball.thrownX, _root.game._y + ball.storedOwner._y, true)) { if (ball.storedOwner.team == 1) { if (ball.thrownX > halfPitchX) { var _local4 = "fieldGoal"; } else { var _local4 = "punt"; } } else if (ball.thrownX < halfPitchX) { var _local4 = "fieldGoal"; } else { var _local4 = "punt"; } } else { var _local4 = "punt"; } if ((_local4 == "fieldGoal") and (changeMode == false)) { situation = "fieldGoal"; gameMode = "fieldGoal"; setupFieldGoal(ball.storedOwner.team, scrimmage); } if ((_local4 == "punt") and (changeMode == false)) { situation = "punt"; gameMode = "punt"; setupPunt(ball.storedOwner.team, scrimmage); } if (((_local4 != "punt") and (_local4 != "fieldGoal")) and (changeMode == false)) { situation = "punt"; gameMode = "punt"; setupPunt(ball.storedOwner.team, scrimmage); } } if (gameMode == "shot") { shotTimer = shotTimer + 1; if (shotTimer > 50) { if ((mins <= 0) and (secs <= 0)) { downs = 0; quarter = quarter + 1; mins = defaultMins; secs = defaultSecs; updateTeams(); if (parseInt(lastTeam) == 1) { setupKickoff(2, formation44, 0); setupRecieve(1, formationRecieve, 250); } else { setupKickoff(1, formation44, 190); setupRecieve(2, formationRecieve, -50); } } else if (parseInt(ball.storedOwner.team) == 1) { setupKickoff(2, formation44, 0); setupRecieve(1, formationRecieve, 250); } else { setupKickoff(1, formation44, 190); setupRecieve(2, formationRecieve, -50); } } } else { shotTimer = 0; } if ((mins <= 0) and (secs <= 0)) { timeOut = true; if ((((gameMode == "celebration") || (gameMode == "shot")) || (quarter == 2)) || (gameMode == "convFail")) { var _local3 = true; } else { var _local3 = false; } if (safed == false) { trace(gameMode); if ((pauseTime < 2) and (tdMode == false)) { removeTackles(); } } else { var _local3 = "safety"; } nextQuarterIn = nextQuarterIn - 1; if (((((((((gameMode != "plays") and (gameMode != "fieldGoal")) and (gameMode != "shot")) and (paused == false)) and (gameMode != "celebration")) and (tdMode == false)) and (gameMode != "puntSafety")) || (gameMode == "convFail")) || ((gameMode == "fieldGoal") and (downs > 3.9))) { trace(_local3); var _local7 = downs; quarter = quarter + 1; mins = defaultMins; secs = defaultSecs; addMessage("quaterchange"); if (_local3 == true) { updateTeams(); if ((parseInt(lastTeam) == 2) || (quarter == 3)) { setupKickoff(1, formation44, 190); setupRecieve(2, formationRecieve, -50); } else { setupKickoff(2, formation44, 0); setupRecieve(1, formationRecieve, 250); } removeTackles(); } else if (_local3 == false) { quarterChanged = true; if (scrimmage != -200) { scrimmage = gameWidth - scrimmage; } if (downline != -200) { downline = gameWidth - downline; } timeOut = false; switchSides(); } else { updateTeams(); if (parseInt(lastTeam) == 2) { if (lastTeam != _root.game.playersTeam) { _root.game.gscore = _root.game.gscore + 2; } else { _root.game.hscore = _root.game.hscore + 2; } setupSafetyKick(1); } else { if (lastTeam != _root.game.playersTeam) { _root.game.gscore = _root.game.gscore + 2; } else { _root.game.hscore = _root.game.hscore + 2; } setupSafetyKick(2); } removeTackles(); } } else { mins = 0; secs = 0; } } else { timeOut = false; if (gameMode == "plays") { quarterChanged = false; safed = false; } } if ((gameMode == "plays") and (demoMode == false)) { kickingTeam = 0; situation = false; tdDown = 0; changeMode = false; makeKick = false; counter = counter + 1; if (counter > 25) { secs = secs - 1; counter = 0; } if ((secs == 0) and (mins > 0)) { mins = mins - 1; secs = 59; } } if (gameMode == "fieldGoal") { paused = false; } if ((((storedDowns != downs) and (downs > 0.5)) and (changeMode == false)) and (tdMode == false)) { var _local2 = Math.round(downs); if (_local2 > downs) { _local2 = _local2 - 1; } if (messageList[messageList.length] != ("down" + Math.round(_local2))) { addMessage("down" + Math.round(_local2)); } storedDowns = downs; } };
Instance of Symbol 33 MovieClip in Symbol 494 MovieClip Frame 2
onClipEvent (enterFrame) { if ((_root.game.vibrate == true) and (_root.game.paused == false)) { play(); } else { gotoAndStop (1); } }
Instance of Symbol 109 MovieClip "userInterface" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { if ((_root.game.demoMode == true) and (_currentframe < 3)) { gotoAndStop (2); } else { gotoAndStop (1); } } onClipEvent (enterFrame) { if (_root.game.gameCompleted == true) { gotoAndStop (3); _root.game.gameCompleted = false; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if (_root.game.screens._currentframe == 1) { this.swapDepths(997); } }
Instance of Symbol 113 MovieClip "grass" in Symbol 494 MovieClip Frame 2
onClipEvent (enterFrame) { if (((((((((_parent.ball.target.team == _root.game.playersTeam) and (_root.game.gameMode == "plays")) and (_root.game.vibrate == true)) and (_parent.passesNum == 0)) and (_root.game.demoMode == false)) and (_root.game.paused == false)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) || ((((((((_parent.ball.target.team == _root.game.playersTeam) and (_root.game.gameMode == "plays")) and (_root.game.vibrate == true)) and (_parent.passesNum == 0)) and (_root.game.demoMode == false)) and (_root.game.paused == false)) and (_root.game.playType == "passing")) and (_root.game.tdMode != false))) { gotoAndStop (2); } else { gotoAndStop (1); } }
Instance of Symbol 116 MovieClip "downlinemc" in Symbol 494 MovieClip Frame 2
onClipEvent (enterFrame) { _x = _parent.downline; var adjside = (_root.game.halfPitchX - _x); var oppside = (-1 * (-500 - _y)); var angle = Math.atan2(oppside, adjside); angle = ((angle / Math.PI) * 180) + 90; _rotation = (-1 * angle); if ((_root.game.gameMode != "puntSafety") and (_root.game.gameMode != "kickOff")) { if (((_parent.downs > 0) and (_root.game.downline < _root.game.endZoneR)) and (_root.game.downline > _root.game.endZoneL)) { _alpha = 70; } else { _alpha = 0; } } else { _alpha = 0; } }
Instance of Symbol 116 MovieClip "scrimmageHit" in Symbol 494 MovieClip Frame 2
onClipEvent (enterFrame) { _x = _parent.scrimmage; var adjside = (_root.game.halfPitchX - _x); var oppside = (-1 * (-500 - _y)); var angle = Math.atan2(oppside, adjside); angle = ((angle / Math.PI) * 180) + 90; _rotation = (-1 * angle); if ((_root.game.gameMode != "puntSafety") and (_root.game.gameMode != "kickOff")) { if ((_parent.downs > 0) || (_root.game.tdMode != false)) { _alpha = 70; } else { _alpha = 0; } } else { _alpha = 0; } if (_root.game.playersTeam == 1) { gotoAndStop (2); } else { gotoAndStop (1); } }
Instance of Symbol 198 MovieClip "player12" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player17" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player18" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player3" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player10" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player4" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player2" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player11" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player20" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player13" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player14" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player19" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player21" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player5" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player6" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player8" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player7" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player9" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player22" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } } onClipEvent (load) { arrow.play(); }
Instance of Symbol 198 MovieClip "player1" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player15" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 198 MovieClip "player16" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { hitSound = new Sound(this); hitSound.attachSound("hitSound"); xspeed = 0; yspeed = 0; speed = 0.1 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); rotVel = 0; rotInc = 0; rotTimer = random(20); _rotation = 0; xpos = _x + _root.game._x; ypos = _y + _root.game._y; _root.game.playerNum = _root.game.playerNum + 1; mass = 2; rad = hitArea._width / 2.3; team = 0; if (parseInt(substring(_name, 7, 2)) < 12) { team = 1; rot = 180; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (4); } else { gotoAndStop (2); } ani.gotoAndStop(10); } else { team = 2; rot = 0; origRot = rot; if ((_name == "player22") || (_name == "player11")) { gotoAndStop (3); } else { gotoAndStop (1); } ani.gotoAndStop(1); } if (team == 2) { trace(((("new Array(" + Math.round(_x)) + ",") + Math.round(_y)) + "),"); } rotStored = 0; heldTime = 0; heldTime2 = 0; tackled = false; forwardProgress = 0; progressTimer = 0; type = ""; fixedLineX = 0; speedDone = false; var xspeedEq = speed; var yspeedEq = speed; storedVar = ""; collisionTimer = 0; intercepted = false; } onClipEvent (enterFrame) { function checkOutOfBounds() { if (_root.game.ball.target == this) { boundsPause(); if ((ani._currentframe < 6) || (ani._currentframe > 14)) { if (team == 1) { } } else if ((ani._currentframe > 6) and (ani._currentframe < 14)) { if (team == 2) { } } } } function checkScrimmage() { if (team == 1) { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.twentyYardLineL; _root.game.touchBack = true; } else { _root.game.touchBack = false; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.endZoneR; } } else { if (_root.game.scrimmage < _root.game.endZoneL) { _root.game.scrimmage = _root.game.endZoneL; } if (_root.game.scrimmage > _root.game.endZoneR) { _root.game.scrimmage = _root.game.twentyYardLineR; _root.game.touchBack = true; } else { _root.game.touchBack = false; } } } function tacklePause() { type = "tackle"; if ((_root.game.timeOut == true) and (_root.game.tdMode == false)) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "tackle"; _root.game.safed = true; } else { type = "tackle"; } if ((_root.game.paused == false) and (_root.game.gameMode != "celebration")) { _root.game.sound.gotoAndPlay("whistle"); } if (((((_root.game.gameMode == "plays") and (_root.game.paused == false)) || ((_root.game.gameMode == "kickOff") and (_root.game.paused == false))) || ((_root.game.gameMode == "punt") and (_root.game.paused == false))) || (((_root.game.tdMode != false) and (_root.game.paused == false)) and (_root.game.gameMode == "plays"))) { tackled = true; type = "tackle"; if ((_root.game.passesNum == 0) and (_root.game.gameMode != "celebration")) { if (_parent.ball.target.team == 1) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) < _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } if (_parent.ball.target.team == 2) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); if (((_x + fixedLineX) > _root.game.scrimmage) and (_root.game.downs > 0)) { _parent.addMessage("sack"); } else { _parent.addMessage("tackled"); } } } else if (_root.game.gameMode != "celebration") { _parent.addMessage("tackled"); } _root.game.pauseTime = 55; } } function boundsPause() { if (_root.game.timeOut == true) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); _root.game.scrimmage = _x + fixedLineX; checkScrimmage(); } if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else if ((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (_root.game.downs > 0)) and (_root.game.ball.target == this)) { type = "bounds"; _root.game.safed = true; } else { type = "bounds"; } type = "bounds"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("outOfBounds"); _root.game.pauseTime = 55; } function turnedPause() { if (_root.game.timeOut == true) { _root.game.scrimmage = forwardProgress; checkScrimmage(); } type = "turn"; _root.game.sound.gotoAndPlay("whistle"); tackled = true; _parent.addMessage("turnedAround"); _parent.addMessage("negativeProgress"); _root.game.pauseTime = 55; } function tackle() { if ((_root.game.gameMode != "puntSafety") and (gameMode != "scrum")) { if (_root.game.tdMode != false) { if ((_root.game.timeOut == false) and (_root.game.gameMode != "celebration")) { _root.game.startKickoff(_root.game.playersTeam); _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; } else if (_root.game.gameMode != "celebration") { _root.game.removeTackles(); tacked = false; _root.game.tdMode = false; _root.game.gameMode = "convFail"; trace(_root.game.gameMode); } else { _root.game.removeTackles(); tacked = false; } } else if ((_root.game.downs <= 3.5) || (_root.game.goForIt == true)) { if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 1)) and (_x < 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else if ((((((((_root.game.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (team == 2)) and (_x > 300)) and (_root.game.gameMode != "fieldGoal")) and (_root.game.gameMode != "punt")) and (type != "turn")) and (_root.game.downs > 0.5)) and (_root.game.ball.target == this)) and (_root.game.gameMode != "celebration")) { _root.game.addMessage("Safety"); if (team != _root.game.playersTeam) { _root.game.setupSafetyKick(_root.game.compTeam); _root.game.hscore = _root.game.hscore + 2; } else { _root.game.setupSafetyKick(_root.game.playersTeam); _root.game.gscore = _root.game.gscore + 2; } tackled = false; } else { _root.game.changeMode = false; tackled = false; if (type == "turn") { var _local4 = forwardProgress; } else { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); var _local4 = _x + fixedLineX; } _root.game.scrimmage = _local4; if (_parent.ball.target.team != _root.game.playersTeam) { var _local5 = random(2); if (_local5 == 1) { _root.game.compPlayType = "passing"; _root.game.setupLine(_root.game.compTeam, _root.game.formationShotgun, _local4, 0.5); } else { _root.game.compPlayType = "running"; _root.game.setupLine(_root.game.compTeam, _root.game.formationI, _local4, 0.5); } _root.game.setupLine(_root.game.playersTeam, _root.game.formation43, _local4, 0.5); } else { var _local5 = 1 + random(5); _root.game.compPlayType = "defense"; _root.game.setupLine(_root.game.compTeam, _root.game["formationDefence" + _local5], _local4, 0.5); _root.game.setupLine(_root.game.playersTeam, _root.game.formationShotgun, _local4, 0.5); } } } else if ((_root.game.goForIt == true) and (_root.game.gameMode == "plays")) { if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } _root.game.pauseTime = 0; _root.game.paused = false; tackled = false; } else if (_root.game.gameMode == "plays") { _root.game.pauseTime = 0; _root.game.paused = false; if (_root.game.changeMode == false) { _root.game.downs = _root.game.downs + 1; } tackled = false; } } } function checkWalls() { if ((_y + 10) > _root.game.pitchFrontY) { if (((yspeed > 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y - 1); yspeed = (-yspeed) * 0.5; } if ((_y - 5) < _root.game.pitchBackY) { if (((yspeed < 1) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) { checkOutOfBounds(); } _y = (_y + 1); yspeed = (-yspeed) * 0.5; } if (_root.game.walls.hitTest(xpos + (hitArea._width / 2), ypos, true) and (_x > 300)) { _x = (_x - 2); xspeed = (-xspeed) * 0.5; } if (_root.game.walls.hitTest(xpos - (hitArea._width / 2), ypos, true) and (_x < 300)) { _x = (_x + 2); xspeed = (-xspeed) * 0.5; } } function checkCollision(b1, b2) { var _local12 = b2._x - b1._x; var _local11 = b2._y - b1._y; var _local19 = Math.sqrt((_local12 * _local12) + (_local11 * _local11)); if (_local19 < (b1.rad + b2.rad)) { if (((_parent.ball.target == this) and (b2.team != this.team)) || ((_parent.ball.target == b2) and (this.team != b2.team))) { tacklePause(); } if (_root.game.gameMode == "plays") { var _local8 = 0; if (xspeed < 0) { _local8 = _local8 + (-xspeed); } else { _local8 = _local8 + xspeed; } if (yspeed < 0) { _local8 = _local8 + (-yspeed); } else { _local8 = _local8 + yspeed; } if (_local8 > 1) { hitSound.setVolume(_local8 * 15); hitSound.start(0, 0); hitSound.setVolume(_local8 * 15); } } var _local18 = Math.atan2(_local11, _local12); var _local7 = Math.cos(_local18); var _local6 = Math.sin(_local18); var _local9 = (_local7 * b1.xspeed) + (_local6 * b1.yspeed); var _local15 = (_local7 * b1.yspeed) - (_local6 * b1.xspeed); var _local10 = (_local7 * b2.xspeed) + (_local6 * b2.yspeed); var _local14 = (_local7 * b2.yspeed) - (_local6 * b2.xspeed); var _local21 = (_local9 * b1.mass) + (_local10 * b2.mass); var _local20 = _local9 - _local10; _local9 = (_local21 - (b2.mass * _local20)) / (b1.mass + b2.mass); _local10 = _local20 + _local9; b1.xspeed = ((_local7 * _local9) - (_local6 * _local15)) * 0.7; b1.yspeed = ((_local7 * _local15) + (_local6 * _local9)) * 0.7; b2.xspeed = ((_local7 * _local10) - (_local6 * _local14)) * 0.7; b2.yspeed = ((_local7 * _local14) + (_local6 * _local10)) * 0.7; var _local16 = ((b1.rad + b2.rad) - _local19) / 2; var _local17 = _local7 * _local16; var _local13 = _local6 * _local16; b1._x = b1._x - (_local17 * 1.1); b1._y = b1._y - (_local13 * 1.1); b2._x = b2._x + (_local17 * 1.1); b2._y = b2._y + (_local13 * 1.1); } } if (_root.game.gameMode == "kickOff") { var xspeedEq = speed; var yspeedEq = speed; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if ((_root.game.gameMode == "scrum") || (_root.game.gameMode == "kickOff")) { forwardProgress = 0; progressTimer = 0; } if (team == _root.game.playersTeam) { if (_root.game.playType == "running") { if (_root.game.playersTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if (team == _root.game.compTeam) { if (_root.game.compPlayType == "running") { if (_root.game.compTeam == 1) { if ((((_name == "player7") || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else if ((((_name == "player18") || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) { mass = 50; _root.game.passesNum = 1; } else { mass = 2; } } else { mass = 2; } } if ((((((_name == "player22") and (parseInt(_root.game.ball.storedOwner.team) == 2)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false)) || (((((_name == "player11") and (parseInt(_root.game.ball.storedOwner.team) == 1)) and (_root.game.gameMode != "plays")) and (_root.game.gameMode != "celebration")) and (_root.game.paused == false))) { if (_currentframe == 1) { gotoAndStop (3); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } else if (_currentframe == 2) { gotoAndStop (4); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(10); } } } else if (((((_name == "player22") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player21._currentframe); } else if (((((_name == "player11") and (_root.game.gameMode != "plays")) and (_root.game.paused == false)) and (_root.game.gameMode != "celebration")) and (_root.game.gameMode != "shot")) { gotoAndStop(_root.game.player10._currentframe); if (((team == 1) and (xspeed == 0)) and (yspeed == 0)) { ani.gotoAndStop(_root.game.player10.ani._currentframe); } } if ((tackled == true) and (_root.game.paused == false)) { tackle(); } if (_root.game.paused == false) { if (_parent.ball.target != this) { arrow.gotoAndStop(1); var arrowPlayed = false; heldTime = 0; } else { if ((_parent.passesNum == 1) || (_root.game.downs == 0)) { if (team == 1) { if ((((xspeed < 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress < (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } else if ((((xspeed > 0) and (_root.game.gameMode == "plays")) and (_root.game.paused == false)) and (_root.game.messageList.length == 0)) { if ((_root.game.tdMode == false) || ((_root.game.tdMode != false) and (_parent.passesNum > 0))) { progressTimer = progressTimer + 1; if ((forwardProgress == 0) || (forwardProgress > (_x + fixedLineX))) { fixedLineX = -(((_y - 194) * (_x - _root.game.halfPitchX)) / 450); forwardProgress = _x + fixedLineX; } if (progressTimer > 50) { turnedPause(); progressTimer = 0; } } else { progressTimer = 0; } } } if ((((team == 1) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 1) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime = heldTime + 1; var playerAmount = 12; i = 1; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if (((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > (1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x > _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) || ((((((((target._x > (_x + 40)) and (_parent.passesNum == 0)) and (heldTime > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed > 1.5)) and (_root.game.downs > 0)) and (_root.game.playType == "passing")) and (_root.game.demoMode == true))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime = 0; } if ((((team == 2) and (_root.game.gameMode == "plays")) and (team != _root.game.playersTeam)) || (((team == 2) and (_root.game.gameMode == "plays")) and (_root.game.demoMode == true))) { heldTime2 = heldTime2 + 1; var playerAmount = 23; i = 12; while (i < playerAmount) { var target = _root.game["player" + i]; var randFactor = random(3); if ((((((((target._x < (_x - 40)) and (_parent.passesNum == 0)) and (heldTime2 > 35)) and (randFactor == 1)) and (_root.game["player" + i].xspeed < (-1.5 * _root.game.vibrationVal))) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || ((((_parent.nzone.hitTest(target.xpos, target.ypos, true) and (target._x < _x)) and (_parent.passesNum == 0)) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing"))) { _parent.passesNum = _parent.passesNum + 1; _parent.ball.target = ""; _parent.ball.targetX = _root.game["player" + i]._x + (_root.game["player" + i].xspeed * (8 + random(15))); _parent.ball.targetY = (_root.game["player" + i]._y - 10) + (_root.game["player" + i].yspeed * (8 + random(15))); var dx = (_parent.ball.targetX - _parent.ball._x); var dy = (_parent.ball.targetY - _parent.ball._y); var dist = Math.sqrt((dx * dx) + (dy * dy)); _parent.ball.xspeed = dx / (dist / 10); _parent.ball.yspeed = dy / (dist / 10); _parent.ball.zspeed = -(dist / 20); _parent.ball.zpos = 4; } i = i + 1; } } else { heldTime2 = 0; } if (arrowPlayed == false) { arrow.play(); var arrowPlayed = true; } } if ((_root.game.gameMode == "plays") and (_parent.ball.target == "")) { if ((((((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player22")) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player11"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player4"))) || (((_root.game.downs == 0) and (_root.game.passesNum == 0)) and (_name == "player16"))) { } else { var catchRad = (rad * 2.5); var zcatch = 4; } if (_root.game.ball.target == "") { if ((_root.game.ball._x < (_x + 50)) and (_root.game.ball._x > (_x - 50))) { if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player22")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "kickOff") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player11")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "punt") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 1)) and (_name == "player15")) { _root.game.ball.target = this; } if ((((_root.game.lastGameMode == "puntSafety") and (_root.game.ball.zpos < 4)) and (_root.game.lastTeam == 2)) and (_name == "player4")) { _root.game.ball.target = this; } } if ((_root.game.ball._x < (_x + 20)) and (_root.game.ball._x > (_x - 20))) { var dx = (_parent.ball._x - _x); var dy = (_parent.ball._y - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } var dx = ((_parent.ball._x + _root.game.ball.xspeed) - _x); var dy = ((_parent.ball._y + _root.game.ball.yspeed) - (_y - 10)); var dist = Math.sqrt((dx * dx) + (dy * dy)); if (((dist < catchRad) and (_parent.ball.zpos < zcatch)) and (_root.game.ball.bounce < 1)) { if ((_parent.ball.storedOwner.team != team) and (_parent.ball.storedOwner.team > 0)) { if (_root.game.tdMode != false) { tacklePause(); } else { _parent.scoreboard.bigscreen.ani.gotoAndPlay("intercept"); _root.game.downs = 0; intercepted = true; _root.game.intercepted = true; } } _parent.ball.target = this; arrow.play(); } } } } xpos = _x + _root.game._x; ypos = _y + _root.game._y; speed = 0.12 * _root.game.vibrationVal; currentY = _y - _root.game.pitchBackY; posY = currentY / _root.game.pitchFrontY; percent = _root.game.pitchDepth / _root.game.horizon; depthScale = (1 - percent) + (posY * percent); if (intercepted == true) { speedDone = false; intercepted = false; } if ((_root.game.vibrate == true) and (_root.game.paused == false)) { rotTimer = 1 + random(20 * _root.game.vibrationVal); if (rotTimer == 1) { rotInc = (-30 + random(60)) / 140; } rotVel = rotVel + rotInc; if (((_root.game.gameMode == "plays") and (speedDone == false)) || (_root.game.mouseIsDown == true)) { if (_root.game.lastGameMode != "kickOff") { speedDone = true; if (_root.game.ball.target != this) { if (((_root.game.playType == "running") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "running") and (team == _root.game.compTeam))) { if ((((((((((_name == "player22") || (_name == "player18")) || (_name == "player16")) || (_name == "player15")) || (_name == "player14")) || (_name == "player11")) || (_name == "player7")) || (_name == "player5")) || (_name == "player4")) || (_name == "player3")) { var xspeedEq = (speed * 1.5); var yspeedEq = (speed * 1.5); } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((_root.game.playType == "defense") and (team == _root.game.playersTeam)) || ((_root.game.compPlayType == "defense") and (team == _root.game.compTeam))) { if ((_root.downs >= 1) and (_root.game.blitz == false)) { if ((((_name == "player8") || (_name == "player9")) || (_name == "player19")) || (_name == "player20")) { var xspeedEq = (-(speed / 3)); var yspeedEq = (-(speed / 3)); } else if ((((_name == "player10") || (_name == "player11")) || (_name == "player21")) || (_name == "player22")) { var xspeedEq = (-(speed / 5)); var yspeedEq = (-(speed / 5)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } else if (((((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.compPlayType == "passing")) || (((_root.game.passesNum == 0) and (_root.game.downs > 0)) and (_root.game.playType == "passing"))) || (((_root.game.passesNum == 0) and (_root.game.tdMode != false)) and (_root.game.playType == "passing"))) { var xspeedEq = (-(speed / 6)); var yspeedEq = (-(speed / 6)); } else { var xspeedEq = speed; var yspeedEq = speed; } } else { var xspeedEq = speed; var yspeedEq = speed; } } } if ((_root.game.gameMode != "plays") || (_root.game.paused == true)) { speedDone = false; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { xspeed = xspeed + (Math.cos((rot - 180) * (Math.PI/180)) * xspeedEq); yspeed = yspeed + (Math.sin((rot - 180) * (Math.PI/180)) * yspeedEq); } if (collisionTimer < 1) { collisionTimer = collisionTimer + 1; } else { collisionTimer = 0; } if (((_root.game.vibrate == true) and (_root.game.paused == false)) || (_root.game.mouseIsDown == true)) { if ((collisionTimer == 0) and (team == 1)) { i = 0; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } if ((collisionTimer == 1) and (team == 2)) { i = 12; while (i < (_root.game.playerNum + 1)) { var target = _root.game["player" + i]; if (_name != ("player" + i)) { checkCollision(this, target); } i = i + 1; } checkWalls(); } } if (_root.game.gameMode == "puntSafety") { checkWalls(); } xspeed = xspeed * 0.97; yspeed = yspeed * 0.97; rotVel = rotVel * 0.97; this.swapDepths(_y + (_x / 5)); if ((_name == "player22") and (_root.game.playType == "running")) { } else { var aniFrames = ani._totalframes; rotStored = rotStored + rotVel; if (rotStored > (360 / aniFrames)) { if (ani._currentframe < aniFrames) { ani.nextFrame(); } else { ani.gotoAndStop(1); } rotStored = rotStored - (360 / aniFrames); } if (rotStored < (-(360 / aniFrames))) { if (ani._currentframe > 1) { ani.prevFrame(); } else { ani.gotoAndStop(aniFrames); } rotStored = rotStored + (360 / aniFrames); } rot = rot + rotVel; _xscale = (depthScale * 110); _yscale = _xscale; } if (((_root.game.gameMode == "plays") || (_root.game.gameMode == "celebration")) || (_root.game.gameMode == "shot")) { _x = (_x + (xspeed * depthScale)); _y = (_y + (yspeed * depthScale)); } } }
Instance of Symbol 229 MovieClip "powerBar" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { playerControlled = false; var target; timer = 0; madeFalse = false; } onClipEvent (enterFrame) { function kickBall() { _root.game.makeKick = false; _root.game.downs = 0; timer = 0; _root.game.vibrate = true; if ((_root.game.gameMode == "punt") || (_root.game.gameMode == "puntSafety")) { _parent.ball.targetX = puntX; _parent.ball.targetY = puntY; } else if (_root.game.gameMode == "fieldGoal") { if (_root.game.ball.target.team != _root.game.playersTeam) { var _local6 = random(490 - _x); if (_local6 < 140) { _parent.ball.targetX = hitX; _parent.ball.targetY = hitY; } else { _parent.ball.targetX = missX; _parent.ball.targetY = missY; } } else if (((_currentframe > 5) and (_currentframe < 11)) || ((_currentframe > 20) and (_currentframe < 27))) { _parent.ball.targetX = hitX; _parent.ball.targetY = hitY; } else { _parent.ball.targetX = missX; _parent.ball.targetY = missY; } } else { _parent.ball.targetX = kickOffX; _parent.ball.targetY = kickOffY; } if (((_root.game.gameMode == "kickOff") || (_root.game.gameMode == "punt")) || (_root.game.gameMode == "puntSafety")) { _root.game.gameMode = "plays"; _root.game.passesNum = 0; } else if (_root.game.gameMode == "fieldGoal") { _root.game.gameMode = "shot"; } var _local4 = _parent.ball.targetX - _parent.ball._x; var _local3 = _parent.ball.targetY - _parent.ball._y; var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3)); _parent.ball.xspeed = _local4 / (_local5 / 10); _parent.ball.yspeed = _local3 / (_local5 / 10); _parent.ball.zspeed = -(_local5 / 20); _parent.ball.zpos = 4; _parent.ball.target = ""; _parent.ball.lastPlayer = _root.game.player12; _parent.ball.storedOwner = _root.game.player12; madeFalse = false; } function kickBall2() { _root.game.downs = 0; timer = 0; _root.game.vibrate = true; if ((_root.game.gameMode == "punt") || (_root.game.gameMode == "puntSafety")) { _parent.ball.targetX = _root.game.player4._x + ((_x - _root.game.player4._x) / 6); _parent.ball.targetY = _root.game.player4._y - 10; } else if (_root.game.gameMode == "fieldGoal") { var _local6 = random(_x); if (_root.game.ball.target.team != _root.game.playersTeam) { _local6 = random(490 - _x); if (_local6 < 140) { _parent.ball.targetX = (_x - 220) - (_currentframe * 2); _parent.ball.targetY = _y; } else { _parent.ball.targetX = (_x - 70) - (_currentframe * 2); _parent.ball.targetY = _y; } } else if (((_currentframe > 5) and (_currentframe < 11)) || ((_currentframe > 20) and (_currentframe < 27))) { _parent.ball.targetX = (_x - 220) - (_currentframe * 2); _parent.ball.targetY = _y; } else { _parent.ball.targetX = (_x - 70) - (_currentframe * 2); _parent.ball.targetY = _y; } } else { _parent.ball.targetX = _x - 240; _parent.ball.targetY = _y - 10; } if (((_root.game.gameMode == "kickOff") || (_root.game.gameMode == "punt")) || (_root.game.gameMode == "puntSafety")) { _root.game.gameMode = "plays"; _root.game.passesNum = 0; } else if (_root.game.gameMode == "fieldGoal") { _root.game.gameMode = "shot"; } var _local4 = _parent.ball.targetX - _parent.ball._x; var _local3 = _parent.ball.targetY - _parent.ball._y; var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3)); _parent.ball.xspeed = _local4 / (_local5 / 10); _parent.ball.yspeed = _local3 / (_local5 / 10); _parent.ball.zspeed = -(_local5 / 20); _parent.ball.zpos = 4; _parent.ball.target = ""; _parent.ball.lastPlayer = _root.game.player11; _parent.ball.storedOwner = _root.game.player11; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } var puntX = (_root.game.player15._x - ((_root.game.player15._x - _x) / 6)); var puntY = (_root.game.player15._y - 10); var hitX = ((_x + 220) + (_currentframe * 2)); var hitY = _y; var missX = ((_x + 70) + (_currentframe * 2)); var missY = _y; var kickOffX = ((_parent.ball.targetX = _x + 240)); var kickOffY = (_y - 10); _x = target._x; _y = target._y; if (((_root.game.gameMode == "kickOff") || (_root.game.gameMode == "fieldGoal")) || (_root.game.gameMode == "punt")) { play(); if (timer < 25) { timer = timer + 1; } else { timer = 0; } var when = (timer + random(20)); var now = 30; if (((when > now) and (_root.game.started == true)) || ((_root.game.demoMode == true) and (when > now))) { if (_root.game.ball.target.team == 1) { kickBall(); } else if (_root.game.demoMode == true) { kickBall2(); } } } if (((_root.game.gameMode == "kickOff") || (_root.game.gameMode == "fieldGoal")) || (_root.game.gameMode == "punt")) { if ((_root.game.gameMode == "fieldGoal") and (_root.game.ball.target.team == _root.game.playersTeam)) { _alpha = 100; } else { _alpha = 0; } this.swapDepths(666); } else { _root.game.started = false; _alpha = 0; } if (target.team == 1) { _yscale = 100; } else { _yscale = -100; } }
Instance of Symbol 257 MovieClip in Symbol 494 MovieClip Frame 2
onClipEvent (load) { storedFrame = 10; } onClipEvent (enterFrame) { if (_root.game.cleanUp == true) { this.removeMovieClip(); } if (_root.game.gameMode == "punt") { if ((_parent.ball.target.team == _root.game.playersTeam) and (_currentframe == 1)) { var formations = "offensive"; gotoAndStop (21); } } else if (_root.game.gameMode == "fieldGoal") { if ((_parent.ball.target.team == _root.game.playersTeam) and (_currentframe == 1)) { var formations = "offensive"; gotoAndStop (20); } } else if ((_root.game.gameMode == "scrum") and (downs != 4)) { if ((_parent.ball.target.team == _root.game.playersTeam) and (_currentframe == 1)) { var formations = "offensive"; gotoAndStop(storedFrame); } else if ((_currentframe == 1) and (downs != 4)) { var formations = "defensive"; gotoAndStop (2); } } else if ((((_root.game.gameMode == "plays") || ((_root.game.gameMode == "fieldGoal") and (_root.ball.target.team != _root.game.playersTeam))) || ((_root.game.gameMode == "punt") and (_root.ball.target.team != _root.game.playersTeam))) || (_root.game.gameMode == "kickOff")) { gotoAndStop (1); } if ((_root.game.gameMode == "fieldGoal") and (_root.ball.target.team != _root.game.playersTeam)) { } if (_root.game.gameMode == "kickOff") { lastPlay = ""; } if (_root.game.gameMode == "punt") { lastPlay = ""; } }
Instance of Symbol 259 MovieClip "ball" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { var target; _x = target._x; _y = target._y; targetX = _x; targetY = _y; xpos = _x; ypos = _y; zpos = 0; zspeed = 0; grav = 1; downTimer = 0; downTimer2 = 0; downTimer3 = 0; xspeed = 0; yspeed = 0; lastPlayer = 0; storedOwner = target; thrownX = 0; bounce = 0; hitGround = false; } onClipEvent (enterFrame) { if (_root.game.cleanUp == true) { this.removeMovieClip(); } if (target != "") { storedOwner = target; thrownX = target._x; _rotation = 0; lastPlayer = target; if (_parent.nzone.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (_root.game.gameMode == "plays")) { if ((target.team == 1) and (_x > 300)) { if (_root.game.tdMode != false) { _parent.addMessage("2point"); _root.game.gameMode = "celebration"; if (_root.game.playersTeam == 1) { _root.game.hscore = _root.game.hscore + 2; } else { _root.game.gscore = _root.game.gscore + 2; } } else { _parent.addMessage("touchdown"); _root.game.gameMode = "celebration"; if (_root.game.playersTeam == 1) { _root.game.hscore = _root.game.hscore + 6; } else { _root.game.gscore = _root.game.gscore + 6; } } } else if ((target.team == 2) and (_x < 300)) { if (_root.game.tdMode != false) { _parent.addMessage("2point"); _root.game.gameMode = "celebration"; if (_root.game.playersTeam == 2) { _root.game.hscore = _root.game.hscore + 2; } else { _root.game.gscore = _root.game.gscore + 2; } } else { _parent.addMessage("touchdown"); _root.game.gameMode = "celebration"; if (_root.game.playersTeam == 2) { _root.game.hscore = _root.game.hscore + 6; } else { _root.game.gscore = _root.game.gscore + 6; } } } } this.swapDepths((_y + 7.5) + _x); _x = (target._x + target.xspeed); _y = (target._y - 10); _parent.ballShadow._x = _x; _parent.ballShadow._y = _y + 11; xpos = _x; ypos = _y; bounce = 0; hitGround = false; } else { _rotation = (_rotation + xspeed); this.swapDepths(_y + 5); if (_root.game.paused == false) { xpos = xpos + xspeed; ypos = ypos + yspeed; zpos = zpos - zspeed; if ((zpos - zspeed) > 0) { zspeed = zspeed + grav; } else if (zspeed > 0) { zspeed = -(zspeed * 0.3); zpos = 0; } } if ((zspeed < 0) and (hitGround == true)) { bounce = bounce + 1; } if ((((zpos < 1) and (_root.game.paused == false)) and (_root.game.gameMode != "shot")) and (_root.game.gameMode != "celebration")) { xspeed = xspeed * 0.9; yspeed = yspeed * 0.9; downTimer = downTimer + 1; if (downTimer == 10) { trace("stage1"); _root.game.sound.gotoAndPlay("whistle"); _root.game.addMessage("looseball"); _root.game.pauseTime = 100; xspeed = 0; yspeed = 0; } hitGround = true; trace(bounce); } if ((((zpos < 1) and (_root.game.timeOut == true)) and (_root.game.gameMode != "shot")) and (_root.game.gameMode != "celebration")) { xspeed = xspeed * 0.9; yspeed = yspeed * 0.9; downTimer3 = downTimer3 + 1; if (downTimer3 == 10) { trace("stage1.2"); _root.game.sound.gotoAndPlay("whistle"); _root.game.addMessage("looseball"); _root.game.removeTackles(); _root.game.gameMode = "plays"; _root.game.looseBall(); xspeed = 0; yspeed = 0; downTimer3 = 0; } hitGround = true; } if (((downTimer == 10) and (_root.game.screens._currentframe < 2)) and (_root.game.gameMode != "shot")) { downTimer2 = downTimer2 + 1; if (downTimer2 == 60) { _root.game.removeTackles(); _root.game.pauseTime = 0; _root.game.paused = false; _root.game.gameMode = "plays"; _root.game.looseBall(); trace("stage2"); trace(_root.game.gameMode); } } _x = xpos; _y = (ypos - zpos); _parent.ballShadow._x = xpos; _parent.ballShadow._y = ypos; } if (_root.game.timeOut == true) { downTimer = 0; downTimer2 = 0; } if (((_root.game.gameMode != "plays") and (_root.game.paused == false)) and (downTimer != 0)) { downTimer = 0; downTimer2 = 0; trace("stage3"); } }
Instance of Symbol 263 MovieClip "ballShadow" in Symbol 494 MovieClip Frame 2
onClipEvent (enterFrame) { if (_root.game.cleanUp == true) { this.removeMovieClip(); } if (_root.game.gameMode == "shot") { _alpha = 0; } else { _alpha = 100; } }
Instance of Symbol 262 MovieClip in Symbol 494 MovieClip Frame 2
onClipEvent (enterFrame) { if (_root.game.cleanUp == true) { this.removeMovieClip(); } if (_parent.grass.hitTest(_x + _root.game._x, _y + _root.game._y, true) and (_root.game.grass._currentframe == 2)) { _alpha = 100; _x = _parent._xmouse; _y = _parent._ymouse; Mouse.hide(); } else { _alpha = 0; _x = _parent._xmouse; _y = _parent._ymouse; Mouse.show(); } }
Instance of Symbol 265 MovieClip in Symbol 494 MovieClip Frame 2
onClipEvent (enterFrame) { if (_root.game.ball.target == "") { if (_alpha == 0) { _x = _root.game.ball.targetX; _y = _root.game.ball.targetY; } } else { _alpha = 0; } }
Instance of Symbol 454 MovieClip "scoreboard" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { waited = 0; storedDowns = 0; } onClipEvent (enterFrame) { if (_root.game.cleanUp == true) { this.removeMovieClip(); } if (_root.game.ball.ypos < 20) { this.swapDepths(_root.getNextHighestDepth()); } else { this.swapDepths(5); } if (_parent.mins > 9) { minsTens = substring(_parent.mins, 1, 1); minsOnes = substring(_parent.mins, 2, 1); } else if (_parent.mins >= 0) { minsTens = 0; minsOnes = _parent.mins; } if (_parent.secs > 9) { secsTens = substring(_parent.secs, 1, 1); secsOnes = substring(_parent.secs, 2, 1); } else if (_parent.secs >= 0) { secsTens = 0; secsOnes = _parent.secs; } _root.game.intercepted = false; storedDowns = _root.game.downs; guestScoreOnes = _root.game.gscore; homeScoreOnes = _root.game.hscore; if (_root.gameMode != "punt") { downs = _parent.downs; } else { downs = 4; } if (_root.game.gameMode != "kickOff") { if (_parent.ballon > 9) { ballonTens = substring(_parent.ballon, 1, 1); ballonOnes = substring(_parent.ballon, 2, 1); } else if (_parent.ballon > 0.9) { ballonTens = 0; ballonOnes = _parent.ballon; } else if (((_parent.ballon != 0) || (_root.game.gameMode == "scrum")) || (_root.game.gameMode == "punt")) { ballonTens = 0; ballonOnes = 1; } if (_parent.togo > 9) { togoTens = substring(_parent.togo, 1, 1); togoOnes = substring(_parent.togo, 2, 1); } else if (_parent.togo > 0.9) { togoTens = 0; togoOnes = _parent.togo; } else if (((_parent.togo != 0) || (_root.game.gameMode == "scrum")) || (_root.game.gameMode == "punt")) { togoOnes = 1; togoTens = 0; } } else { ballonTens = "-"; ballonOnes = "-"; togoTens = "-"; togoOnes = "-"; } if (_root.game.gscore > 9) { guestScoreTens = substring(_root.game.gscore, 1, 1); guestScoreOnes = substring(_root.game.gscore, 2, 1); } else { guestScoreTens = 0; guestScoreOnes = _root.game.gscore; } if (_root.game.hscore > 9) { homeScoreTens = substring(_root.game.hscore, 1, 1); homeScoreOnes = substring(_root.game.hscore, 2, 1); } else { homeScoreTens = 0; homeScoreOnes = _root.game.hscore; } if (_parent.quarter < 5) { qtr = _parent.quarter; } else { qtr = 4; } if (bigscreen.ani._currentframe != 1) { tutorial._alpha = 0; waited = 0; } else { waited = waited + 1; if (waited > 5) { tutorial._alpha = 100; } } }
Instance of Symbol 457 MovieClip "sound" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { } onClipEvent (enterFrame) { if ((_root.game.demoMode == false) and (songPlaying == false)) { } if ((_parent.vibrate != true) and (_root.game.demoMode == false)) { if (songVol < 150) { } } else if (songVol > 0) { } }
Instance of Symbol 458 MovieClip "vibrationSound" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { vibrationTimer = 0; } onClipEvent (enterFrame) { if ((_parent.vibrate == true) and (_parent.paused == false)) { vibrationTimer = vibrationTimer + 1; if ((vibratePlaying == false) and (vibrationTimer > 2)) { vibrate = new Sound(this); vibrate.attachSound("vibrationSound"); vibrate.start(0, 99); vibrate.setVolume(25); var vibratePlaying = true; } } else { var vibratePlaying = false; vibrationTimer = 0; vibrate.stop(); kirupaSound = new Sound(this); } }
Instance of Symbol 493 MovieClip "screens" in Symbol 494 MovieClip Frame 2
onClipEvent (load) { storedQuarter = 1; gscoreD = 0; hscoreD = 0; lastFrame = 1; } onClipEvent (enterFrame) { if (_currentframe == 5) { _root.game.paused = true; } if ((_currentframe < 5) and (_currentframe > 1)) { lastFrame = _currentframe; } if (_root.game.cleanUp == true) { this.removeMovieClip(); } if (((_root.game.demoMode == true) and (_currentframe != 5)) and (_currentframe != 1)) { gotoAndStop (1); } if ((storedQuarter != _root.game.quarter) || (_currentframe == 5)) { this.swapDepths(_root.game.getNextHighestDepth()); if (_currentframe == 1) { if (_root.game.quarter == 3) { gotoAndStop (3); } else if (_root.game.quarter < 5) { gotoAndStop (2); } else if (_currentframe < 4) { gotoAndStop (4); } storedQuarter = _root.game.quarter; } } if ((_alpha < 100) and (_currentframe != 1)) { _alpha = (_alpha + 10); } if (_currentframe == 1) { _alpha = 0; } gscoreD = parseInt(_root.game.gscore); hscoreD = parseInt(_root.game.hscore); }
Symbol 494 MovieClip Frame 3
cleanUp = true;
Symbol 494 MovieClip Frame 4
hscore = 0; gscore = 0; downs = 0; vibrate = false; gameMode = "scrum"; passesNum = 0; downs = 0; shotTimer = 0; counter = 0; secs = 0; mins = defaultMins; quarter = 1; scrimmage = 0; started = false; startTimer = 0; chosenColour = colour; playersTeam = 1; compTeam = 2; gameCompleted = true;

Library Items

Symbol 1 Sound [hitSound]
Symbol 2 Sound [vibrationSound]
Symbol 3 BitmapUsed by:4
Symbol 4 GraphicUses:3Used by:5
Symbol 5 MovieClipUses:4Used by:8
Symbol 6 FontUsed by:7 12
Symbol 7 EditableTextUses:6Used by:8
Symbol 8 MovieClip [message textfield]Uses:5 7
Symbol 9 BitmapUsed by:10
Symbol 10 GraphicUses:9Used by:11
Symbol 11 MovieClipUses:10Used by:13
Symbol 12 EditableTextUses:6Used by:13
Symbol 13 MovieClip [Generic FormInput]Uses:11 12
Symbol 14 GraphicUsed by:Timeline
Symbol 15 GraphicUsed by:25
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClipUses:16Used by:25
Symbol 18 GraphicUsed by:25
Symbol 19 GraphicUsed by:22
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClipUses:20Used by:22
Symbol 22 MovieClipUses:19 21Used by:25
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClipUses:23Used by:25
Symbol 25 MovieClipUses:15 17 18 22 24Used by:Timeline
Symbol 495 MovieClip [__Packages.FormInput]
Symbol 496 MovieClip [__Packages.FormMC]
Symbol 497 MovieClip [__Packages.Params]
Symbol 498 MovieClip [__Packages.FanCardModel]
Symbol 499 MovieClip [__Packages.mx.events.EventDispatcher]
Symbol 500 MovieClip [__Packages.mx.utils.Delegate]
Symbol 501 MovieClip [__Packages.Util]
Symbol 502 MovieClip [__Packages.MessageFormInput]
Symbol 503 MovieClip [__Packages.MouseChecker]
Symbol 26 BitmapUsed by:27
Symbol 27 GraphicUses:26Used by:28
Symbol 28 MovieClipUses:27Used by:Timeline
Symbol 29 BitmapUsed by:30 31
Symbol 30 GraphicUses:29Used by:33
Symbol 31 GraphicUses:29Used by:32
Symbol 32 MovieClipUses:31Used by:33
Symbol 33 MovieClipUses:30 32Used by:494
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:34Used by:36 52 81
Symbol 36 MovieClipUses:35Used by:52
Symbol 37 FontUsed by:38 41 43 45 47 49 476 477 479 488 489
Symbol 38 TextUses:37Used by:52
Symbol 39 FontUsed by:40 42 44 46 48 50 57 482 483
Symbol 40 TextUses:39Used by:52
Symbol 41 TextUses:37Used by:52
Symbol 42 TextUses:39Used by:52
Symbol 43 TextUses:37Used by:52
Symbol 44 TextUses:39Used by:52
Symbol 45 TextUses:37Used by:52
Symbol 46 TextUses:39Used by:52
Symbol 47 TextUses:37Used by:52
Symbol 48 TextUses:39Used by:51 52
Symbol 49 TextUses:37Used by:52
Symbol 50 TextUses:39Used by:51
Symbol 51 MovieClipUses:50 48Used by:52
Symbol 52 MovieClipUses:35 36 38 40 41 42 43 44 45 46 47 48 49 51Used by:81
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClipUses:53Used by:68
Symbol 55 BitmapUsed by:56 61 64 65
Symbol 56 GraphicUses:55Used by:66
Symbol 57 EditableTextUses:39Used by:58
Symbol 58 MovieClipUses:57Used by:66 94
Symbol 59 GraphicUsed by:60
Symbol 60 ButtonUses:59Used by:66 94
Symbol 61 GraphicUses:55Used by:62
Symbol 62 MovieClipUses:61Used by:66
Symbol 63 SoundUsed by:66 94
Symbol 64 GraphicUses:55Used by:66 94
Symbol 65 GraphicUses:55Used by:66 94
Symbol 66 MovieClipUses:56 58 60 62 63 64 65Used by:67
Symbol 67 MovieClipUses:66Used by:68
Symbol 68 MovieClipUses:54 67Used by:81
Symbol 69 GraphicUsed by:70 76 77
Symbol 70 MovieClipUses:69Used by:74 76 77
Symbol 71 GraphicUsed by:73 76 77
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClipUses:71 72Used by:76 77
Symbol 74 MovieClipUses:70Used by:76 77
Symbol 75 GraphicUsed by:76 77
Symbol 76 ButtonUses:70 73 74 75 69 71Used by:81
Symbol 77 ButtonUses:70 73 74 75 69 71Used by:78
Symbol 78 MovieClipUses:77Used by:81
Symbol 79 GraphicUsed by:80
Symbol 80 MovieClipUses:79Used by:81
Symbol 81 MovieClipUses:35 52 68 76 78 80Used by:109
Symbol 82 GraphicUsed by:83
Symbol 83 MovieClipUses:82Used by:84
Symbol 84 MovieClipUses:83Used by:90
Symbol 85 BitmapUsed by:86
Symbol 86 GraphicUses:85Used by:90
Symbol 87 GraphicUsed by:90
Symbol 88 BitmapUsed by:89
Symbol 89 GraphicUses:88Used by:90
Symbol 90 MovieClipUses:84 86 87 89Used by:109
Symbol 91 BitmapUsed by:92
Symbol 92 GraphicUses:91Used by:93
Symbol 93 MovieClipUses:92Used by:94
Symbol 94 MovieClipUses:93 58 60 64 63 65Used by:109 490
Symbol 95 GraphicUsed by:109
Symbol 96 GraphicUsed by:97
Symbol 97 MovieClipUses:96Used by:109
Symbol 98 BitmapUsed by:99
Symbol 99 GraphicUses:98Used by:109
Symbol 100 GraphicUsed by:101 105
Symbol 101 MovieClipUses:100Used by:105
Symbol 102 SoundUsed by:103
Symbol 103 MovieClipUses:102Used by:105 108
Symbol 104 GraphicUsed by:105 108
Symbol 105 ButtonUses:101 103 100 104Used by:109
Symbol 106 GraphicUsed by:107 108
Symbol 107 MovieClipUses:106Used by:108
Symbol 108 ButtonUses:107 103 106 104Used by:109
Symbol 109 MovieClipUses:81 90 94 95 97 99 105 108Used by:494
Symbol 110 GraphicUsed by:113
Symbol 111 GraphicUsed by:112
Symbol 112 ButtonUses:111Used by:113
Symbol 113 MovieClipUses:110 112Used by:494
Symbol 114 GraphicUsed by:116
Symbol 115 GraphicUsed by:116
Symbol 116 MovieClipUses:114 115Used by:494
Symbol 117 GraphicUsed by:118
Symbol 118 MovieClipUses:117Used by:198
Symbol 119 BitmapUsed by:120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
Symbol 120 GraphicUses:119Used by:137
Symbol 121 GraphicUses:119Used by:137
Symbol 122 GraphicUses:119Used by:137
Symbol 123 GraphicUses:119Used by:137
Symbol 124 GraphicUses:119Used by:137
Symbol 125 GraphicUses:119Used by:137
Symbol 126 GraphicUses:119Used by:137
Symbol 127 GraphicUses:119Used by:137
Symbol 128 GraphicUses:119Used by:137
Symbol 129 GraphicUses:119Used by:137
Symbol 130 GraphicUses:119Used by:137
Symbol 131 GraphicUses:119Used by:137
Symbol 132 GraphicUses:119Used by:137
Symbol 133 GraphicUses:119Used by:137
Symbol 134 GraphicUses:119Used by:137
Symbol 135 GraphicUses:119Used by:137
Symbol 136 GraphicUses:119Used by:137
Symbol 137 MovieClipUses:120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136Used by:198
Symbol 138 GraphicUsed by:139
Symbol 139 MovieClipUses:138Used by:198
Symbol 140 GraphicUsed by:142
Symbol 141 GraphicUsed by:142
Symbol 142 ButtonUses:140 141Used by:143
Symbol 143 MovieClipUses:142Used by:198
Symbol 144 BitmapUsed by:145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
Symbol 145 GraphicUses:144Used by:161
Symbol 146 GraphicUses:144Used by:161
Symbol 147 GraphicUses:144Used by:161
Symbol 148 GraphicUses:144Used by:161
Symbol 149 GraphicUses:144Used by:161
Symbol 150 GraphicUses:144Used by:161
Symbol 151 GraphicUses:144Used by:161
Symbol 152 GraphicUses:144Used by:161
Symbol 153 GraphicUses:144Used by:161
Symbol 154 GraphicUses:144Used by:161
Symbol 155 GraphicUses:144Used by:161
Symbol 156 GraphicUses:144Used by:161
Symbol 157 GraphicUses:144Used by:161
Symbol 158 GraphicUses:144Used by:161
Symbol 159 GraphicUses:144Used by:161
Symbol 160 GraphicUses:144Used by:161
Symbol 161 MovieClipUses:145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160Used by:198
Symbol 162 BitmapUsed by:163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
Symbol 163 GraphicUses:162Used by:179
Symbol 164 GraphicUses:162Used by:179
Symbol 165 GraphicUses:162Used by:179
Symbol 166 GraphicUses:162Used by:179
Symbol 167 GraphicUses:162Used by:179
Symbol 168 GraphicUses:162Used by:179
Symbol 169 GraphicUses:162Used by:179
Symbol 170 GraphicUses:162Used by:179
Symbol 171 GraphicUses:162Used by:179
Symbol 172 GraphicUses:162Used by:179
Symbol 173 GraphicUses:162Used by:179
Symbol 174 GraphicUses:162Used by:179
Symbol 175 GraphicUses:162Used by:179
Symbol 176 GraphicUses:162Used by:179
Symbol 177 GraphicUses:162Used by:179
Symbol 178 GraphicUses:162Used by:179
Symbol 179 MovieClipUses:163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178Used by:198
Symbol 180 BitmapUsed by:181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
Symbol 181 GraphicUses:180Used by:197
Symbol 182 GraphicUses:180Used by:197
Symbol 183 GraphicUses:180Used by:197
Symbol 184 GraphicUses:180Used by:197
Symbol 185 GraphicUses:180Used by:197
Symbol 186 GraphicUses:180Used by:197
Symbol 187 GraphicUses:180Used by:197
Symbol 188 GraphicUses:180Used by:197
Symbol 189 GraphicUses:180Used by:197
Symbol 190 GraphicUses:180Used by:197
Symbol 191 GraphicUses:180Used by:197
Symbol 192 GraphicUses:180Used by:197
Symbol 193 GraphicUses:180Used by:197
Symbol 194 GraphicUses:180Used by:197
Symbol 195 GraphicUses:180Used by:197
Symbol 196 GraphicUses:180Used by:197
Symbol 197 MovieClipUses:181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196Used by:198
Symbol 198 MovieClipUses:118 137 139 143 161 179 197Used by:494
Symbol 199 GraphicUsed by:200
Symbol 200 MovieClipUses:199Used by:494
Symbol 201 GraphicUsed by:202
Symbol 202 MovieClipUses:201Used by:494
Symbol 203 GraphicUsed by:204
Symbol 204 MovieClipUses:203Used by:494
Symbol 205 MovieClipUsed by:494
Symbol 206 GraphicUsed by:207
Symbol 207 MovieClipUses:206Used by:220
Symbol 208 GraphicUsed by:209
Symbol 209 ButtonUses:208Used by:220
Symbol 210 BitmapUsed by:211
Symbol 211 GraphicUses:210Used by:219
Symbol 212 BitmapUsed by:213
Symbol 213 GraphicUses:212Used by:214
Symbol 214 MovieClipUses:213Used by:215 218
Symbol 215 MovieClipUses:214Used by:219
Symbol 216 GraphicUsed by:219
Symbol 217 ShapeTweeningUsed by:218
Symbol 218 MovieClipUses:217 214Used by:219
Symbol 219 MovieClipUses:211 215 216 218Used by:220
Symbol 220 MovieClipUses:207 209 219Used by:494
Symbol 221 GraphicUsed by:229
Symbol 222 GraphicUsed by:223
Symbol 223 MovieClipUses:222Used by:229
Symbol 224 GraphicUsed by:229
Symbol 225 GraphicUsed by:229
Symbol 226 GraphicUsed by:227
Symbol 227 ButtonUses:226Used by:228
Symbol 228 MovieClipUses:227Used by:229
Symbol 229 MovieClipUses:221 223 224 225 228Used by:494
Symbol 230 FontUsed by:231 232 248 249 250 251 252 253 254 255 256
Symbol 231 EditableTextUses:230Used by:257
Symbol 232 TextUses:230Used by:257
Symbol 233 GraphicUsed by:242
Symbol 234 GraphicUsed by:237
Symbol 235 GraphicUsed by:236
Symbol 236 MovieClipUses:235Used by:237
Symbol 237 MovieClipUses:234 236Used by:242
Symbol 238 BitmapUsed by:239 240
Symbol 239 GraphicUses:238Used by:242
Symbol 240 GraphicUses:238Used by:241
Symbol 241 MovieClipUses:240Used by:242
Symbol 242 MovieClipUses:233 237 239 241Used by:257
Symbol 243 GraphicUsed by:244
Symbol 244 MovieClipUses:243Used by:245
Symbol 245 MovieClipUses:244Used by:246
Symbol 246 MovieClipUses:245Used by:257
Symbol 247 SoundUsed by:257 457
Symbol 248 TextUses:230Used by:257
Symbol 249 TextUses:230Used by:257
Symbol 250 TextUses:230Used by:257
Symbol 251 TextUses:230Used by:257
Symbol 252 TextUses:230Used by:257
Symbol 253 TextUses:230Used by:257
Symbol 254 TextUses:230Used by:257
Symbol 255 TextUses:230Used by:257
Symbol 256 TextUses:230Used by:257
Symbol 257 MovieClipUses:231 232 242 246 247 248 249 250 251 252 253 254 255 256Used by:494
Symbol 258 GraphicUsed by:259 333 408
Symbol 259 MovieClipUses:258Used by:405 429 494
Symbol 260 GraphicUsed by:263
Symbol 261 GraphicUsed by:262
Symbol 262 MovieClipUses:261Used by:263 494
Symbol 263 MovieClipUses:260 262Used by:494
Symbol 264 GraphicUsed by:265
Symbol 265 MovieClipUses:264Used by:494
Symbol 266 BitmapUsed by:267
Symbol 267 GraphicUses:266Used by:454
Symbol 268 FontUsed by:269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
Symbol 269 TextUses:268Used by:454
Symbol 270 TextUses:268Used by:454
Symbol 271 TextUses:268Used by:454
Symbol 272 EditableTextUses:268Used by:454
Symbol 273 EditableTextUses:268Used by:454
Symbol 274 EditableTextUses:268Used by:454
Symbol 275 EditableTextUses:268Used by:454
Symbol 276 EditableTextUses:268Used by:454
Symbol 277 EditableTextUses:268Used by:454
Symbol 278 EditableTextUses:268Used by:454
Symbol 279 EditableTextUses:268Used by:454
Symbol 280 EditableTextUses:268Used by:454
Symbol 281 EditableTextUses:268Used by:454
Symbol 282 EditableTextUses:268Used by:454
Symbol 283 EditableTextUses:268Used by:454
Symbol 284 EditableTextUses:268Used by:454
Symbol 285 EditableTextUses:268Used by:454
Symbol 286 FontUsed by:287
Symbol 287 TextUses:286Used by:454
Symbol 288 MovieClipUsed by:454
Symbol 289 BitmapUsed by:290
Symbol 290 GraphicUses:289Used by:291
Symbol 291 MovieClipUses:290Used by:292
Symbol 292 MovieClipUses:291Used by:446
Symbol 293 GraphicUsed by:333
Symbol 294 BitmapUsed by:295
Symbol 295 GraphicUses:294Used by:333
Symbol 296 GraphicUsed by:333
Symbol 297 GraphicUsed by:333
Symbol 298 GraphicUsed by:299 402 407
Symbol 299 MovieClipUses:298Used by:333
Symbol 300 FontUsed by:301 303 305 307 309 319 337 338 379 380 381 382 384 385 386 395 397 400 401 403 406 409 412 413 420 423 424 425 427 430 433 434 435 437 439 442
Symbol 301 TextUses:300Used by:302
Symbol 302 MovieClipUses:301Used by:333
Symbol 303 TextUses:300Used by:304
Symbol 304 MovieClipUses:303Used by:333
Symbol 305 TextUses:300Used by:306
Symbol 306 MovieClipUses:305Used by:333
Symbol 307 TextUses:300Used by:308
Symbol 308 MovieClipUses:307Used by:333
Symbol 309 TextUses:300Used by:310
Symbol 310 MovieClipUses:309Used by:333
Symbol 311 GraphicUsed by:312
Symbol 312 MovieClipUses:311Used by:333
Symbol 313 GraphicUsed by:333
Symbol 314 GraphicUsed by:333
Symbol 315 GraphicUsed by:333
Symbol 316 GraphicUsed by:333
Symbol 317 GraphicUsed by:333
Symbol 318 GraphicUsed by:333
Symbol 319 TextUses:300Used by:320
Symbol 320 MovieClipUses:319Used by:333
Symbol 321 GraphicUsed by:333
Symbol 322 GraphicUsed by:333
Symbol 323 GraphicUsed by:333
Symbol 324 GraphicUsed by:333
Symbol 325 GraphicUsed by:333
Symbol 326 GraphicUsed by:333
Symbol 327 GraphicUsed by:333
Symbol 328 GraphicUsed by:333
Symbol 329 ShapeTweeningUsed by:333
Symbol 330 GraphicUsed by:331
Symbol 331 MovieClipUses:330Used by:333
Symbol 332 GraphicUsed by:333
Symbol 333 MovieClipUses:293 295 296 297 299 302 304 306 308 310 312 258 313 314 315 316 317 318 320 321 322 323 324 325 326 327 328 329 331 332Used by:445
Symbol 334 GraphicUsed by:445
Symbol 335 GraphicUsed by:445
Symbol 336 SoundUsed by:445
Symbol 337 TextUses:300Used by:445
Symbol 338 TextUses:300Used by:339 370
Symbol 339 MovieClipUses:338Used by:370
Symbol 340 GraphicUsed by:370
Symbol 341 GraphicUsed by:370
Symbol 342 GraphicUsed by:370
Symbol 343 GraphicUsed by:370
Symbol 344 GraphicUsed by:370
Symbol 345 GraphicUsed by:370
Symbol 346 GraphicUsed by:370
Symbol 347 GraphicUsed by:370
Symbol 348 GraphicUsed by:370
Symbol 349 GraphicUsed by:370
Symbol 350 GraphicUsed by:370
Symbol 351 GraphicUsed by:370
Symbol 352 GraphicUsed by:370
Symbol 353 GraphicUsed by:370
Symbol 354 GraphicUsed by:370
Symbol 355 GraphicUsed by:370
Symbol 356 GraphicUsed by:370
Symbol 357 GraphicUsed by:370
Symbol 358 GraphicUsed by:370
Symbol 359 GraphicUsed by:370
Symbol 360 GraphicUsed by:370
Symbol 361 GraphicUsed by:370
Symbol 362 GraphicUsed by:370
Symbol 363 GraphicUsed by:370
Symbol 364 GraphicUsed by:370
Symbol 365 GraphicUsed by:370
Symbol 366 GraphicUsed by:370
Symbol 367 GraphicUsed by:370
Symbol 368 GraphicUsed by:370
Symbol 369 GraphicUsed by:370
Symbol 370 MovieClipUses:339 338 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369Used by:445
Symbol 371 GraphicUsed by:388
Symbol 372 GraphicUsed by:388
Symbol 373 GraphicUsed by:388
Symbol 374 GraphicUsed by:388
Symbol 375 GraphicUsed by:388
Symbol 376 GraphicUsed by:388
Symbol 377 GraphicUsed by:388
Symbol 378 GraphicUsed by:388
Symbol 379 TextUses:300Used by:383
Symbol 380 TextUses:300Used by:383
Symbol 381 TextUses:300Used by:383
Symbol 382 TextUses:300Used by:383
Symbol 383 MovieClipUses:379 380 381 382Used by:388
Symbol 384 TextUses:300Used by:387
Symbol 385 TextUses:300Used by:387
Symbol 386 TextUses:300Used by:387
Symbol 387 MovieClipUses:384 385 386Used by:388
Symbol 388 MovieClipUses:371 372 373 374 375 376 377 378 383 387Used by:445
Symbol 389 GraphicUsed by:390
Symbol 390 MovieClipUses:389Used by:393
Symbol 391 GraphicUsed by:392
Symbol 392 MovieClipUses:391Used by:393
Symbol 393 MovieClipUses:390 392Used by:399
Symbol 394 GraphicUsed by:399
Symbol 395 TextUses:300Used by:396
Symbol 396 MovieClipUses:395Used by:399
Symbol 397 TextUses:300Used by:398
Symbol 398 MovieClipUses:397Used by:399
Symbol 399 MovieClipUses:393 394 396 398Used by:445
Symbol 400 TextUses:300Used by:445
Symbol 401 TextUses:300Used by:445
Symbol 402 MovieClipUses:298Used by:405 429
Symbol 403 TextUses:300Used by:404
Symbol 404 MovieClipUses:403Used by:405
Symbol 405 MovieClipUses:402 259 404Used by:445
Symbol 406 TextUses:300Used by:445
Symbol 407 MovieClipUses:298Used by:411
Symbol 408 MovieClipUses:258Used by:411
Symbol 409 TextUses:300Used by:410
Symbol 410 MovieClipUses:409Used by:411
Symbol 411 MovieClipUses:407 408 410Used by:445
Symbol 412 TextUses:300Used by:445
Symbol 413 TextUses:300Used by:445
Symbol 414 GraphicUsed by:419
Symbol 415 GraphicUsed by:419
Symbol 416 GraphicUsed by:419
Symbol 417 GraphicUsed by:419
Symbol 418 GraphicUsed by:419
Symbol 419 MovieClipUses:414 415 416 417 418Used by:445
Symbol 420 TextUses:300Used by:445
Symbol 421 FontUsed by:422
Symbol 422 TextUses:421Used by:445
Symbol 423 TextUses:300Used by:445
Symbol 424 TextUses:300Used by:445
Symbol 425 TextUses:300Used by:426
Symbol 426 MovieClipUses:425Used by:429
Symbol 427 TextUses:300Used by:428
Symbol 428 MovieClipUses:427Used by:429
Symbol 429 MovieClipUses:259 402 426 428Used by:445
Symbol 430 TextUses:300Used by:445
Symbol 431 FontUsed by:432
Symbol 432 TextUses:431Used by:445
Symbol 433 TextUses:300Used by:445
Symbol 434 TextUses:300Used by:445
Symbol 435 TextUses:300Used by:436
Symbol 436 MovieClipUses:435Used by:441
Symbol 437 TextUses:300Used by:438
Symbol 438 MovieClipUses:437Used by:441
Symbol 439 TextUses:300Used by:440
Symbol 440 MovieClipUses:439Used by:441
Symbol 441 MovieClipUses:436 438 440Used by:445
Symbol 442 TextUses:300Used by:443
Symbol 443 MovieClipUses:442Used by:444
Symbol 444 MovieClipUses:443Used by:445
Symbol 445 MovieClipUses:333 334 335 336 337 370 388 399 400 401 405 406 411 412 413 419 420 422 423 424 429 430 432 433 434 441 444Used by:446
Symbol 446 MovieClipUses:292 445Used by:454
Symbol 447 GraphicUsed by:451
Symbol 448 GraphicUsed by:449
Symbol 449 MovieClipUses:448Used by:451
Symbol 450 GraphicUsed by:451
Symbol 451 MovieClipUses:447 449 450Used by:454
Symbol 452 GraphicUsed by:453
Symbol 453 ButtonUses:452Used by:454
Symbol 454 MovieClipUses:267 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 287 288 446 451 453Used by:494
Symbol 455 GraphicUsed by:457 458
Symbol 456 SoundUsed by:457
Symbol 457 MovieClipUses:455 456 247Used by:494
Symbol 458 MovieClipUses:455Used by:494
Symbol 459 GraphicUsed by:460
Symbol 460 ButtonUses:459Used by:493
Symbol 461 BitmapUsed by:462
Symbol 462 GraphicUses:461Used by:463
Symbol 463 MovieClipUses:462Used by:491
Symbol 464 GraphicUsed by:490
Symbol 465 BitmapUsed by:466
Symbol 466 GraphicUses:465Used by:467
Symbol 467 MovieClipUses:466Used by:490
Symbol 468 GraphicUsed by:474
Symbol 469 GraphicUsed by:470
Symbol 470 MovieClipUses:469Used by:474
Symbol 471 GraphicUsed by:474
Symbol 472 GraphicUsed by:474
Symbol 473 MovieClipUsed by:474
Symbol 474 MovieClipUses:468 470 471 472 473Used by:478
Symbol 475 GraphicUsed by:478
Symbol 476 TextUses:37Used by:478
Symbol 477 TextUses:37Used by:478
Symbol 478 MovieClipUses:474 475 476 477Used by:490
Symbol 479 TextUses:37Used by:490
Symbol 480 GraphicUsed by:490
Symbol 481 FontUsed by:482 483
Symbol 482 EditableTextUses:39 481Used by:490
Symbol 483 EditableTextUses:39 481Used by:490
Symbol 484 BitmapUsed by:485 486
Symbol 485 GraphicUses:484Used by:487
Symbol 486 GraphicUses:484Used by:487
Symbol 487 MovieClipUses:485 486Used by:490
Symbol 488 TextUses:37Used by:490
Symbol 489 TextUses:37Used by:490
Symbol 490 MovieClipUses:464 467 478 94 479 480 482 483 487 488 489Used by:491
Symbol 491 MovieClipUses:463 490Used by:493
Symbol 492 SoundUsed by:493 494
Symbol 493 MovieClipUses:460 491 492Used by:494
Symbol 494 MovieClipUses:33 109 113 116 198 200 202 204 205 220 229 257 259 263 262 265 454 457 458 493 492Used by:Timeline

Instance Names

"game"Frame 2Symbol 494 MovieClip
"backing_mc"Symbol 8 MovieClip [message textfield] Frame 1Symbol 5 MovieClip
"backing_mc"Symbol 8 MovieClip [message textfield] Frame 1Symbol 5 MovieClip
"tf"Symbol 8 MovieClip [message textfield] Frame 1Symbol 7 EditableText
"backing_mc"Symbol 13 MovieClip [Generic FormInput] Frame 1Symbol 11 MovieClip
"backing_mc"Symbol 13 MovieClip [Generic FormInput] Frame 1Symbol 11 MovieClip
"tf"Symbol 13 MovieClip [Generic FormInput] Frame 1Symbol 12 EditableText
"cover"Symbol 52 MovieClip Frame 1Symbol 36 MovieClip
"label"Symbol 66 MovieClip Frame 1Symbol 58 MovieClip
"glow"Symbol 90 MovieClip Frame 1Symbol 84 MovieClip
"label"Symbol 94 MovieClip Frame 1Symbol 58 MovieClip
"muteButton"Symbol 109 MovieClip Frame 1Symbol 90 MovieClip
"hitArea"Symbol 198 MovieClip Frame 1Symbol 118 MovieClip
"ani"Symbol 198 MovieClip Frame 1Symbol 137 MovieClip
"arrow"Symbol 198 MovieClip Frame 1Symbol 139 MovieClip
"ani"Symbol 198 MovieClip Frame 2Symbol 161 MovieClip
"ani"Symbol 198 MovieClip Frame 3Symbol 179 MovieClip
"ani"Symbol 198 MovieClip Frame 4Symbol 197 MovieClip
"bar"Symbol 220 MovieClip Frame 1Symbol 207 MovieClip
"knob"Symbol 220 MovieClip Frame 1Symbol 219 MovieClip
"changeF"Symbol 257 MovieClip Frame 2Symbol 242 MovieClip
"changeF"Symbol 257 MovieClip Frame 3Symbol 242 MovieClip
"changeF"Symbol 257 MovieClip Frame 5Symbol 242 MovieClip
"changeF"Symbol 257 MovieClip Frame 10Symbol 242 MovieClip
"changeF"Symbol 257 MovieClip Frame 11Symbol 242 MovieClip
"changeF"Symbol 257 MovieClip Frame 13Symbol 242 MovieClip
"changeF"Symbol 257 MovieClip Frame 20Symbol 242 MovieClip
"tutorial"Symbol 445 MovieClip Frame 1Symbol 333 MovieClip
"lights"Symbol 446 MovieClip Frame 1Symbol 292 MovieClip
"ani"Symbol 446 MovieClip Frame 1Symbol 445 MovieClip
"tutorial"Symbol 454 MovieClip Frame 1Symbol 288 MovieClip
"bigscreen"Symbol 454 MovieClip Frame 1Symbol 446 MovieClip
"userInterface"Symbol 494 MovieClip Frame 2Symbol 109 MovieClip
"grass"Symbol 494 MovieClip Frame 2Symbol 113 MovieClip
"downlinemc"Symbol 494 MovieClip Frame 2Symbol 116 MovieClip
"scrimmageHit"Symbol 494 MovieClip Frame 2Symbol 116 MovieClip
"player12"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player17"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player18"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player3"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player10"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player4"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player2"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player11"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player20"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player13"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player14"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player19"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player21"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player5"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player6"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player8"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player7"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player9"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player22"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player1"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player15"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"player16"Symbol 494 MovieClip Frame 2Symbol 198 MovieClip
"walls"Symbol 494 MovieClip Frame 2Symbol 200 MovieClip
"nzone"Symbol 494 MovieClip Frame 2Symbol 202 MovieClip
"fieldGoalArea"Symbol 494 MovieClip Frame 2Symbol 204 MovieClip
"goal2F"Symbol 494 MovieClip Frame 2Symbol 205 MovieClip
"goal2B"Symbol 494 MovieClip Frame 2Symbol 205 MovieClip
"goal1F"Symbol 494 MovieClip Frame 2Symbol 205 MovieClip
"goal1B"Symbol 494 MovieClip Frame 2Symbol 205 MovieClip
"fieldL"Symbol 494 MovieClip Frame 2Symbol 205 MovieClip
"fieldR"Symbol 494 MovieClip Frame 2Symbol 205 MovieClip
"powerBar"Symbol 494 MovieClip Frame 2Symbol 229 MovieClip
"ball"Symbol 494 MovieClip Frame 2Symbol 259 MovieClip
"ballShadow"Symbol 494 MovieClip Frame 2Symbol 263 MovieClip
"scoreboard"Symbol 494 MovieClip Frame 2Symbol 454 MovieClip
"sound"Symbol 494 MovieClip Frame 2Symbol 457 MovieClip
"vibrationSound"Symbol 494 MovieClip Frame 2Symbol 458 MovieClip
"screens"Symbol 494 MovieClip Frame 2Symbol 493 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 1 as "hitSound"
ExportAssets (56)Timeline Frame 1Symbol 2 as "vibrationSound"
ExportAssets (56)Timeline Frame 1Symbol 8 as "message textfield"
ExportAssets (56)Timeline Frame 1Symbol 13 as "Generic FormInput"
ExportAssets (56)Timeline Frame 1Symbol 495 as "__Packages.FormInput"
ExportAssets (56)Timeline Frame 1Symbol 496 as "__Packages.FormMC"
ExportAssets (56)Timeline Frame 1Symbol 497 as "__Packages.Params"
ExportAssets (56)Timeline Frame 1Symbol 498 as "__Packages.FanCardModel"
ExportAssets (56)Timeline Frame 1Symbol 499 as "__Packages.mx.events.EventDispatcher"
ExportAssets (56)Timeline Frame 1Symbol 500 as "__Packages.mx.utils.Delegate"
ExportAssets (56)Timeline Frame 1Symbol 501 as "__Packages.Util"
ExportAssets (56)Timeline Frame 1Symbol 502 as "__Packages.MessageFormInput"
ExportAssets (56)Timeline Frame 1Symbol 503 as "__Packages.MouseChecker"

Labels

"error"Symbol 8 MovieClip [message textfield] Frame 9
"normal"Symbol 8 MovieClip [message textfield] Frame 25
"error"Symbol 13 MovieClip [Generic FormInput] Frame 9
"normal"Symbol 13 MovieClip [Generic FormInput] Frame 25
"fieldGoal"Symbol 52 MovieClip Frame 2
"kickOff"Symbol 52 MovieClip Frame 3
"punt"Symbol 52 MovieClip Frame 4
"extraPoint"Symbol 52 MovieClip Frame 5
"defense"Symbol 52 MovieClip Frame 6
"offense"Symbol 52 MovieClip Frame 7
"idle"Symbol 66 MovieClip Frame 6
"over"Symbol 66 MovieClip Frame 11
"out"Symbol 66 MovieClip Frame 31
"idle"Symbol 94 MovieClip Frame 6
"over"Symbol 94 MovieClip Frame 11
"out"Symbol 94 MovieClip Frame 31
"welcome"Symbol 288 MovieClip Frame 1
"welcome"Symbol 333 MovieClip Frame 1
"goal"Symbol 445 MovieClip Frame 2
"touchdown"Symbol 445 MovieClip Frame 63
"sack"Symbol 445 MovieClip Frame 196
"down1"Symbol 445 MovieClip Frame 221
"down2"Symbol 445 MovieClip Frame 260
"down3"Symbol 445 MovieClip Frame 291
"intercept"Symbol 445 MovieClip Frame 321
"quaterchange"Symbol 445 MovieClip Frame 351
"looseball"Symbol 445 MovieClip Frame 396
"4thdown"Symbol 445 MovieClip Frame 426
"kickoff"Symbol 445 MovieClip Frame 456
"tackled"Symbol 445 MovieClip Frame 486
"goalMissed"Symbol 445 MovieClip Frame 556
"2point"Symbol 445 MovieClip Frame 619
"turnedAround"Symbol 445 MovieClip Frame 661
"negativeProgress"Symbol 445 MovieClip Frame 702
"safety"Symbol 445 MovieClip Frame 762
"outOfBounds"Symbol 445 MovieClip Frame 796
"turnOver"Symbol 445 MovieClip Frame 826
"tie"Symbol 445 MovieClip Frame 835
"whistle"Symbol 457 MovieClip Frame 2
"whoosh"Symbol 457 MovieClip Frame 4
"crowd"Symbol 457 MovieClip Frame 6
"quarter"Symbol 493 MovieClip Frame 2
"halfTime"Symbol 493 MovieClip Frame 3
"final"Symbol 493 MovieClip Frame 4
"sendToFriend"Symbol 493 MovieClip Frame 5
"endOfGame"Symbol 494 MovieClip Frame 3

Dynamic Text Variables

textSymbol 7 EditableText"I thought you might like this"
textSymbol 12 EditableText""
textSymbol 57 EditableText""
lastPlaySymbol 231 EditableText"<p align="center"></p>"
homeScoreOnesSymbol 272 EditableText"<p align="center"><font face="DS-Digital" size="30" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
homeScoreTensSymbol 273 EditableText"<p align="center"><font face="DS-Digital" size="30" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
togoOnesSymbol 274 EditableText"<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
togoTensSymbol 275 EditableText"<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
qtrSymbol 276 EditableText"<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
downsSymbol 277 EditableText"<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
minsOnesSymbol 278 EditableText"<p align="center"><font face="DS-Digital" size="20" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
minsTensSymbol 279 EditableText"<p align="center"><font face="DS-Digital" size="20" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
secsOnesSymbol 280 EditableText"<p align="center"><font face="DS-Digital" size="20" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
secsTensSymbol 281 EditableText"<p align="center"><font face="DS-Digital" size="20" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
ballonOnesSymbol 282 EditableText"<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
ballonTensSymbol 283 EditableText"<p align="center"><font face="DS-Digital" size="18" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
guestScoreOnesSymbol 284 EditableText"<p align="center"><font face="DS-Digital" size="30" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
guestScoreTensSymbol 285 EditableText"<p align="center"><font face="DS-Digital" size="30" color="#ff0000" letterSpacing="0.000000" kerning="1">0</font></p>"
hscoreDSymbol 482 EditableText"<p align="center"><font face="Gotham Black" size="32" color="#d82916" letterSpacing="0.000000" kerning="1">00</font></p>"
gscoreDSymbol 483 EditableText"<p align="center"><font face="Gotham Black" size="32" color="#d82916" letterSpacing="0.000000" kerning="1">00</font></p>"




http://swfchan.com/25/121727/info.shtml
Created: 4/3 -2019 07:38:30 Last modified: 4/3 -2019 07:38:30 Server time: 26/04 -2024 11:21:17