Section 1
//badgeName_106 (BunnyBountySurvivalStandalone_fla.badgeName_106)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class badgeName_106 extends MovieClip {
public function badgeName_106(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 2
//badges_68 (BunnyBountySurvivalStandalone_fla.badges_68)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class badges_68 extends MovieClip {
public function badges_68(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 3
//bluefood_171 (BunnyBountySurvivalStandalone_fla.bluefood_171)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class bluefood_171 extends MovieClip {
public function bluefood_171(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 4
//blueninjafood_203 (BunnyBountySurvivalStandalone_fla.blueninjafood_203)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class blueninjafood_203 extends MovieClip {
public function blueninjafood_203(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 5
//bluevikingfood_268 (BunnyBountySurvivalStandalone_fla.bluevikingfood_268)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class bluevikingfood_268 extends MovieClip {
public var creatureFood:MovieClip;
public function bluevikingfood_268(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 6
//boom_35 (BunnyBountySurvivalStandalone_fla.boom_35)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class boom_35 extends MovieClip {
public function boom_35(){
addFrameScript(0, frame1, 5, frame6, 60, frame61, 100, frame101);
}
function frame6(){
MovieClip(parent).stopTime();
}
function frame1(){
stop();
}
function frame101(){
gotoAndStop(1);
}
function frame61(){
MovieClip(parent).damnation();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 7
//bountyLost_24 (BunnyBountySurvivalStandalone_fla.bountyLost_24)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class bountyLost_24 extends MovieClip {
public var bountyLostGfx:MovieClip;
public function bountyLost_24(){
addFrameScript(0, frame1, 30, frame31);
}
function frame1(){
stop();
}
function frame31(){
gotoAndStop(1);
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 8
//bountyLostGfx_25 (BunnyBountySurvivalStandalone_fla.bountyLostGfx_25)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.text.*;
public dynamic class bountyLostGfx_25 extends MovieClip {
public var bountyLostText:TextField;
}
}//package BunnyBountySurvivalStandalone_fla
Section 9
//buyButtonInfo_111 (BunnyBountySurvivalStandalone_fla.buyButtonInfo_111)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.text.*;
public dynamic class buyButtonInfo_111 extends MovieClip {
public var priceText:TextField;
public var nameText:TextField;
}
}//package BunnyBountySurvivalStandalone_fla
Section 10
//chainer_9 (BunnyBountySurvivalStandalone_fla.chainer_9)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.text.*;
public dynamic class chainer_9 extends MovieClip {
public var colorMsg:MovieClip;
public var chainText:TextField;
public function chainer_9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 11
//chainmovie_8 (BunnyBountySurvivalStandalone_fla.chainmovie_8)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class chainmovie_8 extends MovieClip {
public var chainClip:MovieClip;
public var rewardMsg:MovieClip;
public function chainmovie_8(){
addFrameScript(0, frame1, 7, frame8, 24, frame25, 29, frame30);
}
function frame1(){
stop();
}
function frame25(){
rewardMsg.gotoAndStop(1);
}
function frame8(){
MovieClip(parent).playRewardMsg();
}
function frame30(){
gotoAndStop(1);
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 12
//completescreen_56 (BunnyBountySurvivalStandalone_fla.completescreen_56)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class completescreen_56 extends MovieClip {
public var totalTimeText:TextField;
public var bunniesKilledText:TextField;
public var splashBg:MovieClip;
public var stageBountyText:TextField;
public var stageNo:TextField;
public var earningsText:TextField;
public var bountyPtsText:MovieClip;
public var biggestBountyText:TextField;
public var continueButton2:MovieClip;
public var instruct:MovieClip;
public var normalTargetText:TextField;
public var endtext:MovieClip;
public var maxChainText:TextField;
public var accuracyText:TextField;
public var continueButton:MovieClip;
public var badgeName:MovieClip;
public var facebookLink:MovieClip;
public var badgePic:MovieClip;
public function completescreen_56(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
splashBg.gotoAndStop(1);
MovieClip(parent).changeEndText();
}
function frame1(){
stop();
splashBg.gotoAndStop(2);
MovieClip(parent).changeEndText();
}
function frame4(){
stop();
splashBg.gotoAndStop(3);
MovieClip(parent).stageScreenSetup();
}
function frame2(){
stop();
splashBg.gotoAndStop(1);
MovieClip(parent).changeEndText();
}
function frame5(){
stop();
splashBg.gotoAndStop(4);
MovieClip(parent).thankYou();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 13
//continueButton_64 (BunnyBountySurvivalStandalone_fla.continueButton_64)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class continueButton_64 extends MovieClip {
public function continueButton_64(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 14
//creatureASpirte_154 (BunnyBountySurvivalStandalone_fla.creatureASpirte_154)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class creatureASpirte_154 extends MovieClip {
public var creatureSprite:MovieClip;
public var shadow:MovieClip;
public function creatureASpirte_154(){
addFrameScript(0, frame1, 1, frame2, 6, frame7, 7, frame8, 12, frame13, 35, frame36, 43, frame44, 44, frame45, 69, frame70, 70, frame71, 96, frame97, 97, frame98, 117, frame118, 170, frame171);
}
function frame70(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
gotoAndPlay("move_shroom");
}
function frame71(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame171(){
stop();
if (((!((this == null))) && (!((parent == null))))){
MovieClip(parent).gone = true;
if (parent.parent.contains(parent)){
parent.parent.removeChild(parent);
};
};
}
function frame98(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame97(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
gotoAndPlay("move_normal");
}
function frame7(){
stop();
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
MovieClip(parent.parent.parent).checkKill(parent);
}
function frame1(){
stop();
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame13(){
stop();
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
MovieClip(parent.parent.parent).checkKill(parent);
}
function frame8(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
}
function frame2(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame36(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame118(){
stop();
if (((!((this == null))) && (!((parent == null))))){
MovieClip(parent).gone = true;
if (parent.parent.contains(parent)){
parent.parent.removeChild(parent);
};
};
}
function frame44(){
stop();
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
MovieClip(parent).summon = false;
}
function frame45(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 15
//creatureBSpirte_248 (BunnyBountySurvivalStandalone_fla.creatureBSpirte_248)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class creatureBSpirte_248 extends MovieClip {
public var creatureSprite:MovieClip;
public var shadow:MovieClip;
public function creatureBSpirte_248(){
addFrameScript(0, frame1, 1, frame2, 6, frame7, 7, frame8, 12, frame13, 35, frame36, 43, frame44, 44, frame45, 69, frame70, 70, frame71, 96, frame97, 97, frame98, 117, frame118, 170, frame171);
}
function frame70(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
gotoAndPlay("move_shroom");
}
function frame71(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame171(){
stop();
if (((!((this == null))) && (!((parent == null))))){
MovieClip(parent).gone = true;
if (parent.parent.contains(parent)){
parent.parent.removeChild(parent);
};
};
}
function frame98(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFaint.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFaintHat.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame97(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
gotoAndPlay("move_normal");
}
function frame7(){
stop();
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
MovieClip(parent.parent.parent).checkKill(parent);
}
function frame1(){
stop();
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame13(){
stop();
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
MovieClip(parent.parent.parent).checkKill(parent);
}
function frame8(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
}
function frame2(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame36(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame118(){
stop();
if (((!((this == null))) && (!((parent == null))))){
MovieClip(parent).gone = true;
if (parent.parent.contains(parent)){
parent.parent.removeChild(parent);
};
};
}
function frame44(){
stop();
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
MovieClip(parent).summon = false;
}
function frame45(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 16
//creatureCSpirte_191 (BunnyBountySurvivalStandalone_fla.creatureCSpirte_191)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class creatureCSpirte_191 extends MovieClip {
public var creatureSprite:MovieClip;
public var shadow:MovieClip;
public function creatureCSpirte_191(){
addFrameScript(0, frame1, 1, frame2, 6, frame7, 7, frame8, 12, frame13, 19, frame20, 28, frame29, 29, frame30, 54, frame55, 55, frame56, 81, frame82, 82, frame83, 102, frame103, 155, frame156);
}
function frame156(){
stop();
if (((!((this == null))) && (!((parent == null))))){
MovieClip(parent).gone = true;
if (parent.parent.contains(parent)){
parent.parent.removeChild(parent);
};
};
}
function frame82(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
gotoAndPlay("move_normal");
}
function frame7(){
stop();
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
MovieClip(parent.parent.parent).checkKill(parent);
}
function frame1(){
stop();
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame13(){
stop();
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
MovieClip(parent.parent.parent).checkKill(parent);
}
function frame103(){
stop();
if (((!((this == null))) && (!((parent == null))))){
MovieClip(parent).gone = true;
if (parent.parent.contains(parent)){
parent.parent.removeChild(parent);
};
};
}
function frame29(){
stop();
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
MovieClip(parent).summon = false;
}
function frame83(){
creatureSprite.creatureBody.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame8(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
}
function frame2(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame30(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
}
function frame20(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
function frame55(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
gotoAndPlay("move_shroom");
}
function frame56(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureFace.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.faceRed, this.faceGreen, this.faceBlue, 0);
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 17
//creatureDSpirte_213 (BunnyBountySurvivalStandalone_fla.creatureDSpirte_213)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class creatureDSpirte_213 extends MovieClip {
public var creatureSprite:MovieClip;
public var shadow:MovieClip;
public function creatureDSpirte_213(){
addFrameScript(0, frame1, 1, frame2, 6, frame7, 7, frame8, 12, frame13, 19, frame20, 28, frame29, 29, frame30, 40, frame41, 41, frame42, 52, frame53, 53, frame54, 73, frame74, 86, frame87, 87, frame88, 107, frame108, 120, frame121);
}
function frame74(){
MovieClip(parent.parent.parent).playSound("killBot");
}
function frame87(){
stop();
if (((!((this == null))) && (!((parent == null))))){
MovieClip(parent).gone = true;
if (parent.parent.contains(parent)){
parent.parent.removeChild(parent);
};
};
}
function frame88(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
}
function frame7(){
stop();
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
MovieClip(parent.parent.parent).checkKill(parent);
}
function frame1(){
stop();
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
}
function frame13(){
stop();
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
MovieClip(parent.parent.parent).checkKill(parent);
}
function frame29(){
stop();
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
MovieClip(parent).summon = false;
}
function frame8(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
}
function frame108(){
MovieClip(parent.parent.parent).playSound("killBot");
}
function frame2(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
}
function frame30(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
if (MovieClip(parent).success){
creatureSprite.creatureFood.gotoAndStop(MovieClip(parent).success.foodtype);
};
}
function frame20(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
}
function frame41(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
gotoAndPlay("move_shroom");
}
function frame42(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
}
function frame121(){
stop();
if (((!((this == null))) && (!((parent == null))))){
MovieClip(parent).gone = true;
if (parent.parent.contains(parent)){
parent.parent.removeChild(parent);
};
};
}
function frame54(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
}
function frame53(){
creatureSprite.creatureEar1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureEar2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureLeg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
creatureSprite.creatureHand1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, this.red, this.green, this.blue, 0);
gotoAndPlay("move_normal");
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 18
//creaturedying_183 (BunnyBountySurvivalStandalone_fla.creaturedying_183)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class creaturedying_183 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureBody:MovieClip;
public var creatureHand2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 19
//creaturehit_159 (BunnyBountySurvivalStandalone_fla.creaturehit_159)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class creaturehit_159 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureBody:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 20
//creaturehitshroom_162 (BunnyBountySurvivalStandalone_fla.creaturehitshroom_162)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class creaturehitshroom_162 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureFood:MovieClip;
public var creatureBody:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 21
//creaturemove_179 (BunnyBountySurvivalStandalone_fla.creaturemove_179)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class creaturemove_179 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureBody:MovieClip;
public var creatureHand2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 22
//creaturemoveshroom_168 (BunnyBountySurvivalStandalone_fla.creaturemoveshroom_168)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class creaturemoveshroom_168 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureFood:MovieClip;
public var creatureBody:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
public var creatureLeg2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 23
//creaturestand_156 (BunnyBountySurvivalStandalone_fla.creaturestand_156)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class creaturestand_156 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureBody:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 24
//endOfLevelBg_57 (BunnyBountySurvivalStandalone_fla.endOfLevelBg_57)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class endOfLevelBg_57 extends MovieClip {
public function endOfLevelBg_57(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 25
//endtext1_61 (BunnyBountySurvivalStandalone_fla.endtext1_61)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class endtext1_61 extends MovieClip {
public function endtext1_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 26
//endtext3_63 (BunnyBountySurvivalStandalone_fla.endtext3_63)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class endtext3_63 extends MovieClip {
public function endtext3_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 27
//exitButton_66 (BunnyBountySurvivalStandalone_fla.exitButton_66)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class exitButton_66 extends MovieClip {
public function exitButton_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 28
//facebookLink_67 (BunnyBountySurvivalStandalone_fla.facebookLink_67)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class facebookLink_67 extends MovieClip {
public function facebookLink_67(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 29
//fireGfx_305 (BunnyBountySurvivalStandalone_fla.fireGfx_305)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class fireGfx_305 extends MovieClip {
public function fireGfx_305(){
addFrameScript(4, frame5);
}
function frame5(){
gotoAndPlay(1);
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 30
//highscore_button_123 (BunnyBountySurvivalStandalone_fla.highscore_button_123)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class highscore_button_123 extends MovieClip {
public function highscore_button_123(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 31
//instBG_142 (BunnyBountySurvivalStandalone_fla.instBG_142)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class instBG_142 extends MovieClip {
public function instBG_142(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 32
//instruct_button_122 (BunnyBountySurvivalStandalone_fla.instruct_button_122)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class instruct_button_122 extends MovieClip {
public function instruct_button_122(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 33
//instructions_65 (BunnyBountySurvivalStandalone_fla.instructions_65)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class instructions_65 extends MovieClip {
public function instructions_65(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 34
//instScreen_141 (BunnyBountySurvivalStandalone_fla.instScreen_141)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class instScreen_141 extends MovieClip {
public var instBG:MovieClip;
public var instExitButton:MovieClip;
public function instScreen_141(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 35
//killScore_188 (BunnyBountySurvivalStandalone_fla.killScore_188)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class killScore_188 extends MovieClip {
public var scoreText:MovieClip;
public function killScore_188(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 36
//mainButtonGraphic_62 (BunnyBountySurvivalStandalone_fla.mainButtonGraphic_62)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class mainButtonGraphic_62 extends MovieClip {
public function mainButtonGraphic_62(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 37
//mainMenu_118 (BunnyBountySurvivalStandalone_fla.mainMenu_118)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class mainMenu_118 extends MovieClip {
public var menu_highscore_button:MovieClip;
public var menu_howto_button:MovieClip;
public var menu_play_button:MovieClip;
public var menu_options_button:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 38
//MainTimeline (BunnyBountySurvivalStandalone_fla.MainTimeline)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var pauseMenuButton:MovieClip;
public var creatureCount;
public var shopSelectedPrice;
public var targetMsg:MovieClip;
public var musicVol;
public var pauseMenu:MovieClip;
public var expertTargetReached;
public var moleArray;
public var weaponTypeArray;
public var foodArray;
public var optionsScreen:MovieClip;
public var colorArray;
public var soundPlayer:SoundChannel;
public var cropRetainerConstant;
public var foodDropTime;
public var currentWeapon;
public var accuracy;
public var currentStage;
public var normalTargetReached;
public var topCursor;
public var totalBounty;
public var powerupSpawn;
public var gamePause;
public var minSpawnY;
public var bulletCount;
public var gameWidth;
public var hitCount;
public var minSpawnX;
public var foreground:MovieClip;
public var soundVol;
public var finalWarning:MovieClip;
public var powerupTime;
public var creature_layer:MovieClip;
public var creatureArray;
public var stolenPenalty;
public var musicPlayer:SoundChannel;
public var foodSize;
public var colorMultiplier;
public var targetBounty:MovieClip;
public var finalWaveDone;
public var creatureTypeArray;
public var musicManager:Sound;
public var top_cursor_layer:MovieClip;
public var totalLevels;
public var xmax;
public var spawnCounter;
public var stageArray;
public var timerText:TextField;
public var stageBountyText:TextField;
public var instIndex;
public var currentSong:String;
public var food_layer:MovieClip;
public var biggestBounty;
public var ymax;
public var powerupTakenSpeed;
public var instScreen:MovieClip;
public var bunniesKilled;
public var changePhaseTimer;
public var lastColor;
public var bountyLost:MovieClip;
public var boughtWeapons;
public var newlyBought;
public var bulletArray;
public var powerupGoneTime;
public var powerupCount;
public var mole_layer:MovieClip;
public var powerup_layer:MovieClip;
public var mainMenu:MovieClip;
public var maxSpawnX;
public var maxSpawnY;
public var stageBackground:MovieClip;
public var xmin;
public var boom:MovieClip;
public var stageTimer;
public var badgeIndex;
public var previousSpawnColor;
public var shopScreen:MovieClip;
public var completeScreen:MovieClip;
public var powerupFallSpeed;
public var currentSound:String;
public var holdMouse;
public var chainer:MovieClip;
public var cursor_layer:MovieClip;
public var ymin;
public var weapCountdown:MovieClip;
public var moleCount;
public var gameComplete;
public var weaponIndicator:MovieClip;
public var cursor;
public var soundManager:Sound;
public var shopSelected;
public var gameHeight;
public var maxChain;
public var powerupBaseTime;
public var bulletsFired;
public var thisStageBounty;
public var bullet_layer:MovieClip;
public var powerupArray;
public var fullScreen;
public var bulletSpawnY;
public var bulletSpawnX;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2);
}
public function bulletFly(){
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < bulletArray.length) {
if (bulletArray[_local1] != null){
if ((((bulletArray[_local1].x == bulletArray[_local1].destX)) && ((bulletArray[_local1].y == bulletArray[_local1].destY)))){
if (!bulletArray[_local1].dying){
_local2 = hitCreature(bulletArray[_local1]);
bulletArray[_local1].dying = true;
bulletArray[_local1].gotoAndPlay("die");
if (currentWeapon != 4){
if (_local2 == 1){
playSound("boneHit");
} else {
if (!_local2){
playSound("bulletHit");
};
};
};
};
} else {
if (bulletArray[_local1].scaleX > 1){
bulletArray[_local1].scaleX = (bulletArray[_local1].scaleX - 0.2);
};
if (bulletArray[_local1].scaleY > 1){
bulletArray[_local1].scaleY = (bulletArray[_local1].scaleY - 0.2);
};
bulletArray[_local1].x = (bulletArray[_local1].x + bulletArray[_local1].xspeed);
bulletArray[_local1].y = (bulletArray[_local1].y + bulletArray[_local1].yspeed);
if (bulletArray[_local1].xspeed < 0){
if (bulletArray[_local1].x <= bulletArray[_local1].destX){
bulletArray[_local1].x = bulletArray[_local1].destX;
};
} else {
if (bulletArray[_local1].xspeed > 0){
if (bulletArray[_local1].x >= bulletArray[_local1].destX){
bulletArray[_local1].x = bulletArray[_local1].destX;
};
};
};
if (bulletArray[_local1].y <= bulletArray[_local1].destY){
bulletArray[_local1].y = bulletArray[_local1].destY;
};
};
};
_local1++;
};
}
public function pickFood(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
_local2 = 999999;
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local6 = null;
_local7 = findExit(_arg1);
if (!_arg1.success){
_local8 = new Array();
_local9 = 0;
while (_local9 < foodArray.length) {
if (((((!((foodArray[_local9] == null))) && (!(foodArray[_local9].taken)))) && (!(foodArray[_local9].gone)))){
_local8.push(foodArray[_local9]);
};
_local9++;
};
if (_local8.length > 0){
_local10 = 0;
while (_local10 < _local8.length) {
if (((((!((_local8[_local10] == null))) && (!(_local8[_local10].gone)))) && (!(_local8[_local10].taken)))){
_local6 = _local8[_local10];
_local3 = (_local6.x - _arg1.x);
_local4 = (_local6.y - _arg1.y);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
if (_local5 < _local2){
_local2 = _local5;
_local6 = _local8[_local10];
};
};
_local10++;
};
};
if ((((_local8.length <= 0)) && (!(_local6)))){
_local11 = 0;
while (_local11 < foodArray.length) {
if (((!((foodArray[_local11] == null))) && (!(foodArray[_local11].gone)))){
_local6 = foodArray[_local11];
_local3 = (_local6.x - _arg1.x);
_local4 = (_local6.y - _arg1.y);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
if (_local5 < _local2){
_local2 = _local5;
_local6 = foodArray[_local11];
};
};
_local11++;
};
};
};
if (_local6){
return (_local6);
};
return (_local7);
}
public function initShop(){
shopScreen.shopScreenConfirm.visible = false;
shopScreen.shopScreenConfirm.gotoAndStop(1);
shopScreen.shopItem1.buyButton.buyButtonInfo.priceText.text = (weaponTypeArray[1][4] + " Bounty Points");
shopScreen.shopItem2.buyButton.buyButtonInfo.priceText.text = (weaponTypeArray[2][4] + " Bounty Points");
shopScreen.shopItem3.buyButton.buyButtonInfo.priceText.text = (weaponTypeArray[3][4] + " Bounty Points");
shopScreen.shopItem1.buyButton.buyButtonInfo.nameText.text = weaponTypeArray[1][5];
shopScreen.shopItem2.buyButton.buyButtonInfo.nameText.text = weaponTypeArray[2][5];
shopScreen.shopItem3.buyButton.buyButtonInfo.nameText.text = weaponTypeArray[3][5];
shopScreen.shopItem1.buyButton.weapType = 1;
shopScreen.shopItem2.buyButton.weapType = 2;
shopScreen.shopItem3.buyButton.weapType = 3;
shopScreen.shopItem1.buyButton.addEventListener(MouseEvent.ROLL_OVER, rollOverBuy);
shopScreen.shopItem1.buyButton.addEventListener(MouseEvent.ROLL_OUT, rollOutBuy);
shopScreen.shopItem1.buyButton.addEventListener(MouseEvent.CLICK, buyItem);
shopScreen.shopItem2.buyButton.addEventListener(MouseEvent.CLICK, buyItem);
shopScreen.shopItem2.buyButton.addEventListener(MouseEvent.ROLL_OVER, rollOverBuy);
shopScreen.shopItem2.buyButton.addEventListener(MouseEvent.ROLL_OUT, rollOutBuy);
shopScreen.shopItem3.buyButton.addEventListener(MouseEvent.CLICK, buyItem);
shopScreen.shopItem3.buyButton.addEventListener(MouseEvent.ROLL_OVER, rollOverBuy);
shopScreen.shopItem3.buyButton.addEventListener(MouseEvent.ROLL_OUT, rollOutBuy);
}
public function collectTrash(){
var _local1:*;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
_local1 = creatureArray.length;
_local2 = 0;
while (_local2 < _local1) {
if (creatureArray[_local2] == null){
creatureArray.splice(_local2, 1);
_local1--;
};
_local2++;
};
_local1 = powerupArray.length;
_local3 = 0;
while (_local3 < _local1) {
if (powerupArray[_local3] == null){
powerupArray.splice(_local3, 1);
_local1--;
};
_local3++;
};
_local1 = bulletArray.length;
_local4 = 0;
while (_local4 < _local1) {
if (bulletArray[_local4] == null){
bulletArray.splice(_local4, 1);
_local1--;
};
_local4++;
};
_local1 = moleArray.length;
_local5 = 0;
while (_local5 < _local1) {
if (moleArray[_local5] == null){
moleArray.splice(_local5, 1);
_local1--;
};
_local5++;
};
}
public function setupCursor(){
cursor_layer.addChild(cursor);
cursor.x = stage.mouseX;
cursor.y = stage.mouseY;
cursor_layer.mouseEnabled = false;
cursor.mouseEnabled = false;
cursor.mouseChildren = false;
top_cursor_layer.addChild(topCursor);
topCursor.x = stage.mouseX;
topCursor.y = stage.mouseY;
top_cursor_layer.mouseEnabled = false;
topCursor.mouseEnabled = false;
topCursor.mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, attachTopCursor);
stage.addEventListener(MouseEvent.MOUSE_MOVE, attachCursor);
}
public function rollOutCont2(_arg1:MouseEvent){
if (((_arg1.currentTarget) && (completeScreen.continueButton2))){
completeScreen.continueButton2.gotoAndStop(1);
};
}
public function nextInstructions(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
instIndex++;
instScreen.instBG.gotoAndStop(instIndex);
if (instIndex >= 5){
instScreen.instExitButton.removeEventListener(MouseEvent.CLICK, nextInstructions);
instScreen.instExitButton.addEventListener(MouseEvent.CLICK, closeInstructions);
};
};
}
public function autoShootScreen(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if ((((((bulletCount < weaponTypeArray[currentWeapon][1])) && (!(gameComplete)))) && (!(powerup_layer.hitTestPoint(stage.mouseX, stage.mouseY, true))))){
if (currentWeapon == 4){
_local1 = new flamethrowerBullet();
_local5 = (1 + Math.round((Math.random() * 3)));
_local1.gfx.gotoAndPlay(_local5);
playSound("Flame");
} else {
_local1 = new bullet();
_local1.rotation = (Math.random() * 360);
playSound("bulletFire");
};
_local1.speedConst = weaponTypeArray[currentWeapon][2];
_local1.damage = weaponTypeArray[currentWeapon][0];
_local1.x = bulletSpawnX;
_local1.y = bulletSpawnY;
_local1.scaleX = 2;
_local1.scaleY = 2;
_local1.gone = false;
_local1.dying = false;
_local1.destX = stage.mouseX;
_local1.destY = stage.mouseY;
_local2 = (_local1.destX - _local1.x);
_local3 = (_local1.destY - _local1.y);
_local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
_local1.xspeed = ((_local2 / _local4) * _local1.speedConst);
_local1.yspeed = ((_local3 / _local4) * _local1.speedConst);
bullet_layer.addChild(_local1);
bulletArray.push(_local1);
bulletCount++;
bulletsFired++;
};
}
public function changeMusicVol(_arg1:Event){
musicVol = (optionsScreen.musicBar.thisSlider.value / 100);
musicPlayer.soundTransform = new SoundTransform(musicVol);
}
public function startLevel(){
topCursor.visible = false;
cursor.visible = false;
completeScreen.x = 9999;
completeScreen.y = 9999;
completeScreen.visible = false;
targetBounty.visible = true;
targetBounty.gotoAndPlay("normal");
}
public function attachTopCursor(_arg1:MouseEvent){
topCursor.x = _arg1.stageX;
topCursor.y = _arg1.stageY;
}
public function weaponCheck(){
var _local1:*;
_local1 = 0;
while (_local1 < boughtWeapons.length) {
if (boughtWeapons[_local1]){
switch (boughtWeapons[_local1]){
case 1:
shopScreen.shopItem1.gotoAndStop(3);
shopScreen.shopItem1.buyButton.visible = false;
break;
case 2:
shopScreen.shopItem2.gotoAndStop(3);
shopScreen.shopItem2.buyButton.visible = false;
break;
case 3:
shopScreen.shopItem3.gotoAndStop(3);
shopScreen.shopItem3.buyButton.visible = false;
break;
};
};
_local1++;
};
}
public function moveStolen(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = 0;
_local2 = (_local1 + 10);
_local3 = 0;
while (_local3 < foodArray.length) {
if (((((!((foodArray[_local3] == null))) && (foodArray[_local3].firstFall))) && ((foodArray[_local3].y < foodArray[_local3].yTarget)))){
foodArray[_local3].dropAccel = (foodArray[_local3].dropAccel + 8);
foodArray[_local3].y = (foodArray[_local3].y + foodArray[_local3].dropAccel);
if (foodArray[_local3].y >= (ymax + _local1)){
foodArray[_local3].y = (ymax + _local2);
};
if (foodArray[_local3].y >= foodArray[_local3].yTarget){
if (foodArray[_local3].y >= (ymax + _local1)){
foodArray[_local3].y = (ymax + _local2);
};
foodArray[_local3].firstFall = false;
foodArray[_local3].dropAccel = 2;
};
};
if (((((!((foodArray[_local3] == null))) && (!(foodArray[_local3].gone)))) && (foodArray[_local3].taken))){
_local4 = foodArray[_local3].taken;
if (!_local4.dead){
foodArray[_local3].dropPos = (foodArray[_local3].y + 30);
if (foodArray[_local3].dropPos >= (ymax + _local1)){
foodArray[_local3].dropPos = (ymax + _local1);
};
foodArray[_local3].x = foodArray[_local3].taken.x;
foodArray[_local3].y = (foodArray[_local3].taken.y - 30);
} else {
if (!_local4.gone){
_local5 = 2;
if (foodArray[_local3].y < foodArray[_local3].dropPos){
foodArray[_local3].y = (foodArray[_local3].y + foodArray[_local3].dropAccel);
foodArray[_local3].dropAccel = (foodArray[_local3].dropAccel + _local5);
} else {
if (foodArray[_local3].y >= (ymax + _local1)){
foodArray[_local3].y = (ymax + _local1);
};
foodArray[_local3].taken = null;
foodArray[_local3].dropAccel = _local5;
};
};
};
};
_local3++;
};
}
public function setBadge(_arg1){
var _local2:*;
_local2 = 1;
if ((((_arg1 >= 150)) && ((_arg1 < 300)))){
_local2 = 2;
} else {
if ((((_arg1 >= 300)) && ((_arg1 < 500)))){
_local2 = 3;
} else {
if ((((_arg1 >= 500)) && ((_arg1 < 700)))){
_local2 = 4;
} else {
if ((((_arg1 >= 700)) && ((_arg1 < 1000)))){
_local2 = 5;
} else {
if ((((_arg1 >= 1000)) && ((_arg1 < 1500)))){
_local2 = 6;
} else {
if ((((_arg1 >= 1500)) && ((_arg1 < 2000)))){
_local2 = 7;
} else {
if ((((_arg1 >= 2000)) && ((_arg1 < 2500)))){
_local2 = 8;
} else {
if ((((_arg1 >= 2500)) && ((_arg1 < 3000)))){
_local2 = 9;
} else {
if ((((_arg1 >= 3000)) && ((_arg1 < 3500)))){
_local2 = 10;
} else {
if ((((_arg1 >= 3500)) && ((_arg1 < 4000)))){
_local2 = 11;
} else {
if ((((_arg1 >= 4000)) && ((_arg1 < 4500)))){
_local2 = 12;
} else {
if ((((_arg1 >= 4500)) && ((_arg1 < 5000)))){
_local2 = 13;
} else {
if ((((_arg1 >= 5000)) && ((_arg1 < 6000)))){
_local2 = 14;
} else {
if ((((_arg1 >= 6000)) && ((_arg1 < 7000)))){
_local2 = 15;
} else {
if ((((_arg1 >= 7000)) && ((_arg1 < 8000)))){
_local2 = 16;
} else {
if ((((_arg1 >= 8000)) && ((_arg1 < 9000)))){
_local2 = 17;
} else {
if ((((_arg1 >= 9000)) && ((_arg1 < 10000)))){
_local2 = 18;
} else {
if ((((_arg1 >= 10000)) && ((_arg1 < 11000)))){
_local2 = 19;
} else {
if ((((_arg1 >= 11000)) && ((_arg1 < 12000)))){
_local2 = 20;
} else {
if ((((_arg1 >= 12000)) && ((_arg1 < 13000)))){
_local2 = 21;
} else {
if ((((_arg1 >= 13000)) && ((_arg1 < 15000)))){
_local2 = 22;
} else {
if ((((_arg1 >= 15000)) && ((_arg1 < 17000)))){
_local2 = 23;
} else {
if ((((_arg1 >= 17000)) && ((_arg1 < 19000)))){
_local2 = 24;
} else {
if ((((_arg1 >= 19000)) && ((_arg1 < 21000)))){
_local2 = 25;
} else {
if ((((_arg1 >= 21000)) && ((_arg1 < 23000)))){
_local2 = 26;
} else {
if ((((_arg1 >= 23000)) && ((_arg1 < 25000)))){
_local2 = 27;
} else {
if ((((_arg1 >= 25000)) && ((_arg1 < 30000)))){
_local2 = 28;
} else {
if ((((_arg1 >= 30000)) && ((_arg1 < 35000)))){
_local2 = 29;
} else {
if ((((_arg1 >= 35000)) && ((_arg1 < 40000)))){
_local2 = 30;
} else {
if ((((_arg1 >= 40000)) && ((_arg1 < 45000)))){
_local2 = 31;
} else {
if ((((_arg1 >= 45000)) && ((_arg1 < 50000)))){
_local2 = 32;
} else {
if (_arg1 >= 50000){
_local2 = 33;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
return (_local2);
}
function frame1(){
MochiAd.showPreGameAd({clip:root, id:"a691b594173d5bcd", res:"800x600"});
}
public function menuSetup(){
playMusic("silence");
gameComplete = true;
mainMenu.menu_play_button.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
mainMenu.menu_play_button.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
mainMenu.menu_play_button.addEventListener(MouseEvent.CLICK, startPlay);
mainMenu.menu_options_button.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
mainMenu.menu_options_button.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
mainMenu.menu_options_button.addEventListener(MouseEvent.CLICK, openOptions);
mainMenu.menu_howto_button.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
mainMenu.menu_howto_button.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
mainMenu.menu_howto_button.addEventListener(MouseEvent.CLICK, goToInstructions);
mainMenu.menu_highscore_button.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
mainMenu.menu_highscore_button.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
mainMenu.menu_highscore_button.addEventListener(MouseEvent.CLICK, gotoFacebook);
shopScreen.exitButton.addEventListener(MouseEvent.CLICK, resetLevel);
shopScreen.exitButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
shopScreen.exitButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
optionsScreen.optionsBackButton.addEventListener(MouseEvent.CLICK, closeOptions);
optionsScreen.optionsBackButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
optionsScreen.optionsBackButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
optionsScreen.soundBar.thisSlider.addEventListener(Event.CHANGE, changeSoundVol);
optionsScreen.musicBar.thisSlider.addEventListener(Event.CHANGE, changeMusicVol);
instScreen.instExitButton.addEventListener(MouseEvent.CLICK, nextInstructions);
instScreen.instExitButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
instScreen.instExitButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
pauseMenuButton.addEventListener(MouseEvent.CLICK, pauseGame);
pauseMenuButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
pauseMenuButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
pauseMenu.pauseResume.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
pauseMenu.pauseResume.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
pauseMenu.pauseResume.addEventListener(MouseEvent.CLICK, unpauseGame);
pauseMenu.pauseOptions.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
pauseMenu.pauseOptions.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
pauseMenu.pauseOptions.addEventListener(MouseEvent.CLICK, openOptions);
pauseMenu.pauseMain.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
pauseMenu.pauseMain.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
pauseMenu.pauseMain.addEventListener(MouseEvent.CLICK, toMainConfirm);
pauseMenu.pauseMenuConfirm.pauseMenuConfirmYes.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
pauseMenu.pauseMenuConfirm.pauseMenuConfirmYes.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
pauseMenu.pauseMenuConfirm.pauseMenuConfirmYes.addEventListener(MouseEvent.CLICK, mainConfirm);
pauseMenu.pauseMenuConfirm.pauseMenuConfirmNo.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
pauseMenu.pauseMenuConfirm.pauseMenuConfirmNo.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
pauseMenu.pauseMenuConfirm.pauseMenuConfirmNo.addEventListener(MouseEvent.CLICK, closeMainConfirm);
stage.quality = StageQuality.MEDIUM;
}
function frame2(){
finalWarning.visible = false;
instScreen.visible = false;
optionsScreen.visible = false;
completeScreen.x = 9999;
completeScreen.y = 9999;
fullScreen = false;
gameWidth = 800;
gameHeight = 550;
boughtWeapons = new Array();
stageArray = new Array();
creatureArray = new Array();
bulletArray = new Array();
cropRetainerConstant = 3;
weaponTypeArray = new Array();
creatureTypeArray = new Array();
colorArray = new Array();
foodArray = new Array();
powerupArray = new Array();
moleArray = new Array();
foodSize = 0.75;
gamePause = false;
colorMultiplier = 1;
stolenPenalty = 50;
lastColor = 0;
instIndex = 1;
spawnCounter = 1;
minSpawnY = -90;
minSpawnX = -50;
maxSpawnY = 500;
maxSpawnX = 850;
foodDropTime = 30;
bulletSpawnX = 400;
bulletSpawnY = 650;
xmin = 50;
ymin = 50;
xmax = 750;
ymax = 450;
soundVol = 1;
musicVol = 1;
soundManager = new Sound();
musicManager = new Sound();
musicPlayer = new SoundChannel();
soundPlayer = new SoundChannel();
currentSong = "";
currentSound = "";
stageArray[0] = new Array();
stageArray[0][0] = 2100;
stageArray[0][1] = 300;
stageArray[0][2] = 370;
stageArray[0][3] = 75;
stageArray[0][4] = 8;
stageArray[0][5] = 2;
stageArray[0][6] = 1;
stageArray[0][7] = 2;
stageArray[0][8] = 1;
stageArray[0][9] = 1;
stageArray[0][10] = 0;
stageArray[0][11] = 0;
stageArray[0][12] = 0;
stageArray[0][13] = 350;
stageArray[0][14] = 450;
stageArray[0][15] = 200;
stageArray[0][16] = 300;
stageArray[0][17] = 1000;
stageArray[0][18] = 0;
stageArray[0][19] = 1;
stageArray[0][20] = 0;
stageArray[1] = new Array();
stageArray[1][0] = 2100;
stageArray[1][1] = 450;
stageArray[1][2] = 650;
stageArray[1][3] = 73;
stageArray[1][4] = 9;
stageArray[1][5] = 2;
stageArray[1][6] = 1;
stageArray[1][7] = 3;
stageArray[1][8] = 1;
stageArray[1][9] = 1;
stageArray[1][10] = 0;
stageArray[1][11] = 0;
stageArray[1][12] = 0;
stageArray[1][13] = 350;
stageArray[1][14] = 450;
stageArray[1][15] = 200;
stageArray[1][16] = 300;
stageArray[1][17] = 100;
stageArray[1][18] = 200;
stageArray[1][19] = 1;
stageArray[1][20] = 0;
stageArray[2] = new Array();
stageArray[2][0] = 2100;
stageArray[2][1] = 450;
stageArray[2][2] = 650;
stageArray[2][3] = 73;
stageArray[2][4] = 9;
stageArray[2][5] = 2;
stageArray[2][6] = 1;
stageArray[2][7] = 3;
stageArray[2][8] = 1;
stageArray[2][9] = 1;
stageArray[2][10] = 1;
stageArray[2][11] = 1;
stageArray[2][12] = 250;
stageArray[2][13] = 350;
stageArray[2][14] = 450;
stageArray[2][15] = 200;
stageArray[2][16] = 300;
stageArray[2][17] = 100;
stageArray[2][18] = 250;
stageArray[2][19] = 1;
stageArray[2][20] = 0;
stageArray[3] = new Array();
stageArray[3][0] = 2100;
stageArray[3][1] = 450;
stageArray[3][2] = 650;
stageArray[3][3] = 72;
stageArray[3][4] = 9;
stageArray[3][5] = 2;
stageArray[3][6] = 2;
stageArray[3][7] = 3;
stageArray[3][8] = 1;
stageArray[3][9] = 1;
stageArray[3][10] = 2;
stageArray[3][11] = 2;
stageArray[3][12] = 250;
stageArray[3][13] = 350;
stageArray[3][14] = 450;
stageArray[3][15] = 200;
stageArray[3][16] = 300;
stageArray[3][17] = 100;
stageArray[3][18] = 300;
stageArray[3][19] = 1;
stageArray[3][20] = 0;
stageArray[4] = new Array();
stageArray[4][0] = 2100;
stageArray[4][1] = 450;
stageArray[4][2] = 650;
stageArray[4][3] = 72;
stageArray[4][4] = 10;
stageArray[4][5] = 2;
stageArray[4][6] = 2;
stageArray[4][7] = 4;
stageArray[4][8] = 2;
stageArray[4][9] = 1;
stageArray[4][10] = 1;
stageArray[4][11] = 2;
stageArray[4][12] = 300;
stageArray[4][13] = 250;
stageArray[4][14] = 550;
stageArray[4][15] = 125;
stageArray[4][16] = 275;
stageArray[4][17] = 100;
stageArray[4][18] = 350;
stageArray[4][19] = 1;
stageArray[4][20] = 0;
stageArray[5] = new Array();
stageArray[5][0] = 2100;
stageArray[5][1] = 450;
stageArray[5][2] = 650;
stageArray[5][3] = 70;
stageArray[5][4] = 10;
stageArray[5][5] = 3;
stageArray[5][6] = 3;
stageArray[5][7] = 4;
stageArray[5][8] = 2;
stageArray[5][9] = 1;
stageArray[5][10] = 1;
stageArray[5][11] = 2;
stageArray[5][12] = 300;
stageArray[5][13] = 550;
stageArray[5][14] = 125;
stageArray[5][15] = 275;
stageArray[5][16] = 300;
stageArray[5][17] = 100;
stageArray[5][18] = 400;
stageArray[5][19] = 1;
stageArray[5][20] = 0;
stageArray[6] = new Array();
stageArray[6][0] = 2100;
stageArray[6][1] = 450;
stageArray[6][2] = 650;
stageArray[6][3] = 65;
stageArray[6][4] = 11;
stageArray[6][5] = 3;
stageArray[6][6] = 3;
stageArray[6][7] = 4;
stageArray[6][8] = 3;
stageArray[6][9] = 1;
stageArray[6][10] = 3;
stageArray[6][11] = 3;
stageArray[6][12] = 400;
stageArray[6][13] = 250;
stageArray[6][14] = 550;
stageArray[6][15] = 125;
stageArray[6][16] = 275;
stageArray[6][17] = 100;
stageArray[6][18] = 450;
stageArray[6][19] = 1;
stageArray[6][20] = 0;
stageArray[7] = new Array();
stageArray[7][0] = 0;
stageArray[7][1] = 0;
stageArray[7][2] = 0;
stageArray[7][3] = 65;
stageArray[7][4] = 12;
stageArray[7][5] = 3;
stageArray[7][6] = 3;
stageArray[7][7] = 4;
stageArray[7][8] = 3;
stageArray[7][9] = 1;
stageArray[7][10] = 2;
stageArray[7][11] = 3;
stageArray[7][12] = 400;
stageArray[7][13] = 250;
stageArray[7][14] = 550;
stageArray[7][15] = 125;
stageArray[7][16] = 275;
stageArray[7][17] = 100;
stageArray[7][18] = 450;
stageArray[7][19] = 1;
stageArray[7][20] = 0;
stageArray[8] = new Array();
stageArray[8][0] = 0;
stageArray[8][1] = 0;
stageArray[8][2] = 0;
stageArray[8][3] = 64;
stageArray[8][4] = 13;
stageArray[8][5] = 3;
stageArray[8][6] = 4;
stageArray[8][7] = 4;
stageArray[8][8] = 4;
stageArray[8][9] = 1;
stageArray[8][10] = 1;
stageArray[8][11] = 3;
stageArray[8][12] = 600;
stageArray[8][13] = 250;
stageArray[8][14] = 550;
stageArray[8][15] = 125;
stageArray[8][16] = 275;
stageArray[8][17] = 105;
stageArray[8][18] = 450;
stageArray[8][19] = 1;
stageArray[8][20] = 0;
creatureTypeArray[0] = new Array();
creatureTypeArray[0][0] = 1;
creatureTypeArray[0][1] = 1;
creatureTypeArray[0][2] = 5;
creatureTypeArray[0][3] = 1.5;
creatureTypeArray[0][4] = 0.85;
creatureTypeArray[0][5] = 0;
creatureTypeArray[1] = new Array();
creatureTypeArray[1][0] = 2;
creatureTypeArray[1][1] = 1.5;
creatureTypeArray[1][2] = 10;
creatureTypeArray[1][3] = 3;
creatureTypeArray[1][4] = 0.85;
creatureTypeArray[1][5] = 40;
creatureTypeArray[2] = new Array();
creatureTypeArray[2][0] = 1;
creatureTypeArray[2][1] = 2;
creatureTypeArray[2][2] = 10;
creatureTypeArray[2][3] = 3;
creatureTypeArray[2][4] = 0.85;
creatureTypeArray[2][5] = 20;
creatureTypeArray[3] = new Array();
creatureTypeArray[3][0] = 3;
creatureTypeArray[3][1] = 2;
creatureTypeArray[3][2] = 15;
creatureTypeArray[3][3] = 2;
creatureTypeArray[3][4] = 0.85;
creatureTypeArray[3][5] = 20;
colorArray[0] = new Array();
colorArray[0][0] = 0;
colorArray[0][1] = 0;
colorArray[0][2] = 0;
colorArray[0][3] = 0;
colorArray[0][4] = 0;
colorArray[0][5] = 0;
colorArray[1] = new Array();
colorArray[1][0] = 0xFF;
colorArray[1][1] = 0;
colorArray[1][2] = 0;
colorArray[1][3] = 90;
colorArray[1][4] = 0;
colorArray[1][5] = 0;
colorArray[2] = new Array();
colorArray[2][0] = 0;
colorArray[2][1] = -180;
colorArray[2][2] = -100;
colorArray[2][3] = 90;
colorArray[2][4] = 0;
colorArray[2][5] = 0;
colorArray[3] = new Array();
colorArray[3][0] = 0;
colorArray[3][1] = 0;
colorArray[3][2] = -255;
colorArray[3][3] = 0;
colorArray[3][4] = 0;
colorArray[3][5] = 0;
totalBounty = 0;
gameComplete = false;
currentStage = 0;
totalLevels = 9;
holdMouse = false;
powerupTakenSpeed = 100;
powerupBaseTime = 300;
powerupGoneTime = 75;
powerupFallSpeed = 10;
newlyBought = -1;
badgeIndex = 1;
weaponTypeArray[0] = new Array();
weaponTypeArray[0][0] = 1;
weaponTypeArray[0][1] = 1;
weaponTypeArray[0][2] = 100;
weaponTypeArray[0][3] = 0;
weaponTypeArray[0][4] = 0;
weaponTypeArray[0][5] = "Slingshot";
weaponTypeArray[0][6] = "";
weaponTypeArray[1] = new Array();
weaponTypeArray[1][0] = 1;
weaponTypeArray[1][1] = 3;
weaponTypeArray[1][2] = 75;
weaponTypeArray[1][3] = 0;
weaponTypeArray[1][4] = 800;
weaponTypeArray[1][5] = "Automatic Slingshooter";
weaponTypeArray[1][6] = "Fire bullets at a faster rate!";
weaponTypeArray[2] = new Array();
weaponTypeArray[2][0] = 1;
weaponTypeArray[2][1] = 5;
weaponTypeArray[2][2] = 75;
weaponTypeArray[2][3] = 1;
weaponTypeArray[2][4] = 1700;
weaponTypeArray[2][5] = "Gattling Slingshooter";
weaponTypeArray[2][6] = "Hold down left-click to fire extremely fast!";
weaponTypeArray[3] = new Array();
weaponTypeArray[3][0] = 1;
weaponTypeArray[3][1] = 1;
weaponTypeArray[3][2] = 100;
weaponTypeArray[3][3] = 0;
weaponTypeArray[3][4] = 350;
weaponTypeArray[3][5] = "Crop Retainer Glue";
weaponTypeArray[3][6] = "Bunnies move slower when they carry crops!";
weaponTypeArray[4] = new Array();
weaponTypeArray[4][0] = 3;
weaponTypeArray[4][1] = 80;
weaponTypeArray[4][2] = 60;
weaponTypeArray[4][3] = 1;
weaponTypeArray[4][4] = 4500;
weaponTypeArray[4][5] = "Flame Thrower";
weaponTypeArray[4][6] = "Hold down left-click to burn those bunnies!";
weaponTypeArray[5] = new Array();
weaponTypeArray[5][0] = 0;
weaponTypeArray[5][1] = 0;
weaponTypeArray[5][2] = 0;
weaponTypeArray[5][3] = 0;
weaponTypeArray[5][4] = 0;
weaponTypeArray[5][5] = "Teleporter";
weaponTypeArray[5][6] = "Click to send all crops back to the centre!";
weaponTypeArray[6] = new Array();
weaponTypeArray[6][0] = 0;
weaponTypeArray[6][1] = 0;
weaponTypeArray[6][2] = 0;
weaponTypeArray[6][3] = 0;
weaponTypeArray[6][4] = 0;
weaponTypeArray[6][5] = "Nuke";
weaponTypeArray[6][6] = "Click to eradicate all bunnies!";
cursor = new cursorTarget();
topCursor = new mouseArrow();
Mouse.hide();
shopSelected = 0;
shopSelectedPrice = 0;
initShop();
shopScreen.x = 9999;
shopScreen.y = 9999;
finalWaveDone = false;
thisStageBounty = 0;
stageTimer = 0;
changePhaseTimer = 0;
creatureCount = 0;
currentWeapon = 0;
bulletCount = 0;
powerupTime = 0;
powerupSpawn = 0;
powerupCount = 0;
moleCount = 0;
bunniesKilled = 0;
biggestBounty = 0;
maxChain = 1;
hitCount = 0;
bulletsFired = 0;
accuracy = 0;
previousSpawnColor = 0;
normalTargetReached = false;
expertTargetReached = false;
setupCursor();
menuSetup();
stop();
addEventListener(Event.ENTER_FRAME, ongoing);
stage.addEventListener(MouseEvent.MOUSE_UP, shootScreen);
stage.addEventListener(MouseEvent.MOUSE_DOWN, holdDownMouse);
stage.addEventListener(MouseEvent.MOUSE_UP, releaseMouse);
}
public function dropPowerup(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
_local3 = new powerup();
if (newlyBought > -1){
_local5 = newlyBought;
newlyBought = -1;
} else {
_local4 = Math.round((Math.random() * (boughtWeapons.length - 1)));
_local5 = boughtWeapons[_local4];
};
_local3.powerupType = _local5;
_local3.addEventListener(MouseEvent.MOUSE_UP, clickPowerup);
_local3.powerupSprite.gotoAndStop((_local5 + 1));
_local3.falling = true;
_local3.taken = false;
_local3.dying = false;
_local3.gone = false;
_local3.fallingTargetY = (_arg2 + 50);
_local3.timer = powerupGoneTime;
_local3.xspeed = 0;
_local3.yspeed = 0;
_local3.x = _arg1;
_local3.y = _arg2;
powerup_layer.addChild(_local3);
_local3.gotoAndStop(1);
powerupArray.push(_local3);
powerupCount++;
}
public function checkKill(_arg1){
var _local2:*;
var _local3:*;
_arg1.gotHit = false;
_arg1.thisClip.gotoAndStop(1);
_arg1.xspeed = 0;
_arg1.yspeed = 0;
if (((((((!((_arg1 == null))) && (!(_arg1.dead)))) && (!(_arg1.gone)))) && ((_arg1.life <= 0)))){
if (_arg1.creatureColor == lastColor){
chainer.chainClip.colorMsg.gotoAndStop(lastColor);
colorMultiplier++;
playSound("ding");
chainer.chainClip.chainText.text = colorMultiplier;
if (colorMultiplier > maxChain){
maxChain = colorMultiplier;
};
} else {
colorMultiplier = 1;
};
if (_arg1.scaleX < 0){
_arg1.scoreGfx.scaleX = -1;
};
lastColor = _arg1.creatureColor;
_local2 = (_arg1.bounty * colorMultiplier);
if (_local2 > biggestBounty){
biggestBounty = _local2;
};
bunniesKilled++;
thisStageBounty = (thisStageBounty + _local2);
if (_arg1.creatureType == 3){
} else {
playSound("bunnyDied");
};
stageBountyText.text = thisStageBounty;
chainEffect(colorMultiplier);
_arg1.scoreGfx.scoreText.numbers.text = _local2;
_arg1.scoreGfx.gotoAndPlay("normal");
if (_arg1.success){
_arg1.success.visible = true;
_arg1.success.dropPos = (_arg1.y + 30);
if (_arg1.success.dropPos > (ymax + 50)){
_arg1.success.dropPos = (ymax + 50);
};
_arg1.success = null;
};
_arg1.dead = true;
if (currentWeapon == 4){
_arg1.thisClip.gotoAndPlay("burn");
} else {
_arg1.thisClip.gotoAndPlay("die");
};
if ((((((((powerupCount < 1)) && ((powerupTime < 1)))) && ((creatureTypeArray[_arg1.creatureType][5] > 0)))) && ((boughtWeapons.length > 0)))){
_local3 = (Math.random() * 100);
if (_local3 < creatureTypeArray[_arg1.creatureType][5]){
};
};
creatureCount--;
if (creatureCount <= 0){
creatureCount = 0;
};
};
}
public function popMole(_arg1, _arg2){
var _local3:*;
_local3 = new mole();
_local3.visible = false;
creature_layer.addChild(_local3);
moleArray.push(_local3);
_local3.x = _arg1;
_local3.y = _arg2;
_local3.scaleX = 0.5;
_local3.scaleY = 0.5;
_local3.timer = powerupGoneTime;
_local3.popping = true;
_local3.gotHit = false;
_local3.gotoAndPlay("appear");
_local3.visible = true;
moleCount++;
}
public function unpauseGame(_arg1:MouseEvent){
var _local2:*;
if (_arg1.currentTarget){
playSound("clickSound");
topCursor.visible = false;
cursor.visible = true;
gamePause = false;
pauseMenu.x = 9999;
pauseMenu.y = 9999;
pauseMenu.visible = false;
_local2 = 0;
while (_local2 < foodArray.length) {
if (((!((foodArray[_local2] == null))) && (!(foodArray[_local2].gone)))){
foodArray[_local2].play();
};
_local2++;
};
};
}
public function bulletVsCreature(_arg1, _arg2){
var _local3:*;
_local3 = false;
if (_arg1.thisClip.hitTestPoint(_arg2.x, _arg2.y, true)){
_local3 = true;
};
if (_arg1.thisClip.hitTestPoint((_arg2.x - (_arg2.width / 2)), _arg2.y, true)){
_local3 = true;
};
if (_arg1.thisClip.hitTestPoint((_arg2.x + (_arg2.width / 2)), _arg2.y, true)){
_local3 = true;
};
if (_arg1.thisClip.hitTestPoint(_arg2.x, (_arg2.y - (_arg2.height / 2)), true)){
_local3 = true;
};
if (_arg1.thisClip.hitTestPoint(_arg2.x, (_arg2.y + (_arg2.height / 2)), true)){
_local3 = true;
};
return (_local3);
}
public function nukeCreature(_arg1){
var _local2:*;
if (((((!((_arg1 == null))) && (!(_arg1.dead)))) && (!(_arg1.gone)))){
if (_arg1.scaleX < 0){
_arg1.scoreGfx.scaleX = -1;
};
lastColor = _arg1.creatureColor;
_local2 = _arg1.bounty;
if (_local2 > biggestBounty){
biggestBounty = _local2;
};
bunniesKilled++;
thisStageBounty = (thisStageBounty + _local2);
if (_arg1.creatureType == 3){
} else {
playSound("bunnyDied");
};
stageBountyText.text = thisStageBounty;
_arg1.scoreGfx.scoreText.numbers.text = _local2;
_arg1.scoreGfx.gotoAndPlay("normal");
if (_arg1.success){
_arg1.success.visible = true;
_arg1.success.dropPos = (_arg1.y + 30);
if (_arg1.success.dropPos > (ymax + 50)){
_arg1.success.dropPos = (ymax + 50);
};
_arg1.success = null;
};
_arg1.dead = true;
_arg1.thisClip.gotoAndPlay("burn");
creatureCount--;
if (creatureCount <= 0){
creatureCount = 0;
};
};
}
public function thankYou(){
completeScreen.badgePic.gotoAndStop(badgeIndex);
completeScreen.badgeName.gotoAndStop(badgeIndex);
completeScreen.facebookLink.addEventListener(MouseEvent.CLICK, gotoFacebook);
completeScreen.facebookLink.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
completeScreen.facebookLink.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
completeScreen.continueButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
completeScreen.continueButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
completeScreen.continueButton.removeEventListener(MouseEvent.CLICK, goShop);
completeScreen.continueButton.removeEventListener(MouseEvent.CLICK, startLevel);
completeScreen.continueButton.removeEventListener(MouseEvent.CLICK, gotoThankYou);
completeScreen.continueButton.addEventListener(MouseEvent.CLICK, resetGame);
}
public function spawnCreature(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
spawnCounter--;
if (((!((stageArray[currentStage] == null))) && ((spawnCounter <= 0)))){
_local1 = (stageArray[currentStage][6] + Math.round((Math.random() * (stageArray[currentStage][7] - stageArray[currentStage][6]))));
_local2 = 0;
while (_local2 < _local1) {
_local3 = stageArray[currentStage][10];
_local4 = stageArray[currentStage][11];
_local5 = stageArray[currentStage][20];
_local6 = (Math.random() * 1000);
if (_local6 < stageArray[currentStage][12]){
_local5 = (_local3 + Math.round((Math.random() * (_local4 - _local3))));
};
if (creatureCount < stageArray[currentStage][4]){
createCreature(_local5);
creatureCount++;
};
_local2++;
};
spawnCounter = (stageArray[currentStage][3] + Math.round((Math.random() * 10)));
};
}
public function releaseMouse(_arg1:MouseEvent){
holdMouse = false;
}
public function hitCreature(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = false;
_local3 = 0;
while (_local3 < creatureArray.length) {
if (((((((((((((((((!((creatureArray[_local3] == null))) && (!((_arg1 == null))))) && (!(_arg1.gone)))) && (!(creatureArray[_local3].dead)))) && (!(creatureArray[_local3].summon)))) && (!(creatureArray[_local3].gotHit)))) && (!(creatureArray[_local3].gone)))) && (bulletVsCreature(creatureArray[_local3], _arg1)))) && (!(_local2)))){
if (!creatureArray[_local3].gotHit){
hitCount++;
accuracy = (Math.round(((hitCount / bulletsFired) * 1000)) / 10);
creatureArray[_local3].gotHit = true;
creatureArray[_local3].life = (creatureArray[_local3].life - weaponTypeArray[currentWeapon][0]);
if (creatureArray[_local3].creatureType == 3){
if (currentWeapon != 4){
playSound("hitBot");
};
_local2 = 2;
} else {
if (creatureArray[_local3].life > 0){
playSound("bunnyGotHit");
};
_local2 = 1;
};
if (creatureArray[_local3].life <= 0){
creatureArray[_local3].life = 0;
};
if (creatureArray[_local3].success){
creatureArray[_local3].thisClip.gotoAndPlay("hit_shroom");
} else {
creatureArray[_local3].thisClip.gotoAndPlay("hit");
};
};
};
_local3++;
};
_local4 = 0;
while (_local4 < moleArray.length) {
if (((((((((((((((((!((moleArray[_local4] == null))) && (!((_arg1 == null))))) && (!(_arg1.gone)))) && (!(moleArray[_local4].dying)))) && ((moleArray[_local4].currentFrame == 1)))) && (!(moleArray[_local4].popping)))) && (!(moleArray[_local4].gone)))) && (bulletVsMole(moleArray[_local4], _arg1)))) && (!(_local2)))){
if (!moleArray[_local4].gotHit){
playSound("breakLock");
_local2 = 2;
moleArray[_local4].gotHit = true;
moleArray[_local4].timer = 0;
moleArray[_local4].gotoAndPlay("hit");
dropPowerup(moleArray[_local4].x, (moleArray[_local4].y - 30));
};
};
_local4++;
};
return (_local2);
}
public function playRewardMsg(){
if (colorMultiplier > 2){
if (colorMultiplier < 8){
chainer.rewardMsg.gotoAndStop((colorMultiplier - 1));
} else {
chainer.rewardMsg.gotoAndStop(7);
};
};
}
public function checkGameOver(){
var _local1:*;
var _local2:*;
_local1 = 0;
_local2 = 0;
while (_local2 < foodArray.length) {
if (foodArray[_local2] == null){
_local1++;
};
_local2++;
};
if ((((_local1 >= stageArray[currentStage][9])) && (!(gameComplete)))){
completeLevel();
};
}
public function changeSoundVol(_arg1:Event){
soundVol = (optionsScreen.soundBar.thisSlider.value / 100);
soundPlayer.soundTransform = new SoundTransform(soundVol);
}
public function setShopConfirm(){
shopScreen.shopScreenConfirm.itemName.text = weaponTypeArray[shopSelected][5];
shopScreen.shopScreenConfirm.itemDesc.text = (weaponTypeArray[shopSelected][6] + " Do you want to unlock this Power-Up?");
shopScreen.shopScreenConfirm.noButton.addEventListener(MouseEvent.CLICK, stopBuy);
shopScreen.shopScreenConfirm.noButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
shopScreen.shopScreenConfirm.noButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
shopScreen.shopScreenConfirm.yesButton.addEventListener(MouseEvent.CLICK, confirmBuy);
shopScreen.shopScreenConfirm.yesButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
shopScreen.shopScreenConfirm.yesButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
}
public function openOptions(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
optionsScreen.visible = true;
optionsScreen.x = 0;
optionsScreen.y = 0;
};
}
public function checkSteal(){
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < creatureArray.length) {
_local2 = 0;
while (_local2 < foodArray.length) {
if (((((((((((((((((((((((!((creatureArray[_local1] == null))) && (!((foodArray[_local2] == null))))) && (!(creatureArray[_local1].dead)))) && (!(creatureArray[_local1].gone)))) && (!(foodArray[_local2].porting)))) && (!(foodArray[_local2].firstFall)))) && (!(foodArray[_local2].gone)))) && (!(creatureArray[_local1].summon)))) && (!(creatureArray[_local1].success)))) && (!(creatureArray[_local1].gotHit)))) && (!(foodArray[_local2].taken)))) && (foodArray[_local2].hitTestPoint(creatureArray[_local1].x, creatureArray[_local1].y, true)))){
creatureArray[_local1].success = foodArray[_local2];
foodArray[_local2].taken = creatureArray[_local1];
foodArray[_local2].visible = false;
playSound("stealFoodSound");
creatureArray[_local1].xspeed = 0;
creatureArray[_local1].yspeed = 0;
};
_local2++;
};
_local1++;
};
}
public function rollOverThis(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("rollOverSound");
_arg1.currentTarget.gotoAndStop(2);
};
}
public function gotoFacebook(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
if (_arg1.currentTarget){
_local2 = "http://www.facebook.com/apps/application.php?id=10354845694";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_self");
};
}
public function toMainConfirm(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
pauseMenu.pauseMenuConfirm.visible = true;
};
}
public function movePowerup(){
var _local1:*;
var _local2:*;
if (powerupTime > 0){
powerupTime--;
weapCountdown.timer.scaleY = (powerupTime / powerupBaseTime);
if (powerupTime <= 0){
weapCountdown.visible = false;
weapCountdown.timer.scaleY = 1;
currentWeapon = 0;
weaponIndicator.gotoAndStop(1);
powerupTime = 0;
cursor.gotoAndStop(1);
playSound("powerdownSound");
};
};
_local1 = 0;
while (_local1 < powerupArray.length) {
if (((!((powerupArray[_local1] == null))) && (!(powerupArray[_local1].gone)))){
if (powerupArray[_local1].falling){
powerupArray[_local1].y = (powerupArray[_local1].y + powerupFallSpeed);
if (powerupArray[_local1].y >= powerupArray[_local1].fallingTargetY){
powerupArray[_local1].falling = false;
powerupArray[_local1].gotoAndPlay("floating");
};
} else {
if (powerupArray[_local1].taken){
powerupArray[_local1].x = (powerupArray[_local1].x + powerupArray[_local1].xspeed);
powerupArray[_local1].y = (powerupArray[_local1].y + powerupArray[_local1].yspeed);
if ((((powerupArray[_local1].y >= bulletSpawnY)) && (!(powerupArray[_local1].gone)))){
if (powerupCount <= 0){
powerupCount = 0;
};
if (powerupArray[_local1].powerupType < 5){
powerupTime = powerupBaseTime;
weapCountdown.visible = true;
currentWeapon = powerupArray[_local1].powerupType;
weaponIndicator.gotoAndStop((powerupArray[_local1].powerupType + 1));
if (powerupArray[_local1].powerupType == 1){
cursor.gotoAndStop(2);
} else {
if (powerupArray[_local1].powerupType == 2){
cursor.gotoAndStop(3);
};
};
} else {
if (powerupArray[_local1].powerupType == 5){
portCrops();
} else {
if (powerupArray[_local1].powerupType == 6){
boom.gotoAndPlay("explode");
playSound("nuke");
};
};
};
powerupArray[_local1].gone = true;
powerup_layer.removeChild(powerupArray[_local1]);
powerupCount--;
};
} else {
if (powerupArray[_local1].timer > 0){
powerupArray[_local1].timer--;
if (powerupArray[_local1].timer <= 0){
powerupArray[_local1].timer = 0;
powerupArray[_local1].dying = true;
powerupArray[_local1].gotoAndPlay("die");
};
};
};
};
};
_local1++;
};
_local2 = 0;
while (_local2 < moleArray.length) {
if (moleArray[_local2].timer > 0){
moleArray[_local2].timer--;
if ((((moleArray[_local2].timer <= 0)) && (!(moleArray[_local2].gotHit)))){
moleArray[_local2].timer = 0;
moleArray[_local2].dying = true;
moleArray[_local2].gotoAndPlay("hide");
};
};
_local2++;
};
}
public function createCreature(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
switch (_arg1){
case 0:
_local2 = new creatureA();
break;
case 1:
_local2 = new creatureB();
break;
case 2:
_local2 = new creatureC();
break;
case 3:
_local2 = new creatureD();
break;
};
_local2.life = creatureTypeArray[_arg1][0];
_local2.speedConst = creatureTypeArray[_arg1][1];
_local2.chaseConst = creatureTypeArray[_arg1][3];
_local2.bounty = creatureTypeArray[_arg1][2];
if (_arg1 == 2){
_local6 = new Array();
_local7 = 0;
while (_local7 < foodArray.length) {
if (((!((foodArray[_local7] == null))) && (!(foodArray[_local7].taken)))){
_local6.push(foodArray[_local7]);
};
_local7++;
};
if (_local6.length > 0){
_local5 = Math.round((Math.random() * (_local6.length - 1)));
_local4 = _local6[_local5];
} else {
_local5 = Math.round((Math.random() * (foodArray.length - 1)));
_local4 = foodArray[_local5];
};
_local2.y = Math.round(((_local4.y - 75) + (Math.random() * 150)));
_local2.x = Math.round(((_local4.x - 75) + (Math.random() * 150)));
playSound("ninjaSound");
} else {
_local8 = Math.round((100 * Math.random()));
if (_local8 < 33){
_local2.y = minSpawnY;
_local2.x = Math.round((minSpawnX + (Math.random() * (maxSpawnX - minSpawnX))));
} else {
if ((((_local8 >= 33)) && ((_local8 < 66)))){
_local2.x = maxSpawnX;
_local2.y = Math.round((minSpawnY + (Math.random() * (maxSpawnY - minSpawnY))));
} else {
if (_local8 >= 66){
_local2.x = minSpawnX;
_local2.y = Math.round((minSpawnY + (Math.random() * (maxSpawnY - minSpawnY))));
};
};
};
};
_local3 = generateRandomColor();
_local2.creatureColor = _local3;
_local2.creatureType = _arg1;
_local2.facing = (Math.random() * 360);
_local2.xspeed = 0;
_local2.yspeed = 0;
_local2.summon = true;
_local2.success = null;
_local2.behave = 0;
_local2.gotHit = false;
_local2.dead = false;
_local2.gone = false;
_local2.scaleX = creatureTypeArray[_arg1][4];
_local2.scaleY = creatureTypeArray[_arg1][4];
creature_layer.addChild(_local2);
_local2.thisClip.red = colorArray[(_local3 - 1)][0];
_local2.thisClip.green = colorArray[(_local3 - 1)][1];
_local2.thisClip.blue = colorArray[(_local3 - 1)][2];
_local2.thisClip.faceRed = colorArray[(_local3 - 1)][3];
_local2.thisClip.faceGreen = colorArray[(_local3 - 1)][4];
_local2.thisClip.faceBlue = colorArray[(_local3 - 1)][5];
_local2.thisClip.gotoAndPlay("summon");
creatureArray.push(_local2);
}
public function wrathOfGod(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = 0;
while (_local1 < creatureArray.length) {
if (creatureArray[_local1] != null){
if (((!(creatureArray[_local1].gone)) && (!(creatureArray[_local1].dead)))){
creatureArray[_local1].gone = true;
creature_layer.removeChild(creatureArray[_local1]);
};
creatureArray[_local1] = null;
};
_local1++;
};
creatureArray = new Array();
_local2 = 0;
while (_local2 < bulletArray.length) {
if (bulletArray[_local2] != null){
if (!bulletArray[_local2].gone){
bulletArray[_local2].gone = true;
bullet_layer.removeChild(bulletArray[_local2]);
};
bulletArray[_local2] = null;
};
_local2++;
};
bulletArray = new Array();
_local3 = 0;
while (_local3 < foodArray.length) {
if (foodArray[_local3] != null){
if (!foodArray[_local3].gone){
foodArray[_local3].gone = true;
food_layer.removeChild(foodArray[_local3]);
};
foodArray[_local3] = null;
};
_local3++;
};
foodArray = new Array();
_local4 = 0;
while (_local4 < powerupArray.length) {
if (powerupArray[_local4] != null){
if (!powerupArray[_local4].gone){
powerupArray[_local4].gone = true;
powerup_layer.removeChild(powerupArray[_local4]);
};
powerupArray[_local4] = null;
};
_local4++;
};
powerupArray = new Array();
_local5 = 0;
while (_local5 < moleArray.length) {
if (moleArray[_local5] != null){
if (!moleArray[_local5].gone){
moleArray[_local5].gone = true;
creature_layer.removeChild(moleArray[_local5]);
};
moleArray[_local5] = null;
};
_local5++;
};
moleArray = new Array();
}
public function shootScreen(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if ((((((((weaponTypeArray[currentWeapon][3] < 1)) && ((bulletCount < weaponTypeArray[currentWeapon][1])))) && (!(gameComplete)))) && (!(powerup_layer.hitTestPoint(stage.mouseX, stage.mouseY, true))))){
_local2 = new bullet();
_local2.speedConst = weaponTypeArray[currentWeapon][2];
_local2.damage = weaponTypeArray[currentWeapon][0];
_local2.x = bulletSpawnX;
_local2.y = bulletSpawnY;
_local2.scaleX = 2;
_local2.scaleY = 2;
_local2.gone = false;
_local2.dying = false;
_local2.destX = stage.mouseX;
_local2.destY = stage.mouseY;
_local3 = (_local2.destX - _local2.x);
_local4 = (_local2.destY - _local2.y);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
_local2.xspeed = ((_local3 / _local5) * _local2.speedConst);
_local2.yspeed = ((_local4 / _local5) * _local2.speedConst);
_local2.rotation = (Math.random() * 360);
bullet_layer.addChild(_local2);
bulletArray.push(_local2);
playSound("bulletFire");
bulletCount++;
bulletsFired++;
};
}
public function closeOptions(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
optionsScreen.x = 9999;
optionsScreen.y = 9999;
optionsScreen.visible = false;
};
}
public function closeMainConfirm(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
pauseMenu.pauseMenuConfirm.visible = false;
};
}
public function kickStart(){
var _local1:*;
cursor.visible = true;
targetBounty.visible = false;
gameComplete = false;
gamePause = false;
_local1 = 1;
}
public function playWarning(){
finalWarning.visible = true;
finalWarning.gotoAndPlay(2);
}
public function createPowerup(){
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = 0;
_local2 = 0;
powerupSpawn++;
if (((!((stageArray[currentStage] == null))) && ((powerupSpawn >= stageArray[currentStage][17])))){
powerupSpawn = Math.round((((Math.random() * 10) / 100) * powerupSpawn));
_local3 = (Math.random() * 1000);
if (_local3 < stageArray[currentStage][18]){
if ((((((((powerupCount < 1)) && ((moleCount < 1)))) && ((powerupTime < 1)))) && ((boughtWeapons.length > 0)))){
_local1 = (100 + Math.round((Math.random() * 500)));
_local2 = (100 + Math.round((Math.random() * 300)));
popMole(_local1, _local2);
};
};
};
}
public function rollOverBuy(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("rollOverSound");
_arg1.currentTarget.buyButtonInfo.visible = false;
_arg1.currentTarget.gotoAndStop(2);
};
}
public function completeLevel(){
var _local1:*;
topCursor.visible = true;
totalBounty = (totalBounty + thisStageBounty);
completeScreen.gotoAndStop(2);
gameComplete = true;
completeScreen.bountyPtsText.visible = true;
completeScreen.earningsText.text = thisStageBounty;
completeScreen.bunniesKilledText.text = bunniesKilled;
completeScreen.maxChainText.text = maxChain;
completeScreen.biggestBountyText.text = biggestBounty;
completeScreen.accuracyText.text = (accuracy + "%");
completeScreen.totalTimeText.text = stageTimer;
_local1 = ((((Math.round(accuracy) + Math.round((stageTimer / 50))) + Math.round((maxChain * 10))) + Math.round(biggestBounty)) + Math.round(bunniesKilled));
totalBounty = (totalBounty + _local1);
completeScreen.stageBountyText.text = totalBounty;
badgeIndex = setBadge(totalBounty);
completeScreen.visible = true;
completeScreen.x = 400;
completeScreen.y = 300;
}
public function resetGame(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
wrathOfGod();
mainMenu.visible = true;
mainMenu.x = 0;
mainMenu.y = 0;
mainReset();
};
}
public function stopTime(){
var _local1:*;
_local1 = 0;
while (_local1 < creatureArray.length) {
if (((((((!((creatureArray[_local1] == null))) && (!(creatureArray[_local1].gone)))) && (!(creatureArray[_local1].summon)))) && (!(creatureArray[_local1].dead)))){
creatureArray[_local1].thisClip.gotoAndStop(1);
creatureArray[_local1].yspeed = 0;
creatureArray[_local1].xspeed = 0;
};
_local1++;
};
gamePause = true;
}
public function attachCursor(_arg1:MouseEvent){
cursor.x = _arg1.stageX;
cursor.y = _arg1.stageY;
}
public function firstPlay(){
mainReset();
setupStage();
mainMenu.x = 9999;
mainMenu.y = 9999;
mainMenu.visible = false;
}
public function playSound(_arg1:String){
var _local2:*;
if (_arg1 == "bunnyDied"){
_local2 = (Math.random() * 1050);
if (_local2 < 55){
soundManager = new chipmunkdie1();
} else {
if ((((_local2 >= 55)) && ((_local2 < 110)))){
soundManager = new chipmunkdie2();
} else {
if ((((_local2 >= 110)) && ((_local2 < 165)))){
soundManager = new chipmunkdie3();
} else {
if ((((_local2 >= 165)) && ((_local2 < 220)))){
soundManager = new chipmunkdie4();
} else {
if ((((_local2 >= 220)) && ((_local2 < 275)))){
soundManager = new chipmunkdie5();
} else {
if ((((_local2 >= 275)) && ((_local2 < 330)))){
soundManager = new chipmunkdie6();
} else {
if ((((_local2 >= 330)) && ((_local2 < 385)))){
soundManager = new chipmunkdie7();
} else {
if ((((_local2 >= 440)) && ((_local2 < 495)))){
soundManager = new chipmunkdie8();
} else {
if ((((_local2 >= 495)) && ((_local2 < 550)))){
soundManager = new chipmunkdie9();
} else {
if ((((_local2 >= 550)) && ((_local2 < 605)))){
soundManager = new chipmunkhurt1();
} else {
if ((((_local2 >= 605)) && ((_local2 < 660)))){
soundManager = new chipmunkhurt2();
} else {
if ((((_local2 >= 660)) && ((_local2 < 715)))){
soundManager = new chipmunkhurt3();
} else {
if ((((_local2 >= 715)) && ((_local2 < 770)))){
soundManager = new chipmunkhurt4();
} else {
if ((((_local2 >= 770)) && ((_local2 < 825)))){
soundManager = new chipmunkhurt5();
} else {
if ((((_local2 >= 825)) && ((_local2 < 880)))){
soundManager = new chipmunkhurt6();
} else {
if ((((_local2 >= 880)) && ((_local2 < 935)))){
soundManager = new chipmunkhurt7();
} else {
if ((((_local2 >= 935)) && ((_local2 < 990)))){
soundManager = new chipmunkhurt8();
} else {
soundManager = new chipmunkhurt9();
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
} else {
if (_arg1 == "bunnyGotHit"){
_local2 = (Math.random() * 1000);
if (_local2 < 111){
soundManager = new chipmunkhurt1();
} else {
if ((((_local2 >= 111)) && ((_local2 < 222)))){
soundManager = new chipmunkhurt2();
} else {
if ((((_local2 >= 222)) && ((_local2 < 333)))){
soundManager = new chipmunkhurt3();
} else {
if ((((_local2 >= 333)) && ((_local2 < 444)))){
soundManager = new chipmunkhurt4();
} else {
if ((((_local2 >= 444)) && ((_local2 < 555)))){
soundManager = new chipmunkhurt5();
} else {
if ((((_local2 >= 555)) && ((_local2 < 666)))){
soundManager = new chipmunkhurt6();
} else {
if ((((_local2 >= 666)) && ((_local2 < 777)))){
soundManager = new chipmunkhurt7();
} else {
if ((((_local2 >= 777)) && ((_local2 < 888)))){
soundManager = new chipmunkhurt8();
} else {
soundManager = new chipmunkhurt9();
};
};
};
};
};
};
};
};
} else {
if (_arg1 == "finalWave"){
soundManager = new FinalWave();
} else {
if (_arg1 == "breakLock"){
soundManager = new impact10();
} else {
if (_arg1 == "openLock"){
soundManager = new unlock2();
} else {
if (_arg1 == "nuke"){
soundManager = new explode3();
} else {
if (_arg1 == "bulletFire"){
soundManager = new whip();
} else {
if (_arg1 == "Flame"){
soundManager = new Flame2();
} else {
if (_arg1 == "bulletHit"){
soundManager = new impact4();
} else {
if (_arg1 == "boneHit"){
soundManager = new impact8();
} else {
if (_arg1 == "bulletFlySound"){
soundManager = new bulletFlySound();
} else {
if (_arg1 == "stealFoodSound"){
soundManager = new stealFoodSound();
} else {
if (_arg1 == "foodStolenSound"){
soundManager = new foodStolenSound();
} else {
if (_arg1 == "rollOverSound"){
soundManager = new rollSound();
} else {
if (_arg1 == "clickSound"){
soundManager = new clickSound2();
} else {
if (_arg1 == "ding"){
soundManager = new dingSound1();
if (colorMultiplier == 3){
soundManager = new dingSound2();
} else {
if (colorMultiplier == 4){
soundManager = new dingSound3();
} else {
if (colorMultiplier == 5){
soundManager = new dingSound4();
} else {
if (colorMultiplier == 6){
soundManager = new dingSound5();
} else {
if (colorMultiplier == 7){
soundManager = new dingSound6();
} else {
if (colorMultiplier >= 8){
soundManager = new dingSound7();
};
};
};
};
};
};
} else {
if (_arg1 == "powerupSound"){
soundManager = new powerupSound2();
} else {
if (_arg1 == "powerdownSound"){
soundManager = new powerdownSound2();
} else {
if (_arg1 == "cashSound"){
soundManager = new cashSound();
} else {
if (_arg1 == "cheerSound"){
soundManager = new cheerSound2();
} else {
if (_arg1 == "ninjaSound"){
soundManager = new ninjaSound2();
} else {
if (_arg1 == "barbarianSound"){
soundManager = new barbarianSound1();
} else {
if (_arg1 == "hitBot"){
soundManager = new impact5();
} else {
if (_arg1 == "killBot"){
soundManager = new explosion2();
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
soundPlayer = soundManager.play();
soundPlayer.soundTransform = new SoundTransform(soundVol);
}
public function checkComplete(){
stageTimer++;
timerText.text = stageTimer;
changePhaseTimer++;
if (changePhaseTimer > 1000){
nextStage();
};
}
public function findExit(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
_local6 = 999999;
_local7 = null;
_local8 = new Array();
_local9 = new Object();
_local10 = new Object();
_local11 = new Object();
_local12 = new Object();
_local9.x = -100;
_local9.y = _arg1.y;
_local8.push(_local9);
_local10.y = -100;
_local10.x = _arg1.x;
_local8.push(_local10);
_local11.x = (gameWidth + 100);
_local11.y = _arg1.y;
_local8.push(_local11);
_local13 = 0;
while (_local13 < _local8.length) {
_local4 = _local8[_local13];
_local2 = (_local4.x - _arg1.x);
_local3 = (_local4.y - _arg1.y);
_local5 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
if (_local5 < _local6){
_local6 = _local5;
_local7 = _local4;
};
_local13++;
};
return (_local7);
}
public function setupStage(){
pauseMenu.pauseMenuConfirm.visible = false;
pauseMenu.x = 9999;
pauseMenu.y = 9999;
weapCountdown.visible = false;
pauseMenu.visible = false;
shopScreen.x = 9999;
shopScreen.y = 9999;
shopScreen.visible = false;
topCursor.visible = true;
cursor.gotoAndStop(1);
creatureArray = new Array();
foodArray = new Array();
bulletArray = new Array();
powerupArray = new Array();
moleArray = new Array();
finalWarning.visible = false;
gameComplete = true;
finalWaveDone = false;
currentWeapon = 0;
powerupSpawn = 0;
weaponIndicator.gotoAndStop(1);
bulletCount = 0;
powerupCount = 0;
moleCount = 0;
powerupTime = 0;
thisStageBounty = 0;
bunniesKilled = 0;
normalTargetReached = false;
expertTargetReached = false;
maxChain = 1;
hitCount = 0;
bulletsFired = 0;
accuracy = 0;
biggestBounty = 0;
stageTimer = 0;
changePhaseTimer = 0;
creatureCount = 0;
spawnCounter = 1;
lastColor = 0;
previousSpawnColor = 0;
colorMultiplier = 1;
stageBountyText.text = thisStageBounty;
stageBackground.gotoAndStop(1);
timerText.text = stageTimer;
createStageFood();
startLevel();
}
public function gotoFull(_arg1:MouseEvent){
if (_arg1.currentTarget){
if (!fullScreen){
playSound("clickSound");
optionsScreen.fullScreenCheckBox.fullScreenCheck.gotoAndStop(2);
fullScreen = true;
stage.quality = StageQuality.LOW;
fscommand("fullscreen", "true");
} else {
playSound("clickSound");
optionsScreen.fullScreenCheckBox.fullScreenCheck.gotoAndStop(1);
fullScreen = false;
stage.quality = StageQuality.MEDIUM;
fscommand("fullscreen", "false");
};
};
}
public function bulletVsMole(_arg1, _arg2){
var _local3:*;
_local3 = false;
if (_arg1.hitTestPoint(_arg2.x, _arg2.y, true)){
_local3 = true;
};
if (_arg1.hitTestPoint((_arg2.x - (_arg2.width / 2)), _arg2.y, true)){
_local3 = true;
};
if (_arg1.hitTestPoint((_arg2.x + (_arg2.width / 2)), _arg2.y, true)){
_local3 = true;
};
if (_arg1.hitTestPoint(_arg2.x, (_arg2.y - (_arg2.height / 2)), true)){
_local3 = true;
};
if (_arg1.hitTestPoint(_arg2.x, (_arg2.y + (_arg2.height / 2)), true)){
_local3 = true;
};
return (_local3);
}
public function startPlay(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
firstPlay();
};
}
public function buyItem(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
shopSelected = _arg1.currentTarget.weapType;
shopSelectedPrice = weaponTypeArray[shopSelected][4];
shopScreen.shopScreenConfirm.gotoAndStop(2);
shopScreen.shopScreenConfirm.gotoAndStop(1);
shopScreen.shopScreenConfirm.visible = true;
};
}
public function cleanUp(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = 0;
while (_local1 < creatureArray.length) {
if (creatureArray[_local1] != null){
if (((!(creatureArray[_local1].dead)) && ((((((((creatureArray[_local1].x <= -100)) || ((creatureArray[_local1].y <= -100)))) || ((creatureArray[_local1].x >= (gameWidth + 100))))) || ((creatureArray[_local1].y >= (gameHeight + 100))))))){
if (creatureArray[_local1].success){
creatureArray[_local1].success = null;
};
creatureArray[_local1].dead = true;
creatureArray[_local1].thisClip.gotoAndPlay("die");
creatureCount--;
if (creatureCount <= 0){
creatureCount = 0;
};
};
if (creatureArray[_local1].gone){
creatureArray[_local1] = null;
};
};
_local1++;
};
_local2 = 0;
while (_local2 < foodArray.length) {
if (foodArray[_local2] != null){
if (((!(foodArray[_local2].gone)) && ((((((foodArray[_local2].x <= -90)) || ((foodArray[_local2].y <= -100)))) || ((foodArray[_local2].x >= (gameWidth + 90))))))){
if (foodArray[_local2].taken){
foodArray[_local2].taken = null;
};
playSound("foodStolenSound");
if ((((stageArray[currentStage][8] > 1)) && ((stageArray[currentStage][9] > 1)))){
thisStageBounty = (thisStageBounty - stolenPenalty);
if (thisStageBounty <= 0){
thisStageBounty = 0;
};
bountyLost.bountyLostGfx.bountyLostText.text = ("-" + stolenPenalty);
bountyLost.gotoAndPlay("move");
stageBountyText.text = thisStageBounty;
};
foodArray[_local2].gone = true;
food_layer.removeChild(foodArray[_local2]);
};
if (foodArray[_local2].gone){
foodArray[_local2] = null;
};
};
_local2++;
};
_local3 = 0;
while (_local3 < bulletArray.length) {
if (((!((bulletArray[_local3] == null))) && (bulletArray[_local3].gone))){
bulletCount--;
if (bulletCount <= 0){
bulletCount = 0;
};
bulletArray[_local3] = null;
};
_local3++;
};
_local4 = 0;
while (_local4 < powerupArray.length) {
if (((!((powerupArray[_local4] == null))) && (powerupArray[_local4].gone))){
powerupCount--;
if (powerupCount <= 0){
powerupCount = 0;
};
powerupArray[_local4] = null;
};
_local4++;
};
_local5 = 0;
while (_local5 < moleArray.length) {
if (((!((moleArray[_local5] == null))) && (moleArray[_local5].gone))){
moleCount--;
if (moleCount <= 0){
moleCount = 0;
};
moleArray[_local5] = null;
};
_local5++;
};
}
public function mainConfirm(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
wrathOfGod();
topCursor.visible = true;
gameComplete = true;
mainReset();
mainMenu.visible = true;
mainMenu.x = 0;
mainMenu.y = 0;
};
}
public function goToInstructions(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
instScreen.instBG.gotoAndStop(instIndex);
instScreen.visible = true;
instScreen.x = 0;
instScreen.y = 0;
};
}
public function rollOverCont2(_arg1:MouseEvent){
if (((_arg1.currentTarget) && (completeScreen.continueButton2))){
playSound("rollOverSound");
completeScreen.continueButton2.gotoAndStop(2);
};
}
public function damnation(){
var _local1:*;
_local1 = 0;
while (_local1 < creatureArray.length) {
if (((((((!((creatureArray[_local1] == null))) && (!(creatureArray[_local1].gone)))) && (!(creatureArray[_local1].summon)))) && (!(creatureArray[_local1].dead)))){
nukeCreature(creatureArray[_local1]);
};
_local1++;
};
gamePause = false;
}
public function changeEndText(){
completeScreen.continueButton.removeEventListener(MouseEvent.CLICK, goShop);
completeScreen.continueButton.removeEventListener(MouseEvent.CLICK, startLevel);
completeScreen.continueButton.removeEventListener(MouseEvent.CLICK, gotoThankYou);
completeScreen.continueButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
completeScreen.continueButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
completeScreen.continueButton.addEventListener(MouseEvent.CLICK, gotoThankYou);
}
public function createStageFood(){
var _local1:*;
_local1 = 0;
while (_local1 < stageArray[currentStage][8]) {
createFood();
_local1++;
};
}
public function quitGame(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
fscommand("quit");
};
}
public function rotationCalc(_arg1:Number, _arg2:Number):Number{
return ((((Math.atan2(_arg2, _arg1) * 180) / Math.PI) + 90));
}
public function depthSwap(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = null;
_local2 = null;
_local3 = new Array();
_local3 = creatureArray.concat(moleArray);
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = 0;
while (_local5 < _local3.length) {
if (((((((((((!((_local3[_local5] == null))) && (!((_local3[_local4] == null))))) && (creature_layer.contains(_local3[_local5])))) && (creature_layer.contains(_local3[_local4])))) && (!((_local3[_local5] == _local3[_local4]))))) && (_local3[_local5].hitTestObject(_local3[_local4])))){
if (_local3[_local5].y > _local3[_local4].y){
_local1 = creature_layer.getChildIndex(_local3[_local5]);
_local2 = creature_layer.getChildIndex(_local3[_local4]);
if (_local1 < _local2){
creature_layer.swapChildren(_local3[_local5], _local3[_local4]);
};
} else {
_local1 = creature_layer.getChildIndex(_local3[_local4]);
_local2 = creature_layer.getChildIndex(_local3[_local5]);
if (_local1 < _local2){
creature_layer.swapChildren(_local3[_local4], _local3[_local5]);
};
};
};
_local5++;
};
_local4++;
};
}
public function pauseGame(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
if (_arg1.currentTarget){
playSound("clickSound");
topCursor.visible = true;
cursor.visible = false;
_local2 = 0;
while (_local2 < creatureArray.length) {
if (((((((!((creatureArray[_local2] == null))) && (!(creatureArray[_local2].gone)))) && (!(creatureArray[_local2].summon)))) && (!(creatureArray[_local2].dead)))){
creatureArray[_local2].thisClip.gotoAndStop(1);
creatureArray[_local2].yspeed = 0;
creatureArray[_local2].xspeed = 0;
};
_local2++;
};
_local3 = 0;
while (_local3 < foodArray.length) {
if (((!((foodArray[_local3] == null))) && (!(foodArray[_local3].gone)))){
foodArray[_local3].gotoAndStop(1);
};
_local3++;
};
gamePause = true;
pauseMenu.visible = true;
pauseMenu.x = 0;
pauseMenu.y = 0;
};
}
public function mainReset(){
completeScreen.gotoAndStop(1);
badgeIndex = 1;
currentStage = 0;
shopSelected = 0;
totalBounty = 0;
newlyBought = -1;
shopSelectedPrice = 0;
boughtWeapons = new Array();
}
public function holdDownMouse(_arg1:MouseEvent){
holdMouse = true;
}
public function chaseTarget(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if ((((_arg1.xspeed == 0)) && ((_arg1.yspeed == 0)))){
if (_arg1.success){
_arg1.thisClip.gotoAndPlay("move_shroom");
} else {
_arg1.thisClip.gotoAndPlay("move_normal");
};
};
_local4 = (_arg2.x - _arg1.x);
_local5 = (_arg2.y - _arg1.y);
_local6 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
_arg1.facing = rotationCalc(_local4, _local5);
if (_arg1.facing <= 0){
_arg1.facing = (360 + _arg1.facing);
};
if (_arg1.facing < 180){
_arg1.scaleX = -(creatureTypeArray[_arg1.creatureType][4]);
} else {
_arg1.scaleX = creatureTypeArray[_arg1.creatureType][4];
};
if (_arg1.success){
_local3 = _arg1.speedConst;
} else {
_local3 = _arg1.chaseConst;
};
_arg1.xspeed = ((_local4 / _local6) * _local3);
_arg1.yspeed = ((_local5 / _local6) * _local3);
}
public function stopBuy(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
shopScreen.shopScreenConfirm.visible = false;
};
}
public function moveCreature(){
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < creatureArray.length) {
if (((((((((!((creatureArray[_local1] == null))) && (!(creatureArray[_local1].dead)))) && (!(creatureArray[_local1].gotHit)))) && (!(creatureArray[_local1].gone)))) && (!(creatureArray[_local1].summon)))){
_local2 = pickFood(creatureArray[_local1]);
if (_local2 != null){
chaseTarget(creatureArray[_local1], _local2);
};
if ((((creatureArray[_local1].x > -100)) && ((creatureArray[_local1].xspeed < 0)))){
if ((((currentWeapon == 3)) && (creatureArray[_local1].success))){
creatureArray[_local1].x = (creatureArray[_local1].x + (creatureArray[_local1].xspeed / cropRetainerConstant));
} else {
creatureArray[_local1].x = (creatureArray[_local1].x + creatureArray[_local1].xspeed);
};
};
if ((((creatureArray[_local1].x < (gameWidth + 100))) && ((creatureArray[_local1].xspeed > 0)))){
if ((((currentWeapon == 3)) && (creatureArray[_local1].success))){
creatureArray[_local1].x = (creatureArray[_local1].x + (creatureArray[_local1].xspeed / cropRetainerConstant));
} else {
creatureArray[_local1].x = (creatureArray[_local1].x + creatureArray[_local1].xspeed);
};
};
if ((((creatureArray[_local1].y > -100)) && ((creatureArray[_local1].yspeed < 0)))){
if ((((currentWeapon == 3)) && (creatureArray[_local1].success))){
creatureArray[_local1].y = (creatureArray[_local1].y + (creatureArray[_local1].yspeed / cropRetainerConstant));
} else {
creatureArray[_local1].y = (creatureArray[_local1].y + creatureArray[_local1].yspeed);
};
};
if ((((creatureArray[_local1].y < (gameHeight + 100))) && ((creatureArray[_local1].yspeed > 0)))){
if ((((currentWeapon == 3)) && (creatureArray[_local1].success))){
creatureArray[_local1].y = (creatureArray[_local1].y + (creatureArray[_local1].yspeed / cropRetainerConstant));
} else {
creatureArray[_local1].y = (creatureArray[_local1].y + creatureArray[_local1].yspeed);
};
};
};
_local1++;
};
}
public function rollOutBuy(_arg1:MouseEvent){
if (_arg1.currentTarget){
_arg1.currentTarget.gotoAndStop(1);
_arg1.currentTarget.buyButtonInfo.visible = true;
};
}
public function setShopContinue(){
shopScreen.shopScreenConfirm.itemName.text = weaponTypeArray[shopSelected][5];
shopScreen.shopScreenConfirm.noButton.addEventListener(MouseEvent.CLICK, stopBuy);
shopScreen.shopScreenConfirm.noButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
shopScreen.shopScreenConfirm.noButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
}
public function shopCashCheck(){
if (totalBounty < weaponTypeArray[1][4]){
shopScreen.shopItem1.gotoAndStop(2);
shopScreen.shopItem1.buyButton.visible = false;
} else {
shopScreen.shopItem1.gotoAndStop(1);
shopScreen.shopItem1.buyButton.visible = true;
};
if (totalBounty < weaponTypeArray[2][4]){
shopScreen.shopItem2.gotoAndStop(2);
shopScreen.shopItem2.buyButton.visible = false;
} else {
shopScreen.shopItem2.gotoAndStop(1);
shopScreen.shopItem2.buyButton.visible = true;
};
if (totalBounty < weaponTypeArray[3][4]){
shopScreen.shopItem3.gotoAndStop(2);
shopScreen.shopItem3.buyButton.visible = false;
} else {
shopScreen.shopItem3.gotoAndStop(1);
shopScreen.shopItem3.buyButton.visible = true;
};
}
public function insertHighScore(_arg1, _arg2){
var _local3:URLRequest;
var _local4:URLVariables;
var _local5:URLLoader;
_local3 = new URLRequest("submitscore.php");
_local4 = new URLVariables();
_local4.score = _arg1;
_local4.badge = _arg2;
_local3.data = _local4;
_local3.method = URLRequestMethod.POST;
_local5 = new URLLoader(_local3);
}
public function gotoThankYou(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
wrathOfGod();
completeScreen.gotoAndStop(5);
};
}
public function playMusic(_arg1:String){
if (_arg1 == "silence"){
musicManager = new silence();
currentSong = _arg1;
};
if (musicPlayer){
musicPlayer.stop();
};
musicPlayer = musicManager.play(0, 100000);
musicPlayer.soundTransform = new SoundTransform(musicVol);
}
public function resetLevel(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
wrathOfGod();
setupStage();
};
}
public function createFood(){
var _local1:*;
var _local2:*;
_local2 = (Math.round((Math.random() * 2)) + 1);
switch (_local2){
case 1:
_local1 = new food();
break;
case 2:
_local1 = new food2();
break;
case 3:
_local1 = new food3();
break;
};
_local1.x = Math.round((stageArray[currentStage][13] + (Math.random() * (stageArray[currentStage][14] - stageArray[currentStage][13]))));
_local1.y = -50;
_local1.firstFall = true;
_local1.yTarget = Math.round((stageArray[currentStage][15] + (Math.random() * (stageArray[currentStage][16] - stageArray[currentStage][15]))));
_local1.gone = false;
_local1.taken = null;
_local1.porting = false;
_local1.portX = 0;
_local1.portY = 0;
_local1.foodtype = _local2;
_local1.scaleX = foodSize;
_local1.scaleY = foodSize;
_local1.dropAccel = 2;
_local1.dropPos = (_local1.y + 30);
food_layer.addChild(_local1);
foodArray.push(_local1);
}
public function ongoing(_arg1:Event){
if (!gameComplete){
if (!gamePause){
checkGameOver();
checkComplete();
if (((holdMouse) && ((weaponTypeArray[currentWeapon][3] > 0)))){
autoShootScreen();
};
bulletFly();
createPowerup();
movePowerup();
spawnCreature();
moveCreature();
depthSwap();
checkSteal();
cleanUp();
collectTrash();
};
moveStolen();
};
}
public function stageScreenSetup(){
completeScreen.instruct.gotoAndStop((currentStage + 2));
completeScreen.normalTargetText.text = stageArray[currentStage][1];
completeScreen.stageNo.text = (currentStage + 1);
completeScreen.continueButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
completeScreen.continueButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
completeScreen.continueButton.removeEventListener(MouseEvent.CLICK, goShop);
completeScreen.continueButton.removeEventListener(MouseEvent.CLICK, resetGame);
completeScreen.continueButton.addEventListener(MouseEvent.CLICK, startLevel);
}
public function confirmBuy(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
if (totalBounty >= shopSelectedPrice){
boughtWeapons.push(shopSelected);
newlyBought = shopSelected;
totalBounty = (totalBounty - shopSelectedPrice);
shopScreen.totalBountyText.text = totalBounty;
shopCashCheck();
weaponCheck();
playSound("cashSound");
shopScreen.shopScreenConfirm.gotoAndStop(2);
};
};
}
public function generateRandomColor(){
var _local1:*;
_local1 = Math.round((1 + (stageArray[currentStage][5] * Math.random())));
if (_local1 == previousSpawnColor){
return (generateRandomColor());
};
previousSpawnColor = _local1;
return (_local1);
}
public function finalSpawn(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (!gameComplete){
spawnCounter = 999999;
_local1 = (((stageArray[currentStage][6] + Math.round((Math.random() * (stageArray[currentStage][7] - stageArray[currentStage][6])))) + 1) * 2);
_local2 = 0;
while (_local2 < _local1) {
_local3 = stageArray[currentStage][10];
_local4 = stageArray[currentStage][11];
_local5 = 0;
_local6 = (Math.random() * 1000);
if (_local6 < (stageArray[currentStage][12] * 1.5)){
_local5 = (_local3 + Math.round((Math.random() * (_local4 - _local3))));
};
if (creatureCount < stageArray[currentStage][4]){
createCreature(_local5);
creatureCount++;
};
_local2++;
};
finalWaveDone = true;
};
}
public function chainEffect(_arg1){
if (_arg1 > 1){
if (chainer.currentFrame == 1){
chainer.gotoAndPlay("enter");
} else {
if (chainer.currentFrame >= 8){
chainer.gotoAndPlay("shake");
};
};
};
}
public function closeInstructions(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
instScreen.x = 9999;
instScreen.y = 9999;
instScreen.visible = false;
instIndex = 1;
instScreen.instBG.gotoAndStop(instIndex);
instScreen.instExitButton.removeEventListener(MouseEvent.CLICK, closeInstructions);
instScreen.instExitButton.addEventListener(MouseEvent.CLICK, nextInstructions);
};
}
public function clickPowerup(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
var _local4:*;
if (_arg1.currentTarget){
if (((((!(_arg1.currentTarget.falling)) && (!(_arg1.currentTarget.taken)))) && (!(_arg1.currentTarget.gone)))){
playSound("powerupSound");
_arg1.currentTarget.gotoAndStop(1);
_arg1.currentTarget.taken = true;
_local2 = (bulletSpawnX - _arg1.currentTarget.x);
_local3 = (bulletSpawnY - _arg1.currentTarget.y);
_local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
_arg1.currentTarget.xspeed = ((_local2 / _local4) * powerupTakenSpeed);
_arg1.currentTarget.yspeed = ((_local3 / _local4) * powerupTakenSpeed);
};
};
}
public function nextStage(){
var _local1:*;
var _local2:*;
changePhaseTimer = 0;
if (currentStage < (totalLevels - 1)){
currentStage++;
switch (currentStage){
case 2:
boughtWeapons.push(1);
break;
case 4:
boughtWeapons.push(5);
break;
case 5:
boughtWeapons.push(2);
break;
case 7:
boughtWeapons.push(4);
break;
case 8:
boughtWeapons.push(6);
break;
};
if (foodArray.length < stageArray[currentStage][8]){
_local1 = (stageArray[currentStage][8] - foodArray.length);
_local2 = 0;
while (_local2 < _local1) {
createFood();
_local2++;
};
};
};
}
public function rollOutThis(_arg1:MouseEvent){
if (_arg1.currentTarget){
_arg1.currentTarget.gotoAndStop(1);
};
}
public function portCrops(){
var _local1:*;
var _local2:*;
var _local3:*;
_local3 = 0;
while (_local3 < foodArray.length) {
if (((((((!((foodArray[_local3] == null))) && (!(foodArray[_local3].taken)))) && (!(foodArray[_local3].firstFall)))) && (!(foodArray[_local3].porting)))){
_local1 = (375 + Math.round((Math.random() * 50)));
_local2 = (275 + Math.round((Math.random() * 50)));
foodArray[_local3].portX = _local1;
foodArray[_local3].portY = _local2;
foodArray[_local3].porting = _local2;
foodArray[_local3].gotoAndPlay("portOut");
};
_local3++;
};
weapCountdown.visible = false;
weapCountdown.timer.scaleY = 1;
currentWeapon = 0;
weaponIndicator.gotoAndStop(1);
powerupTime = 0;
cursor.gotoAndStop(1);
}
public function gameOver(){
topCursor.visible = true;
completeScreen.gotoAndStop(1);
gameComplete = true;
completeScreen.stageBountyText.text = "They stole it!";
completeScreen.bountyPtsText.visible = false;
completeScreen.bunniesKilledText.text = bunniesKilled;
completeScreen.maxChainText.text = maxChain;
completeScreen.biggestBountyText.text = biggestBounty;
completeScreen.accuracyText.text = (accuracy + "%");
completeScreen.visible = true;
completeScreen.x = 400;
completeScreen.y = 300;
completeScreen.continueButton.addEventListener(MouseEvent.ROLL_OVER, rollOverThis);
completeScreen.continueButton.addEventListener(MouseEvent.ROLL_OUT, rollOutThis);
completeScreen.continueButton2.addEventListener(MouseEvent.ROLL_OVER, rollOverCont2);
completeScreen.continueButton2.addEventListener(MouseEvent.ROLL_OUT, rollOutCont2);
completeScreen.continueButton.addEventListener(MouseEvent.CLICK, resetGame);
completeScreen.continueButton2.addEventListener(MouseEvent.CLICK, resetLevel);
}
public function gotoHighScore(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
if (_arg1.currentTarget){
_local2 = "highscore.php?gameid=1&scoretype=today&check=global";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_self");
};
}
public function goShop(_arg1:MouseEvent){
if (_arg1.currentTarget){
playSound("clickSound");
completeScreen.x = 9999;
completeScreen.y = 9999;
completeScreen.visible = false;
shopScreen.totalBountyText.text = (totalBounty + " Bounty Points");
shopScreen.shopScreenConfirm.visible = false;
shopScreen.shopScreenConfirm.gotoAndStop(1);
shopCashCheck();
if (boughtWeapons.length > 0){
weaponCheck();
};
shopScreen.visible = true;
shopScreen.x = 0;
shopScreen.y = 0;
};
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 39
//menu_options_button_45 (BunnyBountySurvivalStandalone_fla.menu_options_button_45)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class menu_options_button_45 extends MovieClip {
public function menu_options_button_45(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 40
//newgame_button_120 (BunnyBountySurvivalStandalone_fla.newgame_button_120)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class newgame_button_120 extends MovieClip {
public function newgame_button_120(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 41
//Ninjadie_209 (BunnyBountySurvivalStandalone_fla.Ninjadie_209)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Ninjadie_209 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureBody:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 42
//Ninjahit_196 (BunnyBountySurvivalStandalone_fla.Ninjahit_196)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Ninjahit_196 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureEar2:MovieClip;
public var creatureEar1:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 43
//Ninjahitshroom_198 (BunnyBountySurvivalStandalone_fla.Ninjahitshroom_198)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Ninjahitshroom_198 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureFood:MovieClip;
public var creatureEar2:MovieClip;
public var creatureEar1:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 44
//Ninjarun_208 (BunnyBountySurvivalStandalone_fla.Ninjarun_208)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Ninjarun_208 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureEar2:MovieClip;
public var creatureEar1:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 45
//Ninjarunshroom_200 (BunnyBountySurvivalStandalone_fla.Ninjarunshroom_200)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Ninjarunshroom_200 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureFood:MovieClip;
public var creatureEar2:MovieClip;
public var creatureEar1:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 46
//Ninjastand_192 (BunnyBountySurvivalStandalone_fla.Ninjastand_192)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Ninjastand_192 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureEar2:MovieClip;
public var creatureEar1:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 47
//ninjastillfood_199 (BunnyBountySurvivalStandalone_fla.ninjastillfood_199)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class ninjastillfood_199 extends MovieClip {
public function ninjastillfood_199(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 48
//noButton_58 (BunnyBountySurvivalStandalone_fla.noButton_58)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class noButton_58 extends MovieClip {
public function noButton_58(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 49
//options_button_121 (BunnyBountySurvivalStandalone_fla.options_button_121)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class options_button_121 extends MovieClip {
public function options_button_121(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 50
//optionsBackButton_125 (BunnyBountySurvivalStandalone_fla.optionsBackButton_125)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class optionsBackButton_125 extends MovieClip {
public function optionsBackButton_125(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 51
//optionsScreen_124 (BunnyBountySurvivalStandalone_fla.optionsScreen_124)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class optionsScreen_124 extends MovieClip {
public var optionsBackButton:MovieClip;
public var soundBar:MovieClip;
public var musicBar:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 52
//pause_menu_main_button_47 (BunnyBountySurvivalStandalone_fla.pause_menu_main_button_47)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class pause_menu_main_button_47 extends MovieClip {
public function pause_menu_main_button_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 53
//pause_menu_resume_button_43 (BunnyBountySurvivalStandalone_fla.pause_menu_resume_button_43)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class pause_menu_resume_button_43 extends MovieClip {
public function pause_menu_resume_button_43(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 54
//pauseMenu_40 (BunnyBountySurvivalStandalone_fla.pauseMenu_40)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class pauseMenu_40 extends MovieClip {
public var pauseMenuConfirm:MovieClip;
public var pauseResume:MovieClip;
public var pauseMain:MovieClip;
public var pauseOptions:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 55
//pauseMenuButton_22 (BunnyBountySurvivalStandalone_fla.pauseMenuButton_22)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class pauseMenuButton_22 extends MovieClip {
public function pauseMenuButton_22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 56
//pauseMenuConfirm_49 (BunnyBountySurvivalStandalone_fla.pauseMenuConfirm_49)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class pauseMenuConfirm_49 extends MovieClip {
public var pauseMenuConfirmYes:MovieClip;
public var pauseMenuConfirmNo:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 57
//pauseNoButton_53 (BunnyBountySurvivalStandalone_fla.pauseNoButton_53)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class pauseNoButton_53 extends MovieClip {
public function pauseNoButton_53(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 58
//pauseYesButton_51 (BunnyBountySurvivalStandalone_fla.pauseYesButton_51)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class pauseYesButton_51 extends MovieClip {
public function pauseYesButton_51(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 59
//r_die_239 (BunnyBountySurvivalStandalone_fla.r_die_239)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class r_die_239 extends MovieClip {
public var creatureEar2:MovieClip;
public var creatureEar1:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
public var creatureLeg1:MovieClip;
public var creatureLeg2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 60
//r_ear_die_240 (BunnyBountySurvivalStandalone_fla.r_ear_die_240)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class r_ear_die_240 extends MovieClip {
public var creatureEar1:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 61
//r_walk_236 (BunnyBountySurvivalStandalone_fla.r_walk_236)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class r_walk_236 extends MovieClip {
public var creatureEar2:MovieClip;
public var creatureEar1:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
public var creatureLeg1:MovieClip;
public var creatureLeg2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 62
//r_walk_shroom_225 (BunnyBountySurvivalStandalone_fla.r_walk_shroom_225)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class r_walk_shroom_225 extends MovieClip {
public var creatureFood:MovieClip;
public var creatureEar2:MovieClip;
public var creatureEar1:MovieClip;
public var creatureHand1:MovieClip;
public var creatureLeg1:MovieClip;
public var creatureLeg2:MovieClip;
public var creatureHand2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 63
//realbBuyButton_110 (BunnyBountySurvivalStandalone_fla.realbBuyButton_110)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class realbBuyButton_110 extends MovieClip {
public var buyButtonInfo:MovieClip;
public function realbBuyButton_110(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 64
//rewardMsg_11 (BunnyBountySurvivalStandalone_fla.rewardMsg_11)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class rewardMsg_11 extends MovieClip {
public function rewardMsg_11(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 65
//robotfood_229 (BunnyBountySurvivalStandalone_fla.robotfood_229)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class robotfood_229 extends MovieClip {
public function robotfood_229(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 66
//robotstand_214 (BunnyBountySurvivalStandalone_fla.robotstand_214)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class robotstand_214 extends MovieClip {
public var creatureEar2:MovieClip;
public var creatureEar1:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
public var creatureLeg1:MovieClip;
public var creatureLeg2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 67
//robotstandshroom_221 (BunnyBountySurvivalStandalone_fla.robotstandshroom_221)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class robotstandshroom_221 extends MovieClip {
public var creatureFood:MovieClip;
public var creatureEar2:MovieClip;
public var creatureEar1:MovieClip;
public var creatureHand1:MovieClip;
public var creatureLeg1:MovieClip;
public var creatureLeg2:MovieClip;
public var creatureHand2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 68
//robotstillfood_222 (BunnyBountySurvivalStandalone_fla.robotstillfood_222)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class robotstillfood_222 extends MovieClip {
public function robotstillfood_222(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 69
//scoreText_189 (BunnyBountySurvivalStandalone_fla.scoreText_189)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.text.*;
public dynamic class scoreText_189 extends MovieClip {
public var numbers:TextField;
}
}//package BunnyBountySurvivalStandalone_fla
Section 70
//shopConfirm_115 (BunnyBountySurvivalStandalone_fla.shopConfirm_115)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class shopConfirm_115 extends MovieClip {
public var confirmBox:MovieClip;
public var itemName:TextField;
public var itemDesc:TextField;
public var noButton:MovieClip;
public var yesButton:MovieClip;
public function shopConfirm_115(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
MovieClip(parent.parent).setShopContinue();
}
function frame2(){
stop();
MovieClip(parent.parent).setShopContinue();
}
function frame1(){
stop();
MovieClip(parent.parent).setShopConfirm();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 71
//shopContinueButton_117 (BunnyBountySurvivalStandalone_fla.shopContinueButton_117)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class shopContinueButton_117 extends MovieClip {
public function shopContinueButton_117(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 72
//shopItem1_109 (BunnyBountySurvivalStandalone_fla.shopItem1_109)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class shopItem1_109 extends MovieClip {
public var buyButton:MovieClip;
public function shopItem1_109(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 73
//shopItem2_113 (BunnyBountySurvivalStandalone_fla.shopItem2_113)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class shopItem2_113 extends MovieClip {
public var buyButton:MovieClip;
public function shopItem2_113(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 74
//shopItem3_114 (BunnyBountySurvivalStandalone_fla.shopItem3_114)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class shopItem3_114 extends MovieClip {
public var buyButton:MovieClip;
public function shopItem3_114(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 75
//shopScreen_107 (BunnyBountySurvivalStandalone_fla.shopScreen_107)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.text.*;
public dynamic class shopScreen_107 extends MovieClip {
public var totalBountyText:TextField;
public var shopItem2:MovieClip;
public var shopItem3:MovieClip;
public var shopScreenConfirm:MovieClip;
public var shopItem1:MovieClip;
public var exitButton:MovieClip;
public function shopScreen_107(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 76
//soundBar_129 (BunnyBountySurvivalStandalone_fla.soundBar_129)
package BunnyBountySurvivalStandalone_fla {
import fl.controls.*;
import flash.display.*;
public dynamic class soundBar_129 extends MovieClip {
public var thisSlider:Slider;
public function soundBar_129(){
__setProp_thisSlider_soundBar_Layer1_1();
}
function __setProp_thisSlider_soundBar_Layer1_1(){
try {
thisSlider["componentInspectorSetting"] = true;
} catch(e:Error) {
};
thisSlider.direction = "horizontal";
thisSlider.enabled = true;
thisSlider.liveDragging = false;
thisSlider.maximum = 100;
thisSlider.minimum = 0;
thisSlider.snapInterval = 0;
thisSlider.tickInterval = 0;
thisSlider.value = 100;
thisSlider.visible = true;
try {
thisSlider["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 77
//stageBG1_1 (BunnyBountySurvivalStandalone_fla.stageBG1_1)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class stageBG1_1 extends MovieClip {
public function stageBG1_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 78
//StillFood_165 (BunnyBountySurvivalStandalone_fla.StillFood_165)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class StillFood_165 extends MovieClip {
public function StillFood_165(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 79
//Symbol1_27 (BunnyBountySurvivalStandalone_fla.Symbol1_27)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Symbol1_27 extends MovieClip {
public var timer:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 80
//targetInfoMsg_36 (BunnyBountySurvivalStandalone_fla.targetInfoMsg_36)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class targetInfoMsg_36 extends MovieClip {
public var targetBountyInfo:MovieClip;
public function targetInfoMsg_36(){
addFrameScript(0, frame1, 44, frame45);
}
function frame1(){
stop();
}
function frame45(){
stop();
gotoAndStop(1);
MovieClip(parent).kickStart();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 81
//targetMsg_20 (BunnyBountySurvivalStandalone_fla.targetMsg_20)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class targetMsg_20 extends MovieClip {
public function targetMsg_20(){
addFrameScript(0, frame1, 32, frame33, 64, frame65);
}
function frame65(){
stop();
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame33(){
stop();
gotoAndStop(1);
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 82
//warning_18 (BunnyBountySurvivalStandalone_fla.warning_18)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class warning_18 extends MovieClip {
public function warning_18(){
addFrameScript(0, frame1, 30, frame31, 85, frame86);
}
function frame86(){
this.visible = false;
gotoAndStop(1);
MovieClip(parent).finalSpawn();
}
function frame1(){
stop();
}
function frame31(){
MovieClip(parent).playSound("finalWave");
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 83
//weaponIndicator_30 (BunnyBountySurvivalStandalone_fla.weaponIndicator_30)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class weaponIndicator_30 extends MovieClip {
public function weaponIndicator_30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 84
//Vikingdie_281 (BunnyBountySurvivalStandalone_fla.Vikingdie_281)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Vikingdie_281 extends MovieClip {
public var creatureFaintHat:MovieClip;
public var creatureHat:MovieClip;
public var creatureFace:MovieClip;
public var creatureFaint:MovieClip;
public var creatureBody:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 85
//Vikinghit_256 (BunnyBountySurvivalStandalone_fla.Vikinghit_256)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Vikinghit_256 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureBody:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 86
//Vikinghitshroom_259 (BunnyBountySurvivalStandalone_fla.Vikinghitshroom_259)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Vikinghitshroom_259 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureFood:MovieClip;
public var creatureBody:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 87
//Vikingshroomwalk_261 (BunnyBountySurvivalStandalone_fla.Vikingshroomwalk_261)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Vikingshroomwalk_261 extends MovieClip {
public var creatureHat:MovieClip;
public var creatureFace:MovieClip;
public var creatureFood:MovieClip;
public var creatureBody:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
public var creatureLeg1:MovieClip;
public var creatureLeg2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 88
//Vikingstand_249 (BunnyBountySurvivalStandalone_fla.Vikingstand_249)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Vikingstand_249 extends MovieClip {
public var creatureFace:MovieClip;
public var creatureBody:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
public var creatureLeg1:MovieClip;
public var creatureLeg2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 89
//vikingstillfood_260 (BunnyBountySurvivalStandalone_fla.vikingstillfood_260)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class vikingstillfood_260 extends MovieClip {
public function vikingstillfood_260(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 90
//Vikingwalk_273 (BunnyBountySurvivalStandalone_fla.Vikingwalk_273)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class Vikingwalk_273 extends MovieClip {
public var creatureHat:MovieClip;
public var creatureFace:MovieClip;
public var creatureBody:MovieClip;
public var creatureHand2:MovieClip;
public var creatureHand1:MovieClip;
public var creatureLeg1:MovieClip;
public var creatureLeg2:MovieClip;
}
}//package BunnyBountySurvivalStandalone_fla
Section 91
//yesButton_59 (BunnyBountySurvivalStandalone_fla.yesButton_59)
package BunnyBountySurvivalStandalone_fla {
import flash.display.*;
public dynamic class yesButton_59 extends MovieClip {
public function yesButton_59(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BunnyBountySurvivalStandalone_fla
Section 92
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 93
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 94
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 95
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 96
//Slider (fl.controls.Slider)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class Slider extends UIComponent implements IFocusManagerComponent {
protected var _direction:String;
protected var _liveDragging:Boolean;// = false
protected var _value:Number;// = 0
protected var _snapInterval:Number;// = 0
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 10
protected var track:BaseButton;
protected var _tickInterval:Number;// = 0
protected var tickContainer:Sprite;
protected var thumb:BaseButton;
protected static const TICK_STYLES:Object = {upSkin:"tickSkin"};
protected static const TRACK_STYLES:Object = {upSkin:"sliderTrackSkin", overSkin:"sliderTrackSkin", downSkin:"sliderTrackSkin", disabledSkin:"sliderTrackDisabledSkin"};
protected static const THUMB_STYLES:Object = {upSkin:"thumbUpSkin", overSkin:"thumbOverSkin", downSkin:"thumbDownSkin", disabledSkin:"thumbDisabledSkin"};
protected static var defaultStyles:Object = {thumbUpSkin:"SliderThumb_upSkin", thumbOverSkin:"SliderThumb_overSkin", thumbDownSkin:"SliderThumb_downSkin", thumbDisabledSkin:"SliderThumb_disabledSkin", sliderTrackSkin:"SliderTrack_skin", sliderTrackDisabledSkin:"SliderTrack_disabledSkin", tickSkin:"SliderTick_skin", focusRectSkin:null, focusRectPadding:null};
public function Slider(){
_direction = SliderDirection.HORIZONTAL;
_minimum = 0;
_maximum = 10;
_value = 0;
_tickInterval = 0;
_snapInterval = 0;
_liveDragging = false;
super();
setStyles();
}
public function get minimum():Number{
return (_minimum);
}
public function set minimum(_arg1:Number):void{
_minimum = _arg1;
this.value = Math.max(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function positionThumb():void{
thumb.x = ((((_direction)==SliderDirection.VERTICAL) ? ((maximum - minimum) - value) : (value - minimum) / (maximum - minimum)) * _width);
}
protected function clearTicks():void{
if (((!(tickContainer)) || (!(tickContainer.parent)))){
return;
};
removeChild(tickContainer);
}
protected function onTrackClick(_arg1:MouseEvent):void{
calculateValue(track.mouseX, InteractionInputType.MOUSE, SliderEventClickTarget.TRACK);
if (!liveDragging){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.TRACK, InteractionInputType.MOUSE));
};
}
public function set maximum(_arg1:Number):void{
_maximum = _arg1;
this.value = Math.min(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get liveDragging():Boolean{
return (_liveDragging);
}
protected function doDrag(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
_local2 = (_width / snapInterval);
_local3 = track.mouseX;
calculateValue(_local3, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_DRAG, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:uint;
var _local3:Number;
var _local4:Boolean;
if (!enabled){
return;
};
_local2 = ((snapInterval)>0) ? snapInterval : 1;
_local4 = (direction == SliderDirection.HORIZONTAL);
if ((((((_arg1.keyCode == Keyboard.DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.LEFT)) && (_local4))))){
_local3 = (value - _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.RIGHT)) && (_local4))))){
_local3 = (value + _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.HOME)) && (_local4))))){
_local3 = minimum;
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.END)) && (_local4))))){
_local3 = maximum;
};
};
};
};
if (!isNaN(_local3)){
_arg1.stopPropagation();
doSetValue(_local3, InteractionInputType.KEYBOARD, null, _arg1.keyCode);
};
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
super.enabled = _arg1;
track.enabled = (thumb.enabled = _arg1);
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_PRESS, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
}
public function get snapInterval():Number{
return (_snapInterval);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_RELEASE, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
public function set liveDragging(_arg1:Boolean):void{
_liveDragging = _arg1;
}
public function set value(_arg1:Number):void{
doSetValue(_arg1);
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
_direction = _arg1;
_local2 = (_direction == SliderDirection.VERTICAL);
if (isLivePreview){
if (_local2){
setScaleY(-1);
y = track.height;
} else {
setScaleY(1);
y = 0;
};
positionThumb();
return;
};
if (((_local2) && (componentInspectorSetting))){
if ((rotation % 90) == 0){
setScaleY(-1);
};
};
if (!componentInspectorSetting){
rotation = (_local2) ? 90 : 0;
};
}
public function set tickInterval(_arg1:Number):void{
_tickInterval = _arg1;
invalidate(InvalidationType.SIZE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
track.setSize(_width, track.height);
track.drawNow();
thumb.drawNow();
};
if (tickInterval > 0){
drawTicks();
} else {
clearTicks();
};
positionThumb();
super.draw();
}
override protected function configUI():void{
super.configUI();
thumb = new BaseButton();
thumb.setSize(13, 13);
thumb.autoRepeat = false;
addChild(thumb);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
track = new BaseButton();
track.move(0, 0);
track.setSize(80, 4);
track.autoRepeat = false;
track.useHandCursor = false;
track.addEventListener(MouseEvent.CLICK, onTrackClick, false, 0, true);
addChildAt(track, 0);
}
public function set snapInterval(_arg1:Number):void{
_snapInterval = _arg1;
}
public function get value():Number{
return (_value);
}
public function get direction():String{
return (_direction);
}
public function get tickInterval():Number{
return (_tickInterval);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if ((((_direction == SliderDirection.VERTICAL)) && (!(isLivePreview)))){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
invalidate(InvalidationType.SIZE);
}
protected function drawTicks():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:uint;
var _local5:DisplayObject;
clearTicks();
tickContainer = new Sprite();
_local1 = ((maximum)<1) ? (tickInterval / 100) : tickInterval;
_local2 = ((maximum - minimum) / _local1);
_local3 = (_width / _local2);
_local4 = 0;
while (_local4 <= _local2) {
_local5 = getDisplayObjectInstance(getStyleValue("tickSkin"));
_local5.x = (_local3 * _local4);
_local5.y = ((track.y - _local5.height) - 2);
tickContainer.addChild(_local5);
_local4++;
};
addChild(tickContainer);
}
protected function calculateValue(_arg1:Number, _arg2:String, _arg3:String, _arg4:int=undefined):void{
var _local5:Number;
_local5 = ((_arg1 / _width) * (maximum - minimum));
if (_direction == SliderDirection.VERTICAL){
_local5 = (maximum - _local5);
} else {
_local5 = (minimum + _local5);
};
doSetValue(_local5, _arg2, _arg3, _arg4);
}
protected function getPrecision(_arg1:Number):Number{
var _local2:String;
_local2 = _arg1.toString();
if (_local2.indexOf(".") == -1){
return (0);
};
return (_local2.split(".").pop().length);
}
protected function doSetValue(_arg1:Number, _arg2:String=null, _arg3:String=null, _arg4:int=undefined):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = _value;
if (((!((_snapInterval == 0))) && (!((_snapInterval == 1))))){
_local6 = Math.pow(10, getPrecision(snapInterval));
_local7 = (_snapInterval * _local6);
_local8 = Math.round((_arg1 * _local6));
_local9 = (Math.round((_local8 / _local7)) * _local7);
_arg1 = (_local9 / _local6);
_value = Math.max(minimum, Math.min(maximum, _arg1));
} else {
_value = Math.max(minimum, Math.min(maximum, Math.round(_arg1)));
};
if (((!((_local5 == _value))) && (((((liveDragging) && (!((_arg3 == null))))) || ((_arg2 == InteractionInputType.KEYBOARD)))))){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, _arg3, _arg2, _arg4));
};
positionThumb();
}
protected function setStyles():void{
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 97
//SliderDirection (fl.controls.SliderDirection)
package fl.controls {
public class SliderDirection {
public static var HORIZONTAL:String = "horizontal";
public static var VERTICAL:String = "vertical";
}
}//package fl.controls
Section 98
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 99
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 100
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.utils.*;
import fl.events.*;
import flash.text.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 101
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 102
//InteractionInputType (fl.events.InteractionInputType)
package fl.events {
public class InteractionInputType {
public static const MOUSE:String = "mouse";
public static const KEYBOARD:String = "keyboard";
}
}//package fl.events
Section 103
//SliderEvent (fl.events.SliderEvent)
package fl.events {
import flash.events.*;
public class SliderEvent extends Event {
protected var _triggerEvent:String;
protected var _keyCode:Number;
protected var _value:Number;
protected var _clickTarget:String;
public static const CHANGE:String = "change";
public static const THUMB_PRESS:String = "thumbPress";
public static const THUMB_DRAG:String = "thumbDrag";
public static const THUMB_RELEASE:String = "thumbRelease";
public function SliderEvent(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:int=0){
_value = _arg2;
_keyCode = _arg5;
_triggerEvent = _arg4;
_clickTarget = _arg3;
super(_arg1);
}
public function get clickTarget():String{
return (_clickTarget);
}
override public function clone():Event{
return (new SliderEvent(type, _value, _clickTarget, _triggerEvent, _keyCode));
}
override public function toString():String{
return (formatToString("SliderEvent", "type", "value", "bubbles", "cancelable", "keyCode", "triggerEvent", "clickTarget"));
}
public function get triggerEvent():String{
return (_triggerEvent);
}
public function get value():Number{
return (_value);
}
public function get keyCode():Number{
return (_keyCode);
}
}
}//package fl.events
Section 104
//SliderEventClickTarget (fl.events.SliderEventClickTarget)
package fl.events {
public class SliderEventClickTarget {
public static const TRACK:String = "track";
public static const THUMB:String = "thumb";
}
}//package fl.events
Section 105
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 106
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 107
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 108
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 109
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.utils.*;
import flash.text.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 110
//barbarianSound1 (barbarianSound1)
package {
import flash.media.*;
public dynamic class barbarianSound1 extends Sound {
}
}//package
Section 111
//barbarianSound2 (barbarianSound2)
package {
import flash.media.*;
public dynamic class barbarianSound2 extends Sound {
}
}//package
Section 112
//bullet (bullet)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class bullet extends MovieClip {
public function bullet(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
}
function frame5(){
stop();
parent.removeChild(this);
this.gone = true;
}
}
}//package
Section 113
//bulletFireSound (bulletFireSound)
package {
import flash.media.*;
public dynamic class bulletFireSound extends Sound {
}
}//package
Section 114
//bulletFlySound (bulletFlySound)
package {
import flash.media.*;
public dynamic class bulletFlySound extends Sound {
}
}//package
Section 115
//bulletHitSound (bulletHitSound)
package {
import flash.media.*;
public dynamic class bulletHitSound extends Sound {
}
}//package
Section 116
//cashSound (cashSound)
package {
import flash.media.*;
public dynamic class cashSound extends Sound {
}
}//package
Section 117
//cheerSound1 (cheerSound1)
package {
import flash.media.*;
public dynamic class cheerSound1 extends Sound {
}
}//package
Section 118
//cheerSound2 (cheerSound2)
package {
import flash.media.*;
public dynamic class cheerSound2 extends Sound {
}
}//package
Section 119
//cheerSound3 (cheerSound3)
package {
import flash.media.*;
public dynamic class cheerSound3 extends Sound {
}
}//package
Section 120
//chipmunkdie1 (chipmunkdie1)
package {
import flash.media.*;
public dynamic class chipmunkdie1 extends Sound {
}
}//package
Section 121
//chipmunkdie2 (chipmunkdie2)
package {
import flash.media.*;
public dynamic class chipmunkdie2 extends Sound {
}
}//package
Section 122
//chipmunkdie3 (chipmunkdie3)
package {
import flash.media.*;
public dynamic class chipmunkdie3 extends Sound {
}
}//package
Section 123
//chipmunkdie4 (chipmunkdie4)
package {
import flash.media.*;
public dynamic class chipmunkdie4 extends Sound {
}
}//package
Section 124
//chipmunkdie5 (chipmunkdie5)
package {
import flash.media.*;
public dynamic class chipmunkdie5 extends Sound {
}
}//package
Section 125
//chipmunkdie6 (chipmunkdie6)
package {
import flash.media.*;
public dynamic class chipmunkdie6 extends Sound {
}
}//package
Section 126
//chipmunkdie7 (chipmunkdie7)
package {
import flash.media.*;
public dynamic class chipmunkdie7 extends Sound {
}
}//package
Section 127
//chipmunkdie8 (chipmunkdie8)
package {
import flash.media.*;
public dynamic class chipmunkdie8 extends Sound {
}
}//package
Section 128
//chipmunkdie9 (chipmunkdie9)
package {
import flash.media.*;
public dynamic class chipmunkdie9 extends Sound {
}
}//package
Section 129
//chipmunkhurt1 (chipmunkhurt1)
package {
import flash.media.*;
public dynamic class chipmunkhurt1 extends Sound {
}
}//package
Section 130
//chipmunkhurt2 (chipmunkhurt2)
package {
import flash.media.*;
public dynamic class chipmunkhurt2 extends Sound {
}
}//package
Section 131
//chipmunkhurt3 (chipmunkhurt3)
package {
import flash.media.*;
public dynamic class chipmunkhurt3 extends Sound {
}
}//package
Section 132
//chipmunkhurt4 (chipmunkhurt4)
package {
import flash.media.*;
public dynamic class chipmunkhurt4 extends Sound {
}
}//package
Section 133
//chipmunkhurt5 (chipmunkhurt5)
package {
import flash.media.*;
public dynamic class chipmunkhurt5 extends Sound {
}
}//package
Section 134
//chipmunkhurt6 (chipmunkhurt6)
package {
import flash.media.*;
public dynamic class chipmunkhurt6 extends Sound {
}
}//package
Section 135
//chipmunkhurt7 (chipmunkhurt7)
package {
import flash.media.*;
public dynamic class chipmunkhurt7 extends Sound {
}
}//package
Section 136
//chipmunkhurt8 (chipmunkhurt8)
package {
import flash.media.*;
public dynamic class chipmunkhurt8 extends Sound {
}
}//package
Section 137
//chipmunkhurt9 (chipmunkhurt9)
package {
import flash.media.*;
public dynamic class chipmunkhurt9 extends Sound {
}
}//package
Section 138
//clickSound (clickSound)
package {
import flash.media.*;
public dynamic class clickSound extends Sound {
}
}//package
Section 139
//clickSound2 (clickSound2)
package {
import flash.media.*;
public dynamic class clickSound2 extends Sound {
}
}//package
Section 140
//clickSound3 (clickSound3)
package {
import flash.media.*;
public dynamic class clickSound3 extends Sound {
}
}//package
Section 141
//creatureA (creatureA)
package {
import flash.display.*;
public dynamic class creatureA extends MovieClip {
public var thisClip:MovieClip;
public var scoreGfx:MovieClip;
public function creatureA(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 142
//creatureB (creatureB)
package {
import flash.display.*;
public dynamic class creatureB extends MovieClip {
public var thisClip:MovieClip;
public var scoreGfx:MovieClip;
public function creatureB(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 143
//creatureC (creatureC)
package {
import flash.display.*;
public dynamic class creatureC extends MovieClip {
public var thisClip:MovieClip;
public var scoreGfx:MovieClip;
public function creatureC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 144
//creatureD (creatureD)
package {
import flash.display.*;
public dynamic class creatureD extends MovieClip {
public var thisClip:MovieClip;
public var scoreGfx:MovieClip;
public function creatureD(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 145
//cursorTarget (cursorTarget)
package {
import flash.display.*;
public dynamic class cursorTarget extends MovieClip {
public var gfx:MovieClip;
public function cursorTarget(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 146
//dingSound1 (dingSound1)
package {
import flash.media.*;
public dynamic class dingSound1 extends Sound {
}
}//package
Section 147
//dingSound2 (dingSound2)
package {
import flash.media.*;
public dynamic class dingSound2 extends Sound {
}
}//package
Section 148
//dingSound3 (dingSound3)
package {
import flash.media.*;
public dynamic class dingSound3 extends Sound {
}
}//package
Section 149
//dingSound4 (dingSound4)
package {
import flash.media.*;
public dynamic class dingSound4 extends Sound {
}
}//package
Section 150
//dingSound5 (dingSound5)
package {
import flash.media.*;
public dynamic class dingSound5 extends Sound {
}
}//package
Section 151
//dingSound6 (dingSound6)
package {
import flash.media.*;
public dynamic class dingSound6 extends Sound {
}
}//package
Section 152
//dingSound7 (dingSound7)
package {
import flash.media.*;
public dynamic class dingSound7 extends Sound {
}
}//package
Section 153
//explode3 (explode3)
package {
import flash.media.*;
public dynamic class explode3 extends Sound {
}
}//package
Section 154
//explosion1 (explosion1)
package {
import flash.media.*;
public dynamic class explosion1 extends Sound {
}
}//package
Section 155
//explosion2 (explosion2)
package {
import flash.media.*;
public dynamic class explosion2 extends Sound {
}
}//package
Section 156
//FinalWave (FinalWave)
package {
import flash.media.*;
public dynamic class FinalWave extends Sound {
}
}//package
Section 157
//Flame1 (Flame1)
package {
import flash.media.*;
public dynamic class Flame1 extends Sound {
}
}//package
Section 158
//Flame2 (Flame2)
package {
import flash.media.*;
public dynamic class Flame2 extends Sound {
}
}//package
Section 159
//Flame3 (Flame3)
package {
import flash.media.*;
public dynamic class Flame3 extends Sound {
}
}//package
Section 160
//flamethrowerBullet (flamethrowerBullet)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class flamethrowerBullet extends MovieClip {
public var gfx:MovieClip;
public function flamethrowerBullet(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
}
function frame5(){
stop();
parent.removeChild(this);
this.gone = true;
}
}
}//package
Section 161
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 162
//food (food)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class food extends MovieClip {
public function food(){
addFrameScript(29, frame30, 53, frame54, 77, frame78);
}
function frame78(){
this.porting = false;
this.portX = 0;
this.portY = 0;
gotoAndPlay("normal");
}
function frame30(){
gotoAndPlay("normal");
}
function frame54(){
stop();
this.x = this.portX;
this.y = this.portY;
gotoAndPlay("portIn");
}
}
}//package
Section 163
//food2 (food2)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class food2 extends MovieClip {
public function food2(){
addFrameScript(29, frame30, 53, frame54, 77, frame78);
}
function frame78(){
this.porting = false;
this.portX = 0;
this.portY = 0;
gotoAndPlay("normal");
}
function frame30(){
gotoAndPlay("normal");
}
function frame54(){
stop();
this.x = this.portX;
this.y = this.portY;
gotoAndPlay("portIn");
}
}
}//package
Section 164
//food3 (food3)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class food3 extends MovieClip {
public function food3(){
addFrameScript(29, frame30, 53, frame54, 77, frame78);
}
function frame78(){
this.porting = false;
this.portX = 0;
this.portY = 0;
gotoAndPlay("normal");
}
function frame30(){
gotoAndPlay("normal");
}
function frame54(){
stop();
this.x = this.portX;
this.y = this.portY;
gotoAndPlay("portIn");
}
}
}//package
Section 165
//foodStolenSound (foodStolenSound)
package {
import flash.media.*;
public dynamic class foodStolenSound extends Sound {
}
}//package
Section 166
//impact1 (impact1)
package {
import flash.media.*;
public dynamic class impact1 extends Sound {
}
}//package
Section 167
//impact10 (impact10)
package {
import flash.media.*;
public dynamic class impact10 extends Sound {
}
}//package
Section 168
//impact2 (impact2)
package {
import flash.media.*;
public dynamic class impact2 extends Sound {
}
}//package
Section 169
//impact3 (impact3)
package {
import flash.media.*;
public dynamic class impact3 extends Sound {
}
}//package
Section 170
//impact4 (impact4)
package {
import flash.media.*;
public dynamic class impact4 extends Sound {
}
}//package
Section 171
//impact5 (impact5)
package {
import flash.media.*;
public dynamic class impact5 extends Sound {
}
}//package
Section 172
//impact6 (impact6)
package {
import flash.media.*;
public dynamic class impact6 extends Sound {
}
}//package
Section 173
//impact7 (impact7)
package {
import flash.media.*;
public dynamic class impact7 extends Sound {
}
}//package
Section 174
//impact8 (impact8)
package {
import flash.media.*;
public dynamic class impact8 extends Sound {
}
}//package
Section 175
//impact9 (impact9)
package {
import flash.media.*;
public dynamic class impact9 extends Sound {
}
}//package
Section 176
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class MochiAd {
public static function getVersion():String{
return ("2.3");
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.parent._mochiad_ctr_failed){
options.ad_failed();
_local3 = true;
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
lv = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:Object;
_arg1 = parseInt(_arg1.toString());
_local3 = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
_local4 = [];
_local5 = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
_local6 = _local3[1];
_local7 = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local2:Array;
var _local3:Function;
var _local4:Number;
var _local5:Array;
mc._endpoint = _arg1;
_local2 = mc._queue;
delete mc._queue;
_local3 = mc.doSend;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local5:Number;
var _local6:LocalConnection;
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
_local5 = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0){
options.ad_started();
options.ad_finished();
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
options.ad_failed();
_local4 = true;
};
};
};
if (this.parent._mochiad_ctr_failed){
options.ad_failed();
_local4 = true;
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 177
//mole (mole)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class mole extends MovieClip {
public function mole(){
addFrameScript(0, frame1, 5, frame6, 10, frame11, 27, frame28, 45, frame46, 63, frame64);
}
function frame64(){
stop();
if (((!((this == null))) && (!(this.gone)))){
this.gone = true;
parent.removeChild(this);
};
}
function frame6(){
stop();
this.dying = true;
gotoAndPlay("hide_open");
}
function frame1(){
stop();
}
function frame28(){
this.popping = false;
gotoAndStop(1);
}
function frame11(){
gotoAndPlay("normal_open");
}
function frame46(){
stop();
if (((!((this == null))) && (!(this.gone)))){
this.gone = true;
parent.removeChild(this);
};
}
}
}//package
Section 178
//mouseArrow (mouseArrow)
package {
import flash.display.*;
public dynamic class mouseArrow extends MovieClip {
}
}//package
Section 179
//ninjaSound1 (ninjaSound1)
package {
import flash.media.*;
public dynamic class ninjaSound1 extends Sound {
}
}//package
Section 180
//ninjaSound2 (ninjaSound2)
package {
import flash.media.*;
public dynamic class ninjaSound2 extends Sound {
}
}//package
Section 181
//ninjaSound3 (ninjaSound3)
package {
import flash.media.*;
public dynamic class ninjaSound3 extends Sound {
}
}//package
Section 182
//powerdownSound1 (powerdownSound1)
package {
import flash.media.*;
public dynamic class powerdownSound1 extends Sound {
}
}//package
Section 183
//powerdownSound2 (powerdownSound2)
package {
import flash.media.*;
public dynamic class powerdownSound2 extends Sound {
}
}//package
Section 184
//powerup (powerup)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class powerup extends MovieClip {
public var powerupSprite:MovieClip;
public function powerup(){
addFrameScript(0, frame1, 31, frame32, 45, frame46);
}
function frame1(){
stop();
}
function frame46(){
stop();
if (((!((this == null))) && (!(this.gone)))){
this.gone = true;
parent.removeChild(this);
};
}
function frame32(){
gotoAndPlay("floating");
}
}
}//package
Section 185
//powerupSound1 (powerupSound1)
package {
import flash.media.*;
public dynamic class powerupSound1 extends Sound {
}
}//package
Section 186
//powerupSound2 (powerupSound2)
package {
import flash.media.*;
public dynamic class powerupSound2 extends Sound {
}
}//package
Section 187
//rollOverSound (rollOverSound)
package {
import flash.media.*;
public dynamic class rollOverSound extends Sound {
}
}//package
Section 188
//rollSound (rollSound)
package {
import flash.media.*;
public dynamic class rollSound extends Sound {
}
}//package
Section 189
//silence (silence)
package {
import flash.media.*;
public dynamic class silence extends Sound {
}
}//package
Section 190
//SliderThumb_disabledSkin (SliderThumb_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_disabledSkin extends MovieClip {
public var soundScroll:MovieClip;
}
}//package
Section 191
//SliderThumb_downSkin (SliderThumb_downSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_downSkin extends MovieClip {
public var soundScroll:MovieClip;
}
}//package
Section 192
//SliderThumb_overSkin (SliderThumb_overSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_overSkin extends MovieClip {
public var soundScroll:MovieClip;
}
}//package
Section 193
//SliderThumb_upSkin (SliderThumb_upSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_upSkin extends MovieClip {
public var soundScroll:MovieClip;
}
}//package
Section 194
//SliderTick_skin (SliderTick_skin)
package {
import flash.display.*;
public dynamic class SliderTick_skin extends MovieClip {
}
}//package
Section 195
//SliderTrack_disabledSkin (SliderTrack_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderTrack_disabledSkin extends MovieClip {
public var sondBar:MovieClip;
}
}//package
Section 196
//SliderTrack_skin (SliderTrack_skin)
package {
import flash.display.*;
public dynamic class SliderTrack_skin extends MovieClip {
public var sondBar:MovieClip;
}
}//package
Section 197
//stealFoodSound (stealFoodSound)
package {
import flash.media.*;
public dynamic class stealFoodSound extends Sound {
}
}//package
Section 198
//unlock (unlock)
package {
import flash.media.*;
public dynamic class unlock extends Sound {
}
}//package
Section 199
//unlock2 (unlock2)
package {
import flash.media.*;
public dynamic class unlock2 extends Sound {
}
}//package
Section 200
//whip (whip)
package {
import flash.media.*;
public dynamic class whip extends Sound {
}
}//package