Frame 2
stop();
_root.gunshot = new Sound();
_root.gunshot.attachSound("gunshot");
_root.reload = new Sound();
_root.reload.attachSound("reload");
_root.currentlevel = 0;
_root.levelsuccess = true;
_root.levels = new Array();
i = 0;
currentsound = new Sound();
goodshotsounds = new Array();
goodshotsounds[goodshotsounds.length] = new Sound();
goodshotsounds[0].attachSound("goodshot1");
goodshotsounds[goodshotsounds.length] = new Sound();
goodshotsounds[1].attachSound("goodshot2");
goodshotsounds[goodshotsounds.length] = new Sound();
goodshotsounds[2].attachSound("goodshot3");
goodshotsounds[goodshotsounds.length] = new Sound();
goodshotsounds[3].attachSound("goodshot4");
goodshotsounds[goodshotsounds.length] = new Sound();
goodshotsounds[4].attachSound("goodshot5");
goodshotsounds[goodshotsounds.length] = new Sound();
goodshotsounds[5].attachSound("goodshot6");
goodshotsounds[goodshotsounds.length] = new Sound();
goodshotsounds[6].attachSound("goodshot7");
misssounds = new Array();
misssounds[misssounds.length] = new Sound();
misssounds[0].attachSound("miss1");
misssounds[misssounds.length] = new Sound();
misssounds[1].attachSound("miss2");
misssounds[misssounds.length] = new Sound();
misssounds[2].attachSound("miss3");
newdeersounds = new Array();
newdeersounds[newdeersounds.length] = new Sound();
newdeersounds[0].attachSound("newdeer1");
newdeersounds[newdeersounds.length] = new Sound();
newdeersounds[1].attachSound("newdeer2");
_root.levels[i++] = new Array("Introduction: Shooting Practice", 1, 50000, 1, 500, 12, 0, 0, 9999, 500, "Welcome to <b>Hunting with Peter</b> brought to you by <b><font color=\"#0000FF\"><a href=\"http://www.planet-familyguy.com\">Planet Family Guy</a></font></b>. You've been invited to go along with Peter and Chris in their latest attempt at bonding...James Bond. When you click the \"Start Hunting\" button in the bottom corner of your screen, you will begin hunting. Shoot as many deer as you can with the 12 bullets provided. You can only take four shots before you need to reload so keep that in mind. If Chris should happen to walk in front of you, don't shoot him or your game will be over!");
_root.levels[i++] = new Array("Level 1", 0.7, 20, 3, 500, 36, 5, 0, 9999, 500, "Good job. Now that you're familiar with how your gun works, let's try setting some goals (forget those stupid hunting limits set by the tree-huggers on capital hill). There's a herd of twenty deer headed our way. You'll have to hit 5 of them to continue on to the next level. Good luck!");
_root.levels[i++] = new Array("Level 2", 0.5, 30, 4, 500, 20, 10, 0, 9999, 500, "Friggin excellent! Ok, I see a very large herd headed this way. Use these 20 bullets and hit 10 of them. Take your time and aim. This herd looks like it will take a good long while to pass.");
_root.levels[i++] = new Array("Level 3", 0.7, 500, 6, 8, 20, 5, 0, 9999, 500, "Nice. I'd like to bag more though. Let's try a more wooded area where they won't see us as well. Of course Chris will have more of a tendancy to want to play \"squirrel\" in front of us. Watch out for him and bag five deer to continue.");
_root.levels[i++] = new Array("Level 4", 1.8, 4, 1, 30, 12, 2, 0, 9999, 500, "Nice huntin' there. Woah woah woah... you hear that? That's the sound of some finely tuned engines my friend. This next group of deer knows their stuff. They're going to be a lot faster than the deer we've seen so far. Here they come! There're four of them. Get two and we'll move on. Good luck.");
_root.levels[i++] = new Array("Level 5", 1, 16, 4, 8, 12, 10, 0, 9999, 500, "Man, that was some nice shooting. I could have done it better but you-...you just keep at it. Here comes a herd of about 16 of 'em. Ok, this is our last go so get as many as you can. You've got twelve bullets so I expect to see you kill at least 10 of 'em. Go!");
_root.levels[i++] = new Array("Insanity", 4, 30, 3, 500, 50, 1, 0, 9999, 500, "Sweet. Well done. I guess we're don- Wait! We've got another herd coming up pretty fast. Really fast. Good god, they're going fast. Damn... I knew we shouldn't have been dropping caffine pellets to mark our path. Oh well. I'm counting about 30 of them. If you can tag one, you win!");
Instance of Symbol 49 MovieClip in Frame 2
onClipEvent (load) {
this.stop();
}
Frame 3
if ((!_root.levelsuccess) || (_root.currentlevel == 0)) {
_root.gameover = 0;
stats._visible = false;
_root.currentlevel = 0;
_root.statistics = new Array(new Array(0));
} else {
buttontext = "Start Hunting";
stats._visible = true;
stats.shotsfired = _root.statistics[_root.currentlevel - 1][1];
stats.deerhit = _root.statistics[_root.currentlevel - 1][0];
stats.deerescaped = _root.statistics[_root.currentlevel - 1][2];
stats.treeshit = _root.statistics[_root.currentlevel - 1][3];
stats.totshotsfired = 0;
stats.totdeerhit = 0;
stats.totdeerescaped = 0;
stats.tottreeshit = 0;
i = 0;
while (i < _root.statistics.length) {
stats.totshotsfired = stats.totshotsfired + _root.statistics[i][1];
stats.totdeerhit = stats.totdeerhit + _root.statistics[i][0];
stats.totdeerescaped = stats.totdeerescaped + _root.statistics[i][2];
stats.tottreeshit = stats.tottreeshit + _root.statistics[i][3];
i++;
}
}
_root.statistics[_root.currentlevel] = new Array(0, 0, 0, 0);
_root.levelname = _root.levels[_root.currentlevel][0];
_root.leveldesc = _root.levels[_root.currentlevel][10];
if (!_root.gameover) {
if (_root.statistics[_root.currentlevel - 1][0] < _root.levels[_root.currentlevel - 1][6]) {
_root.gameover = 3;
stats.deerhit = ("<font color=\"#FF0000\">" + stats.deerhit) + "</font>";
_root.leveldesc = ((("You hit " + _root.statistics[_root.currentlevel - 1][0]) + " out of the ") + _root.levels[_root.currentlevel - 1][6]) + " deer required to continue to the next level. Better luck next time.";
}
if (_root.statistics[_root.currentlevel - 1][2] > _root.levels[_root.currentlevel - 1][9]) {
_root.gameover = 3;
stats.deerescaped = ("<font color=\"#FF0000\">" + stats.deerescaped) + "</font>";
_root.leveldesc = ((("You let too many deer pass! You let " + _root.statistics[_root.currentlevel - 1][2]) + " escape when you were only allowed to let ") + _root.levels[_root.currentlevel - 1][9]) + " pass at most. Better luck next time.";
}
if ((_root.statistics[_root.currentlevel - 1][0] / _root.statistics[_root.currentlevel - 1][1]) < _root.levels[_root.currentlevel - 1][7]) {
_root.gameover = 3;
stats.deerhit = ("<font color=\"#FF0000\">" + stats.deerhit) + "</font>";
stats.shotsfired = ("<font color=\"#FF0000\">" + stats.shotsfired) + "</font>";
_root.leveldesc = ((("Your accuracy was " + Math.round((100 * _root.statistics[_root.currentlevel - 1][0]) / _root.statistics[_root.currentlevel - 1][1])) + "%, which is less than the required ") + Math.round(100 * _root.levels[_root.currentlevel - 1][7])) + "% to complete this level. Better luck next time.";
}
}
if ((_root.levels.length == _root.currentlevel) && (!_root.gameover)) {
_root.gameover = 1;
}
if (_root.gameover) {
_root.currentlevel = -1;
switch (_root.gameover) {
case 1 :
_root.levelname = "Game Completed!";
_root.leveldesc = "Congratulations! You and Chris have survived Hunting with Peter! But that's not all! We plan to bring you a better version of this game with even more levels and features in the future. Keep your eye on <a href=\"http://www.planet-familyguy.com\">Planet-FamilyGuy.com</a> for the latest and greatest in the Family Guy community.";
buttontext = "Start Over";
break;
case 2 :
_root.levelname = "Game Over";
_root.leveldesc = "You shot Chris! What the hell is wrong with you? Here's to hoping he pulls through.";
buttontext = "Try Again";
break;
case 3 :
_root.levelname = "Game Over";
buttontext = "Try Again";
}
}
Mouse.show();
Frame 4
stop();
_root.toplayer = 99999999999;
_root.deeronscreen = new Array(0);
Symbol 7 MovieClip [deersit] Frame 1
this.stop();
Symbol 7 MovieClip [deersit] Frame 13
this.prevFrame();
Symbol 14 MovieClip [snowspray] Frame 29
this.removeMovieClip();
Instance of Symbol 21 MovieClip in Symbol 22 MovieClip Frame 1
onClipEvent (enterFrame) {
if (0 > ((this._x = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) - 100))) {
_root.gotoAndStop(1);
} else {
_root.play();
}
}
onClipEvent (load) {
this._x = -100;
}
Symbol 49 MovieClip Frame 1
this.stop();
Symbol 53 Button
on (release) {
getURL ("http://www.mikenomn.com", "_blank");
}
Symbol 56 Button
on (release) {
getURL ("http://www.planet-familyguy.com", "_blank");
}
Symbol 59 Button
on (release) {
getURL ("http://www.damnyouall.net", "_blank");
}
Instance of Symbol 50 MovieClip in Symbol 60 MovieClip Frame 1
onClipEvent (load) {
dir = 1;
}
onClipEvent (enterFrame) {
_parent.stop();
if ((_parent._alpha <= 0) or (_parent._alpha >= 100)) {
if (dir <= 0) {
_parent.play();
}
dir = dir * -1;
}
_parent._alpha = _parent._alpha + dir;
}
Symbol 63 Button
on (release) {
nextFrame();
}
Symbol 93 Button
on (release) {
_root.levelsuccess = 0;
_root.nextFrame();
}
Symbol 113 Button
on (release) {
if (_parent.ammo > 0) {
ammotoload = 4 - _parent.ammoloaded;
if (_parent.ammo < ammotoload) {
ammotoload = _parent.ammo;
}
_parent.ammo = _parent.ammo - ammotoload;
_parent.ammoloaded = _parent.ammoloaded + ammotoload;
if (ammotoload) {
_root.reload.start();
}
}
}
Instance of Symbol 116 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (enterFrame) {
this._visible = true;
if (_parent._parent.ammoloaded < 3) {
this._visible = false;
}
}
Instance of Symbol 116 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (enterFrame) {
this._visible = true;
if (_parent._parent.ammoloaded < 4) {
this._visible = false;
}
}
Instance of Symbol 116 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (enterFrame) {
this._visible = true;
if (_parent._parent.ammoloaded < 1) {
this._visible = false;
}
}
Instance of Symbol 116 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (enterFrame) {
this._visible = true;
if (_parent._parent.ammoloaded < 2) {
this._visible = false;
}
}
Instance of Symbol 98 MovieClip in Symbol 120 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = (_root._xmouse / 2) + 160;
this._rotation = (_root._xmouse - 320) / (Math.PI*2);
this.swapDepths(_root.toplayer);
}
Instance of Symbol 104 MovieClip in Symbol 120 MovieClip Frame 1
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (enterFrame) {
if (_parent.ammoloaded) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
this.swapDepths(6450);
this._x = _root._xmouse;
offset = Math.round(-50 / Math.exp((getTimer() - _parent.lasttime) / 50));
this._y = _root._ymouse + offset;
_parent._y = offset;
}
Instance of Symbol 106 MovieClip "chris" in Symbol 120 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(4848);
}
Instance of Symbol 114 MovieClip "reloadbutton" in Symbol 120 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(4849);
}
Instance of Symbol 117 MovieClip in Symbol 120 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(_root.toplayer + 1);
}
Instance of Symbol 118 MovieClip in Symbol 120 MovieClip Frame 1
onClipEvent (load) {
nextaction = getTimer();
maxdeeronscreen = 10;
deeronscreen = new Array();
_parent.ammo = _root.levels[_root.currentlevel][5] - 4;
_parent.ammoloaded = 4;
_root.deersofar = 0;
_root.deermadesofar = 0;
lasttime = getTimer();
i = 0;
while (i < maxdeeronscreen) {
deeronscreen[i] = new Array(0, 0, 0, 0, 0);
i++;
}
i = 0;
while (i < _root.levels[_root.currentlevel][3]) {
treex = random(640);
treey = Math.round(((i + 1) / (_root.levels[_root.currentlevel][3] + 1)) * 480);
_parent.attachMovie("tree", "tree" + i, (treey * 10) + 3);
_parent["tree" + i]._x = treex;
_parent["tree" + i]._y = treey;
_parent["tree" + i]._xscale = 100 + (treey / 4.8);
if (random(2)) {
_parent["tree" + i]._xscale = _parent["tree" + i]._xscale * -1;
}
_parent["tree" + i]._yscale = 100 + (treey / 4.8);
i++;
}
_root.onMouseDown = function () {
treeshit = 0;
fronttreey = 0;
i = 0;
while (i < _root.levels[_root.currentlevel][3]) {
if (_parent["tree" + i].hitTest(_root._xmouse, _root._ymouse, 1)) {
treeshit++;
if (_parent["tree" + i]._y > fronttreey) {
fronttreey = _parent["tree" + i]._y;
}
}
i++;
}
if (_parent.ammoloaded && (!_parent.reloadbutton.hitTest(_root._xmouse, _root._ymouse, 1))) {
if (_parent.chris.hitTest(_root._xmouse, _root._ymouse, 1)) {
_root.gameover = 2;
}
_root.statistics[_root.currentlevel][3] = _root.statistics[_root.currentlevel][3] + treeshit;
_root.statistics[_root.currentlevel][1]++;
_root.gunshot.start();
_parent.lasttime = getTimer();
_parent.ammoloaded--;
deerhit = 0;
i = 0;
while (i < deeronscreen.length) {
if ((_parent["deersit" + i].hitTest(_root._xmouse, _root._ymouse, 1) && (_parent["deersit" + i]._y > fronttreey)) && (deeronscreen[i][0])) {
if ((!random(2)) && (_root.currentsound.position == _root.currentsound.duration)) {
_root.currentsound = new Sound();
_root.currentsound = _root.goodshotsounds[random(_root.goodshotsounds.length)];
_root.currentsound.start();
}
deerhit++;
_root.statistics[_root.currentlevel][0]++;
deeronscreen[i][4] = 0;
_parent["deersit" + i].play();
}
i++;
}
if (!deerhit) {
_parent.attachMovie("snowspray", "snowspray" + _root._ymouse, ((_root._ymouse - 20) * 10) + 4);
_parent["snowspray" + _root._ymouse]._x = _root._xmouse;
_parent["snowspray" + _root._ymouse]._y = _root._ymouse;
_parent["snowspray" + _root._ymouse]._xscale = 100 + (_root._ymouse / 4.8);
if ((!random(2)) && (_root.currentsound.position == _root.currentsound.duration)) {
_root.currentsound = new Sound();
_root.currentsound = _root.misssounds[random(_root.misssounds.length)];
_root.currentsound.start();
}
}
}
};
}
onClipEvent (enterFrame) {
timegap = (getTimer() - lasttime) / 1000;
lasttime = getTimer();
if ((!random(_root.levels[_root.currentlevel][4] / timegap)) && (_parent.chris._x < -200)) {
_parent.chris._x = 900;
}
_parent.chris._x = _parent.chris._x - (200 * timegap);
_parent.chris._y = (Math.sin(_parent.chris._x / 25) * 20) + 400;
if (nextaction < getTimer()) {
nextaction = getTimer() + 500;
if (!random(2)) {
i = deeronscreen.length - 1;
while ((i >= 0) && (deeronscreen[i][0])) {
i--;
}
if ((i >= 0) && (_root.deermadesofar < _root.levels[_root.currentlevel][2])) {
if ((!random(4)) && (_root.currentsound.position == _root.currentsound.duration)) {
_root.currentsound = new Sound();
_root.currentsound = _root.newdeersounds[random(_root.newdeersounds.length)];
_root.currentsound.start();
}
_root.deermadesofar++;
deeronscreen[i] = new Array(true, -60, random(400) + 60, random(100) + 150, true);
_parent.attachMovie("snowmobile", "snowmobile" + i, deeronscreen[i][2] * 10);
_parent["snowmobile" + i]._xscale = 100 + (deeronscreen[i][2] / 4.8);
_parent["snowmobile" + i]._yscale = 100 + (deeronscreen[i][2] / 4.8);
_parent.attachMovie("deersit", "deersit" + i, (deeronscreen[i][2] * 10) + 1);
_parent["deersit" + i]._xscale = 100 + (deeronscreen[i][2] / 4.8);
_parent["deersit" + i]._yscale = 100 + (deeronscreen[i][2] / 4.8);
}
}
}
i = 0;
while (i < deeronscreen.length) {
deeronscreen[i][1] = deeronscreen[i][1] + ((timegap * (deeronscreen[i][3] * (1 + (deeronscreen[i][2] / 480)))) * _root.levels[_root.currentlevel][1]);
if (!deeronscreen[i][4]) {
deeronscreen[i][3] = deeronscreen[i][3] + (50 * timegap);
}
if ((deeronscreen[i][1] > 700) && (deeronscreen[i][0])) {
if (deeronscreen[i][4]) {
_root.statistics[_root.currentlevel][2]++;
}
_parent["deersit" + i].removeMovieClip();
_parent["snowmobile" + i].removeMovieClip();
deeronscreen[i][1] = -500000;
deeronscreen[i][0] = false;
_root.deersofar++;
}
if (deeronscreen[i][4]) {
_parent["deersit" + i]._x = deeronscreen[i][1];
}
_parent["deersit" + i]._y = deeronscreen[i][2];
_parent["snowmobile" + i]._x = deeronscreen[i][1];
_parent["snowmobile" + i]._y = deeronscreen[i][2];
i++;
}
if (((_root.deersofar >= _root.levels[_root.currentlevel][2]) || (!(_parent.ammo + _parent.ammoloaded))) || (_root.gameover)) {
_root.levelsuccess = true;
_root.currentlevel++;
_root.prevFrame();
}
}