Frame 2
load_bar_mc.start_width = load_bar_mc._width;
minimum_frames = 20;
loading_text_mc.sign = -1;
loading_text_mc.onEnterFrame = function () {
this._alpha = this._alpha + (this.sign * 4);
if (this._alpha <= 50) {
this.sign = 1;
} else if (this._alpha >= 100) {
this.sign = -1;
}
};
load_bar_mc.onEnterFrame = function () {
var _local4 = Math.round(_root.getBytesLoaded());
var _local3 = Math.round(_root.getBytesTotal());
var _local5 = _local4 / _local3;
trace(((("loaded " + Math.round(_local4 / 1024)) + " kb of ") + Math.round(_local3 / 1024)) + " kb");
_root.load_bar_mc._width = _local5 * _root.load_bar_mc.start_width;
if ((_local4 == _local3) && ((_root.minimum_frames--) <= 0)) {
_root.attachMovie("black_scene", "black_scene_mc", 1);
_root.black_scene_mc._alpha = 0;
_root.black_scene_mc._x = 320;
_root.black_scene_mc._y = 240;
this.onEnterFrame = function () {
_root.black_scene_mc._alpha = _root.black_scene_mc._alpha + 5;
if (_root.black_scene_mc._alpha >= 100) {
delete this.onEnterFrame;
_root.gotoAndStop("game_frame");
}
};
}
};
stop();
Frame 3
function IntroVideoLoaded() {
intro_video_mc.end_pause_frames = 10;
intro_video_mc.onEnterFrame = function () {
if ((this.end_pause_frames--) > 0) {
return(undefined);
}
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
delete this.onEnterFrame;
_root.gotoAndStop("game_frame");
}
};
}
black_scene_mc.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
delete this.onEnterFrame;
}
};
stop();
Frame 4
function Vector(x, y, z) {
if (isNaN(x)) {
x = 0;
}
if (isNaN(y)) {
y = 0;
}
if (isNaN(z)) {
z = 0;
}
this.x = x;
this.y = y;
this.z = z;
}
function Line(orig_x, orig_y, m_x, m_y) {
if (Math.abs(m_x) == Number.POSITIVE_INFINITY) {
m_x = 1;
m_y = 0;
} else if (Math.abs(m_y) == Number.POSITIVE_INFINITY) {
m_x = 0;
m_y = 1;
}
this._origin = new Vector(orig_x, orig_y);
this._slope = new Vector(m_x, m_y);
}
function FieldGoalScene() {
this.image = {mc:"", width:1000, height:600};
this.camera = {pos:new Vector(), origin:new Vector(this.image.width / 2, this.image.height / 2), focal_length:50, k:26, max_zoom:100, start_zoom:100};
this.start_pos = new Vector();
this.max_kick_speed = 10;
this.football_elevation = 0;
}
function PlayNewGame() {
sound_loop_mc.me();
sound_loop_mc.PlaySound();
LoadNewFGScene(-90, false);
SetIgnoreOnPress(true);
OpenPopupMC("PickGameScene", "pick_game_scene_mc");
}
function PickLevel() {
SetIgnoreOnPress(true);
OpenPopupMC("PickLevelScene", "pick_level_scene_mc", {center_xoffset:20, center_yoffset:20});
}
function DisplayDemoDialog() {
trace("DISPLAY DEMO DIALOG!");
SetIgnoreOnPress(true);
OpenPopupMC("Demo2Dialog", "demo_dialog_mc");
}
function PlayGame() {
if (pick_level_scene_mc) {
pick_level_scene_mc.Close(EventObj(PlayGame));
return(undefined);
}
if (pick_game_scene_mc) {
pick_game_scene_mc.Close(EventObj(PlayGame));
return(undefined);
}
sound_loop_mc.StopSound();
SetIgnoreOnPress(false);
switch (Game.type) {
case DISTANCE :
PlayDistanceGame(INTRO_STAGE);
return;
case UPRIGHTS :
PlayUprightsGame(INTRO_STAGE);
return;
case TARGET :
PlayTargetGame(INTRO_STAGE);
return;
case POINTS :
PlayPointsGame(INTRO_STAGE);
return;
case HIGH_SCORE :
PlayHighScoreGame(INTRO_STAGE);
return;
default :
trace(("Error: Unknown game type '" + Game.type) + "'");
}
}
function PlayAgain() {
PlayGame();
}
function PauseGame() {
football.paused = true;
football.Still();
game_info_display_mc.StopClock();
Game.paused_bullseye_interval_id = Game.bullseye_interval_id;
clearInterval(Game.bullseye_interval_id);
clearInterval(Game.warning_bullseye_interval_id);
}
function ResumeGame() {
football.paused = false;
if (football.onEnterFrame) {
football.Spin();
}
if (game_info_display_mc.GetClock() != 0) {
game_info_display_mc.StartClock();
}
if (Game.paused_bullseye_interval_id) {
Game.bullseye_interval_id = setInterval(PlayTargetGame, Game.bullseye_interval, NEW_BULLSEYE_STAGE);
Game.warning_bullseye_interval_id = setInterval(PlayTargetGame, Game.warning_bullseye_interval, WARNING_BULLSEYE_STAGE);
delete Game.paused_bullseye_interval_id;
}
}
function ClearFieldGoalScene() {
if (aim_football_mc) {
aim_football_mc.DeleteAimArrow();
ClosePopupMCNow(aim_football_mc, {onClose:EventObj(null)});
}
if (power_and_accuracy_picker_mc) {
ClosePopupMCNow(power_and_accuracy_picker_mc, {onClose:EventObj(null)});
}
if (football) {
football.removeMovieClip();
}
}
function ReInitGame() {
Game.score = 0;
Game.kicks_made = 0;
Game.kicks_missed = 0;
Game.accuracy = 0;
Game.round = 1;
Game.last_fieldgoal = {made:false, pos:new Vector(), hit_goalpost:0};
}
function Quit() {
trace("\n>>> Quitting the game.");
ClearFieldGoalScene();
clearInterval(Game.bullseye_interval_id);
clearInterval(Game.warning_bullseye_interval_id);
Game.current_bullseye.CloseBullseye();
PlayNewGame();
}
function PlayDistanceGame(stage) {
switch (stage) {
case INTRO_STAGE :
ReInitGame();
LoadNewFGScene(-90, false);
OpenPopupMC("DistanceGameIntroScene", "distance_game_intro_scene_mc", {onClose:EventObj(PlayDistanceGame, GO_MSG_STAGE), duration:50});
break;
case GO_MSG_STAGE :
GoSceneInitObject.onClose = EventObj(PlayDistanceGame, KICK_CONTROLS_STAGE);
OpenPopupMC("GoScene", "go_scene_mc", GoSceneInitObject);
LoadNewFGScene(-90, true);
SetIgnoreOnPress(true);
break;
case KICK_CONTROLS_STAGE :
SetIgnoreOnPress(false);
game_info_display_mc.SetClock(10);
game_info_display_mc.SetClockExpirationEvent(EventObj(PlayDistanceGame, OUT_OF_TIME_STAGE));
game_info_display_mc.StartClock();
game_info_display_mc.SetSoundTime(3);
if (Game.level == ROOKIE) {
wind.speed = Math.round(rand(0, 5));
} else if (Game.level == PRO) {
wind.speed = Math.round(rand(0, 8));
} else if (Game.level == ALLPRO) {
wind.speed = Math.round(rand(0, 15));
}
wind.NewRandDir();
if ((Game.kicks_made + Game.kicks_missed) == 0) {
football.pos = new Vector(0, 0, -90);
Game.last_fieldgoal.pos = football.pos.Copy();
game_info_display_mc.SetInfoTitle("made/missed");
game_info_display_mc.SetInfoText("0 / 0");
} else {
if (Game.last_fieldgoal.made == true) {
football.pos = Game.last_fieldgoal.pos.Copy().Sub(new Vector(0, 0, 9));
if (football.pos.z < -189) {
football.pos.z = -189;
}
} else {
football.pos = Game.last_fieldgoal.pos.Copy().Add(new Vector(0, 0, 15));
if (football.pos.z > -90) {
football.pos.z = -90;
}
}
Game.last_fieldgoal.pos = football.pos.Copy();
LoadNewFGScene(football.pos.z, true);
football.pos.x = 10 * Math.round(rand(-1, 1));
}
RedrawFootball();
scene_mc.scene_image.ShowClock();
game_info_display_mc.SetDistance((-football.pos.z) / 3);
football.onKick = EventObj(PlayDistanceGame, FOOTBALL_ON_KICK_STAGE);
football.onFate = EventObj(PlayDistanceGame, GOOD_NO_GOOD_MSG_STAGE);
football.onEnd = EventObj(PlayDistanceGame, END_OF_KICK_STAGE);
KickFootball(0);
break;
case GOOD_NO_GOOD_MSG_STAGE :
if (Game.last_fieldgoal.made == true) {
PlaySoundFieldGoalMake();
OpenPopupMC("GoodScene", "good_scene_mc", GoodNoGoodSceneInitObject);
Game.kicks_made++;
if (Game.last_fieldgoal.pos.z == -189) {
SetIgnoreOnPress(true);
football.onEnd = null;
if (Game.level == ALLPRO) {
var _local1 = ((Game.level == ROOKIE) ? "ROOKIE" : (((Game.level == PRO) ? "PRO" : "ALL-PRO")));
OpenPopupMC("EndOfGameDialog", "distance_end_of_game_dialog_mc", {level_text:_local1});
PlaySoundVictory();
} else {
var _local1 = ((Game.level == ROOKIE) ? "ROOKIE" : (((Game.level == PRO) ? "PRO" : "ALL-PRO")));
OpenPopupMC("DistanceLevelPassedDialog", "distance_level_passed_dialog_mc", {onClose:EventObj(PlayDistanceGame, GO_MSG_STAGE), level_text:_local1});
ReInitGame();
}
}
} else {
PlaySoundFieldGoalMiss();
OpenPopupMC("NoGoodScene", "no_good_scene_mc", GoodNoGoodSceneInitObject);
Game.kicks_missed++;
}
game_info_display_mc.SetInfoText((Game.kicks_made + " / ") + Game.kicks_missed);
break;
case END_OF_KICK_STAGE :
PlayDistanceGame(KICK_CONTROLS_STAGE);
break;
case OUT_OF_TIME_STAGE :
SetIgnoreOnPress(true);
if (!football.onEnterFrame) {
ClearFieldGoalScene();
OpenPopupMC("OutOfTimeDialog", "out_of_time_dialog_mc");
}
break;
case FOOTBALL_ON_KICK_STAGE :
game_info_display_mc.StopClock();
break;
default :
trace("PlayDistanceGame default stage error.");
}
}
function PlayUprightsGame(stage) {
switch (stage) {
case INTRO_STAGE :
ReInitGame();
LoadNewFGScene(-90, false);
OpenPopupMC("UprightsGameIntroScene", "uprights_game_intro_scene_mc", {onClose:EventObj(PlayUprightsGame, GO_MSG_STAGE)});
Game.uprights = {hit_left_upright:false, hit_right_upright:false};
break;
case GO_MSG_STAGE :
switch (Game.level) {
case ROOKIE :
switch (Game.round) {
case 1 :
football.pos = new Vector(0, 0, -75);
break;
case 2 :
football.pos = new Vector(0, 0, -99);
break;
case 3 :
football.pos = new Vector(0, 0, -120);
break;
}
wind.speed = Math.round(rand(0, 4));
break;
case PRO :
switch (Game.round) {
case 1 :
football.pos = new Vector(0, 0, -81);
break;
case 2 :
football.pos = new Vector(0, 0, -105);
break;
case 3 :
football.pos = new Vector(0, 0, -129);
break;
}
wind.speed = Math.round(rand(1, 5));
break;
case ALLPRO :
switch (Game.round) {
case 1 :
football.pos = new Vector(0, 0, -90);
break;
case 2 :
football.pos = new Vector(0, 0, -111);
break;
case 3 :
football.pos = new Vector(0, 0, -135);
break;
}
wind.speed = Math.round(rand(2, 6));
}
wind.NewRandDir();
Game.last_fieldgoal.pos = football.pos.Copy();
LoadNewFGScene(football.pos.z, true);
scene_mc.scene_image.ShowClock();
scene_mc.scene_image.goalpost_left._alpha = (Game.uprights.hit_left_upright ? 30 : 0);
scene_mc.scene_image.goalpost_right._alpha = (Game.uprights.hit_right_upright ? 30 : 0);
RedrawFootball();
GoSceneInitObject.onClose = EventObj(PlayUprightsGame, GAME_START_STAGE);
OpenPopupMC("GoScene", "go_scene_mc", GoSceneInitObject);
SetIgnoreOnPress(true);
break;
case GAME_START_STAGE :
SetIgnoreOnPress(false);
if (Game.level == ROOKIE) {
game_info_display_mc.SetClock(60);
} else if (Game.level == PRO) {
game_info_display_mc.SetClock(60);
} else if (Game.level == ALLPRO) {
game_info_display_mc.SetClock(60);
}
game_info_display_mc.SetClockExpirationEvent(EventObj(PlayUprightsGame, OUT_OF_TIME_STAGE));
game_info_display_mc.SetInfoTitle("left / right");
game_info_display_mc.SetInfoText("no / no");
game_info_display_mc.StartClock();
scene_mc.scene_image.ShowClock();
game_info_display_mc.SetDistance((-football.pos.z) / 3);
case KICK_CONTROLS_STAGE :
if (game_info_display_mc.GetClock() == 0) {
PlayUprightsGame(OUT_OF_TIME_STAGE);
break;
}
switch (Game.level) {
case ROOKIE :
wind.speed = Math.round(rand(0, 4));
break;
case PRO :
wind.speed = Math.round(rand(1, 5));
break;
case ALLPRO :
wind.speed = Math.round(rand(2, 6));
break;
}
wind.NewRandDir();
ResetFGScene();
football.pos = Game.last_fieldgoal.pos.Copy();
RedrawFootball();
football.onFate = EventObj(PlayUprightsGame, GOOD_NO_GOOD_MSG_STAGE);
football.onEnd = EventObj(PlayUprightsGame, KICK_CONTROLS_STAGE);
KickFootball(0);
break;
case GOOD_NO_GOOD_MSG_STAGE :
var _local1 = false;
switch (Game.last_fieldgoal.hit_goalpost) {
case LEFT_UPRIGHT :
if (!Game.uprights.hit_left_upright) {
_local1 = true;
}
Game.uprights.hit_left_upright = true;
scene_mc.scene_image.goalpost_left._alpha = 30;
break;
case RIGHT_UPRIGHT :
if (!Game.uprights.hit_right_upright) {
_local1 = true;
}
Game.uprights.hit_right_upright = true;
scene_mc.scene_image.goalpost_right._alpha = 30;
break;
}
if (Game.last_fieldgoal.hit_goalpost && (Game.last_fieldgoal.hit_goalpost != CROSSBAR)) {
var _local4 = (Game.uprights.hit_left_upright ? "yes" : "no");
var _local3 = (Game.uprights.hit_right_upright ? "yes" : "no");
game_info_display_mc.SetInfoText((_local4 + " / ") + _local3);
if (Game.uprights.hit_left_upright && (Game.uprights.hit_right_upright)) {
SetIgnoreOnPress(true);
game_info_display_mc.StopClock();
football.onEnd = null;
if (Game.round == 3) {
var _local2 = ((Game.level == ROOKIE) ? "ROOKIE" : (((Game.level == PRO) ? "PRO" : "ALL-PRO")));
OpenPopupMC("EndOfGameDialog", "uprights_end_of_game_dialog_mc", {level_text:_local2});
PlaySoundVictory();
} else {
Game.round++;
OpenPopupMC("LevelPassedDialog", "level_passed_dialog_mc", {onClose:EventObj(PlayUprightsGame, GO_MSG_STAGE)});
Game.uprights.hit_left_upright = false;
Game.uprights.hit_right_upright = false;
}
} else if (_local1) {
OpenPopupMC("HitScene", "hit_scene_mc", GoodNoGoodSceneInitObject);
}
} else {
OpenPopupMC("MissScene", "miss_scene_mc", GoodNoGoodSceneInitObject);
PlaySoundFieldGoalMiss();
}
break;
case OUT_OF_TIME_STAGE :
SetIgnoreOnPress(true);
if (!football.onEnterFrame) {
ClearFieldGoalScene();
OpenPopupMC("OutOfTimeDialog", "out_of_time_dialog_mc");
}
break;
default :
trace("PlayUprightsGame default stage error.");
}
}
function PlayPointsGame(stage) {
switch (stage) {
case INTRO_STAGE :
ReInitGame();
LoadNewFGScene(-90, false);
OpenPopupMC("PointsGameIntroScene", "points_game_intro_scene_mc", {onClose:EventObj(PlayPointsGame, GO_MSG_STAGE)});
break;
case GO_MSG_STAGE :
GoSceneInitObject.onClose = EventObj(PlayPointsGame, GAME_START_STAGE);
OpenPopupMC("GoScene", "go_scene_mc", GoSceneInitObject);
var _local3 = (Game.last_fieldgoal.pos.z ? (Game.last_fieldgoal.pos.z) : -90);
LoadNewFGScene(_local3, true);
scene_mc.points_bg_mc._alpha = 50;
SetIgnoreOnPress(true);
break;
case GAME_START_STAGE :
SetIgnoreOnPress(false);
game_info_display_mc.SetClock(60);
game_info_display_mc.SetClockExpirationEvent(EventObj(PlayPointsGame, OUT_OF_TIME_STAGE));
game_info_display_mc.SetInfoTitle("points");
game_info_display_mc.SetInfoText("0");
game_info_display_mc.StartClock();
scene_mc.scene_image.ShowClock();
case KICK_CONTROLS_STAGE :
if (game_info_display_mc.GetClock() == 0) {
PlayPointsGame(OUT_OF_TIME_STAGE);
break;
}
var _local1 = 10 * Math.round(rand(-1, 1));
switch (Game.level) {
case ROOKIE :
switch (Game.round) {
case 1 :
football.pos = new Vector(_local1, 0, Math.round(rand(-75, -105)));
break;
case 2 :
football.pos = new Vector(_local1, 0, Math.round(rand(-105, -135)));
break;
case 3 :
football.pos = new Vector(_local1, 0, Math.round(rand(-135, -165)));
break;
}
wind.speed = Math.round(rand(1, 5));
break;
case PRO :
switch (Game.round) {
case 1 :
football.pos = new Vector(_local1, 0, Math.round(rand(-90, -120)));
break;
case 2 :
football.pos = new Vector(_local1, 0, Math.round(rand(-120, -150)));
break;
case 3 :
football.pos = new Vector(_local1, 0, Math.round(rand(-150, -180)));
break;
}
wind.speed = Math.round(rand(2, 8));
break;
case ALLPRO :
switch (Game.round) {
case 1 :
football.pos = new Vector(_local1, 0, Math.round(rand(-105, -135)));
break;
case 2 :
football.pos = new Vector(_local1, 0, Math.round(rand(-135, -165)));
break;
case 3 :
football.pos = new Vector(_local1, 0, Math.round(rand(-165, -189)));
break;
}
wind.speed = Math.round(rand(2, 12));
}
wind.NewRandDir();
Game.last_fieldgoal.pos = football.pos.Copy();
LoadNewFGScene(football.pos.z, true);
scene_mc.scene_image.points_bg_mc._alpha = 50;
RedrawFootball();
scene_mc.scene_image.ShowClock();
game_info_display_mc.SetDistance((-football.pos.z) / 3);
football.onFate = EventObj(PlayPointsGame, GOOD_NO_GOOD_MSG_STAGE);
football.onEnd = EventObj(PlayPointsGame, KICK_CONTROLS_STAGE);
KickFootball(0);
break;
case GOOD_NO_GOOD_MSG_STAGE :
if (Game.last_fieldgoal.made == true) {
Game.score = Game.score + Math.round(Game.last_fieldgoal.accuracy);
Game.kicks_made++;
PlaySoundFieldGoalMake();
} else {
Game.kicks_missed++;
PlaySoundFieldGoalMiss();
}
game_info_display_mc.SetInfoText(Game.score);
GoodNoGoodSceneInitObject.points = Math.round(Game.last_fieldgoal.accuracy);
var _local4 = GoodNoGoodSceneInitObject.center_yoffset;
GoodNoGoodSceneInitObject.center_yoffset = -125;
OpenPopupMC("PointsText", "points_text_mc", GoodNoGoodSceneInitObject);
GoodNoGoodSceneInitObject.center_yoffset = _local4;
if (Game.score >= 475) {
SetIgnoreOnPress(true);
game_info_display_mc.StopClock();
football.onEnd = null;
if (Game.round == 3) {
var _local2 = ((Game.level == ROOKIE) ? "ROOKIE" : (((Game.level == PRO) ? "PRO" : "ALL-PRO")));
OpenPopupMC("EndOfGameDialog", "points_end_of_game_dialog_mc", {level_text:_local2});
PlaySoundVictory();
} else {
Game.round++;
OpenPopupMC("LevelPassedDialog", "level_passed_dialog_mc", {onClose:EventObj(PlayPointsGame, GO_MSG_STAGE)});
Game.score = 0;
}
}
break;
case OUT_OF_TIME_STAGE :
SetIgnoreOnPress(true);
if (!football.onEnterFrame) {
ClearFieldGoalScene();
OpenPopupMC("OutOfTimeDialog", "out_of_time_dialog_mc");
}
break;
default :
trace("PlayUprightsGame default stage error.");
}
}
function PlayHighScoreGame(stage) {
switch (stage) {
case INTRO_STAGE :
ReInitGame();
LoadNewFGScene(-90, false);
Game.round_score = [0, 0, 0, 0];
Game.score = 0;
OpenPopupMC("HighScoreGameIntroScene", "high_score_game_intro_scene_mc", {onClose:EventObj(PlayHighScoreGame, GO_MSG_STAGE)});
break;
case GO_MSG_STAGE :
GoSceneInitObject.onClose = EventObj(PlayHighScoreGame, GAME_START_STAGE);
OpenPopupMC("GoScene", "go_scene_mc", GoSceneInitObject);
var _local3 = (Game.last_fieldgoal.pos.z ? (Game.last_fieldgoal.pos.z) : -90);
LoadNewFGScene(_local3, true);
scene_mc.points_bg_mc._alpha = 50;
SetIgnoreOnPress(true);
break;
case GAME_START_STAGE :
SetIgnoreOnPress(false);
game_info_display_mc.SetClock(90);
game_info_display_mc.SetClockExpirationEvent(EventObj(PlayHighScoreGame, OUT_OF_TIME_STAGE));
game_info_display_mc.SetInfoTitle("points");
game_info_display_mc.SetInfoText("0");
game_info_display_mc.StartClock();
scene_mc.scene_image.ShowClock();
case KICK_CONTROLS_STAGE :
if (game_info_display_mc.GetClock() == 0) {
PlayHighScoreGame(OUT_OF_TIME_STAGE);
break;
}
var _local1 = 10 * Math.round(rand(-1, 1));
switch (Game.level) {
case ROOKIE :
switch (Game.round) {
case 1 :
football.pos = new Vector(_local1, 0, Math.round(rand(-75, -105)));
break;
case 2 :
football.pos = new Vector(_local1, 0, Math.round(rand(-105, -135)));
break;
case 3 :
football.pos = new Vector(_local1, 0, Math.round(rand(-135, -165)));
break;
}
wind.speed = Math.round(rand(1, 5));
break;
case PRO :
switch (Game.round) {
case 1 :
football.pos = new Vector(_local1, 0, Math.round(rand(-90, -120)));
break;
case 2 :
football.pos = new Vector(_local1, 0, Math.round(rand(-120, -150)));
break;
case 3 :
football.pos = new Vector(_local1, 0, Math.round(rand(-150, -180)));
break;
}
wind.speed = Math.round(rand(2, 8));
break;
case ALLPRO :
switch (Game.round) {
case 1 :
football.pos = new Vector(_local1, 0, Math.round(rand(-105, -135)));
break;
case 2 :
football.pos = new Vector(_local1, 0, Math.round(rand(-135, -165)));
break;
case 3 :
football.pos = new Vector(_local1, 0, Math.round(rand(-165, -189)));
break;
}
wind.speed = Math.round(rand(2, 12));
}
wind.NewRandDir();
Game.last_fieldgoal.pos = football.pos.Copy();
LoadNewFGScene(football.pos.z, true);
scene_mc.scene_image.points_bg_mc._alpha = 50;
RedrawFootball();
scene_mc.scene_image.ShowClock();
game_info_display_mc.SetDistance((-football.pos.z) / 3);
football.onFate = EventObj(PlayHighScoreGame, GOOD_NO_GOOD_MSG_STAGE);
football.onEnd = EventObj(PlayHighScoreGame, KICK_CONTROLS_STAGE);
KickFootball(0);
break;
case GOOD_NO_GOOD_MSG_STAGE :
var _local2 = Math.round(Game.last_fieldgoal.accuracy * (Game.round - ((Game.round - 1) * 0.5)));
if (Game.last_fieldgoal.made == true) {
Game.score = Game.score + _local2;
Game.round_score[Game.round] = Game.round_score[Game.round] + _local2;
Game.kicks_made++;
PlaySoundFieldGoalMake();
} else {
Game.kicks_missed++;
PlaySoundFieldGoalMiss();
}
game_info_display_mc.SetInfoText(Game.round_score[Game.round]);
GoodNoGoodSceneInitObject.points = _local2;
var _local4 = GoodNoGoodSceneInitObject.center_yoffset;
GoodNoGoodSceneInitObject.center_yoffset = -125;
OpenPopupMC("PointsText", "points_text_mc", GoodNoGoodSceneInitObject);
GoodNoGoodSceneInitObject.center_yoffset = _local4;
break;
case OUT_OF_TIME_STAGE :
SetIgnoreOnPress(true);
if (football.onEnterFrame) {
} else {
ClearFieldGoalScene();
if (Game.round == 3) {
PlaySoundVictory();
OpenPopupMC("HighScoreGameEndOfRoundDialog", "high_score_game_end_of_round_dialog_mc", {round1_score:Game.round_score[1], round2_score:Game.round_score[2], round3_score:Game.round_score[3], total_score:Game.score, round:Game.round});
} else {
OpenPopupMC("HighScoreGameEndOfRoundDialog", "high_score_game_end_of_round_dialog_mc", {onClose:EventObj(PlayHighScoreGame, GO_MSG_STAGE), round1_score:Game.round_score[1], round2_score:Game.round_score[2], round3_score:Game.round_score[3], total_score:Game.score, round:Game.round});
Game.round++;
}
break;
trace("PlayHighScoreGame default stage error.");
}
default :
trace("PlayHighScoreGame default stage error.");
}
}
function PlayTargetGame(stage) {
switch (stage) {
case INTRO_STAGE :
ReInitGame();
LoadNewFGScene(-90, false);
Game.bullseye_goal = 4;
OpenPopupMC("TargetGameIntroScene", "target_game_intro_scene_mc", {onClose:EventObj(PlayTargetGame, GO_MSG_STAGE)});
break;
case GO_MSG_STAGE :
var _local3 = 10 * Math.round(rand(-1, 1));
var _local1 = 0;
switch (Game.level) {
case ROOKIE :
_local1 = -75 + ((Game.round - 1) * -12);
break;
case PRO :
_local1 = -75 + ((Game.round - 1) * -15);
break;
case ALLPRO :
_local1 = -75 + ((Game.round - 1) * -18);
}
football.pos = new Vector(_local3, 0, _local1);
Game.last_fieldgoal.pos = football.pos.Copy();
LoadNewFGScene(football.pos.z, true);
GoSceneInitObject.onClose = EventObj(PlayTargetGame, GAME_START_STAGE);
OpenPopupMC("GoScene", "go_scene_mc", GoSceneInitObject);
SetIgnoreOnPress(true);
break;
case GAME_START_STAGE :
SetIgnoreOnPress(false);
if (Game.level == ROOKIE) {
game_info_display_mc.SetClock(90);
} else if (Game.level == PRO) {
game_info_display_mc.SetClock(90);
} else if (Game.level == ALLPRO) {
game_info_display_mc.SetClock(90);
}
game_info_display_mc.SetClockExpirationEvent(EventObj(PlayTargetGame, OUT_OF_TIME_STAGE));
game_info_display_mc.SetInfoTitle("bullseyes");
game_info_display_mc.SetInfoText("0");
game_info_display_mc.StartClock();
scene_mc.scene_image.ShowClock();
game_info_display_mc.SetDistance((-football.pos.z) / 3);
Game.warning_bullseye_interval = 10000;
Game.bullseye_interval = 15000;
Game.bullseye_interval_id = setInterval(PlayTargetGame, Game.bullseye_interval, NEW_BULLSEYE_STAGE);
PlayTargetGame(NEW_BULLSEYE_STAGE);
case KICK_CONTROLS_STAGE :
if (game_info_display_mc.GetClock() == 0) {
PlayTargetGame(OUT_OF_TIME_STAGE);
break;
}
switch (Game.level) {
case ROOKIE :
wind.speed = Math.round(rand(0, 4));
break;
case PRO :
wind.speed = Math.round(rand(1, 5));
break;
case ALLPRO :
wind.speed = Math.round(rand(2, 6));
break;
}
wind.NewRandDir();
_local3 = 10 * Math.round(rand(-1, 1));
football.pos = Game.last_fieldgoal.pos.Copy();
football.pos.x = _local3;
if (scene_mc.scene_image.bullseye_swap_mc.getDepth() > football.getDepth()) {
football.swapDepths(scene_mc.scene_image.bullseye_swap_mc);
}
ResetFGScene();
RedrawFootball();
football.onFate = EventObj(PlayTargetGame, GOOD_NO_GOOD_MSG_STAGE);
football.onEnd = EventObj(PlayTargetGame, KICK_CONTROLS_STAGE);
KickFootball(0);
break;
case GOOD_NO_GOOD_MSG_STAGE :
if (Game.last_fieldgoal.made == true) {
Game.kicks_made++;
OpenPopupMC("HitScene", "hit_scene_mc", GoodNoGoodSceneInitObject);
if (Game.kicks_made < Game.bullseye_goal) {
clearInterval(Game.bullseye_interval_id);
clearInterval(Game.warning_bullseye_interval_id);
PlayTargetGame(NEW_BULLSEYE_STAGE);
Game.bullseye_interval_id = setInterval(PlayTargetGame, Game.bullseye_interval, NEW_BULLSEYE_STAGE);
}
} else {
OpenPopupMC("MissScene", "miss_scene_mc", GoodNoGoodSceneInitObject);
PlaySoundFieldGoalMiss();
}
game_info_display_mc.SetInfoText(Game.kicks_made);
if (Game.kicks_made == Game.bullseye_goal) {
SetIgnoreOnPress(true);
game_info_display_mc.StopClock();
football.onEnd = null;
clearInterval(Game.bullseye_interval_id);
clearInterval(Game.warning_bullseye_interval_id);
Game.current_bullseye.CloseBullseye();
if (scene_mc.scene_image.bullseye_swap_mc.getDepth() > football.getDepth()) {
football.swapDepths(scene_mc.scene_image.bullseye_swap_mc);
}
if (Game.round == 4) {
var _local4 = ((Game.level == ROOKIE) ? "ROOKIE" : (((Game.level == PRO) ? "PRO" : "ALL-PRO")));
OpenPopupMC("EndOfGameDialog", "uprights_end_of_game_dialog_mc", {level_text:_local4});
PlaySoundVictory();
} else {
Game.round++;
OpenPopupMC("LevelPassedDialog", "level_passed_dialog_mc", {onClose:EventObj(PlayTargetGame, GO_MSG_STAGE)});
Game.kicks_made = 0;
}
}
break;
case OUT_OF_TIME_STAGE :
SetIgnoreOnPress(true);
if (!football.onEnterFrame) {
ClearFieldGoalScene();
OpenPopupMC("OutOfTimeDialog", "out_of_time_dialog_mc");
clearInterval(Game.bullseye_interval_id);
clearInterval(Game.warning_bullseye_interval_id);
Game.current_bullseye.CloseBullseye();
if (scene_mc.scene_image.bullseye_swap_mc.getDepth() > football.getDepth()) {
football.swapDepths(scene_mc.scene_image.bullseye_swap_mc);
}
}
break;
case NEW_BULLSEYE_STAGE :
if (Game.current_bullseye && (!Game.current_bullseye.IsClosed())) {
Game.current_bullseye.onClose = EventObj(PlayTargetGame, NEW_BULLSEYE_STAGE);
Game.current_bullseye.CloseBullseye();
} else {
var _local2 = [scene_mc.scene_image.bullseye_lower_left_short, scene_mc.scene_image.bullseye_mid_left_short, scene_mc.scene_image.bullseye_upper_left_short, scene_mc.scene_image.bullseye_lower_mid, scene_mc.scene_image.bullseye_mid_mid, scene_mc.scene_image.bullseye_upper_mid, scene_mc.scene_image.bullseye_lower_right_short, scene_mc.scene_image.bullseye_mid_right_short, scene_mc.scene_image.bullseye_upper_right_short];
var _local5 = Math.round(rand(0, _local2.length - 1));
Game.current_bullseye = _local2[_local5];
Game.current_bullseye.OpenBullseye();
clearInterval(Game.warning_bullseye_interval_id);
Game.warning_bullseye_interval_id = setInterval(PlayTargetGame, Game.warning_bullseye_interval, WARNING_BULLSEYE_STAGE);
if (scene_mc.scene_image.bullseye_swap_mc.getDepth() > football.getDepth()) {
football.swapDepths(scene_mc.scene_image.bullseye_swap_mc);
}
}
break;
case WARNING_BULLSEYE_STAGE :
Game.current_bullseye.WarningBullseye();
clearInterval(Game.warning_bullseye_interval_id);
break;
default :
trace("PlayTargetGame default stage error.");
}
}
function LoadNewFGScene(distance, load_wind_and_game_info) {
var _local1;
if (football) {
_local1 = {pos:football.pos.Copy(), azimuth:football.azimuth, elevation:football.elevation, speed:football.speed, accuracy:football.accuracy, onFate:football.onFate, onEnd:football.onEnd};
} else {
_local1 = {pos:new Vector(), azimuth:0, elevation:0, speed:0, accuracy:0, onFate:null, onEnd:null};
}
if (scene_mc.scene_image) {
scene_mc.scene_image.removeMovieClip();
}
if (distance >= -90) {
scene = Scene30Yards;
} else if (distance >= -120) {
scene = Scene40Yards;
} else if (distance >= -150) {
scene = Scene50Yards;
} else if (distance >= -180) {
scene = Scene60Yards;
} else if (distance >= -190) {
scene = Scene63Yards;
} else {
trace("Error: Illegal distance in LoadNewFGScene(): " + distance);
}
scene_mc.attachMovie(scene.image.mc, "scene_image", SCENE_IMAGE_DEPTH);
scene_mc._x = -scene.start_pos.x;
scene_mc._y = -scene.start_pos.y;
scene_mc._xscale = scene.camera.start_zoom;
scene_mc._yscale = scene.camera.start_zoom;
scene_mc.start_width = scene.image.width;
scene_mc.start_height = scene.image.height;
if (!scene_mc.scene_image.football) {
scene_mc.scene_image.attachMovie("football_44x33", "football", FOOTBALL_DEPTH);
football.pos = _local1.pos;
football.azimuth = _local1.azimuth;
football.elevation = _local1.elevation;
football.speed = _local1.speed;
football.accuracy = _local1.accuracy;
football.onFate = _local1.onFate;
football.onEnd = _local1.onEnd;
}
football = scene_mc.scene_image.football;
camera = scene.camera;
football._alpha = 100;
football.setMask(null);
football.mask_set = false;
scene_mc.scene_image.ShowClock = ShowClockInFieldGoalScene;
scene_mc.scene_image.HideClock = HideClockInFieldGoalScene;
if (load_wind_and_game_info) {
if (!wind_vane_mc) {
OpenPopupMC("WindVane", "wind_vane_mc", {center_xoffset:-((STAGE_WIDTH / 2) - 70), center_yoffset:(STAGE_HEIGHT / 2) - 60});
}
if (!game_info_display_mc) {
OpenPopupMC("GameInfoDisplay", "game_info_display_mc", {center_xoffset:(STAGE_WIDTH / 2) - 50, center_yoffset:-((STAGE_HEIGHT / 2) - 120)});
}
if (!option_bar_mc) {
OpenPopupMC("OptionBar", "option_bar_mc", {center_xoffset:0, center_yoffset:(STAGE_HEIGHT / 2) - 2});
}
} else {
if (wind_vane_mc) {
wind_vane_mc.removeMovieClip();
}
if (game_info_display_mc) {
game_info_display_mc.removeMovieClip();
}
if (option_bar_mc) {
option_bar_mc.removeMovieClip();
}
}
}
function ResetFGScene() {
scene_mc._x = -scene.start_pos.x;
scene_mc._y = -scene.start_pos.y;
scene_mc._xscale = scene.camera.start_zoom;
scene_mc._yscale = scene.camera.start_zoom;
football._alpha = 100;
football.setMask(null);
football.mask_set = false;
}
function RedrawFootball() {
var _local1 = Convert3DPointTo2DPoint(football.pos);
football._x = _local1.x;
football._y = _local1.y;
football._xscale = (football._yscale = _local1.z);
if (football.pos.y == 0) {
football.shadow._visible = true;
} else {
football.shadow._visible = false;
}
}
function Convert3DPointTo2DPoint(v) {
var _local4 = v.z - camera.pos.z;
var _local2 = camera.focal_length / (camera.focal_length + _local4);
var _local1 = new Vector();
_local1.x = camera.origin.x + ft2px((camera.pos.x + v.x) * _local2);
_local1.y = camera.origin.y + ft2px((camera.pos.y - v.y) * _local2);
_local1.z = _local2 * 100;
return(_local1);
}
function ZoomAndPanScene(d) {
if (!IsZoomOn()) {
return(undefined);
}
var _local8 = {xscale:scene_mc._xscale, yscale:scene_mc._yscale, x:scene_mc._x, y:scene_mc._y};
if (scene_mc._xscale < camera.max_zoom) {
var _local4 = scene_mc._width;
scene_mc._xscale = scene_mc._xscale + (2 * (football.speed / scene.max_kick_speed));
scene_mc._yscale = scene_mc._yscale + (2 * (football.speed / scene.max_kick_speed));
var _local3 = scene_mc._width;
scene_mc._x = scene_mc._x - ((_local3 - _local4) / 2);
}
var _local2 = football.pos.z - camera.pos.z;
var _local5 = camera.focal_length / (camera.focal_length + _local2);
scene_mc._x = scene_mc._x - ft2px(d.x * _local5);
var _local1 = {x:football._x, y:football._y};
scene_mc.localToGlobal(_local1);
if (_local1.y > (STAGE_HEIGHT - 50)) {
scene_mc._y = scene_mc._y - (_local1.y - (STAGE_HEIGHT - 50));
} else if ((_local1.y < 50) && (football.velocity.y >= 0)) {
scene_mc._y = scene_mc._y + (50 - _local1.y);
} else if (_local1.y < 150) {
scene_mc._y = scene_mc._y - (_local1.y - 50);
if (scene_mc._y < (-scene.start_pos.y)) {
scene_mc._y = -scene.start_pos.y;
}
}
if (scene_mc._x > 0) {
scene_mc._x = 0;
} else if ((scene_mc._x + ((scene_mc.start_width * scene_mc._xscale) * 0.01)) < STAGE_WIDTH) {
scene_mc._x = STAGE_WIDTH - ((scene_mc.start_width * scene_mc._xscale) * 0.01);
}
if (scene_mc._y > 0) {
scene_mc._y = 0;
} else if ((scene_mc._y + ((scene_mc.start_height * scene_mc._yscale) * 0.01)) < STAGE_HEIGHT) {
scene_mc._y = STAGE_HEIGHT - ((scene_mc.start_height * scene_mc._yscale) * 0.01);
}
}
function KickFootball(stage) {
switch (stage) {
case 0 :
OpenPopupMC("AimFootball", "aim_football_mc", {onClose:EventObj(KickFootball, 1), closeRate:100});
break;
case 1 :
var _local2 = ((football.pos.x != 0) ? 0 : 80);
OpenPopupMC("PowerAndAccuracyPicker", "power_and_accuracy_picker_mc", {openRate:25, onClose:EventObj(KickFootball, 2), closeRate:20, center_xoffset:_local2, center_yoffset:140});
break;
case 2 :
football.azimuth = football.azimuth + (sign(rand(-1, 1)) * ((100 - football.accuracy) / 10));
football.elevation = scene.football_elevation;
football.speed = football.speed * (ComputeMaxKickSpeed() / 100);
football.velocity = new Vector();
var _local1 = x_component(football.speed, football.elevation);
football.velocity.x = x_component(_local1, football.azimuth);
football.velocity.z = y_component(_local1, football.azimuth);
football.velocity.y = y_component(football.speed, football.elevation);
wind.velocity = new Vector();
wind.velocity.x = x_component(wind.speed, wind.azimuth);
wind.velocity.z = y_component(wind.speed, wind.azimuth);
football.Spin();
football.checked_goalpost_collision = false;
football.checked_ground_collision = false;
football.hit_goalpost = 0;
football.fate_known = false;
football.paused = false;
Game.last_fieldgoal.pos = football.pos.Copy();
Game.last_fieldgoal.hit_goalpost = 0;
football.onEnterFrame = MoveFootball;
PlaySoundKickFootball();
onEvent(football.onKick);
break;
}
}
function MoveFootball() {
if (football.paused) {
return(undefined);
}
var _local5 = new Vector(0, -32, 0);
var _local3 = new Vector();
_local3.x = football.velocity.x * TIME_PER_FRAME;
_local3.y = (football.velocity.y * TIME_PER_FRAME) + (((0.5 * _local5.y) * TIME_PER_FRAME) * TIME_PER_FRAME);
_local3.z = football.velocity.z * TIME_PER_FRAME;
football.pos.x = football.pos.x + _local3.x;
football.pos.y = football.pos.y + _local3.y;
football.pos.z = football.pos.z + _local3.z;
football.pos.y = Math.max(0, football.pos.y);
RedrawFootball();
ZoomAndPanScene(_local3);
football.velocity.y = _local3.y / TIME_PER_FRAME;
if (football.pos.y > 0) {
football.checked_ground_collision = false;
}
if (!football.checked_ground_collision) {
if (football.pos.y <= 0) {
football.velocity.y = -football.velocity.y;
football.velocity.Scale(0.5);
football.checked_ground_collision = true;
PlaySoundHitGround((football.pos.x / 20) * 100);
}
}
if (football.pos.z > 0.5) {
if (!football.mask_set) {
football.setMask(scene_mc.scene_image.field_goal_mask);
football.mask_set = true;
}
} else {
football.setMask(null);
football.mask_set = false;
}
if (((football.pos.y <= 0) || (football.pos.z >= 0)) && (!football.fate_known)) {
if (!football.checked_goalpost_collision) {
football.hit_goalpost = CheckForHitGoalpost();
football.checked_goalpost_collision = true;
}
if (((football.hit_goalpost && (football.velocity.z < 0)) && (football.pos.y > 0)) && (Game.type != UPRIGHTS)) {
} else if (Game.type == TARGET) {
Game.last_fieldgoal.made = CheckForHitBullseye();
football.fate_known = true;
onEvent(football.onFate);
if (!Game.last_fieldgoal.made) {
scene_mc.scene_image.bullseye_swap_mc.swapDepths(football);
}
} else if (Game.type == UPRIGHTS) {
Game.last_fieldgoal.hit_goalpost = football.hit_goalpost;
Game.last_fieldgoal.made = false;
football.fate_known = true;
onEvent(football.onFate);
} else {
Game.last_fieldgoal.made = CheckForFieldGoalMake();
Game.last_fieldgoal.accuracy = CalcFieldGoalMakeAccuracy();
Game.last_fieldgoal.hit_goalpost = 0;
football.fate_known = true;
onEvent(football.onFate);
}
} else if (football.fate_known) {
football._alpha = football._alpha - DEFAULT_FOOTBALL_CLOSE_RATE;
if (football._alpha <= 0) {
delete football.onEnterFrame;
football.Still();
onEvent(football.onEnd);
}
}
var _local2 = wind.velocity.Copy().Sub(football.velocity);
_local2.Abs();
var _local4 = new Vector();
_local4.x = _local2.x / (1 + ((_local2.x * wind.k) * TIME_PER_FRAME));
_local4.z = _local2.z / (1 + ((_local2.z * wind.k) * TIME_PER_FRAME));
_local4.y = _local2.y / (1 + ((_local2.y * wind.k) * TIME_PER_FRAME));
var _local1 = _local4.Copy().Sub(_local2).Abs();
if (samesign(football.velocity.x, wind.velocity.x)) {
if (Math.abs(wind.velocity.x) > Math.abs(football.velocity.x)) {
football.velocity.x = football.velocity.x + (sign(football.velocity.x) * _local1.x);
} else {
football.velocity.x = football.velocity.x - (sign(football.velocity.x) * _local1.x);
}
} else {
football.velocity.x = football.velocity.x + (sign(wind.velocity.x) * _local1.x);
}
if (samesign(football.velocity.y, wind.velocity.y)) {
if (Math.abs(wind.velocity.y) > Math.abs(football.velocity.y)) {
football.velocity.y = football.velocity.y + (sign(football.velocity.y) * _local1.y);
} else {
football.velocity.y = football.velocity.y - (sign(football.velocity.y) * _local1.y);
}
} else {
football.velocity.y = football.velocity.y + (sign(wind.velocity.y) * _local1.y);
}
if (samesign(football.velocity.z, wind.velocity.z)) {
if (Math.abs(wind.velocity.z) > Math.abs(football.velocity.z)) {
football.velocity.z = football.velocity.z + (sign(football.velocity.z) * _local1.z);
} else {
football.velocity.z = football.velocity.z - (sign(football.velocity.z) * _local1.z);
}
} else {
football.velocity.z = football.velocity.z + (sign(wind.velocity.z) * _local1.z);
}
}
function CheckForFieldGoalMake() {
var _local1 = scene_mc.scene_image;
if (((football._x > _local1.goalpost_left._x) && (football._x < _local1.goalpost_right._x)) && (football._y < _local1.goalpost_crossbar._y)) {
return(true);
}
return(false);
}
function CalcFieldGoalMakeAccuracy() {
var _local1 = scene_mc.scene_image;
if (((football._x > _local1.goalpost_left._x) && (football._x < _local1.goalpost_right._x)) && (football._y < _local1.goalpost_crossbar._y)) {
var _local2 = (_local1.goalpost_right._x - _local1.goalpost_left._x) / 2;
var _local3 = Math.abs((_local1.goalpost_left._x + _local2) - football._x);
return(((_local2 - _local3) / _local2) * 100);
}
return(0);
}
function CheckForHitGoalpost() {
if (football._z < 0) {
return(undefined);
}
var _local1 = scene_mc.scene_image;
var _local2 = null;
var _local3 = 0;
if (_local1.goalpost_left.hitTest(football)) {
_local2 = _local1.goalpost_left;
_local3 = LEFT_UPRIGHT;
} else if (_local1.goalpost_right.hitTest(football)) {
_local2 = _local1.goalpost_right;
_local3 = RIGHT_UPRIGHT;
}
if (_local2 != null) {
trace("HIT UPRIGHT!");
var _local9 = (_local2._width / 2) + (football._width / 2);
var _local6 = football._x - _local2._x;
var _local13 = Math.sqrt((_local9 * _local9) - (_local6 * _local6));
var _local12 = new Line(0, 0, _local6, -_local13);
var _local11 = _local12.Normal();
var _local14 = new Line(0, 0, _local11.x, _local11.y);
var _local15 = new Line(0, 0, football.velocity.x, football.velocity.z);
var _local7 = (_local14.Angle() * 2) - _local15.Angle();
trace("new angle:" + rad2deg(_local7));
var _local4 = football.velocity.Copy();
trace("original football velocity:" + football.velocity.toString());
_local4.y = 0;
football.velocity.x = x_component(_local4.Magnitude() * 0.5, rad2deg(_local7));
football.velocity.z = y_component(_local4.Magnitude() * 0.5, rad2deg(_local7));
trace("new football velocity:" + football.velocity.toString());
PlaySoundHitGoalpost(_local3);
return(_local3);
}
if (_local1.goalpost_crossbar.hitTest(football)) {
trace("HIT CROSSBAR!");
var _local10 = _local1.goalpost_crossbar;
var _local9 = (_local10._height / 2) + (football._width / 2);
var _local5 = football._y - _local10._y;
var _local13 = Math.sqrt((_local9 * _local9) - (_local5 * _local5));
var _local12 = new Line(0, 0, -_local13, _local5);
var _local11 = _local12.Normal();
var _local14 = new Line(0, 0, _local11.x, _local11.y);
var _local15 = new Line(0, 0, football.velocity.z, football.velocity.y);
var _local7 = (_local14.Angle() * 2) - _local15.Angle();
trace("new angle:" + rad2deg(_local7));
var _local8 = football.velocity.Copy();
trace("original football velocity:" + football.velocity.toString());
_local8.x = 0;
football.velocity.z = x_component(_local8.Magnitude() * 0.5, rad2deg(_local7));
football.velocity.y = y_component((-_local8.Magnitude()) * 0.5, rad2deg(_local7));
trace("new football velocity:" + football.velocity.toString());
PlaySoundHitGoalpost(CROSSBAR);
return(CROSSBAR);
}
return(0);
}
function CheckForHitBullseye() {
var _local3 = scene_mc.scene_image;
var _local1 = {x:football._x, y:football._y};
scene_mc.localToGlobal(_local1);
var _local2 = Game.current_bullseye.hit_area_mc.hitTest(_local1.x, _local1.y, true);
if (_local2) {
football.velocity.Scale(0.6);
football.velocity.z = football.velocity.z * -1;
PlaySoundHitBullseye((football.pos.x / 10) * 100);
}
return(_local2);
}
function ComputeMaxKickSpeed() {
var _local6 = 0;
var _local5 = 0;
var _local1 = 0;
var _local4 = 30;
if (football.pos.z >= -120) {
_local6 = Scene30Yards.max_kick_speed;
_local5 = Scene40Yards.max_kick_speed;
_local1 = Math.abs(football.pos.z - -90);
} else if (football.pos.z >= -150) {
_local6 = Scene40Yards.max_kick_speed;
_local5 = Scene50Yards.max_kick_speed;
_local1 = Math.abs(football.pos.z - -120);
} else if (football.pos.z >= -180) {
_local6 = Scene50Yards.max_kick_speed;
_local5 = Scene60Yards.max_kick_speed;
_local1 = Math.abs(football.pos.z - -150);
} else if (football.pos.z >= -189) {
_local6 = Scene60Yards.max_kick_speed;
_local5 = Scene63Yards.max_kick_speed;
_local1 = Math.abs(football.pos.z - -180);
_local4 = 9;
} else {
trace("ComputeKickSpeed ERROR: Unsupported football.pos: " + football.pos.toString());
}
var _local2 = _local1 / _local4;
var _local3 = ((1 - _local2) * _local6) + (_local2 * _local5);
trace(((((((((">>low speed:" + _local6) + " high speed:") + _local5) + "\ndist_from_low:") + _local1) + " high_pct:") + _local2) + "\nresult:") + _local3);
return(_local3);
}
function ShowClockInFieldGoalScene() {
var _local5 = scene_mc.scene_image;
_local5.clock_digit_1 = null;
_local5.clock_digit_2 = null;
_local5.clock_digit_3 = null;
_local5.clock_digit_4 = null;
_local5.clock_digit_1_mc = null;
_local5.clock_digit_2_mc = null;
_local5.clock_digit_3_mc = null;
_local5.clock_digit_4_mc = null;
_local5.prevt = 0;
_local5.clock_colon_mc = _local5.attachMovie("clock_digit_colon", "ccmc", CLOCK_COLON_DEPTH);
_local5.clock_colon_mc._x = this.clock_colon_position._x;
_local5.clock_colon_mc._y = this.clock_colon_position._y;
_local5.clock_colon_mc._xscale = (_local5.clock_colon_mc._yscale = _local5.clock_colon_position._xscale);
_local5.onEnterFrame = function () {
var _local5 = Math.floor(_root.game_info_display_mc.GetClock());
if (_local5 == this.prevt) {
return(undefined);
}
this.prevt = _local5;
var _local4 = new Array();
var _local7 = Math.floor(_local5 / 60);
var _local6 = _local5 % 60;
_local4[1] = Math.floor(_local7 / 10);
_local4[2] = _local7 % 10;
_local4[3] = Math.floor(_local6 / 10);
_local4[4] = _local6 % 10;
var _local3 = 1;
while (_local3 <= 4) {
if ((this["clock_digit_" + _local3] != null) && (this["clock_digit_" + _local3] != _local4[_local3])) {
this[("clock_digit_" + _local3) + "_mc"].removeMovieClip();
this["clock_digit_" + _local3] = null;
}
if ((((_local3 == 1) && (_local4[_local3])) && (this["clock_digit_" + _local3] != _local4[_local3])) || ((_local3 != 1) && (this["clock_digit_" + _local3] != _local4[_local3]))) {
this["clock_digit_" + _local3] = _local4[_local3];
this[("clock_digit_" + _local3) + "_mc"] = this.attachMovie("clock_digit_" + _local4[_local3], ("cd" + _local3) + "mc", _root[("CLOCK_DIGIT_" + _local3) + "_DEPTH"]);
this[("clock_digit_" + _local3) + "_mc"]._x = this["clock_digit_position_" + _local3]._x;
this[("clock_digit_" + _local3) + "_mc"]._y = this["clock_digit_position_" + _local3]._y;
this[("clock_digit_" + _local3) + "_mc"]._xscale = (this[("clock_digit_" + _local3) + "_mc"]._yscale = this["clock_digit_position_" + _local3]._xscale);
}
_local3++;
}
};
}
function HideClockInFieldGoalScene() {
var _local3 = _root.scene_mc.scene_image;
var _local2 = 1;
while (_local2 <= 4) {
if (_local3[("clock_digit_" + _local2) + "_mc"] != null) {
_local3[("clock_digit_" + _local2) + "_mc"].removeMovieClip();
_local3["clock_digit_" + _local2] = null;
}
_local2++;
}
_local3.clock_colon_mc.removeMovieClip();
delete _local3.onEnterFrame;
}
function OpenPopupMC(new_mc_str, new_mc_name, init_object) {
var _local2 = _root.attachMovie(new_mc_str, new_mc_name, current_depth++, init_object);
if (!_local2) {
trace("OpenPopupMC ERROR: could not load movie " + new_mc_str);
return(undefined);
}
_local2._x = STAGE_WIDTH / 2;
_local2._y = STAGE_HEIGHT / 2;
_local2._alpha = 0;
if (_local2.openRate === undefined) {
_local2.openRate = DEFAULT_MC_OPEN_CLOSE_RATE;
}
if (_local2.openTransition === undefined) {
_local2.openTransition = "grow";
}
if ((_local2.openTransition != "shrink") && (_local2.openTransition != "grow")) {
trace((("Unsupported openTransition '" + _local2.openTransition) + "' for ") + _local2);
}
if (_local2.openTransition == "shrink") {
_local2._xscale = (_local2._yscale = 200);
} else {
_local2._xscale = (_local2._yscale = 0);
}
if (_local2.center_xoffset) {
_local2._x = _local2._x + _local2.center_xoffset;
}
if (_local2.center_yoffset) {
_local2._y = _local2._y + _local2.center_yoffset;
}
if (_local2.openRate >= 100) {
_local2.tmpfunc = onEnterFrameOpenMC;
_local2.tmpfunc();
} else {
_local2.onEnterFrame = onEnterFrameOpenMC;
}
return(_local2);
}
function ClosePopupMC(mc, onClose_obj) {
if (onClose_obj) {
mc.onClose = onClose_obj;
}
if (mc.closeRate === undefined) {
mc.closeRate = DEFAULT_MC_OPEN_CLOSE_RATE;
}
if (mc.closeTransition === undefined) {
mc.closeTransition = "shrink";
}
if ((mc.closeTransition != "shrink") && (mc.closeTransition != "grow")) {
trace((("Unsupported closeTransition '" + mc.closeTransition) + "' for ") + mc);
}
if (mc.closeRate >= 100) {
mc.tmpfunc = onEnterFrameCloseMC;
mc.tmpfunc();
} else {
mc.onEnterFrame = onEnterFrameCloseMC;
}
}
function ClosePopupMCAfterDuration() {
if ((--this.duration_frames) <= 0) {
ClosePopupMC(this);
}
}
function ClosePopupMCNow(mc, onClose_obj) {
mc.closeRate = 100;
ClosePopupMC(mc, onClose_obj);
}
function onEnterFrameOpenMC() {
var _local2 = ((this.openTransition == "grow") ? 1 : -1);
this._xscale = this._xscale + this.openRate;
this._yscale = this._yscale + this.openRate;
this._alpha = this._alpha + this.openRate;
if (((this.openTransition == "shrink") && (this._xscale <= 100)) || ((this.openTransition == "grow") && (this._xscale >= 100))) {
this._xscale = 100;
this._yscale = 100;
this._alpha = 100;
delete this.onEnterFrame;
if (this.duration != null) {
this.duration_frames = sec2frames(this.duration);
this.onEnterFrame = ClosePopupMCAfterDuration;
}
if (this.onOpen) {
onEvent(this.onOpen);
delete this.onOpen;
}
}
}
function onEnterFrameCloseMC() {
var _local2 = ((this.closeTransition == "grow") ? 1 : -1);
this._xscale = this._xscale + (_local2 * this.closeRate);
this._yscale = this._yscale + (_local2 * this.closeRate);
this._alpha = this._alpha - this.closeRate;
if (((this.closeTransition == "shrink") && (this._xscale <= 0)) || ((this.closeTransition == "grow") && (this._xscale >= 200))) {
var _local3 = this.onClose;
delete this.onClose;
delete this.onEnterFrame;
this.removeMovieClip();
if (_local3) {
onEvent(_local3);
}
}
}
function EventObj(func) {
return({func:func, argc:arguments.length - 1, arg1:arguments[1], arg2:arguments[2], arg3:arguments[3]});
}
function onEvent(eventObj) {
eventObj.func(eventObj.arg1, eventObj.arg2, eventobj.arg3);
}
function UpdateWindVaneGraphic() {
if (!wind_vane_mc) {
return(undefined);
}
if (wind.azimuth < 22.5) {
wind_vane_mc.gotoAndStop("E");
} else if (wind.azimuth < 67.5) {
wind_vane_mc.gotoAndStop("NE");
} else if (wind.azimuth < 112.5) {
wind_vane_mc.gotoAndStop("N");
} else if (wind.azimuth < 157.5) {
wind_vane_mc.gotoAndStop("NW");
} else if (wind.azimuth < 202.5) {
wind_vane_mc.gotoAndStop("W");
} else if (wind.azimuth < 247.5) {
wind_vane_mc.gotoAndStop("SW");
} else if (wind.azimuth < 292.5) {
wind_vane_mc.gotoAndStop("S");
} else if (wind.azimuth < 337.5) {
wind_vane_mc.gotoAndStop("SE");
} else {
wind_vane_mc.gotoAndStop("E");
}
wind_vane_mc.label.text = "wind: " + wind.speed;
}
function SetIgnoreOnPress(b) {
ignore_on_press = b;
}
function GetIgnoreOnPress() {
return(ignore_on_press);
}
function ToggleSoundOnOff() {
sound_on = (sound_on ? false : true);
}
function IsSoundOn() {
return(sound_on);
}
function SetSoundOn() {
sound_on = true;
}
function SetSoundOff() {
sound_on = false;
}
function PlaySound(sound_mc, depth, sound_linkage, volume, pan) {
if (IsSoundOn()) {
if (!_root[sound_mc]) {
_root.createEmptyMovieClip(sound_mc, depth);
}
var _local2 = new Sound(sound_mc);
_local2.attachSound(sound_linkage);
_local2.setVolume(volume);
_local2.setPan(pan);
_local2.start();
}
}
function PlaySoundHitGoalpost(goalpost_part) {
var _local1 = 0;
if (goalpost_part == CROSSBAR) {
_local1 = 0;
} else if (goalpost_part == LEFT_UPRIGHT) {
_local1 = -50;
} else if (goalpost_part == RIGHT_UPRIGHT) {
_local1 = 50;
}
PlaySound("goalpost_sound_mc", SOUND01_MC_DEPTH, "goalpost_sound", 30, _local1);
}
function PlaySoundMouseOver() {
PlaySound("mouseover_sound_mc", SOUND02_MC_DEPTH, "mouseover_sound", 100, 0);
}
function PlaySoundHitBullseye(pan) {
PlaySound("bullseye_hit_sound_mc", SOUND03_MC_DEPTH, "bullseye_hit_sound", 100, pan);
}
function PlaySoundKickFootball() {
var _local1 = 0;
if (football.pos.x < -5) {
_local1 = -50;
} else if (football.pos.x > 5) {
_local1 = 50;
} else {
_local1 = 0;
}
PlaySound("kick_football_sound_mc", SOUND04_MC_DEPTH, "football_kick_sound", 30, _local1);
}
function PlaySoundHitGround(pan) {
PlaySound("ground_hit_sound_mc", SOUND05_MC_DEPTH, "ground_hit_sound", 20, pan);
}
function PlaySoundPowerAccuracyMeter() {
PlaySound("power_accuracy_sound_mc", SOUND06_MC_DEPTH, "power_accuracy_sound", 50, 0);
}
function PlaySoundTick() {
PlaySound("time_sound_mc", SOUND07_MC_DEPTH, "time_sound", 50, 50);
}
function PlaySoundEndTick() {
PlaySound("time_end_sound_mc", SOUND08_MC_DEPTH, "time_end_sound", 50, 50);
}
function PlaySoundFieldGoalMake() {
PlaySound("field_goal_make_sound_mc", SOUND09_MC_DEPTH, "field_goal_make_sound", 70, 0);
}
function PlaySoundFieldGoalMiss() {
PlaySound("field_goal_miss_sound_mc", SOUND10_MC_DEPTH, "field_goal_miss_sound", 70, 0);
}
function PlaySoundVictory() {
PlaySound("victory_sound_mc", SOUND11_MC_DEPTH, "victory_sound", 70, 0);
}
function ToggleZoomOnOff() {
zoom_on = (zoom_on ? false : true);
}
function IsZoomOn() {
return(zoom_on);
}
function SetZoomOn() {
zoom_on = true;
}
function SetZoomOff() {
zoom_on = false;
}
function ft2px(feet) {
return(feet * camera.k);
}
function x_component(d, dir) {
return(d * Math.cos((Math.PI/180) * dir));
}
function y_component(d, dir) {
return(d * Math.sin((Math.PI/180) * dir));
}
function rad2deg(rad) {
return((rad * 180) / Math.PI);
}
function deg2rad(deg) {
return((deg * Math.PI) / 180);
}
function samesign(n1, n2) {
return((n1 * n2) >= 0);
}
function sign(n) {
return(((n >= 0) ? 1 : -1));
}
function trunc(i) {
return((result = Math.round(i * 10) / 10));
}
function sec2frames(seconds) {
return(seconds / TIME_PER_FRAME);
}
function rand(min, max) {
return(min + (Math.random() * (max - min)));
}
Vector.prototype.Copy = function () {
return(new Vector(this.x, this.y, this.z));
};
Vector.prototype.Add = function (v) {
this.x = this.x + v.x;
this.y = this.y + v.y;
this.z = this.z + v.z;
return(this);
};
Vector.prototype.Sub = function (v) {
this.x = this.x - v.x;
this.y = this.y - v.y;
this.z = this.z - v.z;
return(this);
};
Vector.prototype.Scale = function (n) {
this.x = this.x * n;
this.y = this.y * n;
this.z = this.z * n;
return(this);
};
Vector.prototype.Abs = function (v) {
this.x = Math.abs(this.x);
this.y = Math.abs(this.y);
this.z = Math.abs(this.z);
return(this);
};
Vector.prototype.Reverse = function () {
this.x = -this.x;
this.y = -this.y;
this.z = -this.z;
return(this);
};
Vector.prototype.DotProduct = function (v) {
return(((this.x * v.x) + (this.y * v.y)) + (this.z * v.z));
};
Vector.prototype.Magnitude = function () {
return(Math.sqrt(((this.x * this.x) + (this.y * this.y)) + (this.z * this.z)));
};
Vector.prototype.Normalize = function () {
var _local2 = Math.sqrt(((this.x * this.x) + (this.y * this.y)) + (this.z * this.z));
this.x = this.x / _local2;
this.y = this.y / _local2;
this.z = this.z / _local2;
return(this);
};
Vector.prototype.toString = function () {
return(((((("<" + this.x) + ", ") + this.y) + ", ") + this.z) + ">");
};
Line.prototype.Origin = function () {
return(this._origin);
};
Line.prototype.Slope = function () {
return(this._slope);
};
Line.prototype.Slope2 = function () {
if (!this._slope2) {
this._slope2 = this._slope.y / this._slope.x;
}
return(this._slope2);
};
Line.prototype.Angle = function () {
if (!this._angle) {
this._angle = Math.atan2(this._slope.y, this._slope.x);
}
return(this._angle);
};
Line.prototype.YIntercept = function () {
if (!this._yintercept) {
this._yintercept = this._origin.y - (this._origin.x * (this._slope.y / this._slope.x));
}
return(this._yintercept);
};
Line.prototype.Intersection = function (line2) {
if (this.Slope2() == line2.Slope2()) {
return(null);
}
if ((this.Slope2() == Number.POSITIVE_INFINITY) || (this.Slope2() == Number.NEGATIVE_INFINITY)) {
return(new Vector(this.Origin().x, (line2.Slope2() * this.Origin().x) + line2.YIntercept()));
}
if ((line2.Slope2() == Number.POSITIVE_INFINITY) || (line2.Slope2() == Number.NEGATIVE_INFINITY)) {
return(new Vector(line2.Origin().x, (this.Slope2() * line2.Origin().x) + this.YIntercept()));
}
var _local3 = (line2.YIntercept() - this.YIntercept()) / (this.Slope2() - line2.Slope2());
var _local4 = (this.Slope2() * _local3) + this.YIntercept();
return(new Vector(_local3, _local4));
};
Line.prototype.Normal = function () {
if (!this._normal) {
this._normal = new Vector(-this.Slope().y, this.Slope().x);
this._normal.Normalize();
if ((this._normal.x < 0) && (this._normal.y < 0)) {
this._normal.x = -this._normal.x;
this._normal.y = -this._normal.y;
}
}
return(this._normal);
};
Line.prototype.DistanceFromLine = function (point) {
var _local2 = -this.Normal().DotProduct(this.Origin());
return(this.Normal().DotProduct(point) + _local2);
};
Line.prototype.toString = function () {
var _local2 = ((("Origin (" + this.Origin().x) + ", ") + this.Origin().y) + ") ";
_local2 = _local2 + (((("Slope (" + this.Slope().x) + ", ") + this.Slope().y) + ") ");
_local2 = _local2 + (((("Normal (" + this.Normal().x) + ", ") + this.Normal().y) + ")");
return(_local2);
};
var DEMO = true;
var HIGH_SCORES_URL = game_url;
var ROOKIE = 1;
var PRO = 2;
var ALLPRO = 3;
var DISTANCE = 1;
var UPRIGHTS = 2;
var TARGET = 3;
var POINTS = 4;
var HIGH_SCORE = 5;
var WIND_VANE_UPDATER_DEPTH = -50;
var SCENE_MC_DEPTH = 1;
var SCENE_IMAGE_DEPTH = 2;
var CLOCK_DIGIT_1_DEPTH = 3;
var CLOCK_DIGIT_2_DEPTH = 4;
var CLOCK_DIGIT_3_DEPTH = 5;
var CLOCK_DIGIT_4_DEPTH = 6;
var CLOCK_COLON_DEPTH = 7;
var AIM_ARROW_DEPTH = 8;
var POWER_PICKER_DEPTH = 9;
var ACCURACY_PICKER_DEPTH = 10;
var FOOTBALL_DEPTH = 15;
var SOUND01_MC_DEPTH = 50;
var SOUND02_MC_DEPTH = 51;
var SOUND03_MC_DEPTH = 52;
var SOUND04_MC_DEPTH = 53;
var SOUND05_MC_DEPTH = 54;
var SOUND06_MC_DEPTH = 55;
var SOUND07_MC_DEPTH = 56;
var SOUND08_MC_DEPTH = 57;
var SOUND09_MC_DEPTH = 58;
var SOUND10_MC_DEPTH = 59;
var SOUND11_MC_DEPTH = 60;
var SOUND12_MC_DEPTH = 61;
var SOUND13_MC_DEPTH = 62;
var SOUND14_MC_DEPTH = 63;
var SOUND15_MC_DEPTH = 64;
var current_depth = 100;
var LEFT_UPRIGHT = 1;
var CROSSBAR = 2;
var RIGHT_UPRIGHT = 3;
var PICKER_SPEED_SLOW = 1;
var PICKER_SPEED_MEDIUM = 2;
var PICKER_SPEED_FAST = 3;
var INTRO_STAGE = 1;
var GO_MSG_STAGE = 2;
var KICK_CONTROLS_STAGE = 3;
var GOOD_NO_GOOD_MSG_STAGE = 4;
var END_OF_KICK_STAGE = 5;
var SUBMIT_SCORE_STAGE = 6;
var END_OF_GAME_STAGE = 7;
var OUT_OF_TIME_STAGE = 8;
var NEW_BULLSEYE_STAGE = 9;
var FOOTBALL_ON_KICK_STAGE = 10;
var WARNING_BULLSEYE_STAGE = 11;
var Game = {level:ROOKIE, type:DISTANCE, score:0, kicks_made:0, kicks_missed:0, out_of_time:false, accuracy:0, round:1, last_fieldgoal:{made:false, pos:new Vector(), hit_goalpost:0}, NumKicks:function () {
return(kicks_made + kicks_missed);
}};
var STAGE_WIDTH = 640;
var STAGE_HEIGHT = 480;
var DEFAULT_MC_OPEN_CLOSE_RATE = 20;
var DEFAULT_FOOTBALL_CLOSE_RATE = 5;
var TIME_PER_FRAME = 0.05;
var Scene30Yards = new FieldGoalScene();
var Scene40Yards = new FieldGoalScene();
var Scene50Yards = new FieldGoalScene();
var Scene60Yards = new FieldGoalScene();
var Scene63Yards = new FieldGoalScene();
with (Scene30Yards) {
image.mc = "field_goal_40yd";
camera.pos = new Vector(0, 15, -149);
camera.max_zoom = 150;
camera.start_zoom = 121;
start_pos = new Vector((((image.width * camera.start_zoom) / 100) - STAGE_WIDTH) / 2, 130);
max_kick_speed = 75;
football_elevation = 35;
}
with (Scene40Yards) {
image.mc = "field_goal_40yd";
camera.pos = new Vector(0, 15, -149);
camera.max_zoom = 140;
camera.start_zoom = 105;
start_pos = new Vector((((image.width * camera.start_zoom) / 100) - STAGE_WIDTH) / 2, 120);
max_kick_speed = 88;
football_elevation = 35;
}
with (Scene50Yards) {
image.mc = "field_goal_60yd";
camera.pos = new Vector(0, 15, -212);
camera.max_zoom = 160;
camera.start_zoom = 131;
start_pos = new Vector((((image.width * camera.start_zoom) / 100) - STAGE_WIDTH) / 2, 180);
max_kick_speed = 105;
football_elevation = 30;
}
with (Scene60Yards) {
image.mc = "field_goal_60yd";
camera.pos = new Vector(0, 15, -212);
camera.max_zoom = 155;
camera.start_zoom = 114;
start_pos = new Vector((((image.width * camera.start_zoom) / 100) - STAGE_WIDTH) / 2, 170);
max_kick_speed = 123;
football_elevation = 28;
}
with (Scene63Yards) {
image.mc = "field_goal_60yd";
camera.pos = new Vector(0, 15, -212);
camera.max_zoom = 155;
camera.start_zoom = 110;
start_pos = new Vector((((image.width * camera.start_zoom) / 100) - STAGE_WIDTH) / 2, 175);
max_kick_speed = 128;
football_elevation = 28;
}
var GoSceneInitObject = {duration:0.75, closeRate:40, center_yoffset:-60, closeTransition:"grow"};
var GoodNoGoodSceneInitObject = {duration:0.2, closeRate:20, center_yoffset:-60, openRate:20, closeTransition:"grow"};
_root.createEmptyMovieClip("scene_mc", SCENE_MC_DEPTH);
_root.createEmptyMovieClip("wind_vane_updater", WIND_VANE_UPDATER_DEPTH);
wind_vane_updater.onEnterFrame = UpdateWindVaneGraphic;
var football = null;
var scene = null;
var camera = null;
var wind = {azimuth:0, speed:0, k:0.01};
var ignore_on_press = false;
var sound_on = true;
var zoom_on = true;
PlayNewGame();
MovieClip.prototype.Close = function (onClose_obj) {
ClosePopupMC(this, onClose_obj);
};
wind.NewRandDir = function () {
if (this.speed <= 3) {
this.azimuth = rand(0, 360);
} else if (this.speed <= 7) {
var _local2 = rand(0, 60);
this.azimuth = ((rand(0, 1) < 0.5) ? (_local2 + 135) : (_local2 - 15));
} else if (this.speed <= 12) {
var _local2 = rand(0, 25);
this.azimuth = ((rand(0, 1) < 0.5) ? (_local2 + 160) : (_local2 - 5));
} else {
var _local2 = rand(0, 10);
this.azimuth = ((rand(0, 1) < 0.5) ? (_local2 + 170) : (_local2 - 0));
}
this.azimuth = (this.azimuth + 360) % 360;
};
stop();
Symbol 36 MovieClip [GameInfoDisplay] Frame 1
function SetClockTitle(txt) {
clock_title_text.text = txt;
}
function SetClockText(txt) {
clock_text.text = txt;
}
function SetInfoTitle(txt) {
info_title_text.text = txt;
}
function SetInfoText(txt) {
info_text.text = txt;
}
function SetDistanceTitle(d) {
distance_title_text.text = d;
}
function SetDistance(d) {
distance_text.text = Math.round(d) + " yards";
}
function ClearDistance() {
distance_text.text = "";
}
function SoundOn() {
sound = true;
}
function SoundOff() {
sound = false;
}
function SetSoundTime(t) {
start_sound_time = t;
}
function GetClock(t) {
return(remaining_clock);
}
function SetClock(t) {
remaining_clock = t;
start_clock = t;
clock_text.textColor = default_time_color;
SetClockText(t);
}
function StartClock() {
start_date = new Date();
tick_flag = false;
this.onEnterFrame = function () {
var _local2 = new Date();
remaining_clock = start_clock - ((_local2.getTime() - start_date.getTime()) / 1000);
if (sound && (remaining_clock < start_sound_time)) {
if (remaining_clock <= 0) {
_root.PlaySoundEndTick();
} else if ((Math.abs(remaining_clock - Math.round(remaining_clock)) < 0.04) && (!tick_flag)) {
_root.PlaySoundTick();
tick_flag = true;
} else {
tick_flag = false;
}
}
if (remaining_clock < 10) {
clock_text.textColor = 16711680 /* 0xFF0000 */;
}
if (remaining_clock <= 0) {
remaining_clock = 0;
StopClock();
if (onExpireEvent) {
_root.onEvent(onExpireEvent);
delete onExpireEvent;
}
}
SetClockText(FormatClockText(remaining_clock));
};
}
function StopClock() {
delete this.onEnterFrame;
start_clock = remaining_clock;
}
function SetClockExpirationEvent(evtObj) {
onExpireEvent = evtObj;
}
function FormatClockText(t) {
if (t >= 10) {
return(Math.floor(t) + " sec");
}
var _local1 = Math.round(t * 10) / 10;
return((((_local1 % 1) != 0) ? (_local1) : (_local1 + ".0")) + " sec");
}
var remaining_clock = 0;
var start_clock = 0;
var start_date = 0;
var onExpireEvent = null;
var default_time_color = clock_text.textColor;
var tick_flag = false;
var sound = true;
var start_sound_time = 10;
clock_title_text.text = "clock";
clock_text.text = "";
info_title_text.text = "info";
info_text.text = "";
distance_title_text.text = "distance";
distance_text.text = "";
trace("GameInfoDisplay loaded");
stop();
Symbol 37 MovieClip [AimFootball] Frame 1
function AimArrowAngle() {
var _local3 = new _root.Vector(_root._xmouse, _root._ymouse);
var _local2 = new _root.Vector(_root.football._x, _root.football._y);
_root.scene_mc.localToGlobal(_local2);
var _local4 = Math.atan2(_local2.y - _local3.y, (_local3.x - _local2.x) * 0.1);
var _local5 = _root.rad2deg(_local4);
return(Math.min(115, Math.max(65, _local5)));
}
function DrawAimArrow(new_angle) {
var _local4 = [new _root.Vector(0, 0, 0), new _root.Vector(-1.5, 0, 20), new _root.Vector(-3, 0, 20), new _root.Vector(0, 0, 35), new _root.Vector(3, 0, 20), new _root.Vector(1.5, 0, 20), new _root.Vector(0, 0, 0)];
var _local5;
var _local3 = [];
var _local8 = 0;
var _local6 = 0;
var _local7 = 0;
var _local2 = 0;
while (_local2 < _local4.length) {
_local8 = Math.atan2(_local4[_local2].z, _local4[_local2].x);
_local6 = _root.rad2deg(_local8) - 90;
_local7 = _local4[_local2].Magnitude();
_local3[_local2] = new _root.Vector();
_local3[_local2].x = _root.x_component(_local7, new_angle - _local6);
_local3[_local2].y = 0;
_local3[_local2].z = _root.y_component(_local7, new_angle - _local6);
_local2++;
}
aim_arrow_mc.clear();
aim_arrow_mc.lineStyle(1, 16776960, 70);
aim_arrow_mc.beginFill(16776960, 30);
_local5 = _root.Convert3DPointTo2DPoint(_root.football.pos.Copy().Add(_local3[0]));
aim_arrow_mc.moveTo(_local5.x, _local5.y);
_local2 = 1;
while (_local2 < _local3.length) {
_local5 = _root.Convert3DPointTo2DPoint(_root.football.pos.Copy().Add(_local3[_local2]));
aim_arrow_mc.lineTo(_local5.x, _local5.y);
_local2++;
}
aim_arrow_mc.endFill();
}
function HideAimArrow() {
aim_arrow_mc.clear();
delete aim_arrow_mc.onEnterFrame;
}
function DeleteAimArrow() {
aim_arrow_mc.removeMovieClip();
}
var aim_arrow_mc = _root.scene_mc.scene_image.createEmptyMovieClip("aim_arrow_mc", _root.AIM_ARROW_DEPTH);
aim_arrow_mc.onEnterFrame = function () {
DrawAimArrow(AimArrowAngle());
};
aim_arrow_mc.onMouseUp = function () {
if (_root.GetIgnoreOnPress()) {
return(undefined);
}
_root.football.azimuth = AimArrowAngle();
aim_arrow_mc.removeMovieClip();
_root.aim_football_mc.Close();
};
trace("AimArrow loaded");
stop();
Symbol 43 MovieClip Frame 1
this.onRollOver = function () {
_root.PlaySoundMouseOver();
this.gotoAndPlay(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
stop();
Symbol 43 MovieClip Frame 20
gotoAndPlay (2);
Symbol 71 MovieClip [PowerAndAccuracyPicker] Frame 1
function SetSpeed(speed) {
switch (speed) {
case _root.PICKER_SPEED_SLOW :
picker_speed_index = 1;
break;
case _root.PICKER_SPEED_MEDIUM :
picker_speed_index = 2;
break;
case _root.PICKER_SPEED_FAST :
picker_speed_index = 3;
break;
default :
trace("PowerAndAccuracyPicker ERROR: unsupported speed: " + speed);
}
}
function NextPicker(not_from_mouse) {
if (!cur_picker) {
if (_root.GetIgnoreOnPress()) {
return(undefined);
}
picker_line_color = 16711680 /* 0xFF0000 */;
StartPowerPicker();
cur_picker = "power_picker";
_root.SetIgnoreOnPress(true);
} else if (cur_picker == "power_picker") {
if (!not_from_mouse) {
MovePicker(power_picker_mc);
}
var _local3 = power_picker_mc.cur_dir;
if (_local3 >= 90) {
_root.football.speed = Math.max(0, (270 - _local3) / 1.8);
} else {
_root.football.speed = (_local3 / 90) * 100;
}
trace("football.speed = " + _root.football.speed);
delete power_picker_mc.onEnterFrame;
if (_root.football.speed > 95) {
comment_txt.text = "GREAT";
} else if (_root.football.speed > 89) {
comment_txt.text = "GOOD";
} else if (_root.football.speed < 70) {
comment_txt.text = "POOR";
}
var _local4 = 100 - _root.football.speed;
picker_speed_index = picker_speed_index + Math.min((picker_speeds.length - 1) - picker_speed_index, Math.round(_local4 / 15));
picker_line_color = 65535;
StartAccuracyPicker();
cur_picker = "accuracy_picker";
_root.PlaySoundPowerAccuracyMeter();
} else if (cur_picker == "accuracy_picker") {
if (!not_from_mouse) {
MovePicker(accuracy_picker_mc);
}
var _local3 = accuracy_picker_mc.cur_dir;
if (_local3 >= -90) {
_root.football.accuracy = Math.max(0, (90 - _local3) / 1.8);
} else {
_root.football.accuracy = Math.max(((180 + _local3) / 90) * 100, 0);
}
trace("football.accuracy = " + _root.football.accuracy);
delete accuracy_picker_mc.onEnterFrame;
if ((_root.football.speed > 90) && (_root.football.accuracy > 95)) {
comment_txt.text = "GREAT";
} else if ((_root.football.speed > 80) && (_root.football.accuracy > 89)) {
comment_txt.text = "GOOD";
} else if ((_root.football.speed < 70) || (_root.football.accuracy < 70)) {
comment_txt.text = "POOR";
}
_root.ClosePopupMC(_root.power_and_accuracy_picker_mc);
_root.PlaySoundPowerAccuracyMeter();
_root.SetIgnoreOnPress(false);
delete this.onMouseUp;
}
}
function StartPowerPicker() {
power_picker_mc.start_dir = 285;
power_picker_mc.end_dir = 0;
power_picker_mc.cur_dir = 285;
power_picker_mc.start_time = new Date();
demo_click_text_mc._visible = false;
SetSpeed(_root.Game.level);
power_picker_mc.onEnterFrame = function () {
if (!demo) {
MovePicker(power_picker_mc);
} else {
if (power_picker_mc.cur_dir < 100) {
demo_click_text_mc._visible = true;
}
if (power_picker_mc.cur_dir > 92) {
MovePicker(power_picker_mc);
}
}
};
}
function StartAccuracyPicker() {
accuracy_picker_mc.start_dir = 105;
accuracy_picker_mc.end_dir = -180;
accuracy_picker_mc.cur_dir = 105;
accuracy_picker_mc.start_time = new Date();
demo_click_text_mc._visible = false;
SetSpeed(_root.Game.level);
accuracy_picker_mc.onEnterFrame = function () {
if (!demo) {
MovePicker(accuracy_picker_mc);
} else {
if (accuracy_picker_mc.cur_dir < -80) {
demo_click_text_mc._visible = true;
}
if (accuracy_picker_mc.cur_dir > -88) {
MovePicker(accuracy_picker_mc);
}
}
};
}
function MovePicker(picker_mc) {
var _local8 = new Date();
var _local9 = _local8.getTime() - picker_mc.start_time.getTime();
picker_mc.cur_dir = picker_mc.start_dir - (((_local9 * 0.001) * (1 / _root.TIME_PER_FRAME)) * picker_speeds[picker_speed_index]);
if (picker_mc.cur_dir <= picker_mc.end_dir) {
delete picker_mc.onEnterFrame;
NextPicker(true);
}
picker_mc.clear();
picker_mc.lineStyle(1, picker_line_color, 70);
picker_mc.beginFill(0, 30);
picker_mc.moveTo(0, 0);
var _local7 = new Vector();
var _local6 = new Vector();
var _local5 = new Vector();
var _local3 = new Vector();
var _local4 = picker_mc.cur_dir - picker_mc.end_dir;
_local7.x = _root.x_component(picker_radius * 3, picker_mc.cur_dir);
_local7.y = -_root.y_component(picker_radius * 3, picker_mc.cur_dir);
_local6.x = _root.x_component(picker_radius * 3, picker_mc.cur_dir - (_local4 / 3));
_local6.y = -_root.y_component(picker_radius * 3, picker_mc.cur_dir - (_local4 / 3));
_local5.x = _root.x_component(picker_radius * 3, picker_mc.cur_dir - ((_local4 / 3) * 2));
_local5.y = -_root.y_component(picker_radius * 3, picker_mc.cur_dir - ((_local4 / 3) * 2));
_local3.x = _root.x_component(picker_radius * 3, picker_mc.end_dir);
_local3.y = -_root.y_component(picker_radius * 3, picker_mc.end_dir);
picker_mc.lineTo(_local7.x, _local7.y);
picker_mc.lineTo(_local6.x, _local6.y);
picker_mc.lineTo(_local5.x, _local5.y);
picker_mc.lineTo(_local3.x, _local3.y);
picker_mc.lineTo(0, 0);
picker_mc.endFill();
}
function SetAsDemo(which) {
trace(("SetAsDemo(" + which) + ")");
this.demo = true;
delete this.onMouseUp;
if (which == "power") {
StartPowerPicker();
setInterval(StartPowerPicker, 5000);
} else if (which == "accuracy") {
StartAccuracyPicker();
setInterval(StartAccuracyPicker, 5000);
}
}
var Vector = _root.Vector;
var picker_radius = 51;
var picker_speed_index = _root.PICKER_SPEED_SLOW;
var picker_speeds = [5, 7.5, 10, 15, 20, 25, 30];
var cur_picker = null;
var picker_line_color = 16711680;
var demo = false;
createEmptyMovieClip("power_picker_mc", _root.POWER_PICKER_DEPTH);
createEmptyMovieClip("accuracy_picker_mc", _root.ACCURACY_PICKER_DEPTH);
power_picker_mc.setMask(power_picker_mask_mc);
accuracy_picker_mc.setMask(accuracy_picker_mask_mc);
power_picker_mc.cur_dir = 0;
accuracy_picker_mc.cur_dir = 0;
demo_click_text_mc._visible = false;
this.onMouseUp = NextPicker;
trace("PowerAndAccuracyPicker loaded");
stop();
Symbol 76 MovieClip Frame 2
function f() {
demo_accuracy_picker_mc.SetAsDemo("accuracy");
clearInterval(tmpid);
}
demo_power_picker_mc.SetAsDemo("power");
var tmpid = setInterval(f, 1500);
stop();
Symbol 77 MovieClip [HighScoreGameIntroScene] Frame 1
play_mc.onPress = function () {
this._parent.Close();
};
stop();
Symbol 81 MovieClip [PointsGameIntroScene] Frame 1
play_mc.onPress = function () {
this._parent.Close();
};
stop();
Symbol 86 MovieClip [TargetGameIntroScene] Frame 1
play_mc.onPress = function () {
this._parent.Close();
};
stop();
Symbol 91 MovieClip [UprightsGameIntroScene] Frame 1
play_mc.onPress = function () {
this._parent.Close();
};
stop();
Symbol 96 MovieClip [DistanceGameIntroScene] Frame 1
play_mc.onPress = function () {
this._parent.Close();
};
stop();
Symbol 108 MovieClip Frame 1
this.gotoAndStop((_root.IsSoundOn() ? 2 : 3));
Symbol 108 MovieClip Frame 9
_root.SetIgnoreOnPress(false);
this.gotoAndStop((_root.IsSoundOn() ? 2 : 3));
Symbol 111 MovieClip Frame 1
this.gotoAndStop((_root.IsZoomOn() ? 2 : 3));
Symbol 111 MovieClip Frame 9
_root.SetIgnoreOnPress(false);
this.gotoAndStop((_root.IsZoomOn() ? 2 : 3));
Symbol 114 MovieClip [OptionBar] Frame 1
pause_text_mc.onPress = function () {
if (!_root.GetIgnoreOnPress()) {
_root.PauseGame();
_root.SetIgnoreOnPress(true);
if (!_root.pause_dialog_mc) {
_root.OpenPopupMC("PauseDialog", "pause_dialog_mc");
}
}
};
quit_text_mc.onPress = function () {
if (!_root.GetIgnoreOnPress()) {
_root.PauseGame();
_root.SetIgnoreOnPress(true);
if (!_root.quit_dialog_mc) {
_root.OpenPopupMC("QuitDialog", "quit_dialog_mc");
}
}
};
help_text_mc.onPress = function () {
if (!_root.GetIgnoreOnPress()) {
_root.PauseGame();
_root.SetIgnoreOnPress(true);
if (!_root.kicking_instructions_popup_mc) {
_root.OpenPopupMC("KickingInstructionsPopup", "kicking_instructions_popup_mc");
}
}
};
sound_toggle_mc.onPress = function () {
if (!_root.GetIgnoreOnPress()) {
_root.SetIgnoreOnPress(true);
_root.ToggleSoundOnOff();
this.gotoAndPlay(4);
}
};
zoom_toggle_mc.onPress = function () {
if (!_root.GetIgnoreOnPress()) {
_root.SetIgnoreOnPress(true);
_root.ToggleZoomOnOff();
this.gotoAndPlay(4);
}
};
this.createEmptyMovieClip("level_watcher", 1);
level_watcher.onEnterFrame = function () {
level_txt.text = "Level: " + ((_root.Game.level == _root.ROOKIE) ? "ROOKIE" : (((_root.Game.level == _root.PRO) ? "PRO" : "ALL-PRO")));
};
stop();
Symbol 119 MovieClip Frame 1
_root.SetIgnoreOnPress(true);
this.onRelease = function () {
_parent.Close();
_root.ResumeGame();
_root.SetIgnoreOnPress(false);
};
stop();
Symbol 121 MovieClip [KickingInstructionsPopup] Frame 1
stop();
Symbol 127 MovieClip [DemoDialog] Frame 1
function CloseDialog() {
this.Close();
_root.SetIgnoreOnPress(false);
}
stop();
Symbol 129 MovieClip [Demo2Dialog] Frame 1
function CloseDialog() {
this.Close();
_root.SetIgnoreOnPress(false);
}
stop();
Symbol 136 MovieClip [OutOfTimeDialog] Frame 1
function OutofTimeResponse(reply) {
this.Close();
_root.SetIgnoreOnPress(false);
if (reply == "playagain") {
_root.PlayAgain();
} else if (reply == "switchlevel") {
_root.PickLevel();
} else if (reply == "playnewgame") {
_root.PlayNewGame();
} else if (reply == "quit") {
_root.Quit();
}
}
if (_root.DEMO) {
this.gotoAndStop(2);
} else {
stop();
}
Symbol 177 MovieClip [HighScoreGameEndOfRoundDialog] Frame 1
function EndofGameResponse(reply) {
this.Close();
_root.SetIgnoreOnPress(false);
if (reply == "playagain") {
_root.PlayAgain();
} else if (reply == "switchlevel") {
_root.PickLevel();
} else if (reply == "playnewgame") {
_root.PlayNewGame();
} else if (reply == "quit") {
_root.Quit();
} else if (reply == "continue") {
}
}
function SubmitScore() {
this.loadVariables((((((_root.HIGH_SCORES_URL + "?SAVE_GAME=1&username=") + _root.username) + "&score=") + this.total_score) + "&level=") + _root.Game.level);
this.gotoAndStop(3);
}
function DisplayDailyHighScores() {
trace("daily_high_score_names = " + daily_high_score_names);
this.gotoAndStop(4);
}
function DisplayAllTimeHighScores() {
trace("all_time_high_score_names = " + all_time_high_score_names);
this.gotoAndStop(5);
}
this.onData = DisplayDailyHighScores;
if (this.round == 3) {
title_text.text = "End of the Game!";
} else {
title_text.text = ("End of Round " + this.round) + "!";
}
round1_score_text.text = ((this.round >= 1) ? (this.round1_score) : "-");
round2_score_text.text = ((this.round >= 2) ? (this.round2_score) : "-");
round3_score_text.text = ((this.round >= 3) ? (this.round3_score) : "-");
total_score_text.text = this.total_score;
if (this.round == 3) {
this.gotoAndStop(2);
} else {
stop();
}
Symbol 177 MovieClip [HighScoreGameEndOfRoundDialog] Frame 2
round1_score_text.text = ((this.round >= 1) ? (this.round1_score) : "-");
round2_score_text.text = ((this.round >= 2) ? (this.round2_score) : "-");
round3_score_text.text = ((this.round >= 3) ? (this.round3_score) : "-");
total_score_text.text = this.total_score;
Symbol 177 MovieClip [HighScoreGameEndOfRoundDialog] Frame 4
high_score_names_text.text = daily_high_score_names.split(",").join(newline);
high_score_scores_text.text = daily_high_score_scores.split(",").join(newline);
level_text.text = ((_root.Game.level == _root.ROOKIE) ? "Level: ROOKIE" : (((_root.Game.level == _root.PRO) ? "Level: PRO" : "Level: ALL-PRO")));
round1_score_text.text = ((this.round >= 1) ? (this.round1_score) : "-");
round2_score_text.text = ((this.round >= 2) ? (this.round2_score) : "-");
round3_score_text.text = ((this.round >= 3) ? (this.round3_score) : "-");
total_score_text.text = this.total_score;
Symbol 177 MovieClip [HighScoreGameEndOfRoundDialog] Frame 5
high_score_names_text.text = all_time_high_score_names.split(",").join(newline);
high_score_scores_text.text = all_time_high_score_scores.split(",").join(newline);
level_text.text = ((_root.Game.level == _root.ROOKIE) ? "Level: ROOKIE" : (((_root.Game.level == _root.PRO) ? "Level: PRO" : "Level: ALL-PRO")));
round1_score_text.text = ((this.round >= 1) ? (this.round1_score) : "-");
round2_score_text.text = ((this.round >= 2) ? (this.round2_score) : "-");
round3_score_text.text = ((this.round >= 3) ? (this.round3_score) : "-");
total_score_text.text = this.total_score;
Symbol 185 MovieClip [EndOfGameDialog] Frame 1
function EndofGameResponse(reply) {
this.Close();
_root.SetIgnoreOnPress(false);
if (reply == "playagain") {
_root.PlayAgain();
} else if (reply == "switchlevel") {
_root.PickLevel();
} else if (reply == "playnewgame") {
_root.PlayNewGame();
} else if (reply == "quit") {
_root.Quit();
}
}
end_of_game_text.text = ("End of the Game!\nCongratulations, you have passed all\nof the levels for a " + level_text) + "!";
if (_root.DEMO) {
this.gotoAndStop(2);
} else {
stop();
}
Symbol 185 MovieClip [EndOfGameDialog] Frame 2
end_of_game_text.text = ("End of the Game!\nCongratulations, you have passed all\nof the levels for a " + level_text) + "!";
Symbol 193 MovieClip [DistanceLevelPassedDialog] Frame 1
function LevelPassedResponse(reply) {
this.Close();
_root.SetIgnoreOnPress(false);
if (reply == "playagain") {
} else if (reply == "nextlevel") {
_root.Game.level++;
}
}
title_text.text = ("" + level_text) + " Level Passed!";
if (_root.Game.level == _root.ROOKIE) {
this.gotoAndStop(1);
} else if (_root.Game.level == _root.PRO) {
this.gotoAndStop(2);
}
stop();
Symbol 199 MovieClip [LevelPassedDialog] Frame 1
function LevelPassedResponse() {
this.Close();
_root.SetIgnoreOnPress(false);
}
if (_root.DEMO) {
this.gotoAndStop(2);
} else {
stop();
}
Symbol 205 MovieClip [PauseDialog] Frame 1
function PausedGameResponse(reply) {
this.Close();
_root.SetIgnoreOnPress(false);
if (reply == "resume") {
_root.ResumeGame();
}
}
stop();
Symbol 214 MovieClip [QuitDialog] Frame 1
function QuitResponse(reply) {
this.Close();
_root.SetIgnoreOnPress(false);
if (reply == "yes") {
_root.Quit();
} else {
_root.ResumeGame();
}
}
if (_root.DEMO) {
this.gotoAndStop(2);
} else {
stop();
}
Symbol 221 MovieClip Frame 1
this.onRollOver = function () {
_root.PlaySoundMouseOver();
this.gotoAndPlay(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
stop();
Symbol 221 MovieClip Frame 20
gotoAndPlay (2);
Symbol 223 MovieClip Frame 1
this.onRollOver = function () {
_root.PlaySoundMouseOver();
this.gotoAndPlay(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
stop();
Symbol 223 MovieClip Frame 20
gotoAndPlay (2);
Symbol 225 MovieClip Frame 1
this.onRollOver = function () {
_root.PlaySoundMouseOver();
this.gotoAndPlay(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
stop();
Symbol 225 MovieClip Frame 20
gotoAndPlay (2);
Symbol 229 MovieClip [PickLevelScene] Frame 1
function GoBack() {
this.Close();
}
function SelectLevel(level) {
trace("\nlevel = " + level);
if (level == "rookie") {
trace("Level = ROOKIE");
_root.Game.level = _root.ROOKIE;
} else if (level == "pro") {
trace("Level = PRO");
_root.Game.level = _root.PRO;
} else if (level == "allpro") {
trace("Level = ALLPRO");
_root.Game.level = _root.ALLPRO;
}
_root.PlayGame();
}
rookie_mc.onPress = function () {
SelectLevel("rookie");
};
pro_mc.onPress = function () {
SelectLevel("pro");
};
allpro_mc.onPress = function () {
SelectLevel("allpro");
};
if (!_root.pick_game_scene_mc) {
this.gotoAndStop(2);
} else {
stop();
}
Symbol 231 MovieClip [PointsText] Frame 1
points_text.text = points;
if (points == 0) {
points_text.textColor = 255;
} else if (points < 50) {
points_text.textColor = 65535;
} else if (points < 80) {
points_text.textColor = 65280;
} else {
points_text.textColor = 16763904 /* 0xFFCC00 */;
}
stop();
Symbol 259 MovieClip Frame 1
function PlaySound() {
if (!_root.IsSoundOn()) {
return(undefined);
}
sound_mc.setVolume(0);
sound_mc.start(0, 100);
this.onEnterFrame = function () {
sound_mc.setVolume(sound_mc.getVolume() + 3);
if (sound_mc.getVolume() >= 50) {
delete this.onEnterFrame;
}
};
}
function StopSound() {
this.onEnterFrame = function () {
sound_mc.setVolume(sound_mc.getVolume() - 3);
if (sound_mc.getVolume() <= 0) {
delete this.onEnterFrame;
sound_mc.stop();
}
};
}
var sound_mc = new Sound(this);
sound_mc.attachSound("sound_loop");
stop();
Symbol 303 MovieClip [BullseyeMid] Frame 1
function OpenBullseye() {
this.onEnterFrame = function () {
if (_currentframe < frame_end) {
nextFrame();
if (_currentframe == frame_end) {
if (this.onOpen) {
_root.onEvent(this.onOpen);
delete this.onOpen;
}
}
}
};
}
function CloseBullseye() {
this.onEnterFrame = function () {
if (_currentframe > frame_start) {
prevFrame();
if (_currentframe == frame_start) {
if (this.onClose) {
_root.onEvent(this.onClose);
delete this.onClose;
}
}
}
};
}
function WarningBullseye() {
this.gotoAndStop(frame_end + 1);
}
function IsClosed() {
return(_currentframe <= frame_start);
}
var frame_start = 2;
var frame_end = 9;
stop();
Symbol 324 MovieClip [BullseyeShort] Frame 1
function OpenBullseye() {
this.onEnterFrame = function () {
if (_currentframe < frame_end) {
nextFrame();
if (_currentframe == frame_end) {
if (this.onOpen) {
_root.onEvent(this.onOpen);
delete this.onOpen;
}
}
}
};
}
function CloseBullseye() {
this.onEnterFrame = function () {
if (_currentframe > frame_start) {
prevFrame();
if (_currentframe == frame_start) {
if (this.onClose) {
_root.onEvent(this.onClose);
delete this.onClose;
}
}
}
};
}
function WarningBullseye() {
this.gotoAndStop(frame_end + 1);
}
function IsClosed() {
return(_currentframe <= frame_start);
}
var frame_start = 2;
var frame_end = 9;
stop();
Symbol 325 MovieClip [field_goal_40yd] Frame 1
this.field_goal_mask._visible = false;
stop();
Symbol 330 MovieClip [field_goal_60yd] Frame 1
field_goal_mask._visible = false;
stop();
Symbol 365 MovieClip [football_44x33] Frame 1
function Spin() {
state = "spin";
this.gotoAndPlay(16);
}
function Still() {
state = "still";
this.gotoAndStop(16);
}
var state = "still";
this.gotoAndStop(16);
Symbol 365 MovieClip [football_44x33] Frame 2
if (state == "still") {
stop();
}
Symbol 365 MovieClip [football_44x33] Frame 9
this.gotoAndPlay(2);
Symbol 365 MovieClip [football_44x33] Frame 16
if (state == "still") {
stop();
}
Symbol 365 MovieClip [football_44x33] Frame 31
this.gotoAndPlay(16);
Symbol 385 MovieClip [WindVane] Frame 1
trace("Windvane loaded");
stop();
Symbol 416 MovieClip [PickGameScene] Frame 1
highlight_ring_pg._visible = false;
highlight_ring_dg._visible = false;
highlight_ring_htu._visible = false;
highlight_ring_tp._visible = false;
highlight_ring_hsg._visible = false;
points_game_btn_mc.onRollOver = function () {
_root.PlaySoundMouseOver();
highlight_ring_pg._visible = true;
};
points_game_btn_mc.onRollOut = function () {
highlight_ring_pg._visible = false;
};
distance_game_btn_mc.onRollOver = function () {
_root.PlaySoundMouseOver();
highlight_ring_dg._visible = true;
};
distance_game_btn_mc.onRollOut = function () {
highlight_ring_dg._visible = false;
};
target_practice_btn_mc.onRollOver = function () {
_root.PlaySoundMouseOver();
highlight_ring_tp._visible = true;
};
target_practice_btn_mc.onRollOut = function () {
highlight_ring_tp._visible = false;
};
hit_the_uprights_btn_mc.onRollOver = function () {
_root.PlaySoundMouseOver();
highlight_ring_htu._visible = true;
};
hit_the_uprights_btn_mc.onRollOut = function () {
highlight_ring_htu._visible = false;
};
high_score_game_btn_mc.onRollOver = function () {
_root.PlaySoundMouseOver();
highlight_ring_hsg._visible = true;
};
high_score_game_btn_mc.onRollOut = function () {
highlight_ring_hsg._visible = false;
};
points_game_btn_mc.onPress = function () {
if (_root.pick_level_scene_mc) {
return(undefined);
}
_root.Game.type = _root.POINTS;
_root.PickLevel();
};
distance_game_btn_mc.onPress = function () {
if (_root.pick_level_scene_mc) {
return(undefined);
}
_root.Game.type = _root.DISTANCE;
_root.PickLevel();
};
target_practice_btn_mc.onPress = function () {
if (_root.pick_level_scene_mc) {
return(undefined);
}
_root.Game.type = _root.TARGET;
_root.PickLevel();
};
hit_the_uprights_btn_mc.onPress = function () {
if (_root.pick_level_scene_mc) {
return(undefined);
}
_root.Game.type = _root.UPRIGHTS;
_root.PickLevel();
};
high_score_game_btn_mc.onPress = function () {
if (_root.DEMO) {
getURL ("http://games.possumstew.com", "_blank");
} else {
if (_root.pick_level_scene_mc) {
return(undefined);
}
_root.Game.type = _root.HIGH_SCORE;
_root.PickLevel();
}
};
if (_root.DEMO) {
this.gotoAndStop(2);
} else {
stop();
}