Frame 1
Frame 11
function StartPreloader() {
_preloaderInterval = setInterval(CheckIfLoaded, 300);
}
function CheckIfLoaded() {
var _local4 = new Date();
var _local3 = _local4 - _swfStart;
if ((this.getBytesLoaded() >= (this.getBytesTotal() - 10)) && (_local3 >= MILLISECONDS_TO_DELAY_PRELOADER)) {
clearInterval(_preloaderInterval);
_root.preloader.gotoAndPlay("opening_screen");
}
}
function InitGame() {
gotoAndStop ("play_screen");
ResetLastGame();
is_playing = true;
StartLevel();
ResetScore();
}
function PlayAgain() {
HideSharingActions();
InitGame();
}
function StartLevel() {
RemoveAllTrees();
_userLevel++;
AddBgSprite();
AddTrees();
AddDashboard();
AddDucks();
AddAtom();
AddBomb();
AddTimeBonusElement();
AddAnimals();
AddGunAim();
StartTimer();
}
function StartTimer() {
_seconds_remained_for_level = LEVEL_MAX_SECONDS;
dashboard.txtClock.text = _seconds_remained_for_level;
_levelTimerInterval = setInterval(function () {
_seconds_remained_for_level--;
dashboard.txtClock.text = padZero(_seconds_remained_for_level);
}, 1000);
_levelEndInterval = setTimeout(EndLevel, LEVEL_MAX_SECONDS * 1000);
}
function StopTimer() {
clearInterval(_levelTimerInterval);
dashboard.txtClock.text = "00";
}
function UpdateGameTimer() {
clearInterval(_levelEndInterval);
_levelEndInterval = setTimeout(EndLevel, _seconds_remained_for_level * 1000);
dashboard.time_flare.gotoAndPlay(2);
}
function EndLevel() {
StopTimer();
RemoveAllAnimals();
RemoveAllDucks();
RemoveAtoms();
RemoveBombs();
RemoveTimeBonusElements();
RemoveGunAim();
StopBackgroundChange();
is_playing = false;
setTimeout(function () {
GameOver();
ShowSharingActions();
}, GAMEOVER_DISPLAY_MILISECONDS);
}
function GameOver() {
gotoAndPlay ("game_over_screen");
gameOverHolder.gameOverAnim.scoreText = ("Great! You scored " + _userScore) + " points!";
}
function ResetGame() {
_userLevel = 1;
_userScore = 0;
_userUserName = "";
_currentDuckIndex = 0;
_currentHitCount = 0;
}
function ResetLastGame() {
_userLevel = 1;
_currentDuckIndex = 0;
_currentBonusIndex = 0;
_currentTimeBonusIndex = 0;
_currentAtomIndex = 0;
_currentBombIndex = 0;
_currentSoundIndex = 0;
_currentHitCount = 0;
ResetScore();
}
function HideSharingActions() {
ExternalInterface.call("HidePublish");
}
function ShowSharingActions() {
if (enable_facebook == "1") {
ExternalInterface.call("ShowPublish", _userScore, _currentHitCount);
}
}
function RemoveTimeBonusElements() {
var _local1 = 0;
while (_local1 <= _currentTimeBonusIndex) {
var _local2 = skyStage["time_bonus" + _local1];
if (_local2) {
_local2.removeMovieClip();
}
_local1++;
}
}
function AddTimeBonusElement() {
_currentTimeBonusIndex++;
if (_currentTimeBonusIndex == 1) {
var _local1 = Get_Time_Until_Next_Time_Bonus();
setTimeout(AddTimeBonusElement, _local1);
return(undefined);
}
if (_currentTimeBonusIndex <= MAX_TIME_BONUS_ELEMENTS) {
skyStage.attachMovie("time_bonus", "time_bonus" + _currentTimeBonusIndex, TIME_BONUS_DEPTH + _currentTimeBonusIndex);
var oBonusElement = skyStage["time_bonus" + _currentTimeBonusIndex];
oBonusElement._x = -30;
oBonusElement._y = 12;
oBonusElement.onRelease = function () {
clearInterval(_timeBonusIntrvalId);
ShootTimeBonusElement(oBonusElement);
};
MoveBonusElement(oBonusElement);
var _local1 = Get_Time_Until_Next_Time_Bonus();
setTimeout(AddTimeBonusElement, _local1);
}
}
function MoveBonusElement(oBonusElement) {
oBonusElement._timeBonusIntrvalId = setInterval(function () {
if (oBonusElement._x < STAGE_WIDTH) {
oBonusElement._x = oBonusElement._x + TIME_BONUS_SPEED;
} else {
clearInterval(oBonusElement._timeBonusIntrvalId);
oBonusElement.removeMovieClip();
}
}, TIME_BONUS_ELEMENT_MOVE_MILISECONDS);
}
function ShootTimeBonusElement(oTimeBonus) {
oTimeBonus.gotoAndPlay("explode");
PlaySoundEffect("time_bonus");
_seconds_remained_for_level = _seconds_remained_for_level + TIME_BONUS_ADD_SECONDS;
UpdateGameTimer();
setTimeout(function () {
oTimeBonus.removeMovieClip();
}, 1000);
}
function RemoveAtoms() {
var _local1 = 0;
while (_local1 <= _currentAtomIndex) {
var _local2 = mainStage["atom" + _local1];
if (_local2) {
_local2.removeMovieClip();
}
_local1++;
}
}
function AddBomb() {
_currentBombIndex++;
if (_currentBombIndex == 1) {
var _local1 = Get_Time_Until_Next_Bomb();
setTimeout(AddBomb, _local1);
return(undefined);
}
if ((_currentBombIndex <= MAX_BOMBS) && (is_playing)) {
skyStage.attachMovie("bomb", "bomb" + _currentBombIndex, BOMBS_DEPTH + _currentBombIndex);
var oBomb = skyStage["bomb" + _currentBombIndex];
oBomb._x = Math.floor(Math.random() * STAGE_WIDTH) + 20;
oBomb._y = 14;
setTimeout(function () {
oBomb.removeMovieClip();
}, BOMB_DISPLAY_MILISECONDS);
var _local1 = Get_Time_Until_Next_Bomb();
setTimeout(AddBomb, _local1);
}
}
function ShootBomb(oBomb) {
oBomb.gotoAndPlay("explode");
setTimeout(function () {
PlaySoundEffect("explosion");
if (oBomb._y < SKY_HEIGHT) {
var _local1 = 0;
while (_local1 < _currentDuckIndex) {
ShootDuck(skyStage["duck" + _local1], true);
_local1++;
}
} else {
var _local1 = 0;
while (_local1 < _currentAnimalIndex) {
ShootAnimal(animalsStage["animal" + _local1], true);
_local1++;
}
}
}, BOMB_EXPLOSION_MILISECONDS);
}
function AddAtom() {
_currentAtomIndex++;
if (_currentAtomIndex == 1) {
var _local1 = Get_Time_Until_Next_Atom();
setTimeout(AddAtom, _local1);
return(undefined);
}
if ((_currentAtomIndex <= MAX_ATOMS) && (is_playing)) {
skyStage.attachMovie("atom", "atom" + _currentAtomIndex, ATOMS_DEPTH + _currentAtomIndex);
var oAtom = mainStage["atom" + _currentAtomIndex];
oAtom._x = Math.floor(Math.random() * STAGE_WIDTH) + 20;
oAtom._y = EARTH_HEIGHT - 20;
MoveAtom(oAtom);
setTimeout(function () {
oAtom.removeMovieClip();
}, ATOM_DISPLAY_MILISECONDS);
var _local1 = Get_Time_Until_Next_Atom();
setTimeout(AddAtom, _local1);
}
}
function MoveAtom(oAtom) {
oAtom._timeBonusIntrvalId = setInterval(function () {
if (oAtom._y < STAGE_HEIGHT) {
oAtom._y = oAtom._y + ATOM_DROP_SPEED;
} else {
clearInterval(oAtom._timeBonusIntrvalId);
oAtom.removeMovieClip();
}
}, TIME_BONUS_ELEMENT_MOVE_MILISECONDS);
}
function ShootAtom(oAtom) {
oAtom.gotoAndPlay("explode");
clearInterval(oAtom._timeBonusIntrvalId);
setTimeout(function () {
PlaySoundEffect("atom_explosion");
var _local1 = 0;
while (_local1 < _currentDuckIndex) {
ShootDuck(skyStage["duck" + _local1], true);
_local1++;
}
_local1 = 0;
while (_local1 < _currentAnimalIndex) {
ShootAnimal(animalsStage["animal" + _local1], true);
_local1++;
}
}, ATOM_EXPLOSION_MILISECONDS);
}
function AddTimeBonusElement() {
_currentTimeBonusIndex++;
if (_currentTimeBonusIndex == 1) {
var _local1 = Get_Time_Until_Next_Time_Bonus();
setTimeout(AddTimeBonusElement, _local1);
return(undefined);
}
if ((_currentTimeBonusIndex <= MAX_TIME_BONUS_ELEMENTS) && (is_playing)) {
skyStage.attachMovie("time_bonus", "time_bonus" + _currentTimeBonusIndex, TIME_BONUS_DEPTH + _currentTimeBonusIndex);
var oBonusElement = skyStage["time_bonus" + _currentTimeBonusIndex];
oBonusElement._x = -30;
oBonusElement._y = 12;
oBonusElement.onRelease = function () {
clearInterval(_timeBonusIntrvalId);
ShootTimeBonusElement(oBonusElement);
};
MoveBonusElement(oBonusElement);
var _local1 = Get_Time_Until_Next_Time_Bonus();
setTimeout(AddTimeBonusElement, _local1);
}
}
function MoveBonusElement(oBonusElement) {
oBonusElement._timeBonusIntrvalId = setInterval(function () {
if (oBonusElement._x < STAGE_WIDTH) {
oBonusElement._x = oBonusElement._x + TIME_BONUS_SPEED;
} else {
clearInterval(oBonusElement._timeBonusIntrvalId);
oBonusElement.removeMovieClip();
}
}, TIME_BONUS_ELEMENT_MOVE_MILISECONDS);
}
function ShootTimeBonusElement(oTimeBonus) {
oTimeBonus.gotoAndPlay("explode");
PlaySoundEffect("time_bonus");
_seconds_remained_for_level = _seconds_remained_for_level + TIME_BONUS_ADD_SECONDS;
UpdateGameTimer();
setTimeout(function () {
oTimeBonus.removeMovieClip();
}, 1000);
}
function padZero(s) {
s = s.toString();
if (s.length < 2) {
s = "0" + s;
}
return(s);
}
function Get_Time_Until_Next_Time_Bonus() {
return(Math.floor((Math.random() * (LEVEL_MAX_SECONDS * 1000)) / MAX_TIME_BONUS_ELEMENTS) + 2000);
}
function Get_Time_Until_Next_Bomb() {
return(Math.floor((Math.random() * (LEVEL_MAX_SECONDS * 1000)) / MAX_BOMBS) + 2000);
}
function Get_Time_Until_Next_Atom() {
return(Math.floor((Math.random() * (LEVEL_MAX_SECONDS * 1000)) / MAX_ATOMS) + 2000);
}
function ReplaceContextMenu() {
var _local2 = new ContextMenu();
_local2.hideBuiltInItems();
_local2.customItems.push(new ContextMenuItem("Hunting Season 1.1", function (obj, item) {
}));
_local2.customItems.push(new ContextMenuItem("Game Credits", function (obj, item) {
getURL (HELP_URL, "_blank");
}));
_local2.customItems.push(new ContextMenuItem("More shooting games!", function (obj, item) {
getURL (MORE_GAMES_URL, "_blank");
}));
_local2.customItems[0].enabled = false;
_root.menu = _local2;
}
function AddDucks() {
_ducksIntervalId = setInterval(AddDuck, MILISECONDS_BETWEEN_DUCKS);
}
function AddAnimals() {
_animalsIntervalId = setInterval(AddAnimal, MILISECONDS_BETWEEN_ANIMALS);
}
function AddDuck() {
_currentDuckIndex++;
skyStage.attachMovie("duck_figures", "duck" + _currentDuckIndex, DUCKS_DEPTH + _currentDuckIndex);
var _local2 = skyStage["duck" + _currentDuckIndex];
skyStage["duck" + _currentDuckIndex].gotoAndStop(Math.floor(Math.random() * skyStage["duck" + _currentDuckIndex]._totalframes) + 1);
var _local4 = 0;
var _local3 = Math.floor(Math.random() * 3) + 5;
var _local7 = Math.floor(Math.random() * STAGE_WIDTH) + Math.floor(STAGE_WIDTH / 3);
var _local1 = _local3 + Math.floor((Math.random() * STAGE_HEIGHT) - (DUCK_AVERAGE_HEIGHT / 2));
var _local6 = ((_local4 < _local7) ? 1 : -1);
var _local5 = ((_local3 < _local1) ? 1 : -1);
if (_local5 == 1) {
if (_local1 < DUCK_AVERAGE_HEIGHT) {
_local1 = DUCK_AVERAGE_HEIGHT + 2;
}
} else if (_local1 > STAGE_HEIGHT) {
_local1 = (STAGE_HEIGHT - DUCK_AVERAGE_HEIGHT) - 2;
}
if (Math.random() > 0.5) {
var _local9 = _local4;
var _local8 = _local3;
_local4 = _local7;
_local3 = _local1;
_local7 = _local9;
_local1 = _local8;
_local6 = -_local6;
_local5 = -_local5;
movementDirection = -1;
if (_local6 == -1) {
skyStage["duck" + _currentDuckIndex]._width = skyStage["duck" + _currentDuckIndex]._width * -1;
}
}
_local2._x = _local4;
_local2._y = _local3;
_local2.EndX = _local7;
_local2.EndY = _local1;
_local2.DirectionX = _local6;
_local2.DirectionY = _local5;
MoveObject(_local2);
}
function ShootDuck(oDuck, isBombed) {
if (oDuck.IsDying) {
return(undefined);
}
oDuck.IsDying = true;
if (typeof(oDuck.SpecialPoints) != "undefined") {
points = oDuck.SpecialPoints;
if (points < 0) {
if (isBombed) {
return(undefined);
}
} else {
PlaySoundEffect("special_points");
dashboard.score_flare.gotoAndPlay(2);
}
} else {
points = 1;
}
_currentHitCount++;
oDuck.figure.gotoAndPlay("death");
oDuck.shadow._visible = false;
setTimeout(function () {
RemoveObject(oDuck);
}, 1000);
RaiseScore(points);
}
function RemoveAllDucks() {
clearInterval(_ducksIntervalId);
var _local1 = 0;
while (_local1 <= _currentDuckIndex) {
var _local2 = skyStage["duck" + _local1];
_local2.removeMovieClip();
_local1++;
}
}
function AddAnimal() {
_currentAnimalIndex++;
animalsStage.attachMovie("animal_figures", "animal" + _currentAnimalIndex, ANIMALS_DEPTH + _currentAnimalIndex);
var _local1 = animalsStage["animal" + _currentAnimalIndex];
animalsStage["animal" + _currentAnimalIndex].gotoAndStop(Math.floor(Math.random() * animalsStage["animal" + _currentAnimalIndex]._totalframes) + 1);
var _local4 = 0;
if (Math.random() > 0.5) {
_local4 = STAGE_WIDTH + 10;
}
var _local3 = (EARTH_HEIGHT_START + Math.floor(Math.random() * (EARTH_HEIGHT - 30))) + 20;
var _local7 = Math.floor(Math.random() * STAGE_WIDTH) + Math.floor(STAGE_WIDTH / 3);
var _local2 = (_local3 + Math.floor(Math.random() * 20)) - 10;
var _local6 = ((_local4 < _local7) ? 1 : -1);
var _local5 = ((_local3 < _local2) ? 1 : -1);
if (_local5 == 1) {
if (_local2 < Animal_AVERAGE_HEIGHT) {
_local2 = Animal_AVERAGE_HEIGHT + 10;
}
} else if (_local2 > STAGE_HEIGHT) {
_local2 = (STAGE_HEIGHT - Animal_AVERAGE_HEIGHT) - 10;
}
if (_local6 == 1) {
animalsStage["animal" + _currentAnimalIndex]._xscale = animalsStage["animal" + _currentAnimalIndex]._xscale * -1;
}
_local1._x = _local4;
_local1._y = _local3;
_local1.EndX = _local7;
_local1.EndY = _local2;
_local1.DirectionX = _local6;
_local1.DirectionY = _local5;
MoveObject(_local1);
}
function ShootAnimal(oAnimal, isBombed) {
if (oAnimal.IsDying) {
return(undefined);
}
oAnimal.IsDying = true;
if (typeof(oAnimal.SpecialPoints) != "undefined") {
points = oAnimal.SpecialPoints;
if (points < 0) {
if (isBombed) {
return(undefined);
}
} else {
PlaySoundEffect("special_points");
dashboard.score_flare.gotoAndPlay(2);
}
} else {
points = 1;
}
_currentHitCount++;
oAnimal.figure.gotoAndPlay("death");
oAnimal.shadow._visible = false;
setTimeout(function () {
RemoveAnimal(oAnimal);
}, 1000);
RaiseScore(points);
}
function MoveObject(obj) {
var _local4 = 50;
var _local3 = 150;
var _local5 = Math.floor(Math.random() * _local3) + _local4;
var stepX = 2;
var stepY = 1;
obj.movementInterval = setInterval(function () {
var _local2 = false;
var _local1 = false;
if (obj.DirectionX == 1) {
if (obj._x < obj.EndX) {
obj._x = obj._x + stepX;
} else {
_local2 = true;
}
} else if (obj._x > obj.EndX) {
obj._x = obj._x - stepX;
} else {
_local2 = true;
}
if (obj.DirectionY == 1) {
if (obj._y < obj.EndY) {
obj._y = obj._y + stepY;
} else {
_local1 = true;
}
} else if (obj._y > obj.EndY) {
obj._y = obj._y - stepY;
} else {
_local1 = true;
}
if (_local2 && (_local1)) {
clearInterval(obj.movementInterval);
obj.removeMovieClip();
}
}, _local5);
}
function RemoveObject(obj) {
obj.removeMovieClip();
}
function RemoveAllAnimals() {
clearInterval(_animalsIntervalId);
var _local1 = 0;
while (_local1 <= _currentAnimalIndex) {
var _local2 = animalsStage["animal" + _local1];
_local2.removeMovieClip();
_local1++;
}
}
function AddGunAim() {
InitWeapons();
PrepareGunAimSound();
skyStage.attachMovie("gunAim", "gunAim", GUN_DEPTH);
skyStage.gunAim._x = _xmouse;
skyStage.gunAim._y = _ymouse;
skyStage.gunAim.gotoAndStop(Math.floor(Math.random() * skyStage.gunAim._totalframes) + 2);
skyStage.gunAim.GunAimPositionInterval = setInterval(function () {
skyStage.gunAim._x = _root._xmouse;
skyStage.gunAim._y = _root._ymouse;
}, 10);
ShowGunAim();
}
function HideGunAim() {
skyStage.gunAim._visible = false;
ShowMouseWhenPlaying();
}
function ShowGunAim() {
skyStage.gunAim._visible = true;
HideMouseWhenPlaying();
}
function ShowMouseWhenPlaying() {
if (is_playing) {
Mouse.show();
}
}
function HideMouseWhenPlaying() {
if (is_playing) {
Mouse.hide();
}
}
function DayVision() {
skyStage.gunAim.gotoAndStop(2);
}
function NightVision() {
skyStage.gunAim.gotoAndStop(3);
}
function InitWeapons() {
var _local1 = setInterval(RotateWeapon, WEAPON_ROTATION_UPDATE_MILLISECONDS);
}
function RotateWeapon() {
var _local5 = _root._xmouse - weapons._x;
var _local4 = _root._ymouse - weapons._y;
var _local3 = Math.atan2(_local4, _local5);
var _local2 = ((_local3 * 180) / Math.PI) + 270;
weapons.weapon._rotation = _local2;
if (_root._ymouse > (STAGE_HEIGHT - 50)) {
}
}
function ShootWeapon() {
weapons.weapon.gotoAndPlay("shoot");
}
function SwitchWeapon() {
if (weapons._currentframe == weapons._totalframes) {
weapons.gotoAndStop(1);
} else {
weapons.nextFrame();
}
}
function PrepareGunAimSound() {
gunAimSoundContainer.attachSound("machinegun_sound");
soundContainer.setVolume(20);
_root.onMouseDown = function () {
if (is_playing) {
ShootWeapon();
PlayShootSound();
}
};
}
function RemoveGunAim() {
skyStage.gunAim.removeMovieClip();
clearInterval(_weaponRotationInterval);
Mouse.show();
}
function PlayShootSound() {
gunAimSoundContainer.start();
}
function AddBgSprite() {
var _local1 = 1;
mainStage.attachMovie("bgSprite", "bgSprite", BG_DEPTH);
mainStage.bgSprite._x = -10;
mainStage.bgSprite._y = 0;
StartBackgroundChange();
}
function StartBackgroundChange() {
mainStage.bgSprite.gotoAndStop("day");
}
function StopBackgroundChange() {
mainStage.bgSprite.gotoAndStop(1);
}
function AddDashboard() {
mainStage.attachMovie("dashboard", "dashboard", DASHBOARD_DEPTH);
mainStage.dashboard._x = 0;
mainStage.dashboard._y = 0;
}
function PlaySoundEffect(id, repeatCount) {
if ((!repeatCount) || (typeof(repeatCount) == "undefined")) {
repeatCount = 1;
}
_currentSoundIndex++;
_root.sounds.createEmptyMovieClip(("sound" + id) + _currentSoundIndex, (SOUND_DEPTH + _currentSoundIndex) + 1);
var soundMc = _root.sounds[("sound" + id) + _currentSoundIndex];
soundMc.oSound = new Sound();
soundMc.oSound.setVolume(_currentVolume);
soundMc.oSound.attachSound(id + "_sound");
soundMc.oSound.onSoundComplete = function () {
soundMc.removeMovieClip();
};
soundMc.oSound.start();
}
function AddTrees() {
var _local6 = ",";
var _local3 = 0;
while (_local3 < TREES_COUNT) {
_currentTreeIndex++;
treesStage.attachMovie("tree", "tree" + _currentTreeIndex, TREES_DEPTH + _currentTreeIndex);
treesStage["tree" + _currentTreeIndex].gotoAndStop(Math.floor(Math.random() * treesStage["tree" + _currentTreeIndex]._totalframes) + 1);
var _local5 = STAGE_WIDTH / 100;
var _local1 = (Math.floor(Math.random() * _local5) * 100) + 5;
_local6 = _local6 + (_local1 + ",");
if (_local6.indexOf(_local1 + ",")) {
_local1 = _local1 + 100;
}
var _local4 = (EARTH_HEIGHT_START + Math.floor(Math.random() * EARTH_HEIGHT)) - 20;
var _local2 = treesStage["tree" + _currentTreeIndex];
_local2._x = _local1;
_local2._y = _local4;
_local2.onRelease = function () {
};
_local3++;
}
}
function InitSoundEffects() {
_root.createEmptyMovieClip("sounds", SOUND_DEPTH);
}
function ResetScore() {
_userScore = 0;
dashboard.txtScore.text = padZero(_userScore);
}
function RaiseScore(points) {
_userScore = _userScore + points;
if (_userScore < 0) {
_userScore = 0;
}
dashboard.txtScore.text = padZero(_userScore);
}
var LEVEL_MAX_SECONDS = 100;
var MILLISECONDS_TO_DELAY_PRELOADER = 1000;
var GAMEOVER_DISPLAY_MILISECONDS = 2000;
var PRE_AD_LENGTH_MILISECONDS = 500;
var POST_AD_LENGTH_MILISECONDS = 5000;
var MILISECONDS_BETWEEN_DUCKS = 900;
var MILISECONDS_BETWEEN_ANIMALS = 1500;
var WEAPON_ROTATION_UPDATE_MILLISECONDS = 150;
var MAX_BOMBS = 3;
var MAX_ATOMS = 15;
var MAX_TIME_BONUS_ELEMENTS = 3;
var BOMB_DISPLAY_MILISECONDS = 4000;
var ATOM_DISPLAY_MILISECONDS = 4000;
var BOMB_EXPLOSION_MILISECONDS = 100;
var ATOM_EXPLOSION_MILISECONDS = 500;
var TIME_BONUS_ELEMENT_MOVE_MILISECONDS = 30;
var TIME_BONUS_ADD_SECONDS = 5;
var TIME_BONUS_SPEED = 2;
var ATOM_DROP_SPEED = 2;
var TREES_COUNT = 2;
var BG_DEPTH = 1;
var DASHBOARD_DEPTH = 2;
var GAME_INFO_DEPTH = 3;
var ADS_DEPTH = 3;
var GUN_DEPTH = 16000;
var TIME_BONUS_DEPTH = 8000;
var DUCKS_DEPTH = 10;
var ANIMALS_DEPTH = 1000;
var ATOMS_DEPTH = 7100;
var BOMBS_DEPTH = 6500;
var TREES_DEPTH = 5000;
var MSG_DEPTH = 11000;
var SOUND_DEPTH = 2000;
var REMOVE_SOUND_DELAY = 5000;
var SHARE_URL = "http://www.myplayyard.com/share_score.php?tsource=hunting_season_game_large";
var HELP_URL = "http://www.myplayyard.com/index.php?a=page&id=10&tsource=hunting_season_game_large";
var MORE_GAMES_URL = "http://www.myplayyard.com/index.php?a=gamelist&name=shooting-games&tsource=hunting_season_game_large";
var TOOLBAR_ID = "myplayyard";
var STAGE_WIDTH = 550;
var STAGE_HEIGHT = 400;
var SKY_HEIGHT = 200;
var EARTH_HEIGHT_START = 200;
var EARTH_HEIGHT = (STAGE_HEIGHT - EARTH_HEIGHT_START);
var DUCK_AVERAGE_HEIGHT = 20;
var _userLevel = 1;
var _userScore = 0;
var _currentTreeIndex = 0;
var _currentAnimalIndex = 0;
var _currentDuckIndex = 0;
var _currentBonusIndex = 0;
var _currentTimeBonusIndex = 0;
var _currentAtomIndex = 0;
var _currentBombIndex = 0;
var _currentSoundIndex = 0;
var _currentHitCount = 0;
var _seconds_remained_for_level = 0;
var _levelTimerInterval = 0;
var _animalsIntervalId = 0;
var _ducksIntervalId = 0;
var _timeBonusIntrvalId = 0;
var _spriteMoveIntervalId = 0;
var soundContainer = new Sound();
var gunAimSoundContainer = new Sound();
var is_playing = false;
var random_time_until_next_bomb = 0;
var random_time_until_next_atom = 0;
var _swfStart = new Date();
var _preloaderInterval = 0;
var _weaponRotationInterval = 0;
var _currentVolume = 20;
InitSoundEffects();
ReplaceContextMenu();
StartPreloader();
stop();
Frame 44
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("6c1bcc2a", this, 10301, true);
stop();
Frame 62
stop();
Symbol 8 MovieClip Frame 1
stop();
Symbol 13 MovieClip Frame 1
stop();
Symbol 14 MovieClip [weapons] Frame 1
stop();
Symbol 17 MovieClip [gunAim] Frame 1
stop();
Symbol 23 Button
on (release) {
getURL (_root.MORE_GAMES_URL, "_blank");
}
on (rollOver) {
_root.HideGunAim();
}
on (rollOut) {
_root.ShowGunAim();
}
Symbol 29 Button
on (release) {
getURL (_root.MORE_GAMES_URL, "_blank");
}
Symbol 39 MovieClip Frame 31
gotoAndPlay (1);
Symbol 41 Button
on (release) {
_root.InitGame();
}
Symbol 44 MovieClip Frame 56
stop();
Symbol 44 MovieClip Frame 82
stop();
Symbol 64 MovieClip [bgSprite] Frame 1
stop();
Symbol 64 MovieClip [bgSprite] Frame 2
stop();
_root.DayVision();
setTimeout(function () {
gotoAndPlay ("evening");
}, 15000);
Symbol 64 MovieClip [bgSprite] Frame 48
stop();
_root.NightVision();
setTimeout(function () {
gotoAndPlay ("sunrise");
}, 15000);
Symbol 64 MovieClip [bgSprite] Frame 106
gotoAndStop ("day");
Symbol 73 Button
on (release) {
getURL (_root.MORE_GAMES_URL, "_blank");
}
Instance of Symbol 74 MovieClip in Symbol 79 MovieClip Frame 45
on (release) {
getURL (_root.MORE_GAMES_URL, "_blank");
}
Symbol 79 MovieClip Frame 60
stop();
_root.ShowSharingActions();
Instance of Symbol 78 MovieClip "btPlayAgain" in Symbol 79 MovieClip Frame 60
on (release) {
_root.PlayAgain();
}
Symbol 97 MovieClip Frame 20
gotoAndPlay ("walk");
Symbol 97 MovieClip Frame 43
stop();
Symbol 98 Button
on (release) {
_root.ShootAnimal(this);
}
Symbol 113 MovieClip Frame 36
gotoAndPlay ("walk");
Symbol 113 MovieClip Frame 54
stop();
Symbol 133 MovieClip Frame 23
stop();
Symbol 134 MovieClip Frame 22
gotoAndPlay ("walk");
Symbol 134 MovieClip Frame 49
stop();
Symbol 135 MovieClip [animal_figures] Frame 1
stop();
Symbol 135 MovieClip [animal_figures] Frame 21
SpecialPoints = -10;
Symbol 135 MovieClip [animal_figures] Frame 22
SpecialPoints = -10;
Symbol 135 MovieClip [animal_figures] Frame 23
SpecialPoints = -10;
Symbol 150 MovieClip Frame 70
stop();
Symbol 151 MovieClip Frame 28
gotoAndPlay ("flight");
Symbol 151 MovieClip Frame 62
stop();
Symbol 152 Button
on (release) {
_root.ShootDuck(this);
}
Symbol 165 MovieClip Frame 12
gotoAndPlay ("flight");
Symbol 165 MovieClip Frame 35
stop();
Symbol 178 MovieClip Frame 59
gotoAndPlay ("flight");
Symbol 178 MovieClip Frame 76
stop();
Symbol 184 MovieClip Frame 59
gotoAndPlay ("flight");
Symbol 184 MovieClip Frame 86
stop();
Symbol 185 MovieClip [duck_figures] Frame 1
stop();
Symbol 185 MovieClip [duck_figures] Frame 19
SpecialPoints = 3;
Symbol 185 MovieClip [duck_figures] Frame 20
SpecialPoints = -2;
Symbol 185 MovieClip [duck_figures] Frame 21
SpecialPoints = -2;
Symbol 190 Button
on (release) {
_root.ShootBomb(this);
}
Symbol 197 MovieClip [bomb] Frame 1
stop();
Symbol 197 MovieClip [bomb] Frame 45
stop();
Symbol 201 Button
on (release) {
getURL (_root.HELP_URL, "_blank");
}
on (rollOver) {
_root.HideGun();
}
on (rollOut) {
_root.ShowGun();
}
Symbol 209 MovieClip [time_bonus] Frame 1
stop();
Symbol 209 MovieClip [time_bonus] Frame 13
stop();
Symbol 219 MovieClip Frame 1
stop();
Symbol 222 Button
on (release) {
_root.ShootAtom(this);
}
Symbol 240 MovieClip Frame 116
stop();
Symbol 241 MovieClip [atom] Frame 1
stop();
Symbol 241 MovieClip [atom] Frame 103
stop();
Symbol 255 MovieClip Frame 27
gotoAndPlay ("walk");
Symbol 255 MovieClip Frame 54
stop();
Symbol 256 MovieClip Frame 36
gotoAndPlay ("walk");
Symbol 256 MovieClip Frame 54
stop();
Symbol 257 MovieClip Frame 28
gotoAndPlay ("walk");
Symbol 257 MovieClip Frame 50
stop();
Symbol 258 MovieClip [tree] Frame 1
stop();
Symbol 270 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 1
stop();
Symbol 275 Button
on (release) {
getURL (_root.MORE_GAMES_URL, "_blank");
}
on (rollOver) {
_root.HideGunAim();
}
on (rollOut) {
_root.ShowGunAim();
}
Symbol 279 MovieClip Frame 1
stop();