Section 1
//Ant_90 (hunt_fla.Ant_90)
package hunt_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Ant_90 extends MovieClip {
public function Ant_90(){
addFrameScript(9, frame10, 15, frame16);
}
function frame10(){
gotoAndPlay(1);
}
function frame16(){
stop();
MovieClip(root).tScore = (MovieClip(root).tScore + 5);
MovieClip(parent).makedead();
}
}
}//package hunt_fla
Section 2
//backgorund_39 (hunt_fla.backgorund_39)
package hunt_fla {
import flash.display.*;
public dynamic class backgorund_39 extends MovieClip {
public var mBush1:MovieClip;
public var mBush2:MovieClip;
public var mTree1:MovieClip;
public var mTree3:MovieClip;
public var mTree2:MovieClip;
}
}//package hunt_fla
Section 3
//background2_68 (hunt_fla.background2_68)
package hunt_fla {
import flash.display.*;
public dynamic class background2_68 extends MovieClip {
public var mBush1:MovieClip;
public var mTree1:MovieClip;
public var mTree3:MovieClip;
public var mTree4:MovieClip;
public var mTree2:MovieClip;
}
}//package hunt_fla
Section 4
//batmain_82 (hunt_fla.batmain_82)
package hunt_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class batmain_82 extends MovieClip {
public function batmain_82(){
addFrameScript(9, frame10, 14, frame15);
}
function frame10(){
gotoAndPlay(1);
}
function frame15(){
stop();
MovieClip(root).tScore = (MovieClip(root).tScore + 15);
MovieClip(parent).makedead();
}
}
}//package hunt_fla
Section 5
//bcksound_66 (hunt_fla.bcksound_66)
package hunt_fla {
import flash.display.*;
public dynamic class bcksound_66 extends MovieClip {
public function bcksound_66(){
addFrameScript(0, frame1, 88, frame89);
}
function frame89(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
}
}//package hunt_fla
Section 6
//condorm_87 (hunt_fla.condorm_87)
package hunt_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class condorm_87 extends MovieClip {
public function condorm_87(){
addFrameScript(8, frame9, 14, frame15);
}
function frame15(){
stop();
MovieClip(root).tScore = (MovieClip(root).tScore + 7);
MovieClip(parent).makedead();
}
function frame9(){
gotoAndPlay(1);
}
}
}//package hunt_fla
Section 7
//crosshair_65 (hunt_fla.crosshair_65)
package hunt_fla {
import flash.display.*;
public dynamic class crosshair_65 extends MovieClip {
public function crosshair_65(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package hunt_fla
Section 8
//gamelost_78 (hunt_fla.gamelost_78)
package hunt_fla {
import flash.display.*;
import flash.text.*;
public dynamic class gamelost_78 extends MovieClip {
public var fScore:TextField;
}
}//package hunt_fla
Section 9
//introbckholder_2 (hunt_fla.introbckholder_2)
package hunt_fla {
import flash.display.*;
public dynamic class introbckholder_2 extends MovieClip {
public var sHit:MovieClip;
}
}//package hunt_fla
Section 10
//linklogo_22 (hunt_fla.linklogo_22)
package hunt_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class linklogo_22 extends MovieClip {
public function linklogo_22(){
addFrameScript(0, frame1);
}
function frame1(){
this.buttonMode = true;
this.useHandCursor = true;
this.addEventListener(MouseEvent.CLICK, playMore);
}
public function playMore(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.loogames.com");
navigateToURL(_local2, "_blank");
}
}
}//package hunt_fla
Section 11
//playmore_21 (hunt_fla.playmore_21)
package hunt_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class playmore_21 extends MovieClip {
public function playmore_21(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
this.useHandCursor = true;
this.mouseEnabled = true;
this.addEventListener(MouseEvent.MOUSE_OVER, mover);
this.addEventListener(MouseEvent.MOUSE_OUT, mout);
this.addEventListener(MouseEvent.CLICK, playMore);
}
public function playMore(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.loogames.com");
navigateToURL(_local2, "_blank");
}
public function mover(_arg1:MouseEvent):void{
this.gotoAndStop(5);
}
public function mout(_arg1:MouseEvent):void{
this.gotoAndStop(1);
}
}
}//package hunt_fla
Section 12
//scmainbody_85 (hunt_fla.scmainbody_85)
package hunt_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class scmainbody_85 extends MovieClip {
public var sHit:MovieClip;
public function scmainbody_85(){
addFrameScript(4, frame5, 10, frame11);
}
function frame5(){
gotoAndPlay(1);
}
function frame11(){
stop();
MovieClip(root).tScore = (MovieClip(root).tScore + 10);
MovieClip(parent).makedead();
}
}
}//package hunt_fla
Section 13
//spiderbody_80 (hunt_fla.spiderbody_80)
package hunt_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class spiderbody_80 extends MovieClip {
public function spiderbody_80(){
addFrameScript(5, frame6, 11, frame12);
}
function frame12(){
stop();
MovieClip(root).tScore = (MovieClip(root).tScore + 5);
MovieClip(parent).makedead();
}
function frame6(){
gotoAndPlay(1);
}
}
}//package hunt_fla
Section 14
//startbutton_20 (hunt_fla.startbutton_20)
package hunt_fla {
import flash.events.*;
import flash.display.*;
public dynamic class startbutton_20 extends MovieClip {
public function startbutton_20(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
this.useHandCursor = true;
this.mouseEnabled = true;
this.addEventListener(MouseEvent.MOUSE_OVER, mover);
this.addEventListener(MouseEvent.MOUSE_OUT, mout);
}
public function mover(_arg1:MouseEvent):void{
this.gotoAndStop(5);
}
public function mout(_arg1:MouseEvent):void{
this.gotoAndStop(1);
}
}
}//package hunt_fla
Section 15
//startbuttoncopy_77 (hunt_fla.startbuttoncopy_77)
package hunt_fla {
import flash.events.*;
import flash.display.*;
public dynamic class startbuttoncopy_77 extends MovieClip {
public function startbuttoncopy_77(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
this.useHandCursor = true;
this.mouseEnabled = true;
this.addEventListener(MouseEvent.MOUSE_OVER, mover);
this.addEventListener(MouseEvent.MOUSE_OUT, mout);
}
public function mover(_arg1:MouseEvent):void{
this.gotoAndStop(5);
}
public function mout(_arg1:MouseEvent):void{
this.gotoAndStop(1);
}
}
}//package hunt_fla
Section 16
//winsysmbol_76 (hunt_fla.winsysmbol_76)
package hunt_fla {
import flash.display.*;
import flash.text.*;
public dynamic class winsysmbol_76 extends MovieClip {
public var fScore:TextField;
}
}//package hunt_fla
Section 17
//woodenback_23 (hunt_fla.woodenback_23)
package hunt_fla {
import flash.display.*;
public dynamic class woodenback_23 extends MovieClip {
public var sHit:MovieClip;
}
}//package hunt_fla
Section 18
//woodenbackl2_67 (hunt_fla.woodenbackl2_67)
package hunt_fla {
import flash.display.*;
import flash.text.*;
public dynamic class woodenbackl2_67 extends MovieClip {
public var sHit:MovieClip;
public var fScore:TextField;
}
}//package hunt_fla
Section 19
//ants (ants)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class ants extends MovieClip {
var antDir:int;
var mDead:Boolean;
var lastTime:int;
public var moveOn:Boolean;
var aspeed:Number;// = 0.12
public var mAnt:MovieClip;
public function ants(_arg1:int):void{
aspeed = 0.12;
super();
mDead = false;
antDir = _arg1;
this.buttonMode = true;
addEventListener(Event.ENTER_FRAME, mainLoop);
addEventListener(MouseEvent.CLICK, fired);
decideScale();
}
function antMove(_arg1:int):void{
if (!mDead){
if (antDir == 0){
this.x = (this.x + (_arg1 * aspeed));
if (this.x > 1900){
makedead();
};
} else {
if (antDir == 1){
this.x = (this.x - (_arg1 * aspeed));
if (this.x < -100){
makedead();
};
};
};
};
}
public function makedead():void{
mDead = true;
removeEventListener(Event.ENTER_FRAME, mainLoop);
removeEventListener(MouseEvent.CLICK, fired);
parent.removeChild(this);
}
function decideScale():void{
if (antDir == 1){
this.mAnt.scaleX = -1;
};
}
function fired(_arg1:MouseEvent):void{
removeEventListener(MouseEvent.CLICK, fired);
mAnt.gotoAndPlay("adead");
}
function mainLoop(_arg1:Event):void{
var _local2:int;
if (lastTime == 0){
lastTime = getTimer();
};
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
antMove(_local2);
}
}
}//package
Section 20
//bats (bats)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class bats extends MovieClip {
var cnDir:int;
var mDead:Boolean;
var bty:int;
public var mBat:MovieClip;
var lastTime:int;
public var moveOn:Boolean;
var aspeed:Number;// = 0.16
public function bats(_arg1:int):void{
aspeed = 0.16;
super();
mDead = false;
this.mouseEnabled = true;
this.buttonMode = true;
cnDir = _arg1;
bty = 2;
addEventListener(Event.ENTER_FRAME, mainLoop);
addEventListener(MouseEvent.CLICK, fired);
}
public function makedead():void{
mDead = true;
removeEventListener(Event.ENTER_FRAME, mainLoop);
removeEventListener(MouseEvent.CLICK, fired);
parent.removeChild(this);
}
function batMove(_arg1:int):void{
if (!mDead){
if (cnDir == 0){
this.x = (this.x + (_arg1 * aspeed));
this.y = (this.y + bty);
if (this.x > 800){
this.y = (this.y - bty);
};
if ((((this.x > 1800)) || ((this.y < 0)))){
makedead();
};
} else {
if (cnDir == 1){
this.x = (this.x - (_arg1 * aspeed));
this.y = (this.y + bty);
if (this.x < 900){
this.y = (this.y - bty);
};
if ((((this.x < -50)) || ((this.y < 0)))){
makedead();
};
};
};
};
}
function fired(_arg1:MouseEvent):void{
removeEventListener(MouseEvent.CLICK, fired);
mBat.gotoAndPlay("cdead");
}
function mainLoop(_arg1:Event):void{
var _local2:int;
if (lastTime == 0){
lastTime = getTimer();
};
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
batMove(_local2);
}
}
}//package
Section 21
//condor (condor)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class condor extends MovieClip {
var cnDir:int;
public var mCondor:MovieClip;
var mDead:Boolean;
var lastTime:int;
public var moveOn:Boolean;
var aspeed:Number;// = 0.2
public function condor(_arg1:int):void{
aspeed = 0.2;
super();
mDead = false;
cnDir = _arg1;
this.mouseEnabled = true;
this.buttonMode = true;
decideScale();
addEventListener(Event.ENTER_FRAME, mainLoop);
addEventListener(MouseEvent.CLICK, fired);
}
function condorMove(_arg1:int):void{
if (!mDead){
if (cnDir == 0){
this.x = (this.x + (_arg1 * aspeed));
if (this.x > 1900){
makedead();
};
} else {
if (cnDir == 1){
this.x = (this.x - (_arg1 * aspeed));
if (this.x < -100){
makedead();
};
};
};
};
}
public function makedead():void{
mDead = true;
removeEventListener(Event.ENTER_FRAME, mainLoop);
removeEventListener(MouseEvent.CLICK, fired);
parent.removeChild(this);
}
function decideScale():void{
if (cnDir == 1){
this.mCondor.scaleX = -1;
};
}
function fired(_arg1:MouseEvent):void{
removeEventListener(MouseEvent.CLICK, fired);
mCondor.gotoAndPlay("cdead");
}
function mainLoop(_arg1:Event):void{
var _local2:int;
if (lastTime == 0){
lastTime = getTimer();
};
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
condorMove(_local2);
}
}
}//package
Section 22
//cShoot (cShoot)
package {
import flash.media.*;
public dynamic class cShoot extends Sound {
}
}//package
Section 23
//hunt2 (hunt2)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
public class hunt2 extends MovieClip {
public var condorDelay:int;
public var mScore:TextField;
public var btAgain:MovieClip;
public var mLoose:MovieClip;
public var mWin:MovieClip;
private var cS:Sound;
public var timediff:int;
var min:int;
var sec:int;
public var batDelay:int;
public var tScore:int;
var lastTime:int;
public var batTime:Timer;
public var keytop;
public var mBck:MovieClip;
public var mSec:TextField;
public var mMin:TextField;
public var mSound:MovieClip;
var gD:Timer;
var spTime:Timer;
var mTime:Timer;
public var keyleft;
public var condorTime:Timer;
var allAnimal:Array;
public var btStart2:MovieClip;
public var scDelay:int;
var tempScore:int;
var bspeed:Number;
var spDelay:int;
public var btStart:MovieClip;
public var mBck2:MovieClip;
public var btIntro:MovieClip;
public var scTime:Timer;
public var keyright:Boolean;
var soundOn:Boolean;
public var antTime:Timer;
var _mochiads_game_id:String;// = "59de325a4066b736"
public var keybottom;
var targetScore:int;
var level:String;
public var ptext:TextField;
public var totalScore:int;
public var mCross:MovieClip;
public var gOver:Boolean;
public var antDelay:int;
public var btNew:MovieClip;
public var mLevel1:MovieClip;
var targetTime:int;
public function hunt2(){
_mochiads_game_id = "59de325a4066b736";
super();
addFrameScript(0, frame1, 4, frame5, 9, frame10, 14, frame15, 21, frame22, 29, frame30, 34, frame35, 39, frame40);
}
public function startAgain(_arg1:MouseEvent):void{
btAgain.removeEventListener(MouseEvent.CLICK, startAgain);
if (level == "level1"){
this.gotoAndStop("l1start");
} else {
if (level == "level2"){
this.gotoAndStop("l2start");
};
};
}
public function shoot(_arg1:MouseEvent):void{
mCross.gotoAndPlay(2);
cS = new cShoot();
cS.play(1);
}
function moveback():void{
if (keyright){
if (mBck.x > -1175){
mBck.x = (mBck.x - (timediff * bspeed));
};
};
if (keyleft){
if (mBck.x < -15){
mBck.x = (mBck.x + (timediff * bspeed));
};
};
if (keytop){
if (mBck.y < -18){
mBck.y = (mBck.y + (timediff * bspeed));
};
};
if (keybottom){
if (mBck.y > -332){
mBck.y = (mBck.y - (timediff * bspeed));
};
};
}
public function generalkill():void{
var _local1:String;
var _local2:int;
var _local3:*;
if (level == "level1"){
_local1 = "mBck";
} else {
if (level == "level2"){
_local1 = "mBck2";
};
};
_local2 = (this[_local1].numChildren - 1);
while (_local2 > 0) {
_local3 = this[_local1].getChildAt(_local2);
if ((((((((((_local3 is ants)) || ((_local3 is spiders)))) || ((_local3 is condor)))) || ((_local3 is scorpion)))) || ((_local3 is bats)))){
_local3.makedead();
};
_local2--;
};
}
public function endIntro(_arg1:MouseEvent):void{
btIntro.removeEventListener(MouseEvent.CLICK, endIntro);
this.gotoAndStop("l1start");
}
function frame10(){
stop();
btStart.addEventListener(MouseEvent.CLICK, startGame);
}
function frame5(){
stop();
btIntro.addEventListener(MouseEvent.CLICK, endIntro);
}
function frame15(){
stop();
stHunt();
}
function frame1(){
stop();
addEventListener(Event.ENTER_FRAME, loadprogress);
}
function frame22(){
stop();
Mouse.show();
mLevel1.fScore.text = String(totalScore);
btStart2.addEventListener(MouseEvent.CLICK, startGame2);
}
function countTime(_arg1:TimerEvent):void{
sec++;
if (sec >= 60){
min++;
sec = 0;
};
mMin.text = String(min);
mSec.text = String(sec);
}
function frame30(){
stop();
stHunt();
}
function frame35(){
stop();
Mouse.show();
mWin.fScore.text = String(totalScore);
btNew.addEventListener(MouseEvent.CLICK, startNew);
}
public function addCondors(_arg1:TimerEvent):void{
var _local2:int;
var _local3:MovieClip;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = Math.round((Math.random() * 1));
_local3 = new condor(_local2);
if (_local2 == 0){
_local3.x = 0;
} else {
if (_local2 == 1){
_local3.x = 1800;
};
};
if (level == "level1"){
mBck.addChild(_local3);
allAnimal.push(_local3);
mBck.setChildIndex(mBck.mTree1, (mBck.numChildren - 1));
mBck.setChildIndex(mBck.mTree2, (mBck.numChildren - 2));
mBck.setChildIndex(mBck.mBush2, (mBck.numChildren - 3));
mBck.setChildIndex(mBck.mTree3, (mBck.numChildren - 4));
} else {
if (level == "level2"){
mBck2.addChild(_local3);
allAnimal.push(_local3);
};
};
_local4 = Math.round((Math.random() * 250));
_local5 = (Math.round((Math.random() * 80)) + 30);
_local6 = (Math.round((Math.random() * 20)) + 30);
_local3.y = (20 + _local4);
_local3.width = _local5;
_local3.height = _local6;
}
function frame40(){
stop();
Mouse.show();
mLoose.fScore.text = String(totalScore);
btAgain.addEventListener(MouseEvent.CLICK, startAgain);
}
public function addSpider(_arg1:TimerEvent):void{
var _local2:int;
var _local3:MovieClip;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = Math.round((Math.random() * 1));
_local3 = new spiders(_local2);
_local4 = Math.round((Math.random() * 110));
_local5 = (Math.round((Math.random() * 70)) + 50);
_local6 = (Math.round((Math.random() * 30)) + 30);
_local3.y = (590 + _local4);
_local3.width = _local5;
_local3.height = _local6;
if (_local2 == 0){
_local3.x = 0;
} else {
if (_local2 == 1){
_local3.x = 1800;
};
};
mBck2.addChild(_local3);
allAnimal.push(_local3);
mBck2.setChildIndex(mBck2.mTree1, (mBck2.numChildren - 1));
mBck2.setChildIndex(mBck2.mBush1, (mBck2.numChildren - 2));
}
function moveback2():void{
if (keyright){
if (mBck2.x > -1175){
mBck2.x = (mBck2.x - (timediff * bspeed));
};
};
if (keyleft){
if (mBck2.x < -15){
mBck2.x = (mBck2.x + (timediff * bspeed));
};
};
if (keytop){
if (mBck2.y < -18){
mBck2.y = (mBck2.y + (timediff * bspeed));
};
};
if (keybottom){
if (mBck2.y > -275){
mBck2.y = (mBck2.y - (timediff * bspeed));
};
};
}
public function loadprogress(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = this.root.loaderInfo.bytesLoaded;
_local3 = this.root.loaderInfo.bytesTotal;
_local4 = Math.round((_local2 / 0x0400));
_local5 = Math.round((_local3 / 0x0400));
ptext.text = (((("Loaded " + _local4) + "/k of ") + _local5) + " k");
if (_local2 >= _local3){
removeEventListener(Event.ENTER_FRAME, loadprogress);
gotoAndStop(5);
};
}
function decideLevel():void{
if (tScore >= targetScore){
if (level == "level1"){
totalScore = (totalScore + tScore);
gotoAndStop("l2start");
} else {
if (level == "level2"){
totalScore = (totalScore + tScore);
gotoAndStop("Win");
};
};
} else {
tScore = 0;
totalScore = 0;
gotoAndStop("gameOver");
};
}
public function startGame2(_arg1:MouseEvent):void{
btStart2.removeEventListener(MouseEvent.CLICK, startGame2);
this.gotoAndStop("level2");
}
function startGameMain():void{
if (level == "level1"){
mBck.enabled = false;
mBck.mouseChildren = true;
mBck.setChildIndex(mBck.mTree1, (mBck.numChildren - 1));
mBck.setChildIndex(mBck.mTree2, (mBck.numChildren - 2));
mBck.setChildIndex(mBck.mBush1, (mBck.numChildren - 3));
antTime = new Timer(antDelay);
antTime.addEventListener(TimerEvent.TIMER, addAnts);
antTime.start();
targetTime = 5;
targetScore = 350;
} else {
if (level == "level2"){
mBck2.enabled = false;
mBck2.mouseChildren = true;
spTime = new Timer(spDelay);
spTime.addEventListener(TimerEvent.TIMER, addSpider);
spTime.start();
targetTime = 10;
targetScore = 750;
};
};
condorTime = new Timer(condorDelay);
condorTime.addEventListener(TimerEvent.TIMER, addCondors);
condorTime.start();
scTime = new Timer(scDelay);
scTime.addEventListener(TimerEvent.TIMER, addScorpions);
scTime.start();
batTime = new Timer(batDelay);
batTime.addEventListener(TimerEvent.TIMER, addBats);
batTime.start();
}
public function addBats(_arg1:TimerEvent):void{
var _local2:int;
var _local3:MovieClip;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = Math.round((Math.random() * 1));
_local3 = new bats(_local2);
if (_local2 == 0){
_local3.x = 0;
} else {
if (_local2 == 1){
_local3.x = 1800;
};
};
if (level == "level1"){
mBck.addChild(_local3);
allAnimal.push(_local3);
mBck.setChildIndex(mBck.mTree1, (mBck.numChildren - 1));
mBck.setChildIndex(mBck.mTree2, (mBck.numChildren - 2));
mBck.setChildIndex(mBck.mBush2, (mBck.numChildren - 3));
mBck.setChildIndex(mBck.mTree3, (mBck.numChildren - 4));
} else {
if (level == "level2"){
mBck2.addChild(_local3);
allAnimal.push(_local3);
};
};
_local4 = Math.round((Math.random() * 250));
_local5 = (Math.round((Math.random() * 45)) + 30);
_local6 = (Math.round((Math.random() * 20)) + 20);
_local3.y = (20 + _local4);
_local3.width = _local5;
_local3.height = _local6;
}
function endGame():void{
if (level == "level1"){
antTime.removeEventListener(TimerEvent.TIMER, addAnts);
} else {
if (level == "level2"){
spTime.removeEventListener(TimerEvent.TIMER, addSpider);
};
};
mTime.removeEventListener(TimerEvent.TIMER, countTime);
condorTime.removeEventListener(TimerEvent.TIMER, addCondors);
scTime.removeEventListener(TimerEvent.TIMER, addScorpions);
batTime.removeEventListener(TimerEvent.TIMER, addBats);
removeEventListener(Event.ENTER_FRAME, mainLoop);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keydown);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyup);
removeEventListener(MouseEvent.CLICK, shoot);
min = 0;
sec = 0;
generalkill();
gD = new Timer(2000, 1);
gD.addEventListener(TimerEvent.TIMER, mPause);
gD.start();
}
public function keyup(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 37){
keyleft = false;
};
if (_arg1.keyCode == 39){
keyright = false;
};
if (_arg1.keyCode == 38){
keytop = false;
};
if (_arg1.keyCode == 40){
keybottom = false;
};
}
public function startGame(_arg1:MouseEvent):void{
btStart.removeEventListener(MouseEvent.CLICK, startGame);
this.gotoAndStop("level1");
}
function mPause(_arg1:TimerEvent):void{
gD.removeEventListener(TimerEvent.TIMER, mPause);
decideLevel();
}
public function keydown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 37){
keyleft = true;
};
if (_arg1.keyCode == 39){
keyright = true;
};
if (_arg1.keyCode == 38){
keytop = true;
};
if (_arg1.keyCode == 40){
keybottom = true;
};
}
function stHunt():void{
antDelay = 10000;
condorDelay = 15000;
scDelay = 25000;
batDelay = 30000;
spDelay = 10000;
bspeed = 0.15;
soundOn = true;
allAnimal = new Array();
mSound.gotoAndPlay(2);
lastTime = getTimer();
Mouse.hide();
tScore = 0;
mCross.mouseEnabled = false;
mCross.enabled = false;
gOver = false;
level = this.currentLabel;
mTime = new Timer(1000);
mTime.addEventListener(TimerEvent.TIMER, countTime);
mTime.start();
keyleft = false;
keyright = false;
keytop = false;
keybottom = false;
addEventListener(Event.ENTER_FRAME, mainLoop);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyup);
addEventListener(MouseEvent.CLICK, shoot);
startGameMain();
}
public function addAnts(_arg1:TimerEvent):void{
var _local2:int;
var _local3:MovieClip;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = Math.round((Math.random() * 1));
_local3 = new ants(_local2);
if (_local2 == 0){
_local3.x = 0;
} else {
if (_local2 == 1){
_local3.x = 1800;
};
};
mBck.addChild(_local3);
allAnimal.push(_local3);
mBck.setChildIndex(mBck.mTree1, (mBck.numChildren - 1));
mBck.setChildIndex(mBck.mTree2, (mBck.numChildren - 2));
mBck.setChildIndex(mBck.mBush1, (mBck.numChildren - 3));
_local4 = Math.round((Math.random() * 80));
_local5 = (Math.round((Math.random() * 50)) + 40);
_local6 = (Math.round((Math.random() * 30)) + 40);
_local3.y = (550 + _local4);
_local3.width = _local5;
_local3.height = _local6;
}
public function startNew(_arg1:MouseEvent):void{
btNew.removeEventListener(MouseEvent.CLICK, startNew);
this.gotoAndStop("l1start");
}
public function addScorpions(_arg1:TimerEvent):void{
var _local2:int;
var _local3:MovieClip;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = Math.round((Math.random() * 1));
_local3 = new scorpion(_local2);
_local4 = (Math.round((Math.random() * 100)) + 60);
_local5 = (Math.round((Math.random() * 60)) + 20);
if (_local2 == 0){
_local3.x = 0;
} else {
if (_local2 == 1){
_local3.x = 1800;
};
};
if (level == "level1"){
mBck.addChild(_local3);
allAnimal.push(_local3);
_local6 = Math.round((Math.random() * 80));
_local3.y = (560 + _local6);
mBck.setChildIndex(mBck.mTree1, (mBck.numChildren - 1));
mBck.setChildIndex(mBck.mTree2, (mBck.numChildren - 2));
mBck.setChildIndex(mBck.mBush1, (mBck.numChildren - 3));
} else {
if (level == "level2"){
_local6 = Math.round((Math.random() * 110));
_local3.y = (590 + _local6);
mBck2.addChild(_local3);
allAnimal.push(_local3);
mBck2.setChildIndex(mBck2.mTree1, (mBck2.numChildren - 1));
mBck2.setChildIndex(mBck2.mBush1, (mBck2.numChildren - 2));
};
};
_local3.width = _local4;
_local3.height = _local5;
}
function mainLoop(_arg1:Event):void{
if (lastTime == 0){
lastTime = getTimer();
};
timediff = (getTimer() - lastTime);
lastTime = (lastTime + timediff);
if (level == "level1"){
moveback();
} else {
if (level == "level2"){
moveback2();
};
};
mCross.x = mouseX;
mCross.y = mouseY;
mScore.text = String((tScore + totalScore));
if (min >= targetTime){
gOver = true;
endGame();
};
}
}
}//package
Section 24
//scorpion (scorpion)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class scorpion extends MovieClip {
var cnDir:int;
public var mScor:MovieClip;
var mDead:Boolean;
var lastTime:int;
public var moveOn:Boolean;
var aspeed:Number;// = 0.16
public function scorpion(_arg1:int):void{
aspeed = 0.16;
super();
mDead = false;
cnDir = _arg1;
decideScale();
this.mouseEnabled = true;
this.buttonMode = true;
addEventListener(Event.ENTER_FRAME, mainLoop);
addEventListener(MouseEvent.CLICK, fired);
}
public function makedead():void{
mDead = true;
removeEventListener(Event.ENTER_FRAME, mainLoop);
removeEventListener(MouseEvent.CLICK, fired);
parent.removeChild(this);
}
function decideScale():void{
if (cnDir == 1){
this.mScor.scaleX = -1;
};
}
function scorpionMove(_arg1:int):void{
if (!mDead){
if (cnDir == 0){
this.x = (this.x + (_arg1 * aspeed));
if (this.x > 1900){
makedead();
};
} else {
if (cnDir == 1){
this.x = (this.x - (_arg1 * aspeed));
if (this.x < -100){
makedead();
};
};
};
};
}
function fired(_arg1:MouseEvent):void{
removeEventListener(MouseEvent.CLICK, fired);
mScor.gotoAndPlay("cdead");
}
function mainLoop(_arg1:Event):void{
var _local2:int;
if (lastTime == 0){
lastTime = getTimer();
};
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
scorpionMove(_local2);
}
}
}//package
Section 25
//spiders (spiders)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class spiders extends MovieClip {
var antDir:int;
var mDead:Boolean;
var lastTime:int;
public var moveOn:Boolean;
var aspeed:Number;// = 0.12
public var mSpider:MovieClip;
public function spiders(_arg1:int):void{
aspeed = 0.12;
super();
mDead = false;
antDir = _arg1;
this.mouseEnabled = true;
this.buttonMode = true;
addEventListener(Event.ENTER_FRAME, mainLoop);
addEventListener(MouseEvent.CLICK, fired);
decideScale();
}
function spiderMove(_arg1:int):void{
if (!mDead){
if (antDir == 0){
this.x = (this.x + (_arg1 * aspeed));
if (this.x > 1900){
makedead();
};
} else {
if (antDir == 1){
this.x = (this.x - (_arg1 * aspeed));
if (this.x < -100){
makedead();
};
};
};
};
}
public function makedead():void{
mDead = true;
removeEventListener(Event.ENTER_FRAME, mainLoop);
removeEventListener(MouseEvent.CLICK, fired);
parent.removeChild(this);
}
function decideScale():void{
if (antDir == 1){
this.mSpider.scaleX = -1;
};
}
function fired(_arg1:MouseEvent):void{
removeEventListener(MouseEvent.CLICK, fired);
mSpider.gotoAndPlay("adead");
}
function mainLoop(_arg1:Event):void{
var _local2:int;
if (lastTime == 0){
lastTime = getTimer();
};
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
spiderMove(_local2);
}
}
}//package