Section 1
//ActiveCharacterClass (com.polimon.ActiveCharacterClass)
package com.polimon {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
public class ActiveCharacterClass {
public var pRearPos:Point;
public var pMcCainMap_MC:McCainMapMovieClip;
private var lastTime:int;
public var pPunchDelay:int;
public var pCharacter_MC;
public var pPunchState:String;// = "1"
public var pWorldX:Number;
public var pWorldY:Number;
public var pWorldZ:Number;
public var pLock_UserInput:Boolean;// = false
public var pShadow_MC:CharShadowMovieClip;
var pChannel2:SoundChannel;
public var pHurtDelay:int;
public var pPunchDir:String;
public var gamemap;
public var pHurtState:String;// = "0"
public var pMode:String;
public var gGameObj;
public var pStartX:Number;
public var pStartY:Number;
public var pStartZ:Number;
public var pObject_Type;// = "Character"
public var pIdentity:String;
public var Player_Action:String;// = "swr"
public var pBidenMap_MC:BidenMapMovieClip;
var pMusicPlaying:Boolean;// = true
public var MainObj;
public var pPalinMap_MC:PalinMapMovieClip;
public var pObamaMap_MC:ObamaMapMovieClip;
public var pHurtDir:String;
public function ActiveCharacterClass(_arg1:Object){
var _local2:String;
var _local3:Object;
var _local4:RunningMate;
pObject_Type = "Character";
Player_Action = "swr";
pRearPos = new Point(0, 0);
pPunchState = "1";
pHurtState = "0";
pObamaMap_MC = new ObamaMapMovieClip();
pBidenMap_MC = new BidenMapMovieClip();
pMcCainMap_MC = new McCainMapMovieClip();
pPalinMap_MC = new PalinMapMovieClip();
pShadow_MC = new CharShadowMovieClip();
pLock_UserInput = false;
pMusicPlaying = true;
super();
gGameObj = _arg1;
MainObj = gGameObj.MainObj;
gGameObj.pDisplay_Registry_List.push(this);
gGameObj.pCharacter_Registry_List.push(this);
gamemap = MainObj.gamemap;
switch (gGameObj.pActiveCharacterName){
case "Obama":
pCharacter_MC = pObamaMap_MC;
_local2 = "Biden";
break;
case "McCain":
pCharacter_MC = pMcCainMap_MC;
_local2 = "Palin";
break;
};
initShadowMovieClipAttributes();
initCharacterMovieClipAttributes();
pMode = "ActiveControl";
MainObj.addEventListener(Event.ENTER_FRAME, GameUpdate);
SetWorldPosition(gGameObj.pPrezLastPos[0], 0, gGameObj.pPrezLastPos[2]);
SetRearPosition();
pStartX = pWorldX;
pStartY = pWorldY;
pStartZ = pWorldZ;
_local3 = new Object();
_local3.X = pRearPos.x;
_local3.Y = 0;
_local3.Z = pRearPos.y;
_local3.mode = "Follow";
_local3.type = _local2;
_local3.spd = 1;
_local3.waypoints = [];
_local4 = new RunningMate(gGameObj, _local3);
}
public function CollisionDetection(_arg1:String){
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
switch (_arg1){
case "CharBase":
_local2 = new Point(pCharacter_MC.x, pCharacter_MC.y);
_local3 = gamemap.localToGlobal(_local2);
_local4 = new Point(_local3.x, (_local3.y + 40));
_local5 = new Point(_local4.x, _local4.y);
if (MainObj.collisionmap.hitTestPoint(_local5.x, _local5.y, true)){
return (true);
};
break;
};
return (false);
}
public function WorldTranslate(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean){
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:Point;
var _local9:Point;
var _local10:Point;
var _local11:Point;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local5 = gGameObj.Translate_Increment(_arg1, 50, 30);
_local6 = gGameObj.Translate_Increment(_arg2, 50, 30);
_local7 = gGameObj.Translate_Increment(_arg3, 50, 30);
_local8 = new Point(pCharacter_MC.x, pCharacter_MC.y);
_local9 = gamemap.localToGlobal(_local8);
_local10 = new Point(_local9.x, (_local9.y + 40));
_local11 = new Point(_local10.x, _local10.y);
if (_arg4 == true){
if (_local5 > 0){
_local11 = new Point(((_local10.x + 30) + _local5), _local10.y);
if (MainObj.collisionmap.hitTestPoint(_local11.x, _local11.y, true)){
_local5 = 0;
};
};
if (_local5 < 0){
_local11 = new Point(((_local10.x - 30) + _local5), _local10.y);
if (MainObj.collisionmap.hitTestPoint(_local11.x, _local11.y, true)){
_local5 = 0;
};
};
if (_local7 > 0){
_local11 = new Point((_local10.x + _local5), (_local10.y + 30));
if (MainObj.collisionmap.hitTestPoint(_local11.x, _local11.y, true)){
_local7 = 0;
};
_local11 = new Point(((_local10.x - 15) + _local5), (_local10.y + 30));
if (MainObj.collisionmap.hitTestPoint(_local11.x, _local11.y, true)){
_local7 = 0;
};
_local11 = new Point(((_local10.x + 15) + _local5), (_local10.y + 30));
if (MainObj.collisionmap.hitTestPoint(_local11.x, _local11.y, true)){
_local7 = 0;
};
};
if (_local7 < 0){
_local11 = new Point((_local10.x + _local5), (_local10.y - 20));
if (MainObj.collisionmap.hitTestPoint(_local11.x, _local11.y, true)){
_local7 = 0;
};
_local11 = new Point(((_local10.x - 15) + _local5), (_local10.y - 20));
if (MainObj.collisionmap.hitTestPoint(_local11.x, _local11.y, true)){
_local7 = 0;
};
_local11 = new Point(((_local10.x + 15) + _local5), (_local10.y - 20));
if (MainObj.collisionmap.hitTestPoint(_local11.x, _local11.y, true)){
_local7 = 0;
};
};
};
_local12 = (pWorldX + _local5);
_local13 = (pWorldY + _local6);
_local14 = (pWorldZ + _local7);
SetWorldPosition(_local12, _local13, _local14);
}
public function CheckModes(){
switch (pMode){
case "ActiveControl":
UserInput();
centerMap();
break;
};
}
public function UserInput(){
var _local1:Boolean;
if (pLock_UserInput == false){
_local1 = false;
if (gGameObj.arrowRight){
WorldTranslate(5, 0, 0, true);
Player_Action = "swr";
_local1 = true;
Animate();
};
if (gGameObj.arrowLeft){
WorldTranslate(-5, 0, 0, true);
Player_Action = "swl";
_local1 = true;
Animate();
};
if (gGameObj.arrowUp){
WorldTranslate(0, 0, -5, true);
Player_Action = "wb";
_local1 = true;
Animate();
};
if (gGameObj.arrowDown){
WorldTranslate(0, 0, 5, true);
Player_Action = "wf";
_local1 = true;
Animate();
};
if (gGameObj.SpaceBar_Down){
if (pWorldY < 5){
pMode = "Camera";
};
};
if (_local1 == false){
switch (Player_Action){
case "swr":
Player_Action = "ssr";
break;
case "swl":
Player_Action = "ssl";
break;
case "wf":
Player_Action = "sf";
break;
case "wb":
Player_Action = "sb";
break;
};
};
Animate();
SetRearPosition();
CheckForVoterDots();
CheckForFundRaisers();
CheckForRandomBattle();
return;
};
}
public function NPC_HitCollision(){
var _local1:Point;
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:*;
var _local6:*;
var _local7:Point;
var _local8:Point;
var _local9:Number;
_local1 = new Point(pCharacter_MC.x, pCharacter_MC.y);
_local2 = gamemap.localToGlobal(_local1);
_local3 = new Point(_local2.x, (_local2.y + 40));
_local4 = new Point(_local3.x, _local3.y);
_local5 = 0;
while (_local5 < gGameObj.pNPC_Registry_List.length) {
_local6 = gGameObj.pNPC_Registry_List[_local5];
_local7 = new Point(_local6.pCharacter_MC.x, _local6.pCharacter_MC.y);
_local1 = new Point(_local6.pCharacter_MC.x, _local6.pCharacter_MC.y);
_local2 = gamemap.localToGlobal(_local1);
_local8 = new Point((_local2.x + 23), (_local2.y + 70));
_local9 = Point.distance(_local8, _local4);
_local5++;
};
}
public function initShadowMovieClipAttributes(){
gamemap = gGameObj.MainObj.gamemap;
pShadow_MC.name = "shadow";
pShadow_MC.width = 45;
pShadow_MC.height = 17;
pShadow_MC.alpha = 0.4;
pShadow_MC.gotoAndStop(1);
gamemap.addChild(pShadow_MC);
}
public function SetWorldPosition(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Point;
var _local5:Point;
var _local6:Point;
var _local7:Point;
var _local8:Number;
var _local9:Number;
var _local10:Number;
pWorldX = _arg1;
pWorldY = _arg2;
pWorldZ = _arg3;
pCharacter_MC.x = _arg1;
pCharacter_MC.y = _arg3;
pShadow_MC.x = _arg1;
pShadow_MC.y = _arg3;
_local4 = new Point(pShadow_MC.x, pShadow_MC.y);
_local5 = gamemap.localToGlobal(_local4);
_local6 = new Point((_local5.x + 23), _local5.y);
_local7 = new Point(_local6.x, _local6.y);
if (MainObj.collisionmap.hitTestPoint(_local7.x, _local7.y, true)){
pShadow_MC.x = (pShadow_MC.x + 10);
_local8 = (pShadow_MC.width - gGameObj.Translate_Increment(3, 50, 30));
if (_local8 < 10){
_local8 = 10;
};
pShadow_MC.width = _local8;
_local9 = (pShadow_MC.height - gGameObj.Translate_Increment(3, 50, 30));
if (_local9 < 20){
_local9 = 20;
};
pShadow_MC.height = _local9;
pShadow_MC.alpha = 0.2;
} else {
_local8 = (pShadow_MC.width + gGameObj.Translate_Increment(3, 50, 30));
if (_local8 > 45){
_local8 = 45;
};
pShadow_MC.width = _local8;
_local9 = (pShadow_MC.height + gGameObj.Translate_Increment(3, 50, 30));
if (_local9 > 17){
_local9 = 17;
};
pShadow_MC.height = _local9;
pShadow_MC.width = _local8;
pShadow_MC.height = _local9;
pShadow_MC.alpha = 0.4;
};
_local10 = 50;
pCharacter_MC.y = ((pCharacter_MC.y - _local10) - _arg2);
}
public function Animate(){
var _local1:int;
var _local2:Number;
var _local3:Number;
if (lastTime == 0){
lastTime = getTimer();
};
_local1 = (getTimer() - lastTime);
if (_local1 > 100){
switch (Player_Action){
case "swr":
_local2 = 4;
_local3 = 5;
break;
case "swl":
_local2 = 6;
_local3 = 7;
break;
case "wf":
_local2 = 2;
_local3 = 3;
break;
case "wb":
_local2 = 9;
_local3 = 10;
break;
case "ssr":
_local2 = 4;
_local3 = 4;
break;
case "ssl":
_local2 = 6;
_local3 = 6;
break;
case "sf":
_local2 = 1;
_local3 = 1;
break;
case "sb":
_local2 = 8;
_local3 = 8;
break;
};
if (pCharacter_MC.currentFrame >= _local3){
pCharacter_MC.gotoAndStop(_local2);
lastTime = getTimer();
} else {
if (pCharacter_MC.currentFrame < _local2){
pCharacter_MC.gotoAndStop(_local2);
lastTime = getTimer();
} else {
pCharacter_MC.gotoAndStop((pCharacter_MC.currentFrame + 1));
lastTime = getTimer();
};
};
};
}
public function CheckForRandomBattle(){
var _local1:Number;
var _local2:*;
var _local3:*;
_local1 = gGameObj.DistanceTo([pWorldX, pWorldY, pWorldZ], [pStartX, pStartY, pStartZ]);
if (_local1 > gGameObj.pRandomBattleDistance){
_local2 = 0;
while (_local2 < gGameObj.pPolimonHitAreas_List.length) {
_local3 = gGameObj.pPolimonHitAreas_List[_local2];
if (pShadow_MC.hitTestObject(_local3)){
switch (_local3.name){
case "wildpolimon_WC":
gGameObj.pWildPolimonEncounter = "WC";
break;
case "wildpolimon_CW":
gGameObj.pWildPolimonEncounter = "CW";
break;
case "wildpolimon_HL":
gGameObj.pWildPolimonEncounter = "HL";
break;
case "wildpolimon_AA":
gGameObj.pWildPolimonEncounter = "AA";
break;
case "wildpolimon_C":
gGameObj.pWildPolimonEncounter = "C";
break;
case "wildpolimon_CP":
gGameObj.pWildPolimonEncounter = "CP";
break;
case "wildpolimon_E":
gGameObj.pWildPolimonEncounter = "E";
break;
case "wildpolimon_H":
gGameObj.pWildPolimonEncounter = "H";
break;
case "wildpolimon_HL":
gGameObj.pWildPolimonEncounter = "HL";
break;
case "wildpolimon_ME":
gGameObj.pWildPolimonEncounter = "ME";
break;
case "wildpolimon_R":
gGameObj.pWildPolimonEncounter = "R";
break;
case "wildpolimon_BO":
gGameObj.pWildPolimonEncounter = "BO";
break;
case "wildpolimon_JM":
gGameObj.pWildPolimonEncounter = "JM";
break;
};
break;
};
_local2++;
};
if (gGameObj.pMusicFirstPlayed == true){
gGameObj.pChannel1.stop();
};
gGameObj.pChannel1 = gGameObj.BattleThemeBG_Snd.play(undefined, 50);
pMode = "Battling";
gGameObj.gGame_Status = "Frontend";
gGameObj.pFrontend_Status = "MapFadeOut-Battle";
};
}
public function CheckForFundRaisers(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:SharedObject;
_local1 = 0;
while (_local1 < gGameObj.pFundRaiser_List.length) {
_local2 = gGameObj.pFundRaiser_List[_local1][0];
_local3 = gGameObj.pFundRaiser_List[_local1][1];
if (_local3.name == _local2){
if (pShadow_MC.hitTestObject(_local3)){
gGameObj.pPlayerMovesLimit["SOARING SPEECH"]["C"] = gGameObj.pPlayerMovesLimit["SOARING SPEECH"]["M"];
gGameObj.pPlayerMovesLimit["CHANGE"]["C"] = gGameObj.pPlayerMovesLimit["CHANGE"]["M"];
gGameObj.pPlayerMovesLimit["NUANCE"]["C"] = gGameObj.pPlayerMovesLimit["NUANCE"]["M"];
gGameObj.pPlayerMovesLimit["RELATE"]["C"] = gGameObj.pPlayerMovesLimit["RELATE"]["M"];
gGameObj.pPlayerMovesLimit["DEBATE"]["C"] = gGameObj.pPlayerMovesLimit["DEBATE"]["M"];
gGameObj.pPlayerMovesLimit["RAMBLE ON"]["C"] = gGameObj.pPlayerMovesLimit["RAMBLE ON"]["M"];
gGameObj.pPlayerMovesLimit["GET UP!"]["C"] = gGameObj.pPlayerMovesLimit["GET UP!"]["M"];
gGameObj.pPlayerMovesLimit["P.O.W."]["C"] = gGameObj.pPlayerMovesLimit["P.O.W."]["M"];
gGameObj.pPlayerMovesLimit["MAVERICK MOVE"]["C"] = gGameObj.pPlayerMovesLimit["MAVERICK MOVE"]["M"];
gGameObj.pPlayerMovesLimit["TELEPROMPTER"]["C"] = gGameObj.pPlayerMovesLimit["TELEPROMPTER"]["M"];
gGameObj.pPlayerMovesLimit["FOLKSY SPEECH"]["C"] = gGameObj.pPlayerMovesLimit["FOLKSY SPEECH"]["M"];
gGameObj.pPlayerMovesLimit["UNSCRIPTED ANSWER"]["C"] = gGameObj.pPlayerMovesLimit["UNSCRIPTED ANSWER"]["M"];
gGameObj.pPlayerMovesLimit["RALLY BASE"]["C"] = gGameObj.pPlayerMovesLimit["RALLY BASE"]["M"];
gGameObj.pFundRaiser_List.splice(_local1, 1);
MainObj.gamemap.removeChild(_local3);
_local4 = SharedObject.getLocal("PolimonSave");
_local4.data.pFundRaiser_List = gGameObj.pFundRaiser_List;
_local4.data.pVoterDot_List = gGameObj.pVoterDot_List;
_local4.data.pPrezLastPos = [pWorldX, pWorldY, pWorldZ];
_local4.data.pChosenCharacter = gGameObj.pChosenCharacter;
_local4.flush();
gGameObj.pHealth_Prez = gGameObj.pHealth_PrezMax;
gGameObj.pHealth_Vice = gGameObj.pHealth_ViceMax;
MainObj.fundraiser_overlay.alpha = 1;
gGameObj.pFrontend_Status = "FundraiserOverlay_Delay";
gGameObj.gGame_Status = "Frontend";
gGameObj.pStartTime = getTimer();
break;
};
};
_local1++;
};
}
public function centerMap(){
gamemap.x = (-(pCharacter_MC.x) + 320);
gamemap.y = (-(pCharacter_MC.y) + 240);
if (gamemap.x < -1756){
gamemap.x = -1756;
};
if (gamemap.x > 0){
gamemap.x = 0;
};
if (gamemap.y < -915){
gamemap.y = -915;
};
if (gamemap.y > 0){
gamemap.y = 0;
};
if (pWorldZ > 1500){
SetWorldPosition(pWorldX, pWorldY, 1500);
};
if (pWorldZ < 175){
SetWorldPosition(pWorldX, pWorldY, 175);
};
if (pWorldX > 2450){
SetWorldPosition(2450, pWorldY, pWorldZ);
};
if (pWorldX < 0){
SetWorldPosition(0, pWorldY, pWorldZ);
};
}
public function initCharacterMovieClipAttributes(){
gamemap = gGameObj.MainObj.gamemap;
pCharacter_MC.gotoAndStop(1);
gamemap.addChild(pCharacter_MC);
}
public function SetRearPosition(){
switch (Player_Action){
case "swr":
case "ssr":
pRearPos.x = (pWorldX - 50);
pRearPos.y = (pWorldZ - 0);
break;
case "swl":
case "ssl":
pRearPos.x = (pWorldX + 50);
pRearPos.y = (pWorldZ - 0);
break;
case "wf":
case "sf":
pRearPos.x = pWorldX;
pRearPos.y = (pWorldZ - 50);
break;
case "wb":
case "sb":
pRearPos.x = pWorldX;
pRearPos.y = (pWorldZ + 50);
break;
};
}
public function DestroyCharacter(){
var _local1:*;
var _local2:*;
var _local3:*;
gGameObj.pPrezLastPos = [pWorldX, pWorldY, pWorldZ];
gamemap.removeChild(pShadow_MC);
pShadow_MC = null;
gamemap.removeChild(pCharacter_MC);
pCharacter_MC = null;
_local1 = 0;
while (_local1 < gGameObj.pCharacter_Registry_List.length) {
_local2 = gGameObj.pCharacter_Registry_List[_local1];
if (_local2 == this){
gGameObj.pCharacter_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
_local1 = 0;
while (_local1 < gGameObj.pDisplay_Registry_List.length) {
_local3 = gGameObj.pDisplay_Registry_List[_local1];
if (_local3 == this){
gGameObj.pDisplay_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
MainObj.removeEventListener(Event.ENTER_FRAME, GameUpdate);
}
public function CheckForVoterDots(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:ObamaChantSnd;
var _local5:SarahChantSnd;
_local1 = 0;
while (_local1 < gGameObj.pVoterDot_List.length) {
_local2 = gGameObj.pVoterDot_List[_local1][0];
_local3 = gGameObj.pVoterDot_List[_local1][1];
if (_local3.name == _local2){
if (pShadow_MC.hitTestObject(_local3)){
switch (gGameObj.pActiveCharacterName){
case "Obama":
_local4 = new ObamaChantSnd();
pChannel2 = _local4.play();
_local3.gotoAndStop(2);
break;
case "McCain":
_local5 = new SarahChantSnd();
pChannel2 = _local5.play();
_local3.gotoAndStop(3);
break;
};
gGameObj.pVoterDot_List.splice(_local1, 1);
break;
};
};
_local1++;
};
}
public function GameUpdate(_arg1:Event){
switch (gGameObj.gGame_Status){
case "GameMap":
CheckModes();
break;
case "CleanUp":
DestroyCharacter();
break;
};
}
}
}//package com.polimon
Section 2
//GameObjClass (com.polimon.GameObjClass)
package com.polimon {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.utils.*;
import flash.external.*;
public class GameObjClass {
public var TitleThemeBG_Snd:TitleThemeBG;
public var pDisplay_Registry_List:Array;
public var gGame_Status:String;// = "Frontend"
public var pCurrentLevel:String;// = "1"
public var pChannel1:SoundChannel;
public var pBattlePlayer2_Name:String;
public var gamemap;
public var pLoaderInitialized:Boolean;// = false
public var pCharacter_Registry_List:Array;
public var pBattleCPU2_HealthMax;
public var pBattleCPUisSleeping:Boolean;// = false
public var arrowDown:Boolean;
public var pVoterDot_List:Array;
public var pFrontend_Status:String;// = "Loader"
public var pHealth_ViceMax:int;// = 0xFF
public var MainObj;
public var pBattleCPUSleepTurns:int;
public var pBattleMove3Text:TextField;
public var pBattleHealthTextFormat:TextFormat;
public var pBattleCPU2_Health:int;
public var pPolimonHitAreas_List:Array;
public var pActiveCharacterHealth:int;
public var pPlayerMovesLimit:Object;
public var SpaceBar_Down:Boolean;// = false
public var pActiveCharacterHealthMax:int;
public var MapThemeBG_Snd:MapThemeBG;
public var gameStartTime:int;
public var pBattleStatusTextFormat:TextFormat;
public var arrowUp;
public var pActiveBattleCPUName:String;
public var lastTime:int;
public var pBattleCPUConfusionTurns:int;
public var pCurrentBattleMove:String;
public var pBattlePlayer2_Health:int;
public var pBattleCPUConfusion:Boolean;// = false
public var Attack_KeyDown;
public var pBattleHumanisConfused:Boolean;// = false
public var pGame_StartTime:int;
public var pBattle_State:String;
public var pCleanUpState:String;// = "1"
public var pBattleHumanConfusion:Boolean;// = false
public var pFundRaiser_List:Array;
public var pBattleCPU1_Symbol:String;
public var AnimPointer:int;// = 1
public var pBattlePlayer1_Symbol:String;
public var pBattlePlayer1_HealthMax;
public var pMusicFirstPlayed:Boolean;// = false
public var pCPUSwitchedYet:Boolean;// = false
public var pTutorial_State:String;// = "campaign_stop"
public var pBattleMove2Text:TextField;
public var collisionmap;
public var pRunningMateClassRef;
public var pVoiceSamplePlayList:Object;
public var pRandomBattleDistance:int;
public var pBattleCPULifeDrain:Boolean;// = false
public var pBattleHitValue:int;
public var pBattleHealthText:TextField;
public var pBattleHumanSleep:Boolean;// = false
public var pPrezLastPos;
public var pBattleAttackRecoil:String;
public var pBattleHumanLifeDrain:Boolean;// = false
public var pVoterDot_Count:int;
public var pActiveBattleCPUSymbol:String;
public var McCainEndingSongBG_Snd:McCainEndingSongBG;
public var ObamaEndingSongBG_Snd:ObamaEndingSongBG;
public var theMovieClip;
public var pViceLastPos;
public var pHealth_PrezMax:int;// = 25
public var pFinalBattle:Boolean;// = false
public var pBattleSwitchTextFormat:TextFormat;
public var pChosenCharacter:String;
public var pBattleCPU1_Name:String;
public var pBattleHumanConfusionTurns:int;
public var pActiveCharacterClassRef;
public var pActiveCharacterName:String;
public var pBattleMove1Text:TextField;
public var pBattleCPUisConfused:Boolean;// = false
public var BattleThemeBG_Snd:BattleThemeBG;
public var pBattleCPUSleep:Boolean;// = false
public var pBattleHumanisSleeping:Boolean;// = false
public var pBattlePlayer1_Name:String;
public var pBattleCPU1_Health:int;
public var arrowRight;
public var W_KeyDown;
public var pBattlePlayer1_Health:int;
public var pBattleMoveTextFormat:TextFormat;
public var pBattlePlayer2_HealthMax;
private var pSiteLock;
public var pBattleHumanSleepTurns:int;
public var pBattleCPU2_Symbol:String;
public var pBattleStatusText:TextField;
public var pActiveCharacterSymbol:String;
public var pActiveBattleCPUHealthMax:int;
public var arrowLeft;
public var pBattleCPU1_HealthMax;
public var pBattlePlayer2_Symbol:String;
public var pWildPolimonEncounter:String;
public var pStartTime:int;
public var pBattleActionTextFormat:TextFormat;
public var pContinueGame:Boolean;
public var pHealth_Prez:int;// = 25
public var pBattleCPU2_Name:String;
public var pActiveBattleCPUHealth:int;
public var pHealth_Vice:int;// = 0xFF
public var pBattleSwitchText:TextField;
public var pBattleActionText:TextField;
public var pBattleMove4Text:TextField;
public var pNPC_Registry_List:Array;
public var pBattleMoveBackfire;
public var pBattle_StartTime:int;
public function GameObjClass(_arg1:Object){
gGame_Status = "Frontend";
pFrontend_Status = "Loader";
pCurrentLevel = "1";
SpaceBar_Down = false;
AnimPointer = 1;
pLoaderInitialized = false;
pVoterDot_List = [];
pFundRaiser_List = [];
pPolimonHitAreas_List = [];
pHealth_Prez = 25;
pHealth_PrezMax = 25;
pHealth_Vice = 0xFF;
pHealth_ViceMax = 0xFF;
pPlayerMovesLimit = {};
pPrezLastPos = [500, 0, 500];
pViceLastPos = [0, 0, 0];
pBattleStatusText = new TextField();
pBattleStatusTextFormat = new TextFormat();
pBattleActionText = new TextField();
pBattleActionTextFormat = new TextFormat();
pBattleMove1Text = new TextField();
pBattleMove2Text = new TextField();
pBattleMove3Text = new TextField();
pBattleMove4Text = new TextField();
pBattleHealthText = new TextField();
pBattleSwitchText = new TextField();
pBattleMoveTextFormat = new TextFormat();
pBattleSwitchTextFormat = new TextFormat();
pBattleHealthTextFormat = new TextFormat();
pBattleCPUConfusion = false;
pBattleCPUisConfused = false;
pBattleCPULifeDrain = false;
pBattleHumanConfusion = false;
pBattleHumanisConfused = false;
pBattleHumanLifeDrain = false;
pBattleCPUSleep = false;
pBattleCPUisSleeping = false;
pBattleHumanSleep = false;
pBattleHumanisSleeping = false;
pCPUSwitchedYet = false;
pFinalBattle = false;
pCleanUpState = "1";
pTutorial_State = "campaign_stop";
BattleThemeBG_Snd = new BattleThemeBG();
MapThemeBG_Snd = new MapThemeBG();
TitleThemeBG_Snd = new TitleThemeBG();
ObamaEndingSongBG_Snd = new ObamaEndingSongBG();
McCainEndingSongBG_Snd = new McCainEndingSongBG();
pMusicFirstPlayed = false;
pVoiceSamplePlayList = {};
pDisplay_Registry_List = new Array();
pNPC_Registry_List = new Array();
pCharacter_Registry_List = new Array();
super();
MainObj = _arg1;
MainObj.addEventListener(Event.ENTER_FRAME, GameUpdate);
MainObj.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
MainObj.stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
pStartTime = getTimer();
pSiteLock = false;
MochiAd.showPreGameAd({clip:MainObj, id:"cea18293cc43e814", res:"640x480"});
}
protected function sortDisplayList():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:int;
var _local8:int;
_local1 = 0;
while (_local1 < pDisplay_Registry_List.length) {
_local2 = pDisplay_Registry_List[_local1];
switch (_local2.pObject_Type){
case "Character":
_local3 = _local2.pCharacter_MC;
break;
case "Object":
_local3 = _local2.pObject_MC;
break;
};
if (_local3 != null){
_local4 = 0;
while (_local4 < pDisplay_Registry_List.length) {
_local5 = pDisplay_Registry_List[_local4];
switch (_local5.pObject_Type){
case "Character":
_local6 = _local5.pCharacter_MC;
break;
case "Object":
_local6 = _local5.pObject_MC;
break;
};
if (_local6 != null){
if (_local2.pWorldZ > _local5.pWorldZ){
_local7 = gamemap.getChildIndex(_local3);
_local8 = gamemap.getChildIndex(_local6);
if (_local7 < _local8){
gamemap.swapChildrenAt(_local7, _local8);
};
};
};
_local4++;
};
};
_local1++;
};
}
public function Frontend(){
var _local1:SharedObject;
var _local2:*;
var _local3:Number;
var _local4:ActiveCharacterClass;
var _local5:RegExp;
var _local6:RegExp;
var _local7:RegExp;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:String;
var _local12:int;
var _local13:Number;
var _local14:MovieClip;
var _local15:*;
var _local16:String;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local20:Boolean;
var _local21:*;
var _local22:*;
var _local23:Array;
var _local24:Array;
var _local25:Array;
var _local26:String;
var _local27:*;
var _local28:*;
var _local29:*;
var _local30:*;
var _local31:Boolean;
var _local32:*;
switch (pFrontend_Status){
case "Loader":
if ((((MainObj.currentLabel == "loader")) && ((pLoaderInitialized == false)))){
MainObj.addEventListener(Event.ENTER_FRAME, loading);
};
break;
case "PreTitleScreen":
if (pSiteLock == true){
_local21 = ["outsidetheboxsoftware.com", "www.outsidetheboxsoftware.com", "www.sociotown.com", "sociotown.com"];
_local22 = sitelock(_local21);
if (_local22 == true){
MainObj.gotoAndStop("SiteLocked");
pFrontend_Status = "SiteLocked";
return;
};
};
if (pMusicFirstPlayed == true){
pChannel1.stop();
};
pChannel1 = TitleThemeBG_Snd.play(null, 50);
pMusicFirstPlayed = true;
pContinueGame = false;
pFrontend_Status = "PreTitleScreen-1";
MainObj.gotoAndStop("title_screen");
break;
case "PreTitleScreen-1":
MainObj.new_game_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.new_game_button.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.new_game_button.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.credits_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.credits_button.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.credits_button.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.sociotown_clicklogo.addEventListener(MouseEvent.CLICK, open_SocioTownPage);
MainObj.sociotown_clicklogo.buttonMode = true;
_local1 = SharedObject.getLocal("PolimonSave");
if (_local1.size > 0){
MainObj.continue_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.continue_button.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.continue_button.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
} else {
MainObj.continue_button.alpha = 0.5;
};
pFrontend_Status = "FadeInTitleScreen";
break;
case "FadeInTitleScreen":
_local2 = MainObj.black_screen;
_local2.x = 0;
_local3 = _local2.alpha;
_local3 = (_local3 - Translate_Increment(0.05, 50, 30));
if (_local3 < 0){
_local3 = 0;
};
_local2.alpha = _local3;
if (_local3 == 0){
_local2.x = 640;
pFrontend_Status = "TitleScreen";
};
break;
case "TitleScreen":
break;
case "PreChooseTeam":
if (MainObj.obama_biden_team_button == null){
return;
};
MainObj.obama_biden_team_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.obama_biden_team_button.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.obama_biden_team_button.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.mccain_palin_team_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.mccain_palin_team_button.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.mccain_palin_team_button.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
pFrontend_Status = "ChooseTeam";
break;
case "ChooseTeam":
break;
case "InitializeMap":
if (MainObj.gamemap == null){
return;
};
gamemap = MainObj.gamemap;
if (pContinueGame == true){
_local1 = SharedObject.getLocal("PolimonSave");
_local23 = _local1.data.pFundRaiser_List;
pFundRaiser_List = _local23;
_local24 = _local1.data.pVoterDot_List;
pVoterDot_List = _local24;
_local25 = _local1.data.pPrezLastPos;
_local26 = _local1.data.pChosenCharacter;
pChosenCharacter = _local26;
initPresidentProperties();
pPrezLastPos = _local25;
} else {
initPresidentProperties();
};
switch (pChosenCharacter){
case "Obama":
MainObj.gamemap.gotoAndStop(2);
break;
case "McCain":
MainObj.gamemap.gotoAndStop(1);
break;
};
pFrontend_Status = "InitializeMap-1";
break;
case "InitializeMap-1":
if (pContinueGame == false){
_local5 = /dot/;
_local6 = /fund/;
_local27 = 0;
while (_local27 < gamemap.numChildren) {
_local28 = gamemap.getChildAt(_local27);
if (_local5.test(_local28.name)){
pVoterDot_List.push([_local28.name, _local28]);
_local28.gotoAndStop(1);
};
if (_local6.test(_local28.name)){
pFundRaiser_List.push([_local28.name, _local28]);
};
_local27++;
};
pVoterDot_Count = pVoterDot_List.length;
} else {
pTutorial_State = "done";
pVoterDot_Count = 0;
_local5 = /dot/;
_local27 = 0;
while (_local27 < gamemap.numChildren) {
_local28 = gamemap.getChildAt(_local27);
if (_local5.test(_local28.name)){
pVoterDot_Count++;
};
_local27++;
};
};
pFrontend_Status = "PreMap-1";
break;
case "PreMap-1":
switch (pChosenCharacter){
case "Obama":
MainObj.gamemap.gotoAndStop(2);
break;
case "McCain":
MainObj.gamemap.gotoAndStop(1);
break;
};
pFrontend_Status = "PreMap-2";
break;
case "PreMap-2":
pDisplay_Registry_List = [];
gamemap = MainObj.gamemap;
collisionmap = MainObj.collisionmap;
collisionmap.x = (collisionmap.x + 1200);
collisionmap.y = (collisionmap.y + 800);
gamemap.addChild(collisionmap);
collisionmap.x = 169;
collisionmap.y = 193;
collisionmap.alpha = 0;
MainObj.stage.focus = MainObj.stage;
if (pMusicFirstPlayed == true){
pChannel1.stop();
};
pChannel1 = MapThemeBG_Snd.play();
pMusicFirstPlayed = true;
pActiveCharacterName = pChosenCharacter;
_local4 = new ActiveCharacterClass(this);
pActiveCharacterClassRef = _local4;
pActiveCharacterClassRef.centerMap();
MainObj.fundraiser_overlay.alpha = 0;
MainObj.prepare_finalshowdown_overlay.alpha = 0;
MainObj.tutorial_fill_meter.alpha = 0;
MainObj.gamemap.tutorial_campaign_stop.alpha = 0;
_local5 = /dot/;
_local6 = /fund/;
_local27 = 0;
while (_local27 < MainObj.gamemap.numChildren) {
_local28 = MainObj.gamemap.getChildAt(_local27);
if (_local5.test(_local28.name)){
switch (pActiveCharacterName){
case "Obama":
_local28.gotoAndStop(2);
break;
case "McCain":
_local28.gotoAndStop(3);
break;
};
_local29 = 0;
while (_local29 < pVoterDot_List.length) {
_local30 = pVoterDot_List[_local29][0];
if (_local30 == _local28.name){
pVoterDot_List[_local29][1] = _local28;
_local28.gotoAndStop(1);
};
_local29++;
};
};
if (_local6.test(_local28.name)){
_local31 = true;
_local29 = 0;
while (_local29 < pFundRaiser_List.length) {
_local32 = pFundRaiser_List[_local29][0];
if (_local32 == _local28.name){
pFundRaiser_List[_local29][1] = _local28;
_local31 = false;
};
_local29++;
};
if (_local31 == true){
MainObj.gamemap.removeChild(_local28);
_local27--;
};
};
_local27++;
};
_local7 = /wildpolimon/;
pPolimonHitAreas_List = [];
_local27 = 0;
while (_local27 < MainObj.numChildren) {
_local28 = MainObj.getChildAt(_local27);
if (_local7.test(_local28.name)){
gamemap.addChild(_local28);
_local28.x = (_local28.x + 1200);
_local28.y = (_local28.y + 800);
_local28.alpha = 0;
pPolimonHitAreas_List.push(_local28);
_local27--;
};
_local27++;
};
pFrontend_Status = "PreMap-3";
break;
case "PreMap-3":
pActiveCharacterClassRef.gamemap = MainObj.gamemap;
_local8 = 200;
pRandomBattleDistance = (300 + Math.floor((Math.random() * _local8)));
MainObj.showdown_bar.width = 1;
MainObj.PresidentHealthBar.gotoAndStop(1);
MainObj.ViceHealthBar.gotoAndStop(1);
switch (pActiveCharacterName){
case "Obama":
MainObj.PresidentHealthIcon.gotoAndStop(1);
MainObj.ViceHealthIcon.gotoAndStop(2);
MainObj.showdown_bar.gotoAndStop(1);
break;
case "McCain":
MainObj.PresidentHealthIcon.gotoAndStop(3);
MainObj.ViceHealthIcon.gotoAndStop(4);
MainObj.showdown_bar.gotoAndStop(2);
break;
};
pFrontend_Status = "FadeInMap";
break;
case "PreMap-4":
pFrontend_Status = "FadeInMap";
break;
case "FadeInMap":
_local2 = MainObj.black_screen;
_local2.x = 0;
_local3 = _local2.alpha;
_local3 = (_local3 - Translate_Increment(0.05, 50, 30));
if (_local3 < 0){
_local3 = 0;
};
_local2.alpha = _local3;
if (_local3 == 0){
_local2.x = 640;
pActiveCharacterClassRef.pMode = "ActiveControl";
gGame_Status = "GameMap";
pFrontend_Status = "Map";
};
break;
case "Tutorial":
Tutorial();
break;
case "MapFadeOut-Battle":
MainObj.gamemap.scaleX = (MainObj.gamemap.scaleX + Translate_Increment(0.05, 50, 30));
MainObj.gamemap.scaleY = (MainObj.gamemap.scaleY + Translate_Increment(0.05, 50, 30));
MainObj.gamemap.x = (MainObj.gamemap.x - Translate_Increment(25, 50, 30));
MainObj.gamemap.y = (MainObj.gamemap.y - Translate_Increment(25, 50, 30));
_local2 = MainObj.black_screen;
_local3 = _local2.alpha;
_local2.x = 0;
_local3 = (_local3 + Translate_Increment(0.05, 50, 30));
if (_local3 > 1){
_local3 = 1;
};
_local2.alpha = _local3;
if (_local3 == 1){
pFrontend_Status = "PreBattleSetup";
};
break;
case "FundraiserOverlay_Delay":
_local9 = (getTimer() - pStartTime);
AdjustHealthBars();
if (_local9 > 2500){
MainObj.fundraiser_overlay.alpha = 0;
pActiveCharacterClassRef.pMode = "ActiveControl";
gGame_Status = "GameMap";
pFrontend_Status = "Map";
};
break;
case "PrepareFinalShowdownOverlay_Delay":
_local9 = (getTimer() - pStartTime);
AdjustShowdownBar();
if (_local9 > 3500){
switch (pActiveCharacterName){
case "Obama":
pWildPolimonEncounter = "JM";
break;
case "McCain":
pWildPolimonEncounter = "BO";
break;
};
if (pMusicFirstPlayed == true){
pChannel1.stop();
};
pChannel1 = BattleThemeBG_Snd.play(null, 50);
pActiveCharacterClassRef.pMode = "Battling";
gGame_Status = "Frontend";
pFrontend_Status = "MapFadeOut-Battle";
};
break;
case "PreBattleSetup":
pActiveCharacterClassRef.DestroyCharacter();
pRunningMateClassRef.DestroyRunningMate();
MainObj.gotoAndStop("battle");
pFrontend_Status = "BattleSetup";
break;
case "BattleSetup":
MainObj.challenger_podium.gotoAndStop(1);
MainObj.challenger_podium.alpha = 0;
pBattleCPU2_Name = null;
pBattleCPU2_Symbol = null;
pBattleCPU2_Health = null;
pBattleCPU2_HealthMax = null;
switch (pWildPolimonEncounter){
case "WC":
default:
_local10 = 1;
_local11 = "\"A Wild White Working Class man appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "WHITE WORKING CLASS";
pActiveBattleCPUHealth = 100;
pActiveBattleCPUHealthMax = 100;
break;
case "CW":
_local10 = 2;
_local11 = "\"A Wild Career Woman appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "CAREER WOMAN";
pActiveBattleCPUHealth = 120;
pActiveBattleCPUHealthMax = 120;
break;
case "AA":
_local10 = 3;
_local11 = "\"A Wild African American appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "AFRICAN AMERICAN";
pActiveBattleCPUHealth = 120;
pActiveBattleCPUHealthMax = 120;
break;
case "C":
_local10 = 4;
_local11 = "\"A Wild College Fratboy appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "COLLEGE FRATBOY";
pActiveBattleCPUHealth = 120;
pActiveBattleCPUHealthMax = 120;
break;
case "CP":
_local10 = 5;
_local11 = "\"A Wild Conservative Blowhard appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "CONSERVATIVE BLOWHARD";
pActiveBattleCPUHealth = 120;
pActiveBattleCPUHealthMax = 120;
break;
case "E":
_local10 = 6;
_local11 = "\"A Wild Evangelical appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "EVANGELICAL";
pActiveBattleCPUHealth = 120;
pActiveBattleCPUHealthMax = 120;
break;
case "H":
_local10 = 7;
_local11 = "\"A Wild Hispanic appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "HISPANIC";
pActiveBattleCPUHealth = 120;
pActiveBattleCPUHealthMax = 120;
break;
case "HL":
_local10 = 8;
_local11 = "\"A Wild Hollywood Liberal appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "HOLLYWOOD LIBERAL";
pActiveBattleCPUHealth = 120;
pActiveBattleCPUHealthMax = 120;
break;
case "ME":
_local10 = 9;
_local11 = "\"A Wild Media Elite appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "MEDIA ELITE";
pActiveBattleCPUHealth = 120;
pActiveBattleCPUHealthMax = 120;
break;
case "R":
_local10 = 10;
_local11 = "\"A Wild Redneck appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "REDNECK";
pActiveBattleCPUHealth = 120;
pActiveBattleCPUHealthMax = 120;
break;
case "BO":
_local10 = 11;
_local11 = "\"BARACK OBAMA has appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "Obama";
pActiveBattleCPUHealth = 0xFF;
pActiveBattleCPUHealthMax = 0xFF;
pBattleCPU2_Name = "Biden";
pBattleCPU2_Symbol = "JB";
pBattleCPU2_Health = 300;
pBattleCPU2_HealthMax = 300;
pFinalBattle = true;
MainObj.challenger_podium.gotoAndStop(1);
break;
case "JM":
_local10 = 13;
_local11 = "\"JOHN McCAIN has appeared!\"";
pActiveBattleCPUSymbol = pWildPolimonEncounter;
pActiveBattleCPUName = "McCain";
pActiveBattleCPUHealth = 325;
pActiveBattleCPUHealthMax = 325;
pBattleCPU2_Name = "Palin";
pBattleCPU2_Symbol = "SP";
pBattleCPU2_Health = 200;
pBattleCPU2_HealthMax = 200;
pFinalBattle = true;
MainObj.challenger_podium.gotoAndStop(2);
break;
};
pBattleCPU1_Name = pActiveBattleCPUName;
pBattleCPU1_Symbol = pActiveBattleCPUSymbol;
pBattleCPU1_Health = pActiveBattleCPUHealth;
pBattleCPU1_HealthMax = pActiveBattleCPUHealthMax;
switch (pActiveCharacterName){
case "Obama":
pBattlePlayer1_Name = "Obama";
pBattlePlayer1_Symbol = "BO";
pBattlePlayer1_Health = pHealth_Prez;
pBattlePlayer1_HealthMax = pHealth_PrezMax;
pBattlePlayer2_Name = "Biden";
pBattlePlayer2_Symbol = "JB";
pBattlePlayer2_Health = pHealth_Vice;
pBattlePlayer2_HealthMax = pHealth_ViceMax;
_local12 = 1;
break;
case "McCain":
pBattlePlayer1_Name = "McCain";
pBattlePlayer1_Symbol = "JM";
pBattlePlayer1_Health = pHealth_Prez;
pBattlePlayer1_HealthMax = pHealth_PrezMax;
pBattlePlayer2_Name = "Palin";
pBattlePlayer2_Symbol = "SP";
pBattlePlayer2_Health = pHealth_Vice;
pBattlePlayer2_HealthMax = pHealth_ViceMax;
_local12 = 3;
break;
default:
_local12 = 1;
break;
};
pActiveCharacterName = pBattlePlayer1_Name;
pActiveCharacterSymbol = pBattlePlayer1_Symbol;
pActiveCharacterHealth = pBattlePlayer1_Health;
pActiveCharacterHealthMax = pBattlePlayer1_HealthMax;
_local13 = (pActiveCharacterHealth / pActiveCharacterHealthMax);
_local14 = MainObj.battle_player_statbox.battle_player_healthbar;
_local14.width = (_local13 * 199);
_local15 = _local14.width;
if (_local15 > 130){
_local14.gotoAndStop(1);
};
if ((((_local15 >= 61)) && ((_local15 <= 130)))){
_local14.gotoAndStop(2);
};
if (_local15 < 61){
_local14.gotoAndStop(3);
};
MainObj.battle_challenger.gotoAndStop(_local10);
MainObj.battle_challenger_statbox.battle_challenger_healthbar.gotoAndStop(1);
MainObj.battle_challenger_statbox.battle_challenger_name_text.gotoAndStop(_local10);
MainObj.battle_challenger.x = (MainObj.battle_challenger.x - 700);
MainObj.battle_challenger_shadow.x = (MainObj.battle_challenger_shadow.x - 700);
MainObj.battle_challenger_circle.x = (MainObj.battle_challenger_circle.x - 700);
MainObj.battle_challenger_statbox.x = (MainObj.battle_challenger_statbox.x - 400);
MainObj.battle_player.gotoAndStop(_local12);
MainObj.battle_player_statbox.battle_player_name_text.gotoAndStop(_local12);
MainObj.battle_player.x = (MainObj.battle_player.x + 700);
MainObj.battle_player_circle.x = (MainObj.battle_player_circle.x + 700);
MainObj.battle_player_statbox.x = (MainObj.battle_player_statbox.x + 400);
_local16 = _local11;
pBattleStatusText.text = _local16;
pBattleStatusText.width = 500;
pBattleStatusText.x = 52;
pBattleStatusText.y = 353;
pBattleStatusText.wordWrap = true;
pBattleStatusText.selectable = false;
pBattleStatusTextFormat.size = "18";
pBattleStatusTextFormat.align = "left";
pBattleStatusTextFormat.bold = true;
pBattleStatusTextFormat.font = "Tahoma";
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattleHealthText.text = ((pActiveCharacterHealth + "/") + pActiveCharacterHealthMax);
pBattleHealthText.width = 168;
pBattleHealthText.x = 55;
pBattleHealthText.y = 59;
pBattleHealthText.selectable = false;
pBattleHealthTextFormat.size = "21";
pBattleHealthTextFormat.align = "left";
pBattleHealthTextFormat.bold = true;
pBattleHealthTextFormat.font = "Tahoma";
pBattleHealthText.setTextFormat(pBattleHealthTextFormat);
MainObj.battle_player_statbox.addChild(pBattleHealthText);
pBattleCPUisConfused = false;
pBattleCPUConfusionTurns = 0;
pBattleCPUisSleeping = false;
pBattleCPUSleepTurns = 0;
pVoiceSamplePlayList = {};
pFrontend_Status = "BattleFadeIn";
break;
case "BattleFadeIn":
_local2 = MainObj.black_screen;
_local2.x = 0;
_local3 = _local2.alpha;
_local3 = (_local3 - Translate_Increment(0.05, 50, 30));
if (_local3 < 0){
_local3 = 0;
};
_local2.alpha = _local3;
if (_local3 == 0){
_local2.x = 640;
pFrontend_Status = "SlideInBattleElements";
};
break;
case "SlideInBattleElements":
_local17 = true;
_local18 = true;
_local19 = true;
_local20 = true;
if (MainObj.battle_challenger.x < 497){
MainObj.battle_challenger.x = (MainObj.battle_challenger.x + Translate_Increment(25, 50, 30));
MainObj.battle_challenger_shadow.x = (MainObj.battle_challenger_shadow.x + Translate_Increment(25, 50, 30));
MainObj.battle_challenger_circle.x = (MainObj.battle_challenger_circle.x + Translate_Increment(25, 50, 30));
_local17 = false;
if (MainObj.battle_challenger.x >= 497){
MainObj.battle_challenger.x = 497;
MainObj.battle_challenger_shadow.X = 395;
MainObj.battle_challenger_circle.X = 460;
_local17 = true;
};
};
if (MainObj.battle_player.x > 169){
MainObj.battle_player.x = (MainObj.battle_player.x - Translate_Increment(25, 50, 30));
MainObj.battle_player_circle.x = (MainObj.battle_player_circle.x - Translate_Increment(25, 50, 30));
_local18 = false;
if (MainObj.battle_player.x <= 169){
MainObj.battle_player.x = 169;
MainObj.battle_player_circle.x = -50;
_local18 = false;
};
};
if ((((_local17 == true)) && ((_local18 == true)))){
if (MainObj.battle_challenger_statbox.x < 0){
MainObj.battle_challenger_statbox.x = (MainObj.battle_challenger_statbox.x + Translate_Increment(25, 50, 30));
_local19 = false;
if (MainObj.battle_challenger_statbox.x >= 0){
MainObj.battle_challenger_statbox.x = 0;
_local19 = true;
};
};
if (MainObj.battle_player_statbox.x > 333){
MainObj.battle_player_statbox.x = (MainObj.battle_player_statbox.x - Translate_Increment(25, 50, 30));
_local20 = false;
if (MainObj.battle_player_statbox.x <= 333){
MainObj.battle_player_statbox.x = 333;
_local20 = true;
};
};
if ((((_local19 == true)) && ((_local20 == true)))){
pBattle_State = "intro-1";
gGame_Status = "Battle";
pFrontend_Status = "Battle";
};
};
break;
case "PreTitleScreen":
if (pMusicFirstPlayed == true){
pChannel1.stop();
};
pFrontend_Status = "TitleScreen";
break;
case "TitleScreen":
break;
case "PreCredits":
pFrontend_Status = "Credits";
break;
case "Credits":
MainObj.back_button.addEventListener(MouseEvent.CLICK, GeneralButtonBehavior);
MainObj.back_button.addEventListener(MouseEvent.MOUSE_OVER, GeneralButtonBehavior);
MainObj.back_button.addEventListener(MouseEvent.MOUSE_OUT, GeneralButtonBehavior);
MainObj.sociotown_clicklogo.addEventListener(MouseEvent.CLICK, open_SocioTownPage);
MainObj.sociotown_clicklogo.buttonMode = true;
break;
case "Cinematic":
break;
case "PreLevel-1":
switch (pCurrentLevel){
};
case "GameOver":
_local9 = (getTimer() - pStartTime);
if (_local9 > 4000){
pFrontend_Status = "FadeOutGameOver";
};
break;
case "FadeOutGameOver":
_local2 = MainObj.black_screen;
_local3 = _local2.alpha;
_local2.x = 0;
_local3 = (_local3 + Translate_Increment(0.05, 50, 30));
if (_local3 > 1){
_local3 = 1;
};
_local2.alpha = _local3;
if (_local3 == 1){
pFrontend_Status = "PreTitleScreen";
};
break;
case "WINNER":
pFinalBattle = false;
switch (pChosenCharacter){
case "Obama":
pFrontend_Status = "ObamaWin-1";
MainObj.gotoAndStop("obamawins");
break;
case "McCain":
pFrontend_Status = "McCainWin-1";
MainObj.gotoAndStop("mccainwins");
break;
};
break;
case "McCainWin-1":
_local2 = MainObj.black_screen;
_local2.x = 0;
_local3 = _local2.alpha;
_local3 = (_local3 - Translate_Increment(0.05, 50, 30));
if (_local3 < 0){
_local3 = 0;
};
_local2.alpha = _local3;
if (_local3 == 0){
_local2.x = 640;
pFrontend_Status = "McCainWin-2";
};
break;
case "McCainWin-2":
if (pMusicFirstPlayed == true){
pChannel1.stop();
};
pChannel1 = McCainEndingSongBG_Snd.play();
pStartTime = getTimer();
pFrontend_Status = "McCainWin-3";
break;
case "McCainWin-3":
_local9 = (getTimer() - pStartTime);
if (_local9 > 87000){
pFrontend_Status = "McCainWin-4";
MainObj.gotoAndStop("mccaincredits");
};
break;
case "McCainWin-4":
_local9 = (getTimer() - pStartTime);
if (_local9 > 97000){
pStartTime = getTimer();
pFrontend_Status = "PreTitleScreen";
};
break;
case "ObamaWin-1":
MainObj.obama_ending_picture.alpha = 0;
MainObj.yeswecan_text.alpha = 0;
_local2 = MainObj.black_screen;
_local2.x = 0;
_local3 = _local2.alpha;
_local3 = (_local3 - Translate_Increment(0.05, 50, 30));
if (_local3 < 0){
_local3 = 0;
};
_local2.alpha = _local3;
if (_local3 == 0){
_local2.x = 640;
pFrontend_Status = "ObamaWin-2";
};
break;
case "ObamaWin-2":
if (pMusicFirstPlayed == true){
pChannel1.stop();
};
pChannel1 = ObamaEndingSongBG_Snd.play();
pStartTime = getTimer();
pFrontend_Status = "ObamaWin-3";
break;
case "ObamaWin-3":
_local3 = MainObj.obama_ending_picture.alpha;
_local3 = (_local3 + Translate_Increment(0.03, 50, 30));
if (_local3 > 1){
_local3 = 1;
};
MainObj.obama_ending_picture.alpha = _local3;
_local9 = (getTimer() - pStartTime);
if (_local9 > 42000){
MainObj.yeswecan_text.alpha = 1;
pFrontend_Status = "ObamaWin-4";
};
break;
case "ObamaWin-4":
_local9 = (getTimer() - pStartTime);
if (_local9 > 120000){
pFrontend_Status = "ObamaWin-5";
MainObj.gotoAndStop("obamacredits");
};
break;
case "ObamaWin-5":
_local9 = (getTimer() - pStartTime);
if (_local9 > 170000){
pStartTime = getTimer();
pFrontend_Status = "PreTitleScreen";
};
break;
};
}
public function AdjustHealthBars(){
var _local1:Number;
var _local2:*;
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:*;
var _local7:int;
var _local8:Number;
_local1 = (pHealth_Prez / pHealth_PrezMax);
_local2 = MainObj.PresidentHealthBar.width;
if (_local2 > 46){
MainObj.PresidentHealthBar.gotoAndStop(1);
};
if ((((_local2 >= 21)) && ((_local2 <= 46)))){
MainObj.PresidentHealthBar.gotoAndStop(2);
};
if (_local2 < 21){
MainObj.PresidentHealthBar.gotoAndStop(3);
};
_local3 = (72 * _local1);
_local4 = _local3;
if (MainObj.PresidentHealthBar.width < _local4){
MainObj.PresidentHealthBar.width = (MainObj.PresidentHealthBar.width + Translate_Increment(1, 50, 30));
if (MainObj.PresidentHealthBar.width > _local4){
MainObj.PresidentHealthBar.width = _local4;
};
};
if (MainObj.PresidentHealthBar.width > _local4){
MainObj.PresidentHealthBar.width = (MainObj.PresidentHealthBar.width - Translate_Increment(1, 50, 30));
if (MainObj.PresidentHealthBar.width < _local4){
MainObj.PresidentHealthBar.width = _local4;
};
};
_local5 = (pHealth_Vice / pHealth_ViceMax);
_local6 = MainObj.ViceHealthBar.width;
if (_local6 > 46){
MainObj.ViceHealthBar.gotoAndStop(1);
};
if ((((_local6 >= 21)) && ((_local6 <= 46)))){
MainObj.ViceHealthBar.gotoAndStop(2);
};
if (_local6 < 21){
MainObj.ViceHealthBar.gotoAndStop(3);
};
_local7 = (72 * _local5);
_local8 = _local7;
if (MainObj.ViceHealthBar.width < _local8){
MainObj.ViceHealthBar.width = (MainObj.ViceHealthBar.width + Translate_Increment(1, 50, 30));
if (MainObj.ViceHealthBar.width > _local8){
MainObj.ViceHealthBar.width = _local8;
};
};
if (MainObj.ViceHealthBar.width > _local8){
MainObj.ViceHealthBar.width = (MainObj.ViceHealthBar.width - Translate_Increment(1, 50, 30));
if (MainObj.ViceHealthBar.width < _local8){
MainObj.ViceHealthBar.width = _local8;
};
};
}
public function ProcessBattleMove(_arg1:String, _arg2:String){
var _local3:Object;
var _local4:Object;
var _local5:String;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:Boolean;
var _local10:int;
var _local11:int;
var _local12:Boolean;
var _local13:int;
var _local14:int;
pCurrentBattleMove = _arg2;
_local3 = {};
_local3["Obama"] = {};
_local3["Obama"]["SOARING SPEECH"] = {Type:"Attack", AR:"H", Accur:90, Backf:5, ME:75, WC:40, CW:100, E:40, CP:20, HL:100, AA:100, H:70, C:100, R:30, JM:50, SP:50};
_local3["Obama"]["CHANGE"] = {Type:"Attack", AR:"M", Accur:99, Backf:1, ME:50, WC:30, CW:50, E:20, CP:20, HL:50, AA:80, H:65, C:65, R:30, JM:30, SP:30};
_local3["Obama"]["NUANCE"] = {Type:"Confusion", AR:"L", Accur:10, Backf:5, ME:10, WC:75, CW:75, E:75, CP:75, HL:50, AA:50, H:50, C:50, R:80, JM:50, SP:85};
_local3["Obama"]["RELATE"] = {Type:"Attack", AR:"L", Accur:95, Backf:1, ME:25, WC:5, CW:20, E:5, CP:5, HL:35, AA:85, H:30, C:50, R:5, JM:5, SP:15};
_local3["Biden"] = {};
_local3["Biden"]["DEBATE"] = {Type:"Attack", AR:"H", Accur:90, Backf:5, ME:40, WC:40, CW:40, E:40, CP:40, HL:40, AA:40, H:40, C:40, R:40, JM:25, SP:50};
_local3["Biden"]["RAMBLE ON"] = {Type:"Sleep", AR:"L", Accur:50, Backf:5, ME:20, WC:40, CW:40, E:40, CP:40, HL:40, AA:40, H:40, C:40, R:40, JM:40, SP:40};
_local3["Biden"]["GET UP!"] = {Type:"Team Recover", AR:"M", Accur:95, Backf:1, ME:10, WC:75, CW:35, E:75, CP:50, HL:70, AA:25, H:25, R:80, C:40, JM:20, SP:85};
_local3["Biden"]["RELATE"] = {Type:"Attack", AR:"L", Accur:95, Backf:1, ME:25, WC:30, CW:15, E:5, CP:5, HL:20, AA:25, H:30, C:20, R:20, JM:5, SP:5};
_local3["McCain"] = {};
_local3["McCain"]["P.O.W."] = {Type:"Attack", AR:"H", Accur:90, Backf:5, ME:50, WC:50, CW:50, E:50, CP:75, HL:50, AA:50, H:50, C:50, R:80, BO:45, JB:35};
_local3["McCain"]["MAVERICK MOVE"] = {Type:"Attack", AR:"M", Accur:90, Backf:40, ME:80, WC:80, CW:80, E:95, CP:120, HL:80, AA:80, H:80, C:110, R:80, BO:50, JB:50};
_local3["McCain"]["TELEPROMPTER"] = {Type:"Sleep", AR:"L", Accur:10, Backf:10, ME:80, WC:60, CW:75, E:60, CP:60, HL:80, AA:80, H:80, C:80, R:80, BO:50, JB:50};
_local3["McCain"]["RELATE"] = {Type:"Attack", AR:"L", Accur:95, Backf:1, ME:25, WC:25, CW:10, E:30, CP:30, HL:20, AA:1, H:5, C:5, R:40, BO:5, JB:5};
_local3["Palin"] = {};
_local3["Palin"]["FOLKSY SPEECH"] = {Type:"Attack", AR:"H", Accur:90, Backf:5, ME:5, WC:45, CW:20, E:90, CP:75, HL:10, AA:20, H:20, C:25, R:100, BO:30, JB:30};
_local3["Palin"]["UNSCRIPTED ANSWER"] = {Type:"Confusion", AR:"L", Accur:90, Backf:1, ME:80, WC:50, CW:70, E:5, CP:5, HL:80, AA:80, H:80, C:70, R:5, BO:50, JB:50};
_local3["Palin"]["RALLY BASE"] = {Type:"Life Sucker", AR:"M", Accur:10, Backf:80, ME:10, WC:75, CW:20, E:100, CP:100, HL:10, AA:5, H:5, C:10, R:90, BO:10, JB:10};
_local3["Palin"]["RELATE"] = {Type:"Attack", AR:"L", Accur:95, Backf:1, ME:1, WC:40, CW:20, E:100, CP:80, HL:5, AA:5, H:5, C:15, R:80, BO:5, JB:5};
_local3["WHITE WORKING CLASS"] = {};
_local3["WHITE WORKING CLASS"]["VOTE AGAINST SELF-INTEREST"] = {Type:"Attack", AR:"M", Accur:100, Backf:25, BO:45, JB:20, JM:5, SP:10};
_local3["WHITE WORKING CLASS"]["ECONOMIC CONCERN"] = {Type:"Attack", AR:"M", Accur:90, Backf:1, BO:10, JB:10, JM:45, SP:35};
_local3["WHITE WORKING CLASS"]["SELF-DELUSION"] = {Type:"Recover", AR:"L", Accur:90, Backf:10, BO:20, JB:15, JM:15, SP:5};
_local3["CAREER WOMAN"] = {};
_local3["CAREER WOMAN"]["SEXISM CHARGE"] = {Type:"Attack", AR:"H", Accur:90, Backf:10, BO:45, JB:20, JM:35, SP:1};
_local3["CAREER WOMAN"]["HEALTHCARE CONCERN"] = {Type:"Attack", AR:"M", Accur:90, Backf:10, BO:5, JB:5, JM:30, SP:30};
_local3["CAREER WOMAN"]["SELF-DELUSION"] = {Type:"Recover", AR:"L", Accur:90, Backf:10, BO:20, JB:15, JM:15, SP:5};
_local3["AFRICAN AMERICAN"] = {};
_local3["AFRICAN AMERICAN"]["RACE CARD"] = {Type:"Attack", AR:"H", Accur:90, Backf:25, BO:5, JB:20, JM:55, SP:30};
_local3["AFRICAN AMERICAN"]["ECONOMIC CONCERN"] = {Type:"Attack", AR:"M", Accur:90, Backf:5, BO:5, JB:10, JM:45, SP:40};
_local3["AFRICAN AMERICAN"]["SELF-DELUSION"] = {Type:"Recover", AR:"L", Accur:90, Backf:10, BO:20, JB:15, JM:15, SP:5};
_local3["COLLEGE FRATBOY"] = {};
_local3["COLLEGE FRATBOY"]["APATHY"] = {Type:"Attack", AR:"H", Accur:90, Backf:50, BO:15, JB:15, JM:30, SP:25};
_local3["COLLEGE FRATBOY"]["ENVIRONMENTAL CONCERN"] = {Type:"Attack", AR:"M", Accur:90, Backf:5, BO:15, JB:25, JM:35, SP:45};
_local3["COLLEGE FRATBOY"]["SELF-DELUSION"] = {Type:"Recover", AR:"L", Accur:90, Backf:10, BO:20, JB:15, JM:15, SP:5};
_local3["CONSERVATIVE BLOWHARD"] = {};
_local3["CONSERVATIVE BLOWHARD"]["MISINFORMATION"] = {Type:"Attack", AR:"H", Accur:90, Backf:5, BO:45, JB:20, JM:5, SP:1};
_local3["CONSERVATIVE BLOWHARD"]["CULTURAL DIVIDE"] = {Type:"Attack", AR:"M", Accur:90, Backf:5, BO:50, JB:15, JM:1, SP:1};
_local3["CONSERVATIVE BLOWHARD"]["SELF-DELUSION"] = {Type:"Recover", AR:"L", Accur:90, Backf:10, BO:20, JB:15, JM:15, SP:5};
_local3["EVANGELICAL"] = {};
_local3["EVANGELICAL"]["LITMUS TEST"] = {Type:"Attack", AR:"H", Accur:90, Backf:5, BO:35, JB:20, JM:5, SP:1};
_local3["EVANGELICAL"]["CULTURAL CONCERNS"] = {Type:"Attack", AR:"M", Accur:90, Backf:5, BO:25, JB:20, JM:5, SP:1};
_local3["EVANGELICAL"]["SELF-DELUSION"] = {Type:"Recover", AR:"L", Accur:90, Backf:10, BO:20, JB:15, JM:15, SP:5};
_local3["HISPANIC"] = {};
_local3["HISPANIC"]["IMMIGRATION HYSTERIA"] = {Type:"Attack", AR:"H", Accur:90, Backf:10, BO:20, JB:20, JM:50, SP:25};
_local3["HISPANIC"]["ECONOMIC CONCERN"] = {Type:"Attack", AR:"M", Accur:90, Backf:5, BO:10, JB:10, JM:45, SP:45};
_local3["HISPANIC"]["SELF-DELUSION"] = {Type:"Recover", AR:"L", Accur:90, Backf:10, BO:20, JB:15, JM:15, SP:5};
_local3["HOLLYWOOD LIBERAL"] = {};
_local3["HOLLYWOOD LIBERAL"]["POLITICAL SATIRE"] = {Type:"Attack", AR:"H", Accur:90, Backf:10, BO:5, JB:10, JM:35, SP:50};
_local3["HOLLYWOOD LIBERAL"]["ANIMAL RIGHTS"] = {Type:"Attack", AR:"M", Accur:90, Backf:10, BO:10, JB:10, JM:20, SP:45};
_local3["HOLLYWOOD LIBERAL"]["SELF-DELUSION"] = {Type:"Recover", AR:"L", Accur:90, Backf:10, BO:20, JB:15, JM:15, SP:5};
_local3["MEDIA ELITE"] = {};
_local3["MEDIA ELITE"]["SENSATIONALISM"] = {Type:"Attack", AR:"H", Accur:90, Backf:10, BO:45, JB:20, JM:45, SP:60};
_local3["MEDIA ELITE"]["SCRUTINY"] = {Type:"Attack", AR:"M", Accur:90, Backf:10, BO:10, JB:10, JM:20, SP:70};
_local3["MEDIA ELITE"]["SELF-DELUSION"] = {Type:"Recover", AR:"L", Accur:90, Backf:10, BO:20, JB:15, JM:15, SP:5};
_local3["REDNECK"] = {};
_local3["REDNECK"]["GUN RIGHTS"] = {Type:"Attack", AR:"H", Accur:90, Backf:10, BO:35, JB:30, JM:5, SP:1};
_local3["REDNECK"]["CULTURAL CONCERNS"] = {Type:"Attack", AR:"M", Accur:90, Backf:5, BO:25, JB:20, JM:5, SP:1};
_local3["REDNECK"]["SELF-DELUSION"] = {Type:"Recover", AR:"L", Accur:90, Backf:10, BO:20, JB:15, JM:15, SP:5};
switch (_arg1){
case "Human":
_local4 = _local3[pActiveCharacterName][_arg2];
_local5 = _local4["Type"];
_local6 = _local4["Accur"];
_local7 = _local4["Backf"];
_local8 = _local4[pActiveBattleCPUSymbol];
pBattleHitValue = _local8;
pBattleAttackRecoil = _local4["AR"];
if (pBattleHumanisConfused == true){
if (pBattleHumanConfusionTurns == 0){
pBattleHumanisConfused = false;
} else {
pActiveCharacterHealth = (pActiveCharacterHealth - 15);
if (pActiveCharacterHealth < 1){
pActiveCharacterHealth = 1;
};
pBattleHumanConfusionTurns = (pBattleHumanConfusionTurns - 1);
pBattle_State = "HumanStillConfused";
return;
};
};
if (pBattleHumanisSleeping == true){
if (pBattleHumanSleepTurns == 0){
pBattleHumanisSleeping = false;
} else {
pBattleHumanSleepTurns = (pBattleHumanSleepTurns - 1);
pBattle_State = "HumanStillSleeping";
return;
};
};
break;
case "CPU":
_local4 = _local3[pActiveBattleCPUName][_arg2];
_local5 = _local4["Type"];
_local6 = _local4["Accur"];
_local7 = _local4["Backf"];
_local8 = _local4[pActiveCharacterSymbol];
pBattleHitValue = _local8;
pBattleAttackRecoil = _local4["AR"];
if (pBattleCPUisConfused == true){
if (pBattleCPUConfusionTurns == 0){
pBattleCPUisConfused = false;
} else {
pActiveBattleCPUHealth = (pActiveBattleCPUHealth - 15);
if (pActiveBattleCPUHealth < 1){
pActiveBattleCPUHealth = 1;
};
pBattleCPUConfusionTurns = (pBattleCPUConfusionTurns - 1);
pBattle_State = "CPUStillConfused";
return;
};
};
if (pBattleCPUisSleeping == true){
if (pBattleCPUSleepTurns == 0){
pBattleCPUisSleeping = false;
} else {
pBattleCPUSleepTurns = (pBattleCPUSleepTurns - 1);
pBattle_State = "CPUStillSleeping";
return;
};
};
break;
};
switch (_local5){
case "Attack":
_local9 = false;
_local10 = 100;
_local11 = (1 + Math.floor((Math.random() * _local10)));
if (_local11 <= _local6){
_local9 = true;
};
if (_local9 == true){
_local12 = false;
_local13 = 100;
_local14 = (1 + Math.floor((Math.random() * _local13)));
if (_local14 <= _local7){
_local12 = true;
};
if (_local12 == false){
if (_arg1 == "Human"){
pActiveBattleCPUHealth = (pActiveBattleCPUHealth - _local8);
if (pActiveBattleCPUHealth < 1){
pActiveBattleCPUHealth = 1;
};
pBattle_State = "SuccessfulHumanAttack";
PlayVoiceSample(_arg2, pActiveCharacterName);
} else {
pActiveCharacterHealth = (pActiveCharacterHealth - _local8);
if (pActiveCharacterHealth < 1){
pActiveCharacterHealth = 1;
};
pBattle_State = "SuccessfulCPUAttack";
};
} else {
pBattleMoveBackfire = true;
if (_arg1 == "Human"){
pActiveCharacterHealth = (pActiveCharacterHealth - (_local8 * 0.5));
if (pActiveCharacterHealth < 1){
pActiveCharacterHealth = 1;
};
pBattle_State = "BackfiredHumanAttack";
if ((((pActiveCharacterName == "McCain")) && ((_arg2 == "MAVERICK MOVE")))){
PlayVoiceSample(_arg2, pActiveCharacterName);
};
} else {
pActiveBattleCPUHealth = (pActiveBattleCPUHealth - (_local8 * 0.5));
if (pActiveBattleCPUHealth < 1){
pActiveBattleCPUHealth = 1;
};
pBattle_State = "BackfiredCPUAttack";
};
};
} else {
if (_arg1 == "Human"){
pBattle_State = "FailedHumanAttack";
} else {
pBattle_State = "FailedCPUAttack";
};
};
break;
case "Confusion":
_local9 = false;
_local10 = 100;
_local11 = (1 + Math.floor((Math.random() * _local10)));
if (_local11 <= (_local6 + _local8)){
_local9 = true;
};
if (_local9 == true){
_local12 = false;
_local13 = 100;
_local14 = (1 + Math.floor((Math.random() * _local13)));
if (_local14 <= _local7){
_local12 = true;
};
if (_local12 == false){
if (_arg1 == "Human"){
pBattle_State = "SuccessfulHumanAttack";
pBattleCPUConfusion = true;
PlayVoiceSample(_arg2, pActiveCharacterName);
} else {
pBattle_State = "SuccessfulCPUAttack";
pBattleHumanConfusion = true;
};
} else {
pBattleMoveBackfire = true;
if (_arg1 == "Human"){
pBattle_State = "BackfiredHumanAttack";
pBattleHumanConfusion = true;
} else {
pBattle_State = "BackfiredCPUAttack";
pBattleCPUConfusion = true;
};
};
} else {
if (_arg1 == "Human"){
pBattle_State = "FailedHumanAttack";
} else {
pBattle_State = "FailedCPUAttack";
};
};
break;
case "Sleep":
_local9 = false;
_local10 = 100;
_local11 = (1 + Math.floor((Math.random() * _local10)));
if (_local11 <= (_local6 + _local8)){
_local9 = true;
};
if (_local9 == true){
_local12 = false;
_local13 = 100;
_local14 = (1 + Math.floor((Math.random() * _local13)));
if (_local14 <= _local7){
_local12 = true;
};
if (_local12 == false){
if (_arg1 == "Human"){
pBattle_State = "SuccessfulHumanAttack";
pBattleCPUSleep = true;
} else {
pBattle_State = "SuccessfulCPUAttack";
pBattleHumanSleep = true;
};
} else {
if (_arg1 == "Human"){
pBattle_State = "BackfiredHumanAttack";
pBattleHumanSleep = true;
} else {
pBattle_State = "BackfiredCPUAttack";
pBattleCPUSleep = true;
};
};
} else {
if (_arg1 == "Human"){
pBattle_State = "FailedHumanAttack";
} else {
pBattle_State = "FailedCPUAttack";
};
};
break;
case "Recover":
case "Team Recover":
_local9 = false;
_local10 = 100;
_local11 = (1 + Math.floor((Math.random() * _local10)));
if (_local11 <= _local6){
_local9 = true;
};
if (_local9 == true){
if (_arg1 == "Human"){
pBattle_State = "SuccessfulHumanRecover";
pActiveCharacterHealth = pActiveCharacterHealthMax;
pBattlePlayer1_Health = pBattlePlayer1_HealthMax;
pBattlePlayer2_Health = pBattlePlayer2_HealthMax;
PlayVoiceSample(_arg2, pActiveCharacterName);
} else {
pActiveBattleCPUHealth = (pActiveBattleCPUHealth + (1 + Math.floor((Math.random() * 75))));
pBattle_State = "SuccessfulCPURecover";
};
} else {
if (_arg1 == "Human"){
pBattle_State = "FailedHumanAttack";
} else {
pBattle_State = "FailedCPUAttack";
};
};
break;
case "Life Sucker":
_local9 = false;
_local10 = 100;
_local11 = (1 + Math.floor((Math.random() * _local10)));
if (_local11 <= (_local6 + _local8)){
_local9 = true;
};
if (_local9 == true){
if (_arg1 == "Human"){
pBattle_State = "SuccessfulHumanAttack";
pActiveBattleCPUHealth = (pActiveBattleCPUHealth - _local8);
if (pActiveBattleCPUHealth < 1){
pActiveBattleCPUHealth = 1;
};
pActiveCharacterHealth = (pActiveCharacterHealth + _local8);
if (pActiveCharacterHealth > pActiveCharacterHealthMax){
pActiveCharacterHealth = pActiveCharacterHealthMax;
};
pBattlePlayer1_Health = (pBattlePlayer1_Health + _local8);
if (pBattlePlayer1_Health > pBattlePlayer1_HealthMax){
pBattlePlayer1_Health = pBattlePlayer1_HealthMax;
};
pBattleCPULifeDrain = true;
} else {
pActiveCharacterHealth = (pActiveCharacterHealth - _local8);
if (pActiveCharacterHealth < 1){
pActiveCharacterHealth = 1;
};
pActiveBattleCPUHealth = (pActiveBattleCPUHealth + _local8);
if (pActiveBattleCPUHealth > pActiveBattleCPUHealthMax){
pActiveBattleCPUHealth = pActiveBattleCPUHealthMax;
};
pBattlePlayer1_Health = (pBattlePlayer1_Health + _local8);
if (pBattleCPU1_Health > pBattleCPU1_HealthMax){
pBattleCPU1_Health = pBattleCPU1_HealthMax;
};
pBattle_State = "SuccessfulCPUAttack";
};
} else {
if (_arg1 == "Human"){
pBattle_State = "FailedHumanAttack";
} else {
pBattle_State = "FailedCPUAttack";
};
};
break;
};
}
public function GetDirectionFrom(_arg1:Object, _arg2:Object){
var _local3:String;
var _local4:String;
var _local5:String;
var _local6:int;
var _local7:int;
if (_arg1.pWorldX < _arg2.pWorldX){
_local4 = "left";
_local6 = (_arg2.pWorldX - _arg1.pWorldX);
};
if (_arg1.pWorldX > _arg2.pWorldX){
_local4 = "right";
_local6 = (_arg1.pWorldX - _arg2.pWorldX);
};
if (_arg1.pWorldZ < _arg2.pWorldZ){
_local5 = "back";
_local7 = (_arg2.pWorldZ - _arg1.pWorldZ);
};
if (_arg1.pWorldZ > _arg2.pWorldZ){
_local5 = "front";
_local7 = (_arg1.pWorldZ - _arg2.pWorldZ);
};
if (_local4 == "left"){
if (_local6 > _local7){
_local3 = "left";
} else {
_local3 = _local5;
};
};
if (_local4 == "right"){
if (_local6 > _local7){
_local3 = "right";
} else {
_local3 = _local5;
};
};
return (_local3);
}
public function GeneralButtonBehavior(_arg1:MouseEvent){
var _local2:*;
var _local3:GlowFilter;
switch (_arg1.type){
case "mouseOver":
_local2 = _arg1.currentTarget;
switch (_local2.name){
case "new_game_button":
case "continue_button":
case "credits_button":
case "back_button":
case "obama_biden_team_button":
case "mccain_palin_team_button":
_local3 = new GlowFilter();
_local3.blurX = 23;
_local3.blurY = 23;
_local3.color = 0xFFCC00;
_local3.strength = 0.75;
_local2.filters = [_local3];
break;
};
break;
case "mouseOut":
_local2 = _arg1.currentTarget;
switch (_local2.name){
case "new_game_button":
case "continue_button":
case "credits_button":
case "back_button":
case "obama_biden_team_button":
case "mccain_palin_team_button":
_local2.filters = [];
break;
};
break;
case "click":
_local2 = _arg1.currentTarget;
switch (_local2.name){
case "new_game_button":
_local2.filters = [];
MainObj.gotoAndStop("choose_team");
pFrontend_Status = "PreChooseTeam";
break;
case "mccain_palin_team_button":
_local2.filters = [];
pChosenCharacter = "McCain";
pFrontend_Status = "InitializeMap";
MainObj.gotoAndStop("map");
break;
case "obama_biden_team_button":
_local2.filters = [];
pChosenCharacter = "Obama";
pFrontend_Status = "InitializeMap";
MainObj.gotoAndStop("map");
break;
case "continue_button":
pContinueGame = true;
_local2.filters = [];
pFrontend_Status = "InitializeMap";
MainObj.gotoAndStop("map");
break;
case "credits_button":
pFrontend_Status = "PreCredits";
MainObj.gotoAndStop("credits");
break;
case "back_button":
pFrontend_Status = "PreTitleScreen";
MainObj.gotoAndStop("title_screen");
break;
};
break;
};
}
public function keyDownFunction(_arg1:KeyboardEvent){
if (_arg1.keyCode == 37){
arrowLeft = true;
} else {
if (_arg1.keyCode == 39){
arrowRight = true;
} else {
if (_arg1.keyCode == 38){
arrowUp = true;
} else {
if (_arg1.keyCode == 40){
arrowDown = true;
} else {
if ((((_arg1.keyCode >= 65)) && ((_arg1.keyCode <= 90)))){
Attack_KeyDown = true;
} else {
if (_arg1.keyCode == 32){
SpaceBar_Down = true;
};
};
};
};
};
};
}
public function CleanUp(){
switch (pCleanUpState){
case "1":
pCleanUpState = "2";
break;
case "2":
gGame_Status = "Frontend";
pFrontend_Status = "PreLevel-1";
pCleanUpState = "1";
break;
case "3":
break;
case "3":
pCleanUpState = "4";
break;
case "4":
MainObj.gotoAndStop("Score");
gGame_Status = "Frontend";
pFrontend_Status = "PreScore";
break;
};
}
public function Battle(){
var _local1:int;
var _local2:*;
var _local3:String;
var _local4:*;
var _local5:String;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:int;
var _local11:String;
var _local12:String;
var _local13:int;
var _local14:int;
var _local15:Number;
var _local16:int;
var _local17:int;
var _local18:int;
var _local19:Number;
var _local20:MovieClip;
var _local21:*;
var _local22:int;
var _local23:Number;
var _local24:Boolean;
var _local25:Boolean;
var _local26:int;
var _local27:Number;
var _local28:int;
var _local29:int;
var _local30:Number;
var _local31:MovieClip;
var _local32:*;
var _local33:*;
var _local34:int;
var _local35:int;
var _local36:Number;
var _local37:int;
var _local38:*;
var _local39:Number;
var _local40:PunchHardSnd;
var _local41:SoundChannel;
var _local42:Boolean;
var _local43:Boolean;
switch (pBattle_State){
case "intro-1":
if (pFinalBattle == true){
MainObj.challenger_podium.alpha = 1;
};
pBattle_StartTime = getTimer();
pBattle_State = "intro-2";
break;
case "intro-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2000){
pBattle_State = "setup_battle_moves";
};
break;
case "setup_battle_moves":
_local10 = 22;
switch (pActiveCharacterName){
case "Obama":
_local3 = "SOARING SPEECH";
_local2 = "SOARING SPEECH";
_local5 = "CHANGE";
_local4 = "CHANGE";
_local7 = "NUANCE";
_local6 = "NUANCE";
_local9 = "RELATE";
_local8 = "RELATE";
break;
case "Biden":
_local3 = "DEBATE";
_local2 = "DEBATE";
_local5 = "RAMBLE ON";
_local4 = "RAMBLE ON";
_local7 = "GET UP!";
_local6 = "GET UP!";
_local9 = "RELATE";
_local8 = "RELATE";
break;
case "McCain":
_local3 = "P.O.W.";
_local2 = "P.O.W.";
_local5 = "MAVERICK MOVE";
_local4 = "MAVERICK MOVE";
_local7 = "TELEPROMPTER";
_local6 = "TELEPROMPTER";
_local9 = "RELATE";
_local8 = "RELATE";
break;
case "Palin":
_local3 = "FOLKSY SPEECH";
_local2 = "FOLKSY SPEECH";
_local5 = "UNSCRIPTED ANSWER";
_local4 = "UNSCRIPTED ANSWER";
_local7 = "RALLY BASE";
_local6 = "RALLY BASE";
_local9 = "RELATE";
_local8 = "RELATE";
_local10 = 18;
break;
};
pBattleMove1Text.name = _local2;
pBattleMove1Text.text = (((((_local3 + " (") + pPlayerMovesLimit[_local2]["C"]) + "/") + pPlayerMovesLimit[_local2]["M"]) + ")");
pBattleMove1Text.autoSize = TextFieldAutoSize.LEFT;
pBattleMove1Text.x = 43;
pBattleMove1Text.y = 356;
pBattleMove1Text.mouseEnabled = true;
pBattleMove1Text.selectable = false;
pBattleMove1Text.addEventListener(MouseEvent.CLICK, BattleMoveOptions);
pBattleMove1Text.addEventListener(MouseEvent.MOUSE_OVER, BattleMoveOptions);
pBattleMove1Text.addEventListener(MouseEvent.MOUSE_OUT, BattleMoveOptions);
pBattleMove2Text.name = _local4;
pBattleMove2Text.text = (((((_local5 + " (") + pPlayerMovesLimit[_local4]["C"]) + "/") + pPlayerMovesLimit[_local4]["M"]) + ")");
pBattleMove2Text.autoSize = TextFieldAutoSize.LEFT;
pBattleMove2Text.x = 43;
pBattleMove2Text.y = 398;
pBattleMove2Text.mouseEnabled = true;
pBattleMove2Text.selectable = false;
pBattleMove2Text.addEventListener(MouseEvent.CLICK, BattleMoveOptions);
pBattleMove2Text.addEventListener(MouseEvent.MOUSE_OVER, BattleMoveOptions);
pBattleMove2Text.addEventListener(MouseEvent.MOUSE_OUT, BattleMoveOptions);
pBattleMove3Text.name = _local6;
pBattleMove3Text.text = (((((_local7 + " (") + pPlayerMovesLimit[_local6]["C"]) + "/") + pPlayerMovesLimit[_local6]["M"]) + ")");
pBattleMove3Text.autoSize = TextFieldAutoSize.LEFT;
pBattleMove3Text.x = 343;
pBattleMove3Text.y = 356;
pBattleMove3Text.mouseEnabled = true;
pBattleMove3Text.selectable = false;
pBattleMove3Text.addEventListener(MouseEvent.CLICK, BattleMoveOptions);
pBattleMove3Text.addEventListener(MouseEvent.MOUSE_OVER, BattleMoveOptions);
pBattleMove3Text.addEventListener(MouseEvent.MOUSE_OUT, BattleMoveOptions);
pBattleMove4Text.name = _local8;
pBattleMove4Text.text = (((((_local9 + " (") + pPlayerMovesLimit[_local8]["C"]) + "/") + pPlayerMovesLimit[_local8]["M"]) + ")");
pBattleMove4Text.autoSize = TextFieldAutoSize.LEFT;
pBattleMove4Text.x = 343;
pBattleMove4Text.y = 398;
pBattleMove4Text.mouseEnabled = true;
pBattleMove4Text.selectable = false;
pBattleMove4Text.addEventListener(MouseEvent.CLICK, BattleMoveOptions);
pBattleMove4Text.addEventListener(MouseEvent.MOUSE_OVER, BattleMoveOptions);
pBattleMove4Text.addEventListener(MouseEvent.MOUSE_OUT, BattleMoveOptions);
pBattleMoveTextFormat.size = _local10;
pBattleMoveTextFormat.align = "left";
pBattleMoveTextFormat.bold = true;
pBattleMoveTextFormat.font = "Tahoma";
pBattleMove1Text.setTextFormat(pBattleMoveTextFormat);
pBattleMove2Text.setTextFormat(pBattleMoveTextFormat);
pBattleMove3Text.setTextFormat(pBattleMoveTextFormat);
pBattleMove4Text.setTextFormat(pBattleMoveTextFormat);
pBattleSwitchText.name = "SWITCH POLIMON";
pBattleSwitchText.text = "SWITCH POLIMON";
pBattleSwitchText.autoSize = TextFieldAutoSize.LEFT;
pBattleSwitchText.x = 437;
pBattleSwitchText.y = 430;
pBattleSwitchText.mouseEnabled = true;
pBattleSwitchText.selectable = false;
pBattleSwitchText.addEventListener(MouseEvent.CLICK, BattleMoveOptions);
pBattleSwitchText.addEventListener(MouseEvent.MOUSE_OVER, BattleMoveOptions);
pBattleSwitchText.addEventListener(MouseEvent.MOUSE_OUT, BattleMoveOptions);
pBattleSwitchTextFormat.size = "15";
pBattleSwitchTextFormat.align = "left";
pBattleSwitchTextFormat.bold = true;
pBattleSwitchTextFormat.font = "Tahoma";
pBattleSwitchText.setTextFormat(pBattleSwitchTextFormat);
pBattleStatusText.selectable = false;
MainObj.addChild(pBattleMove1Text);
MainObj.addChild(pBattleMove2Text);
MainObj.addChild(pBattleMove3Text);
MainObj.addChild(pBattleMove4Text);
MainObj.addChild(pBattleSwitchText);
MainObj.removeChild(pBattleStatusText);
pBattle_State = "battle_moves";
break;
case "battle_moves":
break;
case "CPU_turn":
CPUBattleLogic();
break;
case "SuccessfulHumanAttack":
MainObj.removeChild(pBattleMove1Text);
MainObj.removeChild(pBattleMove2Text);
MainObj.removeChild(pBattleMove3Text);
MainObj.removeChild(pBattleMove4Text);
MainObj.removeChild(pBattleSwitchText);
_local11 = ((pActiveCharacterName.toUpperCase() + " used ") + pCurrentBattleMove);
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = false;
pBattleStatusText.selectable = false;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattle_State = "HumanAttack-1";
break;
case "SuccessfulHumanRecover":
MainObj.removeChild(pBattleMove1Text);
MainObj.removeChild(pBattleMove2Text);
MainObj.removeChild(pBattleMove3Text);
MainObj.removeChild(pBattleMove4Text);
MainObj.removeChild(pBattleSwitchText);
_local11 = ((pActiveCharacterName.toUpperCase() + " used ") + pCurrentBattleMove);
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = false;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattle_State = "HumanRecover-1";
break;
case "FailedHumanAttack":
MainObj.removeChild(pBattleMove1Text);
MainObj.removeChild(pBattleMove2Text);
MainObj.removeChild(pBattleMove3Text);
MainObj.removeChild(pBattleMove4Text);
MainObj.removeChild(pBattleSwitchText);
_local11 = ((pActiveCharacterName.toUpperCase() + " used ") + pCurrentBattleMove);
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = false;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattle_State = "FailedAttack-1";
break;
case "BackfiredHumanAttack":
MainObj.removeChild(pBattleMove1Text);
MainObj.removeChild(pBattleMove2Text);
MainObj.removeChild(pBattleMove3Text);
MainObj.removeChild(pBattleMove4Text);
MainObj.removeChild(pBattleSwitchText);
_local11 = (((pActiveCharacterName.toUpperCase() + " used ") + pCurrentBattleMove) + "\nBut it BACKFIRED!");
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = false;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattle_StartTime = getTimer();
pBattle_State = "BackfiredHumanAttack-1";
break;
case "BackfiredHumanAttack-1":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
_local40 = new PunchHardSnd();
_local41 = _local40.play();
pBattle_State = "HumanHit-1";
};
break;
case "HumanStillConfused":
MainObj.removeChild(pBattleMove1Text);
MainObj.removeChild(pBattleMove2Text);
MainObj.removeChild(pBattleMove3Text);
MainObj.removeChild(pBattleMove4Text);
MainObj.removeChild(pBattleSwitchText);
_local11 = (pActiveCharacterName.toUpperCase() + " is still CONFUSED!");
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = false;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattleMoveBackfire = true;
pBattle_StartTime = getTimer();
pBattle_State = "HumanStillConfused-2";
break;
case "HumanStillSleeping":
MainObj.removeChild(pBattleMove1Text);
MainObj.removeChild(pBattleMove2Text);
MainObj.removeChild(pBattleMove3Text);
MainObj.removeChild(pBattleMove4Text);
MainObj.removeChild(pBattleSwitchText);
_local11 = (pActiveCharacterName.toUpperCase() + " is still ASLEEP!");
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = false;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattle_StartTime = getTimer();
pBattle_State = "CPUBecameSleepy-2";
break;
case "HumanAttack-1":
_local12 = pBattleAttackRecoil;
switch (_local12){
case "L":
_local13 = 140;
_local14 = 5;
break;
case "M":
_local13 = 100;
_local14 = 7;
break;
case "H":
_local13 = 60;
_local14 = 7;
break;
};
_local15 = MainObj.battle_player.x;
_local15 = (_local15 - Translate_Increment(_local14, 50, 30));
if (_local15 < _local13){
_local15 = _local13;
};
MainObj.battle_player.x = _local15;
if (_local15 == _local13){
pBattle_State = "HumanAttack-2";
};
break;
case "HumanAttack-2":
_local12 = pBattleAttackRecoil;
switch (_local12){
case "L":
_local16 = 170;
_local14 = 10;
break;
case "M":
_local16 = 170;
_local14 = 20;
break;
case "H":
_local16 = 170;
_local14 = 30;
break;
};
_local15 = MainObj.battle_player.x;
_local15 = (_local15 + Translate_Increment(_local14, 50, 30));
if (_local15 > _local16){
_local15 = _local16;
};
MainObj.battle_player.x = _local15;
if (_local15 == _local16){
_local40 = new PunchHardSnd();
_local41 = _local40.play();
pBattle_State = "CPUHit-1";
};
break;
case "CPUHit-1":
_local12 = "Heavy";
if (pBattleHitValue < 15){
_local12 = "Light";
};
if ((((pBattleHitValue >= 15)) && ((pBattleHitValue <= 40)))){
_local12 = "Medium";
};
if (pBattleHitValue > 40){
_local12 = "Heavy";
};
switch (_local12){
case "Light":
_local16 = 540;
_local14 = 20;
break;
case "Medium":
_local16 = 580;
_local14 = 20;
break;
case "Heavy":
_local16 = 650;
_local14 = 40;
break;
};
MainObj.battle_challenger.alpha = 0.5;
MainObj.battle_challenger_shadow.alpha = 0;
_local15 = MainObj.battle_challenger.x;
_local15 = (_local15 + Translate_Increment(_local14, 50, 30));
if (_local15 > _local16){
_local15 = _local16;
};
MainObj.battle_challenger.x = _local15;
if (_local15 == _local16){
pBattle_State = "CPUHit-2";
};
break;
case "CPUHit-2":
_local12 = "Heavy";
if (pBattleHitValue < 15){
_local12 = "Light";
};
if ((((pBattleHitValue >= 15)) && ((pBattleHitValue <= 40)))){
_local12 = "Medium";
};
if (pBattleHitValue > 40){
_local12 = "Heavy";
};
switch (_local12){
case "Light":
_local13 = 497;
_local14 = 20;
break;
case "Medium":
_local13 = 497;
_local14 = 20;
break;
case "Heavy":
_local13 = 497;
_local14 = 40;
break;
};
MainObj.battle_challenger.alpha = 0.5;
MainObj.battle_challenger_shadow.alpha = 0;
_local15 = MainObj.battle_challenger.x;
_local15 = (_local15 - Translate_Increment(_local14, 50, 30));
if (_local15 < _local13){
_local15 = _local13;
};
MainObj.battle_challenger.x = _local15;
if (_local15 == _local13){
MainObj.battle_challenger.alpha = 1;
MainObj.battle_challenger_shadow.alpha = 1;
pBattle_State = "CPUReduceHealth-1";
pBattle_StartTime = getTimer();
_local42 = pBattleCPUConfusion;
if (_local42 == true){
pBattle_State = "CPUBecameConfused-1";
};
_local43 = pBattleCPUSleep;
if (_local43 == true){
pBattle_State = "CPUBecameSleepy-1";
};
};
break;
case "CPUReduceHealth-1":
_local17 = pActiveBattleCPUHealth;
_local18 = pActiveBattleCPUHealthMax;
_local19 = (_local17 / _local18);
_local20 = MainObj.battle_challenger_statbox.battle_challenger_healthbar;
_local21 = _local20.width;
if (_local21 > 130){
_local20.gotoAndStop(1);
};
if ((((_local21 >= 61)) && ((_local21 <= 130)))){
_local20.gotoAndStop(2);
};
if (_local21 < 61){
_local20.gotoAndStop(3);
};
_local22 = (199 * _local19);
_local23 = _local22;
if (_local20.width > _local23){
_local20.width = (_local20.width - Translate_Increment(2, 50, 30));
if (_local20.width < (_local23 + 0.35)){
_local20.width = _local23;
};
} else {
_local20.width = _local23;
};
_local24 = pBattleCPULifeDrain;
if (_local24 == true){
_local28 = pActiveCharacterHealth;
_local29 = pActiveCharacterHealthMax;
_local30 = (_local28 / _local29);
_local31 = MainObj.battle_player_statbox.battle_player_healthbar;
_local32 = _local31.width;
_local30 = (_local28 / _local29);
_local32 = _local31.width;
if (_local32 > 130){
_local31.gotoAndStop(1);
};
if ((((_local32 >= 61)) && ((_local32 <= 130)))){
_local31.gotoAndStop(2);
};
if (_local32 < 61){
_local31.gotoAndStop(3);
};
_local35 = (199 * _local30);
_local36 = _local35;
if (_local31.width < _local36){
_local31.width = (_local31.width + Translate_Increment(2, 50, 30));
if (_local31.width > _local36){
_local31.width = _local36;
};
};
if ((((_local20.width == _local23)) && ((_local31.width == _local36)))){
pBattle_State = "CPULifeDrain-1";
};
} else {
if (_local20.width == _local23){
pBattle_State = "CPUReduceHealth-2";
};
};
break;
case "CPUReduceHealth-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2000){
pBattle_State = "CPUhowEffectiveHit-1";
};
break;
case "CPUhowEffectiveHit-1":
pBattle_State = "CPUhowEffectiveHit-2";
pBattle_StartTime = getTimer();
_local25 = pBattleMoveBackfire;
if (_local25 == true){
pBattleMoveBackfire = false;
pBattle_State = "setup_battle_moves";
if (pBattleCPUisConfused == true){
pBattle_State = "CPUStillConfused-3";
};
return;
};
if (pActiveBattleCPUHealth == 1){
pBattle_State = "CPUFainted-1";
};
_local26 = pBattleHitValue;
if (_local26 < 15){
_local11 = "It's not very effective...";
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "CPUhowEffectiveHit-2";
};
if (_local26 > 40){
_local11 = "It's Super Effective!";
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "CPUhowEffectiveHit-2";
};
MainObj.addChild(pBattleStatusText);
break;
case "CPUhowEffectiveHit-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1800){
pBattle_State = "CPU_turn";
if (pActiveBattleCPUHealth == 1){
pBattle_State = "CPUFainted-1";
};
};
break;
case "CPUFainted-1":
_local11 = (pActiveBattleCPUName.toUpperCase() + " FAINTED!");
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "CPUFainted-2";
break;
case "CPUFainted-2":
MainObj.battle_challenger_shadow.alpha = 0;
_local27 = MainObj.battle_challenger.scaleX;
_local27 = (_local27 - Translate_Increment(0.1, 50, 30));
MainObj.battle_challenger.scaleX = _local27;
MainObj.battle_challenger.scaleY = _local27;
MainObj.battle_challenger.alpha = (MainObj.battle_challenger.alpha - 0.05);
MainObj.battle_challenger.y = (MainObj.battle_challenger.y + Translate_Increment(20, 50, 30));
if (_local27 < 0.05){
pBattle_StartTime = getTimer();
MainObj.battle_challenger.x = 725;
MainObj.battle_challenger.alpha = 0;
pBattle_State = "CPUFainted-3";
};
break;
case "CPUFainted-3":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1800){
if (pFinalBattle == false){
switch (pActiveCharacterName){
case "Obama":
pHealth_Prez = pActiveCharacterHealth;
pHealth_Vice = pBattlePlayer2_Health;
break;
case "Biden":
pHealth_Prez = pBattlePlayer1_Health;
pHealth_Vice = pActiveCharacterHealth;
break;
case "McCain":
pHealth_Prez = pActiveCharacterHealth;
pHealth_Vice = pBattlePlayer2_Health;
break;
case "Palin":
pHealth_Prez = pBattlePlayer1_Health;
pHealth_Vice = pActiveCharacterHealth;
break;
};
MainObj.removeChild(pBattleStatusText);
MainObj.gotoAndStop("map");
pFrontend_Status = "PreMap-1";
gGame_Status = "Frontend";
pBattle_State = "CPUFainted-4";
} else {
switch (pActiveBattleCPUName){
case "Obama":
case "McCain":
pFrontend_Status = "WINNER";
gGame_Status = "Frontend";
pBattle_State = "CPUFainted-4";
return;
case "Biden":
case "Palin":
pBattle_State = "CPU_SwitchOut-3";
return;
};
};
};
break;
case "FailedAttack-1":
_local11 = "But it failed...";
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "FailedAttack-2";
MainObj.addChild(pBattleStatusText);
break;
case "FailedAttack-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1800){
pBattle_State = "CPU_turn";
};
break;
case "CPUBecameConfused-1":
pBattleCPUConfusion = false;
pBattleCPUisConfused = true;
if (pBattleCPUConfusionTurns == 0){
pBattleCPUConfusionTurns = 2;
};
_local11 = (pActiveBattleCPUName.toUpperCase() + " became CONFUSED!");
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "CPUBecameConfused-2";
MainObj.addChild(pBattleStatusText);
break;
case "CPUBecameConfused-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
pBattle_State = "CPU_turn";
};
break;
case "CPUStillConfused-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
_local40 = new PunchHardSnd();
_local41 = _local40.play();
pBattle_State = "CPUHit-1";
};
break;
case "CPUStillConfused-3":
_local1 = (getTimer() - pBattle_StartTime);
_local11 = (pActiveBattleCPUName.toUpperCase() + " hurt itself in its CONFUSION!");
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "CPUStillConfused-4";
break;
case "CPUStillConfused-4":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
pBattle_State = "setup_battle_moves";
};
break;
case "CPUBecameSleepy-1":
pBattleCPUSleep = false;
pBattleCPUisSleeping = true;
if (pBattleCPUSleepTurns == 0){
pBattleCPUSleepTurns = 2;
};
_local11 = (pActiveBattleCPUName.toUpperCase() + " fell ASLEEP!");
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "CPUBecameSleepy-2";
MainObj.addChild(pBattleStatusText);
break;
case "CPUBecameSleepy-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
pBattle_State = "CPU_turn";
};
break;
case "CPULifeDrain-1":
pBattleCPULifeDrain = false;
_local11 = "PALIN's AND McCAIN's health also increased!";
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "CPULifeDrain-2";
MainObj.addChild(pBattleStatusText);
break;
case "CPULifeDrain-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 3000){
pBattle_State = "CPUhowEffectiveHit-1";
};
break;
case "HumanRecover-1":
_local28 = pActiveCharacterHealth;
_local29 = pActiveCharacterHealthMax;
_local30 = (_local28 / _local29);
_local31 = MainObj.battle_player_statbox.battle_player_healthbar;
_local32 = _local31.width;
_local30 = (_local28 / _local29);
_local32 = _local31.width;
_local33 = (_local31.width / 199);
_local34 = (pActiveCharacterHealthMax * _local33);
pBattleHealthText.text = ((_local34 + "/") + pActiveCharacterHealthMax);
pBattleHealthText.setTextFormat(pBattleHealthTextFormat);
if (_local32 > 130){
_local31.gotoAndStop(1);
};
if ((((_local32 >= 61)) && ((_local32 <= 130)))){
_local31.gotoAndStop(2);
};
if (_local32 < 61){
_local31.gotoAndStop(3);
};
_local35 = (199 * _local30);
_local36 = _local35;
if (_local31.width < _local36){
_local31.width = (_local31.width + Translate_Increment(2, 50, 30));
if (_local31.width > _local36){
_local31.width = _local36;
};
};
if (_local31.width == _local36){
pBattle_State = "HumanRecover-2";
};
break;
case "HumanRecover-2":
pBattleCPULifeDrain = false;
_local11 = "OBAMA's and BIDEN's health increased!";
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "HumanRecover-3";
MainObj.addChild(pBattleStatusText);
break;
case "HumanRecover-3":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2000){
pBattle_State = "CPU_turn";
};
break;
case "Human_SwitchOut-1":
if (pBattleHumanisSleeping == true){
pBattle_State = "HumanStillSleeping";
return;
};
if (pBattleHumanisConfused == true){
pActiveCharacterHealth = (pActiveCharacterHealth - 15);
if (pActiveCharacterHealth < 1){
pActiveCharacterHealth = 1;
};
pBattle_State = "HumanStillConfused";
return;
};
MainObj.removeChild(pBattleMove1Text);
MainObj.removeChild(pBattleMove2Text);
MainObj.removeChild(pBattleMove3Text);
MainObj.removeChild(pBattleMove4Text);
MainObj.removeChild(pBattleSwitchText);
pBattle_State = "Human_SwitchOut-2";
switch (pActiveCharacterName){
case "Obama":
_local11 = "OBAMA! You look tired!";
if (pBattlePlayer2_Health == 0){
_local11 = "Biden is nursing a GAFFE. \nYou gotta do it yourself OBAMA!";
pBattle_StartTime = (getTimer() + 1000);
pBattle_State = "CPUFailedAttack-2";
};
break;
case "Biden":
_local11 = "Good job JOE!";
break;
case "McCain":
_local11 = "McCAIN! Take a nap!";
if (pBattlePlayer2_Health == 0){
_local11 = "Sarah is hiding from the \"Liberal Media\"! \nYou gotta do it yourself McCain!";
pBattle_StartTime = (getTimer() + 1000);
pBattle_State = "CPUFailedAttack-2";
};
break;
case "Palin":
_local11 = "Good job SARAH!";
break;
};
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
break;
case "Human_SwitchOut-2":
_local13 = -100;
_local14 = 20;
_local15 = MainObj.battle_player.x;
_local15 = (_local15 - Translate_Increment(_local14, 50, 30));
if (_local15 < _local13){
_local15 = _local13;
};
MainObj.battle_player.x = _local15;
if (_local15 == _local13){
pBattle_State = "Human_SwitchOut-3";
pBattle_StartTime = getTimer();
};
break;
case "Human_SwitchOut-3":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1500){
pBattle_State = "Human_SwitchOut-4";
};
break;
case "Human_SwitchOut-4":
switch (pActiveCharacterName){
case "Obama":
_local11 = "Go get'em JOE!";
pActiveCharacterName = "Biden";
_local37 = 2;
pBattlePlayer1_Symbol = pActiveCharacterSymbol;
pBattlePlayer1_Health = pActiveCharacterHealth;
pBattlePlayer1_HealthMax = pActiveCharacterHealthMax;
pActiveCharacterName = pBattlePlayer2_Name;
pActiveCharacterSymbol = pBattlePlayer2_Symbol;
pActiveCharacterHealth = pBattlePlayer2_Health;
pActiveCharacterHealthMax = pBattlePlayer2_HealthMax;
break;
case "Biden":
_local11 = "Bams go handle your business!";
pActiveCharacterName = "Obama";
_local37 = 1;
pBattlePlayer2_Symbol = pActiveCharacterSymbol;
pBattlePlayer2_Health = pActiveCharacterHealth;
pBattlePlayer2_HealthMax = pActiveCharacterHealthMax;
pActiveCharacterName = pBattlePlayer1_Name;
pActiveCharacterSymbol = pBattlePlayer1_Symbol;
pActiveCharacterHealth = pBattlePlayer1_Health;
pActiveCharacterHealthMax = pBattlePlayer1_HealthMax;
break;
case "McCain":
_local11 = "Go SARAH BARACUDA!";
pActiveCharacterName = "Palin";
_local37 = 4;
pBattlePlayer1_Symbol = pActiveCharacterSymbol;
pBattlePlayer1_Health = pActiveCharacterHealth;
pBattlePlayer1_HealthMax = pActiveCharacterHealthMax;
pActiveCharacterName = pBattlePlayer2_Name;
pActiveCharacterSymbol = pBattlePlayer2_Symbol;
pActiveCharacterHealth = pBattlePlayer2_Health;
pActiveCharacterHealthMax = pBattlePlayer2_HealthMax;
break;
case "Palin":
_local11 = "McCain! Time to get Mavericky!";
pActiveCharacterName = "McCain";
_local37 = 3;
pBattlePlayer2_Symbol = pActiveCharacterSymbol;
pBattlePlayer2_Health = pActiveCharacterHealth;
pBattlePlayer2_HealthMax = pActiveCharacterHealthMax;
pActiveCharacterName = pBattlePlayer1_Name;
pActiveCharacterSymbol = pBattlePlayer1_Symbol;
pActiveCharacterHealth = pBattlePlayer1_Health;
pActiveCharacterHealthMax = pBattlePlayer1_HealthMax;
break;
};
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
_local19 = (pActiveCharacterHealth / pActiveCharacterHealthMax);
_local20 = MainObj.battle_player_statbox.battle_player_healthbar;
_local20.width = (_local19 * 199);
_local21 = _local20.width;
if (_local21 > 130){
_local20.gotoAndStop(1);
};
if ((((_local21 >= 61)) && ((_local21 <= 130)))){
_local20.gotoAndStop(2);
};
if (_local21 < 61){
_local20.gotoAndStop(3);
};
MainObj.battle_player.gotoAndStop(_local37);
MainObj.battle_player_statbox.battle_player_name_text.gotoAndStop(_local37);
pBattleHealthText.text = ((pActiveCharacterHealth + "/") + pActiveCharacterHealthMax);
pBattleHealthText.setTextFormat(pBattleHealthTextFormat);
pBattle_State = "Human_SwitchOut-5";
break;
case "Human_SwitchOut-5":
_local16 = 170;
_local14 = 20;
_local15 = MainObj.battle_player.x;
_local15 = (_local15 + Translate_Increment(_local14, 50, 30));
if (_local15 > _local16){
_local15 = _local16;
};
MainObj.battle_player.x = _local15;
if (_local15 == _local16){
pBattle_State = "Human_SwitchOut-6";
pBattle_StartTime = getTimer();
};
break;
case "Human_SwitchOut-6":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1500){
pBattle_State = "CPU_turn";
};
break;
case "SuccessfulCPUAttack":
_local11 = ((pActiveBattleCPUName.toUpperCase() + " used ") + pCurrentBattleMove);
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = true;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattle_State = "CPUAttack-1";
break;
case "SuccessfulCPURecover":
_local11 = ((pActiveBattleCPUName.toUpperCase() + " used ") + pCurrentBattleMove);
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = false;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattle_State = "CPURecover-1";
break;
case "FailedCPUAttack":
_local11 = ((pActiveBattleCPUName.toUpperCase() + " used ") + pCurrentBattleMove);
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = true;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattle_StartTime = getTimer();
pBattle_State = "CPUFailedAttack-1";
break;
case "BackfiredCPUAttack":
_local11 = (((pActiveBattleCPUName.toUpperCase() + " used ") + pCurrentBattleMove) + "\nBut it BACKFIRED!");
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = false;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattle_StartTime = getTimer();
pBattle_State = "BackfiredCPUAttack-1";
break;
case "BackfiredCPUAttack-1":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
_local40 = new PunchHardSnd();
_local41 = _local40.play();
pBattle_State = "CPUHit-1";
};
break;
case "CPUStillConfused":
_local11 = (pActiveBattleCPUName.toUpperCase() + " is still CONFUSED!");
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = false;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattleMoveBackfire = true;
pBattle_StartTime = getTimer();
pBattle_State = "CPUStillConfused-2";
break;
case "CPUStillSleeping":
_local11 = (pActiveBattleCPUName.toUpperCase() + " is still ASLEEP!");
pBattleStatusText.text = _local11;
pBattleStatusText.wordWrap = false;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
pBattle_StartTime = getTimer();
pBattle_State = "HumanBecameSleepy-2";
break;
case "CPUAttack-1":
_local12 = pBattleAttackRecoil;
switch (_local12){
case "L":
_local16 = 540;
_local14 = 5;
break;
case "M":
_local16 = 580;
_local14 = 5;
break;
case "H":
_local16 = 620;
_local14 = 7;
break;
};
MainObj.battle_challenger_shadow.alpha = 0;
_local15 = MainObj.battle_challenger.x;
_local15 = (_local15 + Translate_Increment(_local14, 50, 30));
if (_local15 > _local16){
_local15 = _local16;
};
MainObj.battle_challenger.x = _local15;
if (_local15 == _local16){
pBattle_State = "CPUAttack-2";
};
break;
case "CPUAttack-2":
_local12 = pBattleAttackRecoil;
switch (_local12){
case "L":
_local13 = 497;
_local14 = 20;
break;
case "M":
_local13 = 497;
_local14 = 20;
break;
case "H":
_local13 = 497;
_local14 = 40;
break;
};
_local15 = MainObj.battle_challenger.x;
_local15 = (_local15 - Translate_Increment(_local14, 50, 30));
if (_local15 < _local13){
_local15 = _local13;
};
MainObj.battle_challenger.x = _local15;
if (_local15 == _local13){
_local40 = new PunchHardSnd();
_local41 = _local40.play();
pBattle_State = "HumanHit-1";
MainObj.battle_challenger_shadow.alpha = 1;
};
break;
case "HumanHit-1":
_local12 = "Heavy";
if (pBattleHitValue < 15){
_local12 = "Light";
};
if ((((pBattleHitValue >= 15)) && ((pBattleHitValue <= 40)))){
_local12 = "Medium";
};
if (pBattleHitValue > 40){
_local12 = "Heavy";
};
switch (_local12){
case "Light":
_local13 = 140;
_local14 = 20;
break;
case "Medium":
_local13 = 100;
_local14 = 20;
break;
case "Heavy":
_local13 = 30;
_local14 = 40;
break;
};
MainObj.battle_player.alpha = 0.5;
_local15 = MainObj.battle_player.x;
_local15 = (_local15 - Translate_Increment(_local14, 50, 30));
if (_local15 < _local13){
_local15 = _local13;
};
MainObj.battle_player.x = _local15;
if (_local15 == _local13){
pBattle_State = "HumanHit-2";
};
break;
case "HumanHit-2":
_local12 = "Heavy";
if (pBattleHitValue < 15){
_local12 = "Light";
};
if ((((pBattleHitValue >= 15)) && ((pBattleHitValue <= 40)))){
_local12 = "Medium";
};
if (pBattleHitValue > 40){
_local12 = "Heavy";
};
switch (_local12){
case "Light":
_local16 = 170;
_local14 = 10;
break;
case "Medium":
_local16 = 170;
_local14 = 20;
break;
case "Heavy":
_local16 = 170;
_local14 = 30;
break;
};
_local15 = MainObj.battle_player.x;
_local15 = (_local15 + Translate_Increment(_local14, 50, 30));
if (_local15 > _local16){
_local15 = _local16;
};
MainObj.battle_player.x = _local15;
if (_local15 == _local16){
MainObj.battle_player.alpha = 1;
pBattle_State = "HumanReduceHealth-1";
pBattle_StartTime = getTimer();
_local42 = pBattleHumanConfusion;
if (_local42 == true){
pBattle_State = "HumanBecameConfused-1";
};
_local43 = pBattleHumanSleep;
if (_local43 == true){
pBattle_State = "HumanBecameSleepy-1";
};
};
break;
case "HumanReduceHealth-1":
_local17 = pActiveCharacterHealth;
_local18 = pActiveCharacterHealthMax;
_local19 = (_local17 / _local18);
_local20 = MainObj.battle_player_statbox.battle_player_healthbar;
_local21 = _local20.width;
_local38 = (_local20.width / 199);
_local34 = (pActiveCharacterHealthMax * _local38);
pBattleHealthText.text = ((_local34 + "/") + pActiveCharacterHealthMax);
pBattleHealthText.setTextFormat(pBattleHealthTextFormat);
if (_local21 > 130){
_local20.gotoAndStop(1);
};
if ((((_local21 >= 61)) && ((_local21 <= 130)))){
_local20.gotoAndStop(2);
};
if (_local21 < 61){
_local20.gotoAndStop(3);
};
_local22 = (199 * _local19);
_local23 = _local22;
if (_local20.width >= _local23){
_local20.width = (_local20.width - Translate_Increment(2, 50, 30));
if (_local20.width < (_local23 + 0.35)){
_local20.width = _local23;
};
} else {
_local20.width = _local23;
};
_local24 = pBattleHumanLifeDrain;
if (_local24 == true){
_local28 = pActiveBattleCPUHealth;
_local29 = pActiveBattleCPUHealthMax;
_local30 = (_local28 / _local29);
_local31 = MainObj.battle_challenger_statbox.battle_challenger_healthbar;
_local32 = _local31.width;
_local30 = (_local28 / _local29);
_local32 = _local31.width;
if (_local32 > 130){
_local31.gotoAndStop(1);
};
if ((((_local32 >= 61)) && ((_local32 <= 130)))){
_local31.gotoAndStop(2);
};
if (_local32 < 61){
_local31.gotoAndStop(3);
};
_local35 = (199 * _local30);
_local36 = _local35;
if (_local31.width < _local36){
_local31.width = (_local31.width + Translate_Increment(2, 50, 30));
if (_local31.width > _local36){
_local31.width = _local36;
};
};
if ((((_local20.width == _local23)) && ((_local31.width == _local36)))){
pBattle_State = "HumanLifeDrain-1";
};
} else {
if (_local20.width == _local23){
pBattle_State = "HumanReduceHealth-2";
};
};
break;
case "HumanReduceHealth-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 3000){
pBattle_State = "HumanhowEffectiveHit-1";
};
break;
case "HumanhowEffectiveHit-1":
pBattle_State = "HumanhowEffectiveHit-2";
pBattle_StartTime = getTimer();
_local25 = pBattleMoveBackfire;
if (_local25 == true){
pBattleMoveBackfire = false;
pBattle_State = "CPU_turn";
if (pActiveCharacterHealth == 1){
pBattle_State = "HumanFainted-1";
};
if (pBattleHumanisConfused == true){
pBattle_State = "HumanStillConfused-3";
};
return;
};
_local26 = pBattleHitValue;
if (_local26 < 15){
_local11 = "It's not very effective...";
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "HumanhowEffectiveHit-2";
};
if (_local26 > 40){
_local11 = "It's Super Effective!";
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "HumanhowEffectiveHit-2";
};
MainObj.addChild(pBattleStatusText);
break;
case "HumanhowEffectiveHit-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1800){
pBattle_State = "setup_battle_moves";
if (pActiveCharacterHealth == 1){
pBattle_State = "HumanFainted-1";
};
};
break;
case "CPUFailedAttack-1":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1800){
pBattle_State = "CPUFailedAttack-1-2";
};
break;
case "CPUFailedAttack-1-2":
_local11 = "But it failed...";
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "CPUFailedAttack-2";
MainObj.addChild(pBattleStatusText);
break;
case "CPUFailedAttack-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1800){
pBattle_State = "setup_battle_moves";
};
break;
case "HumanFainted-1":
_local11 = (pActiveCharacterName.toUpperCase() + " FAINTED!");
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "HumanFainted-2";
break;
case "HumanFainted-2":
_local39 = MainObj.battle_player.y;
_local39 = (_local39 + Translate_Increment(20, 50, 30));
MainObj.battle_player.y = _local39;
MainObj.battle_player.alpha = (MainObj.battle_player.alpha - 0.1);
if (_local39 > 400){
pBattle_StartTime = getTimer();
MainObj.battle_player.alpha = 1;
MainObj.battle_player.x = -100;
MainObj.battle_player.y = 223;
pBattle_State = "HumanFainted-3";
};
break;
case "HumanFainted-3":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
pActiveCharacterHealth = 0;
switch (pActiveCharacterName){
case "Obama":
case "McCain":
pHealth_Prez = pActiveCharacterHealth;
pHealth_Vice = pBattlePlayer2_Health;
pStartTime = getTimer();
MainObj.gotoAndStop("gameover");
pFrontend_Status = "GameOver";
gGame_Status = "Frontend";
pBattle_State = "HumanFainted-4";
return;
case "Biden":
case "Palin":
pHealth_Prez = pBattlePlayer1_Health;
pHealth_Vice = pActiveCharacterHealth;
pBattle_State = "Human_SwitchOut-3";
return;
};
MainObj.removeChild(pBattleStatusText);
MainObj.gotoAndStop("map");
pFrontend_Status = "PreMap-1";
gGame_Status = "Frontend";
pBattle_State = "HumanFainted-4";
};
break;
case "HumanBecameConfused-1":
pBattleHumanConfusion = false;
pBattleHumanisConfused = true;
if (pBattleHumanConfusionTurns == 0){
pBattleHumanConfusionTurns = 2;
};
_local11 = (pActiveCharacterName.toUpperCase() + " became CONFUSED!");
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "HumanBecameConfused-2";
MainObj.addChild(pBattleStatusText);
break;
case "HumanBecameConfused-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
pBattle_State = "setup_battle_moves";
};
break;
case "HumanStillConfused-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
_local40 = new PunchHardSnd();
_local41 = _local40.play();
pBattle_State = "HumanHit-1";
};
break;
case "HumanStillConfused-3":
_local1 = (getTimer() - pBattle_StartTime);
_local11 = (pActiveCharacterName.toUpperCase() + " hurt itself in its CONFUSION!");
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "HumanStillConfused-4";
break;
case "HumanStillConfused-4":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
pBattle_State = "CPU_turn";
};
break;
case "HumanBecameSleepy-1":
pBattleHumanSleep = false;
pBattleHumanisSleeping = true;
if (pBattleHumanSleepTurns == 0){
pBattleHumanSleepTurns = 2;
};
_local11 = (pActiveCharacterName.toUpperCase() + " fell ASLEEP!");
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "HumanBecameSleepy-2";
MainObj.addChild(pBattleStatusText);
break;
case "HumanBecameSleepy-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 2500){
pBattle_State = "setup_battle_moves";
};
break;
case "HumanLifeDrain-1":
pBattleCPULifeDrain = false;
_local11 = "PALIN's AND McCAIN's health also increased!";
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "HumanLifeDrain-2";
MainObj.addChild(pBattleStatusText);
break;
case "HumanLifeDrain-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 3000){
pBattle_State = "HumanhowEffectiveHit-1";
};
break;
case "CPURecover-1":
_local28 = pActiveBattleCPUHealth;
_local29 = pActiveBattleCPUHealthMax;
_local30 = (_local28 / _local29);
_local31 = MainObj.battle_challenger_statbox.battle_challenger_healthbar;
_local32 = _local31.width;
_local30 = (_local28 / _local29);
_local32 = _local31.width;
if (_local32 > 130){
_local31.gotoAndStop(1);
};
if ((((_local32 >= 61)) && ((_local32 <= 130)))){
_local31.gotoAndStop(2);
};
if (_local32 < 61){
_local31.gotoAndStop(3);
};
_local35 = (199 * _local30);
_local36 = _local35;
if (_local31.width < _local36){
_local31.width = (_local31.width + Translate_Increment(2, 50, 30));
if (_local31.width > _local36){
_local31.width = _local36;
};
};
if (_local31.width == _local36){
pBattle_State = "CPURecover-2";
pBattle_StartTime = getTimer();
};
break;
case "CPURecover-2":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1500){
_local11 = (pActiveBattleCPUName + "'s health increased!");
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
pBattle_StartTime = getTimer();
pBattle_State = "CPURecover-3";
MainObj.addChild(pBattleStatusText);
};
break;
case "CPURecover-3":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 3000){
pBattle_State = "setup_battle_moves";
};
break;
case "CPU_SwitchOut-1":
if (pBattleCPUisSleeping == true){
pBattle_State = "CPUStillSleeping";
return;
};
if (pBattleCPUisConfused == true){
pActiveBattleCPUHealth = (pActiveBattleCPUHealth - 15);
if (pActiveBattleCPUHealth < 1){
pActiveBattleCPUHealth = 1;
};
pBattle_State = "CPUStillConfused";
return;
};
pBattle_State = "CPU_SwitchOut-2";
switch (pActiveBattleCPUName){
case "Obama":
_local11 = "OBAMA! You look tired!";
break;
case "Biden":
_local11 = "Good job JOE!";
break;
case "McCain":
_local11 = "McCAIN! Take a nap!";
break;
case "Palin":
_local11 = "Good job SARAH!";
break;
};
MainObj.battle_challenger_shadow.alpha = 0;
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
break;
case "CPU_SwitchOut-2":
_local16 = 725;
_local14 = 20;
_local15 = MainObj.battle_challenger.x;
_local15 = (_local15 + Translate_Increment(_local14, 50, 30));
if (_local15 > _local16){
_local15 = _local16;
};
MainObj.battle_challenger.x = _local15;
if (_local15 == _local16){
pBattle_State = "CPU_SwitchOut-3";
pBattle_StartTime = getTimer();
};
break;
case "CPU_SwitchOut-3":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1500){
pBattle_State = "CPU_SwitchOut-4";
};
break;
case "CPU_SwitchOut-4":
switch (pActiveBattleCPUName){
case "Obama":
_local11 = "Go get'em JOE!";
pActiveBattleCPUName = "Biden";
_local37 = 12;
pBattleCPU1_Symbol = pActiveBattleCPUSymbol;
pBattleCPU1_Health = pActiveBattleCPUHealth;
pBattleCPU1_HealthMax = pActiveBattleCPUHealthMax;
pActiveBattleCPUName = pBattleCPU2_Name;
pActiveBattleCPUSymbol = pBattleCPU2_Symbol;
pActiveBattleCPUHealth = pBattleCPU2_Health;
pActiveBattleCPUHealthMax = pBattleCPU2_HealthMax;
break;
case "Biden":
_local11 = "Bams go handle your business!";
pActiveBattleCPUName = "Obama";
_local37 = 11;
pBattleCPU2_Symbol = pActiveBattleCPUSymbol;
pBattleCPU2_Health = pActiveBattleCPUHealth;
pBattleCPU2_HealthMax = pActiveBattleCPUHealthMax;
pActiveBattleCPUName = pBattleCPU1_Name;
pActiveBattleCPUSymbol = pBattleCPU1_Symbol;
pActiveBattleCPUHealth = pBattleCPU1_Health;
pActiveBattleCPUHealthMax = pBattleCPU1_HealthMax;
break;
case "McCain":
_local11 = "Go SARAH BARACUDA!";
pActiveBattleCPUName = "Palin";
_local37 = 14;
pBattleCPU1_Symbol = pActiveBattleCPUSymbol;
pBattleCPU1_Health = pActiveBattleCPUHealth;
pBattleCPU1_HealthMax = pActiveBattleCPUHealthMax;
pActiveBattleCPUName = pBattleCPU2_Name;
pActiveBattleCPUSymbol = pBattleCPU2_Symbol;
pActiveBattleCPUHealth = pBattleCPU2_Health;
pActiveBattleCPUHealthMax = pBattleCPU2_HealthMax;
break;
case "Palin":
_local11 = "McCain! Time to get Mavericky!";
pActiveBattleCPUName = "McCain";
_local37 = 13;
pBattleCPU2_Symbol = pActiveBattleCPUSymbol;
pBattleCPU2_Health = pActiveBattleCPUHealth;
pBattleCPU2_HealthMax = pActiveBattleCPUHealthMax;
pActiveBattleCPUName = pBattleCPU1_Name;
pActiveBattleCPUSymbol = pBattleCPU1_Symbol;
pActiveBattleCPUHealth = pBattleCPU1_Health;
pActiveBattleCPUHealthMax = pBattleCPU1_HealthMax;
break;
};
pBattleStatusText.text = _local11;
pBattleStatusText.setTextFormat(pBattleStatusTextFormat);
MainObj.addChild(pBattleStatusText);
_local19 = (pActiveBattleCPUHealth / pActiveBattleCPUHealthMax);
_local20 = MainObj.battle_challenger_statbox.battle_challenger_healthbar;
_local20.width = (_local19 * 199);
_local21 = _local20.width;
if (_local21 > 130){
_local20.gotoAndStop(1);
};
if ((((_local21 >= 61)) && ((_local21 <= 130)))){
_local20.gotoAndStop(2);
};
if (_local21 < 61){
_local20.gotoAndStop(3);
};
MainObj.battle_challenger.alpha = 1;
MainObj.battle_challenger.scaleX = 1;
MainObj.battle_challenger.scaleY = 1;
MainObj.battle_challenger.y = 101;
MainObj.battle_challenger.gotoAndStop(_local37);
MainObj.battle_challenger_statbox.battle_challenger_name_text.gotoAndStop(_local37);
pBattle_State = "CPU_SwitchOut-5";
break;
case "CPU_SwitchOut-5":
_local13 = 497;
_local14 = 20;
_local15 = MainObj.battle_challenger.x;
_local15 = (_local15 - Translate_Increment(_local14, 50, 30));
if (_local15 < _local13){
_local15 = _local13;
};
MainObj.battle_challenger.x = _local15;
if (_local15 == _local13){
pBattle_State = "CPU_SwitchOut-6";
pBattle_StartTime = getTimer();
MainObj.battle_challenger_shadow.alpha = 0;
};
break;
case "CPU_SwitchOut-6":
_local1 = (getTimer() - pBattle_StartTime);
if (_local1 > 1500){
pBattle_State = "setup_battle_moves";
};
break;
};
}
public function CPUBattleLogic(){
var _local1:int;
var _local2:Array;
var _local3:String;
_local1 = pActiveBattleCPUHealth;
_local2 = [];
switch (pActiveBattleCPUSymbol){
case "WC":
if (_local1 >= 80){
_local2 = ["VOTE AGAINST SELF-INTEREST", "FOREIGN POLICY CONCERN", "FOREIGN POLICY CONCERN"];
};
if ((((_local1 >= 60)) && ((_local1 <= 79)))){
_local2 = ["VOTE AGAINST SELF-INTEREST", "FOREIGN POLICY CONCERN", "FOREIGN POLICY CONCERN"];
};
if ((((_local1 >= 40)) && ((_local1 <= 59)))){
_local2 = ["VOTE AGAINST SELF-INTEREST", "VOTE AGAINST SELF-INTEREST", "VOTE AGAINST SELF-INTEREST"];
};
if ((((_local1 >= 20)) && ((_local1 <= 39)))){
_local2 = ["SELF-DELUSION", "FOREIGN POLICY CONCERN", "FOREIGN POLICY CONCERN"];
};
if ((((_local1 >= 1)) && ((_local1 <= 19)))){
_local2 = ["SELF-DELUSION", "VOTE AGAINST SELF-INTEREST", "FOREIGN POLICY CONCERN"];
};
break;
case "CW":
if (_local1 >= 80){
_local2 = ["SEXISM CHARGE", "HEALTHCARE CONCERN", "HEALTHCARE CONCERN"];
};
if ((((_local1 >= 60)) && ((_local1 <= 79)))){
_local2 = ["SEXISM CHARGE", "HEALTHCARE CONCERN", "HEALTHCARE CONCERN"];
};
if ((((_local1 >= 40)) && ((_local1 <= 59)))){
_local2 = ["SEXISM CHARGE", "SEXISM CHARGE", "SEXISM CHARGE"];
};
if ((((_local1 >= 20)) && ((_local1 <= 39)))){
_local2 = ["SELF-DELUSION", "HEALTHCARE CONCERN", "HEALTHCARE CONCERN"];
};
if ((((_local1 >= 1)) && ((_local1 <= 19)))){
_local2 = ["SELF-DELUSION", "SEXISM CHARGE", "HEALTHCARE CONCERN"];
};
break;
case "AA":
if (_local1 >= 80){
_local2 = ["RACE CARD", "ECONOMIC CONCERN", "ECONOMIC CONCERN"];
};
if ((((_local1 >= 60)) && ((_local1 <= 79)))){
_local2 = ["RACE CARD", "ECONOMIC CONCERN", "ECONOMIC CONCERN"];
};
if ((((_local1 >= 40)) && ((_local1 <= 59)))){
_local2 = ["RACE CARD", "RACE CARD", "RACE CARD"];
};
if ((((_local1 >= 20)) && ((_local1 <= 39)))){
_local2 = ["SELF-DELUSION", "ECONOMIC CONCERN", "ECONOMIC CONCERN"];
};
if ((((_local1 >= 1)) && ((_local1 <= 19)))){
_local2 = ["SELF-DELUSION", "RACE CARD", "ECONOMIC CONCERN"];
};
break;
case "C":
if (_local1 >= 80){
_local2 = ["APATHY", "ENVIRONMENTAL CONCERN", "ENVIRONMENTAL CONCERN"];
};
if ((((_local1 >= 60)) && ((_local1 <= 79)))){
_local2 = ["APATHY", "ENVIRONMENTAL CONCERN", "ENVIRONMENTAL CONCERN"];
};
if ((((_local1 >= 40)) && ((_local1 <= 59)))){
_local2 = ["APATHY", "APATHY", "APATHY"];
};
if ((((_local1 >= 20)) && ((_local1 <= 39)))){
_local2 = ["SELF-DELUSION", "ENVIRONMENTAL CONCERN", "ENVIRONMENTAL CONCERN"];
};
if ((((_local1 >= 1)) && ((_local1 <= 19)))){
_local2 = ["SELF-DELUSION", "APATHY", "ENVIRONMENTAL CONCERN"];
};
break;
case "CP":
if (_local1 >= 80){
_local2 = ["MISINFORMATION", "CULTURAL DIVIDE", "CULTURAL DIVIDE"];
};
if ((((_local1 >= 60)) && ((_local1 <= 79)))){
_local2 = ["MISINFORMATION", "CULTURAL DIVIDE", "CULTURAL DIVIDE"];
};
if ((((_local1 >= 40)) && ((_local1 <= 59)))){
_local2 = ["MISINFORMATION", "MISINFORMATION", "MISINFORMATION"];
};
if ((((_local1 >= 20)) && ((_local1 <= 39)))){
_local2 = ["SELF-DELUSION", "CULTURAL DIVIDE", "CULTURAL DIVIDE"];
};
if ((((_local1 >= 1)) && ((_local1 <= 19)))){
_local2 = ["SELF-DELUSION", "MISINFORMATION", "CULTURAL DIVIDE"];
};
break;
case "E":
if (_local1 >= 80){
_local2 = ["LITMUS TEST", "CULTURAL CONCERNS", "CULTURAL CONCERNS"];
};
if ((((_local1 >= 60)) && ((_local1 <= 79)))){
_local2 = ["LITMUS TEST", "CULTURAL CONCERNS", "CULTURAL CONCERNS"];
};
if ((((_local1 >= 40)) && ((_local1 <= 59)))){
_local2 = ["LITMUS TEST", "LITMUS TEST", "LITMUS TEST"];
};
if ((((_local1 >= 20)) && ((_local1 <= 39)))){
_local2 = ["SELF-DELUSION", "CULTURAL CONCERNS", "CULTURAL CONCERNS"];
};
if ((((_local1 >= 1)) && ((_local1 <= 19)))){
_local2 = ["SELF-DELUSION", "LITMUS TEST", "CULTURAL CONCERNS"];
};
break;
case "H":
if (_local1 >= 80){
_local2 = ["IMMIGRATION HYSTERIA", "ECONOMIC CONCERN", "ECONOMIC CONCERN"];
};
if ((((_local1 >= 60)) && ((_local1 <= 79)))){
_local2 = ["IMMIGRATION HYSTERIA", "ECONOMIC CONCERN", "ECONOMIC CONCERN"];
};
if ((((_local1 >= 40)) && ((_local1 <= 59)))){
_local2 = ["IMMIGRATION HYSTERIA", "IMMIGRATION HYSTERIA", "IMMIGRATION HYSTERIA"];
};
if ((((_local1 >= 20)) && ((_local1 <= 39)))){
_local2 = ["SELF-DELUSION", "ECONOMIC CONCERN", "ECONOMIC CONCERN"];
};
if ((((_local1 >= 1)) && ((_local1 <= 19)))){
_local2 = ["SELF-DELUSION", "IMMIGRATION HYSTERIA", "ECONOMIC CONCERN"];
};
break;
case "HL":
if (_local1 >= 80){
_local2 = ["POLITICAL SATIRE", "ANIMAL RIGHTS", "ANIMAL RIGHTS"];
};
if ((((_local1 >= 60)) && ((_local1 <= 79)))){
_local2 = ["POLITICAL SATIRE", "ANIMAL RIGHTS", "ANIMAL RIGHTS"];
};
if ((((_local1 >= 40)) && ((_local1 <= 59)))){
_local2 = ["POLITICAL SATIRE", "IMMIGRATION HYSTERIA", "IMMIGRATION HYSTERIA"];
};
if ((((_local1 >= 20)) && ((_local1 <= 39)))){
_local2 = ["SELF-DELUSION", "ANIMAL RIGHTS", "ANIMAL RIGHTS"];
};
if ((((_local1 >= 1)) && ((_local1 <= 19)))){
_local2 = ["SELF-DELUSION", "POLITICAL SATIRE", "ANIMAL RIGHTS"];
};
break;
case "ME":
if (_local1 >= 80){
_local2 = ["SENSATIONALISM", "SCRUTINY", "SCRUTINY"];
};
if ((((_local1 >= 60)) && ((_local1 <= 79)))){
_local2 = ["SENSATIONALISM", "SCRUTINY", "SCRUTINY"];
};
if ((((_local1 >= 40)) && ((_local1 <= 59)))){
_local2 = ["SENSATIONALISM", "SENSATIONALISM", "SENSATIONALISM"];
};
if ((((_local1 >= 20)) && ((_local1 <= 39)))){
_local2 = ["SELF-DELUSION", "SCRUTINY", "SCRUTINY"];
};
if ((((_local1 >= 1)) && ((_local1 <= 19)))){
_local2 = ["SELF-DELUSION", "SENSATIONALISM", "SCRUTINY"];
};
break;
case "R":
if (_local1 >= 80){
_local2 = ["GUN RIGHTS", "CULTURAL CONCERNS", "CULTURAL CONCERNS"];
};
if ((((_local1 >= 60)) && ((_local1 <= 79)))){
_local2 = ["GUN RIGHTS", "CULTURAL CONCERNS", "CULTURAL CONCERNS"];
};
if ((((_local1 >= 40)) && ((_local1 <= 59)))){
_local2 = ["GUN RIGHTS", "GUN RIGHTS", "GUN RIGHTS"];
};
if ((((_local1 >= 20)) && ((_local1 <= 39)))){
_local2 = ["SELF-DELUSION", "CULTURAL CONCERNS", "CULTURAL CONCERNS"];
};
if ((((_local1 >= 1)) && ((_local1 <= 19)))){
_local2 = ["SELF-DELUSION", "GUN RIGHTS", "CULTURAL CONCERNS"];
};
break;
case "BO":
if (_local1 >= 200){
_local2 = ["SOARING SPEECH", "CHANGE", "CHANGE"];
if (pCPUSwitchedYet == false){
_local2 = ["SWITCH", "SWITCH", "SWITCH"];
};
};
if ((((_local1 >= 150)) && ((_local1 <= 199)))){
_local2 = ["SOARING SPEECH", "CHANGE", "CHANGE"];
if (pCPUSwitchedYet == false){
_local2 = ["SWITCH", "SWITCH", "SWITCH"];
};
};
if ((((_local1 >= 100)) && ((_local1 <= 149)))){
_local2 = ["SOARING SPEECH", "NUANCE", "NUANCE"];
if (pCPUSwitchedYet == false){
_local2 = ["SWITCH", "SWITCH", "SWITCH"];
};
};
if ((((_local1 >= 50)) && ((_local1 <= 99)))){
_local2 = ["SOARING SPEECH", "CHANGE", "NUANCE"];
};
if ((((_local1 >= 1)) && ((_local1 <= 49)))){
_local2 = ["SOARING SPEECH", "CHANGE", "CHANGE"];
};
break;
case "JB":
if (_local1 >= 200){
_local2 = ["DEBATE", "DEBATE", "DEBATE"];
};
if ((((_local1 >= 150)) && ((_local1 <= 199)))){
_local2 = ["DEBATE", "GET UP!", "GET UP!"];
};
if ((((_local1 >= 100)) && ((_local1 <= 149)))){
_local2 = ["DEBATE", "RELATE", "RELATE"];
};
if ((((_local1 >= 50)) && ((_local1 <= 99)))){
_local2 = ["DEBATE", "RAMBLE ON", "RAMBLE ON"];
};
if ((((_local1 >= 1)) && ((_local1 <= 49)))){
_local2 = ["DEBATE", "DEBATE", "RELATE"];
};
break;
case "JM":
if (_local1 >= 200){
_local2 = ["P.O.W.", "MAVERICK MOVE", "MAVERICK MOVE"];
if (pCPUSwitchedYet == false){
_local2 = ["SWITCH", "SWITCH", "SWITCH"];
};
};
if ((((_local1 >= 150)) && ((_local1 <= 199)))){
_local2 = ["P.O.W.", "MAVERICK MOVE", "MAVERICK MOVE"];
if (pCPUSwitchedYet == false){
_local2 = ["SWITCH", "SWITCH", "SWITCH"];
};
};
if ((((_local1 >= 100)) && ((_local1 <= 149)))){
_local2 = ["P.O.W.", "TELEPROMPTER", "TELEPROMPTER"];
if (pCPUSwitchedYet == false){
_local2 = ["SWITCH", "SWITCH", "SWITCH"];
};
};
if ((((_local1 >= 50)) && ((_local1 <= 99)))){
_local2 = ["P.O.W.", "MAVERICK MOVE", "TELEPROMPTER"];
};
if ((((_local1 >= 1)) && ((_local1 <= 49)))){
_local2 = ["P.O.W.", "MAVERICK MOVE", "MAVERICK MOVE"];
};
break;
case "SP":
if (_local1 >= 165){
_local2 = ["FOLKSY SPEECH", "FOLKSY SPEECH", "FOLKSY SPEECH"];
};
if ((((_local1 >= 150)) && ((_local1 <= 165)))){
_local2 = ["FOLKSY SPEECH", "UNSCRIPTED ANSWER", "UNSCRIPTED ANSWER"];
};
if ((((_local1 >= 100)) && ((_local1 <= 149)))){
_local2 = ["FOLKSY SPEECH", "RELATE", "RELATE"];
};
if ((((_local1 >= 50)) && ((_local1 <= 99)))){
_local2 = ["FOLKSY SPEECH", "RALLY BASE", "RALLY BASE"];
};
if ((((_local1 >= 1)) && ((_local1 <= 49)))){
_local2 = ["FOLKSY SPEECH", "FOLKSY SPEECH", "RELATE"];
};
break;
};
_local3 = _local2[Math.floor((Math.random() * 3))];
if (_local3 != "SWITCH"){
ProcessBattleMove("CPU", _local3);
} else {
pBattle_State = "CPU_SwitchOut-1";
pCPUSwitchedYet = true;
};
}
private function sitelock(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = MainObj.stage.loaderInfo;
_local3 = true;
_local4 = _local2.url.split("://");
_local5 = _local4[1].split("/");
for (_local6 in _arg1) {
if (_arg1[_local6] == _local5[0]){
_local3 = false;
};
};
if (_local3){
};
return (_local3);
}
function open_SocioTownPage(_arg1:MouseEvent){
if (ExternalInterface.available){
ExternalInterface.call("window.open", "http://www.sociotown.com", "win");
};
}
function loading(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:int;
var _local7:Number;
var _local8:int;
pLoaderInitialized = true;
MainObj.loader_bg.addEventListener(MouseEvent.CLICK, open_SocioTownPage);
MainObj.loader_bg.buttonMode = true;
_local2 = MainObj.stage.loaderInfo.bytesTotal;
_local3 = MainObj.stage.loaderInfo.bytesLoaded;
_local4 = (_local3 / _local2);
MainObj.loader_bar.alpha = 0.6;
_local5 = MainObj.loader_bar;
_local6 = (360 * _local4);
_local7 = _local6;
if (_local5.width <= _local7){
_local5.width = (_local5.width + Translate_Increment(3, 50, 30));
if (_local5.width > (_local7 - 0.35)){
_local5.width = _local7;
};
} else {
_local5.width = _local7;
};
_local8 = (getTimer() - pStartTime);
if ((((_local2 == _local3)) && ((_local5.width == _local7)))){
pFrontend_Status = "PreTitleScreen";
MainObj.loader_bg.removeEventListener(MouseEvent.CLICK, open_SocioTownPage);
MainObj.gotoAndStop("title_screen");
MainObj.removeEventListener(Event.ENTER_FRAME, loading);
};
}
public function AdjustShowdownBar(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (1 - (pVoterDot_List.length / pVoterDot_Count));
_local2 = (217 * _local1);
_local3 = _local2;
if (MainObj.showdown_bar.width < _local3){
MainObj.showdown_bar.width = (MainObj.showdown_bar.width + Translate_Increment(1, 50, 30));
if (MainObj.showdown_bar.width > _local3){
MainObj.showdown_bar.width = _local3;
};
};
if ((((_local1 == 1)) && ((pFinalBattle == false)))){
pFinalBattle = true;
MainObj.prepare_finalshowdown_overlay.alpha = 1;
pStartTime = getTimer();
gGame_Status = "Frontend";
pFrontend_Status = "PrepareFinalShowdownOverlay_Delay";
};
}
public function keyUpFunction(_arg1:KeyboardEvent){
if (_arg1.keyCode == 37){
arrowLeft = false;
} else {
if (_arg1.keyCode == 39){
arrowRight = false;
} else {
if (_arg1.keyCode == 38){
arrowUp = false;
} else {
if (_arg1.keyCode == 40){
arrowDown = false;
} else {
if ((((_arg1.keyCode >= 65)) && ((_arg1.keyCode <= 90)))){
Attack_KeyDown = false;
} else {
if (_arg1.keyCode == 32){
SpaceBar_Down = false;
};
};
};
};
};
};
}
function DistanceTo(_arg1:Array, _arg2:Array){
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
_local3 = _arg1[0];
_local4 = _arg1[1];
_local5 = _arg1[2];
_local6 = _arg2[0];
_local7 = _arg2[1];
_local8 = _arg2[2];
_local9 = (_local3 - _local6);
_local10 = (_local4 - _local7);
_local11 = (_local5 - _local8);
_local12 = Math.sqrt((((_local9 * _local9) + (_local10 * _local10)) + (_local11 * _local11)));
return (_local12);
}
public function GameUpdate(_arg1:Event){
switch (gGame_Status){
case "Frontend":
Frontend();
break;
case "GameMap":
sortDisplayList();
AdjustShowdownBar();
AdjustHealthBars();
Tutorial();
break;
case "Battle":
Battle();
break;
case "CleanUp":
CleanUp();
break;
};
}
function Translate_Increment(_arg1:Number, _arg2:Number, _arg3:Number):Number{
var _local4:Number;
var _local5:Number;
_local4 = (_arg1 * _arg3);
_local5 = ((_local4 / 1000) * MainObj.gTimeinterval);
if (_local5 > _arg2){
_local5 = _arg2;
};
return (_local5);
}
public function PlayVoiceSample(_arg1:String, _arg2:String){
var _local3:ObamaYesWeCanSnd;
var _local4:SoundChannel;
var _local5:ObamaNuanceSnd;
var _local6:BidenGetUpSnd;
var _local7:McCainPowSnd;
var _local8:McCainSuspendCampaignSnd;
var _local9:McCainPenguinSnd;
var _local10:PalinFolksySnd;
var _local11:PalinMoleculeSnd;
switch (_arg2){
case "Obama":
switch (_arg1){
case "SOARING SPEECH":
if (pVoiceSamplePlayList[(_arg1 + _arg2)] == null){
_local3 = new ObamaYesWeCanSnd();
_local4 = _local3.play();
pVoiceSamplePlayList[(_arg1 + _arg2)] = true;
};
break;
case "NUANCE":
if (pVoiceSamplePlayList[(_arg1 + _arg2)] == null){
_local5 = new ObamaNuanceSnd();
_local4 = _local5.play();
pVoiceSamplePlayList[(_arg1 + _arg2)] = true;
};
break;
};
break;
case "Biden":
switch (_arg1){
case "GET UP!":
if (pVoiceSamplePlayList[(_arg1 + _arg2)] == null){
_local6 = new BidenGetUpSnd();
_local4 = _local6.play();
pVoiceSamplePlayList[(_arg1 + _arg2)] = true;
};
break;
};
break;
case "McCain":
switch (_arg1){
case "P.O.W.":
if (pVoiceSamplePlayList[(_arg1 + _arg2)] == null){
_local7 = new McCainPowSnd();
_local4 = _local7.play();
pVoiceSamplePlayList[(_arg1 + _arg2)] = true;
};
break;
case "MAVERICK MOVE":
if (pBattleMoveBackfire == true){
if (pVoiceSamplePlayList[(_arg1 + _arg2)] == null){
_local8 = new McCainSuspendCampaignSnd();
_local4 = _local8.play();
pVoiceSamplePlayList[(_arg1 + _arg2)] = true;
};
};
break;
case "SWITCH":
if (pVoiceSamplePlayList[(_arg1 + _arg2)] == null){
_local9 = new McCainPenguinSnd();
_local4 = _local9.play();
pVoiceSamplePlayList[(_arg1 + _arg2)] = true;
};
break;
};
break;
case "Palin":
switch (_arg1){
case "FOLKSY SPEECH":
if (pVoiceSamplePlayList[(_arg1 + _arg2)] == null){
_local10 = new PalinFolksySnd();
_local4 = _local10.play();
pVoiceSamplePlayList[(_arg1 + _arg2)] = true;
};
break;
case "UNSCRIPTED ANSWER":
if (pVoiceSamplePlayList[(_arg1 + _arg2)] == null){
_local11 = new PalinMoleculeSnd();
_local4 = _local11.play();
pVoiceSamplePlayList[(_arg1 + _arg2)] = true;
};
break;
};
break;
};
}
public function Tutorial(){
var _local1:int;
var _local2:Number;
switch (pTutorial_State){
case "campaign_stop":
MainObj.gamemap.tutorial_campaign_stop.alpha = 1;
pStartTime = getTimer();
gGame_Status = "Frontend";
pFrontend_Status = "Tutorial";
pTutorial_State = "campaign_stop-2";
break;
case "campaign_stop-2":
_local1 = (getTimer() - pStartTime);
if (_local1 > 3000){
MainObj.gamemap.tutorial_campaign_stop.alpha = 0;
gGame_Status = "GameMap";
pFrontend_Status = "Map";
pTutorial_State = "fill_meter";
};
break;
case "fill_meter":
_local2 = (1 - (pVoterDot_List.length / pVoterDot_Count));
if (_local2 > 0){
MainObj.tutorial_fill_meter.alpha = 1;
pStartTime = getTimer();
gGame_Status = "Frontend";
pFrontend_Status = "Tutorial";
pTutorial_State = "fill_meter-2";
};
break;
case "fill_meter-2":
_local1 = (getTimer() - pStartTime);
AdjustShowdownBar();
if (_local1 > 3000){
MainObj.tutorial_fill_meter.alpha = 0;
gGame_Status = "GameMap";
pFrontend_Status = "Map";
pTutorial_State = "done";
};
break;
};
}
function BattleMoveOptions(_arg1:MouseEvent){
var _local2:*;
switch (_arg1.type){
case "mouseOver":
_local2 = _arg1.currentTarget;
_local2.textColor = 0xFF0000;
break;
case "mouseOut":
_local2 = _arg1.currentTarget;
_local2.textColor = 0;
break;
case "click":
_local2 = _arg1.currentTarget;
_local2.textColor = 0;
switch (pActiveCharacterName){
case "Obama":
switch (_local2.name){
case "SOARING SPEECH":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "CHANGE":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "NUANCE":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "RELATE":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "SWITCH POLIMON":
pBattle_State = "Human_SwitchOut-1";
break;
};
break;
case "Biden":
switch (_local2.name){
case "DEBATE":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "RAMBLE ON":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "GET UP!":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "RELATE":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "SWITCH POLIMON":
pBattle_State = "Human_SwitchOut-1";
break;
};
break;
case "McCain":
switch (_local2.name){
case "P.O.W.":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "MAVERICK MOVE":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "TELEPROMPTER":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "RELATE":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "SWITCH POLIMON":
pBattle_State = "Human_SwitchOut-1";
break;
};
break;
case "Palin":
switch (_local2.name){
case "FOLKSY SPEECH":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "UNSCRIPTED ANSWER":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "RALLY BASE":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "RELATE":
if (pPlayerMovesLimit[_local2.name]["C"] > 0){
ProcessBattleMove("Human", _local2.name);
pPlayerMovesLimit[_local2.name]["C"] = (pPlayerMovesLimit[_local2.name]["C"] - 1);
};
break;
case "SWITCH POLIMON":
pBattle_State = "Human_SwitchOut-1";
PlayVoiceSample("SWITCH", "McCain");
break;
};
break;
};
break;
};
}
public function initPresidentProperties(){
pPlayerMovesLimit["SOARING SPEECH"] = {C:5, M:5};
pPlayerMovesLimit["CHANGE"] = {C:15, M:15};
pPlayerMovesLimit["NUANCE"] = {C:25, M:25};
pPlayerMovesLimit["RELATE"] = {C:30, M:30};
pPlayerMovesLimit["DEBATE"] = {C:10, M:10};
pPlayerMovesLimit["RAMBLE ON"] = {C:15, M:15};
pPlayerMovesLimit["GET UP!"] = {C:5, M:5};
pPlayerMovesLimit["P.O.W."] = {C:5, M:5};
pPlayerMovesLimit["MAVERICK MOVE"] = {C:15, M:15};
pPlayerMovesLimit["TELEPROMPTER"] = {C:15, M:15};
pPlayerMovesLimit["FOLKSY SPEECH"] = {C:10, M:10};
pPlayerMovesLimit["UNSCRIPTED ANSWER"] = {C:15, M:15};
pPlayerMovesLimit["RALLY BASE"] = {C:5, M:5};
switch (pChosenCharacter){
case "Obama":
pHealth_Prez = 250;
pHealth_PrezMax = 250;
pHealth_Vice = 325;
pHealth_ViceMax = 325;
pPrezLastPos = [917, 0, 670];
break;
case "McCain":
pHealth_Prez = 350;
pHealth_PrezMax = 350;
pHealth_Vice = 200;
pHealth_ViceMax = 200;
pPrezLastPos = [1325, 0, 300];
break;
};
}
}
}//package com.polimon
Section 3
//MochiAd (com.polimon.MochiAd)
package com.polimon {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.7");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
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_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
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 unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
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.gotoAndStop("loader");
} 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{
}, ad_skipped:function ():void{
}};
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.adSkipped = options.ad_skipped;
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);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
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 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
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 _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"){
};
return (_local3);
}
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 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 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;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
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?cacheBust=") + new Date().getTime()));
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 runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
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 _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 adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
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 sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, 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();
this.clip.gotoAndStop("loader");
} 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{
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
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);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
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.adSkipped = options.ad_skipped;
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;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
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);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
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{
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
MochiAd.showInterLevelAd(_arg1);
}
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 com.polimon
Section 4
//NPC (com.polimon.NPC)
package com.polimon {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.utils.*;
public class NPC {
public var pCharacter_MC;
public var pShadow_MC:CharShadowMovieClip;
private var lastTime:int;
public var pWorldX:Number;
public var pWorldY:Number;
public var pWorldZ:Number;
public var pSpawnName:String;
public var pX_Destin;
public var pRunAway_Obj:Object;
public var gamemap;
public var pNPCType:String;
public var pWaypoint_Delay:int;
public var pSpeed:Number;
public var pMode:String;
public var gGameObj;
public var pWaypoint_State;// = 1
public var pStartX:Number;
public var pStartY:Number;
public var pStartZ:Number;
public var pObject_Type;// = "Character"
public var pAction:String;
public var pIdentity:String;
public var Player_Action:String;// = "swr"
public var pZ_Destin:Number;
public var MainObj;
public var pWaypoints_List:Array;
public var pWaypoint_Pointer;// = 0
public var pWaypoint_Speed:Number;
public var pY_Destin;
public function NPC(){
pObject_Type = "Character";
Player_Action = "swr";
pWaypoint_Pointer = 0;
pWaypoint_State = 1;
pShadow_MC = new CharShadowMovieClip();
super();
}
public function RunAway(){
var _local1:int;
var _local2:int;
_local2 = pSpeed;
if (pRunAway_Obj == null){
pRunAway_Obj = gGameObj.heroClassRef;
};
if (pWorldX > pRunAway_Obj.pWorldX){
_local1 = (pWorldX - pRunAway_Obj.pWorldX);
if (_local1 > 50){
WorldTranslate(_local2, 0, 0, true);
pAction = "swr";
};
};
if (pWorldX < pRunAway_Obj.pWorldX){
_local1 = (pRunAway_Obj.pWorldX - pWorldX);
if (_local1 > 50){
WorldTranslate(-(_local2), 0, 0, true);
pAction = "swl";
};
};
if (pWorldZ > pRunAway_Obj.pWorldZ){
_local1 = (pWorldZ - pRunAway_Obj.pWorldZ);
if (_local1 > 50){
WorldTranslate(0, 0, _local2, true);
pAction = "wf";
};
};
if (pWorldZ < pRunAway_Obj.pWorldZ){
_local1 = (pRunAway_Obj.pWorldZ - pWorldZ);
if (_local1 > 50){
WorldTranslate(0, 0, -(_local2), true);
pAction = "wb";
};
};
}
public function WorldTranslate(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean){
var _local5:Boolean;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:Point;
var _local10:Point;
var _local11:Point;
var _local12:Point;
var _local13:Boolean;
var _local14:Number;
var _local15:Number;
var _local16:Number;
_local5 = true;
_local6 = gGameObj.Translate_Increment(_arg1, 50, 30);
_local7 = gGameObj.Translate_Increment(_arg2, 50, 30);
_local8 = gGameObj.Translate_Increment(_arg3, 50, 30);
_local9 = new Point(pCharacter_MC.x, pCharacter_MC.y);
_local10 = gamemap.localToGlobal(_local9);
_local11 = new Point(_local10.x, (_local10.y + 40));
_local12 = new Point(_local11.x, _local11.y);
_local13 = false;
if (_arg4 == true){
if (_local6 > 0){
_local12 = new Point(((_local11.x + 30) + _local6), _local11.y);
_local13 = NPC_Collision(_local12);
if (MainObj.collisionmap.hitTestPoint(_local12.x, _local12.y, true)){
_local6 = 0;
};
if (_local13 == true){
_local6 = 0;
};
};
if (_local6 < 0){
_local12 = new Point(((_local11.x - 30) + _local6), _local11.y);
_local13 = NPC_Collision(_local12);
if (MainObj.collisionmap.hitTestPoint(_local12.x, _local12.y, true)){
_local6 = 0;
};
if (_local13 == true){
_local6 = 0;
};
};
if (_local8 > 0){
_local12 = new Point((_local11.x + _local6), (_local11.y + 30));
_local13 = NPC_Collision(_local12);
if (MainObj.collisionmap.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local13 == true){
_local8 = 0;
};
_local12 = new Point(((_local11.x - 15) + _local6), (_local11.y + 30));
_local13 = NPC_Collision(_local12);
if (MainObj.collisionmap.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local13 == true){
_local8 = 0;
};
_local12 = new Point(((_local11.x + 15) + _local6), (_local11.y + 30));
_local13 = NPC_Collision(_local12);
if (MainObj.collisionmap.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local13 == true){
_local8 = 0;
};
};
if (_local8 < 0){
_local12 = new Point((_local11.x + _local6), (_local11.y - 20));
_local13 = NPC_Collision(_local12);
if (MainObj.collisionmap.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local13 == true){
_local8 = 0;
};
_local12 = new Point(((_local11.x - 15) + _local6), (_local11.y - 20));
_local13 = NPC_Collision(_local12);
if (MainObj.collisionmap.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local13 == true){
_local8 = 0;
};
_local12 = new Point(((_local11.x + 15) + _local6), (_local11.y - 20));
_local13 = NPC_Collision(_local12);
if (MainObj.collisionmap.hitTestPoint(_local12.x, _local12.y, true)){
_local8 = 0;
};
if (_local13 == true){
_local8 = 0;
};
};
};
if ((((((_local6 == 0)) && ((_local7 == 0)))) && ((_local8 == 0)))){
_local5 = false;
};
_local14 = (pWorldX + _local6);
_local15 = (pWorldY + _local7);
_local16 = (pWorldZ + _local8);
SetWorldPosition(_local14, _local15, _local16);
return (_local5);
}
public function WayPoints(){
var _local1:Boolean;
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:int;
var _local11:Number;
switch (pWaypoint_State){
case 1:
if (pWaypoints_List.length > 0){
pWaypoint_Pointer = 0;
_local2 = pWaypoints_List[pWaypoint_Pointer];
pX_Destin = _local2.x;
pY_Destin = _local2.y;
pZ_Destin = _local2.z;
pWaypoint_Speed = _local2.spd;
pWaypoint_State = 2;
};
break;
case 2:
_local1 = true;
_local2 = pWaypoints_List[pWaypoint_Pointer];
_local3 = pX_Destin;
_local4 = pY_Destin;
_local5 = pZ_Destin;
_local6 = pWaypoint_Speed;
_local7 = pWorldX;
if (_local7 != _local3){
_local1 = false;
if (_local7 < _local3){
_local7 = (_local7 + gGameObj.Translate_Increment(_local6, 50, 30));
if (_local7 > _local3){
_local7 = _local3;
};
};
if (_local7 > _local3){
_local7 = (_local7 - gGameObj.Translate_Increment(_local6, 50, 30));
if (_local7 < _local3){
_local7 = _local3;
};
};
};
_local8 = pWorldY;
if (_local8 != _local4){
_local1 = false;
if (_local8 < _local4){
_local8 = (_local8 + gGameObj.Translate_Increment(_local6, 50, 30));
if (_local8 > _local4){
_local8 = _local4;
};
};
if (_local8 > _local4){
_local8 = (_local8 - gGameObj.Translate_Increment(_local6, 50, 30));
if (_local8 < _local4){
_local8 = _local4;
};
};
};
_local9 = pWorldZ;
if (_local9 != _local5){
_local1 = false;
if (_local9 < _local5){
_local9 = (_local9 + gGameObj.Translate_Increment(_local6, 50, 30));
if (_local9 > _local5){
_local9 = _local5;
};
};
if (_local9 > _local5){
_local9 = (_local9 - gGameObj.Translate_Increment(_local6, 50, 30));
if (_local9 < _local5){
_local9 = _local5;
};
};
};
SetWorldPosition(_local7, _local8, _local9);
if (_local1 == false){
if (_local7 < _local3){
pAction = "swr";
};
if (_local7 > _local3){
pAction = "swl";
};
if (_local9 < _local5){
pAction = "wf";
};
if (_local9 > _local5){
pAction = "wb";
};
};
if (_local1 == true){
switch (pAction){
case "swr":
pAction = "ssr";
break;
case "swl":
pAction = "ssl";
break;
case "wf":
pAction = "sf";
break;
case "wb":
pAction = "sb";
break;
};
pWaypoint_Delay = getTimer();
pWaypoint_State = 3;
};
break;
case 3:
_local2 = pWaypoints_List[pWaypoint_Pointer];
_local10 = 0;
_local11 = ((getTimer() - pWaypoint_Delay) * 0.001);
if (_local11 > _local10){
pWaypoints_List.splice(0, 1);
pWaypoint_State = 1;
};
break;
};
}
public function NPC_Collision(_arg1:Point){
var _local2:*;
var _local3:*;
var _local4:Point;
var _local5:Point;
var _local6:Point;
var _local7:Point;
var _local8:Number;
_local2 = 0;
while (_local2 < gGameObj.pNPC_Registry_List.length) {
_local3 = gGameObj.pNPC_Registry_List[_local2];
_local4 = new Point(_local3.pCharacter_MC.x, _local3.pCharacter_MC.y);
_local5 = new Point(_local3.pCharacter_MC.x, _local3.pCharacter_MC.y);
_local6 = gamemap.localToGlobal(_local5);
_local7 = new Point(_local6.x, (_local6.y + 40));
_local8 = Point.distance(_local7, _arg1);
if (_local8 < 20){
return (true);
};
_local2++;
};
}
public function initShadowMovieClipAttributes(){
gamemap = gGameObj.MainObj.gamemap;
pShadow_MC.name = "shadow";
pShadow_MC.width = 45;
pShadow_MC.height = 17;
pShadow_MC.alpha = 0.3;
pShadow_MC.gotoAndStop(1);
gamemap.addChild(pShadow_MC);
}
public function SetWorldPosition(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Number;
pWorldX = _arg1;
pWorldY = _arg2;
pWorldZ = _arg3;
pCharacter_MC.x = _arg1;
pCharacter_MC.y = _arg3;
pShadow_MC.x = _arg1;
pShadow_MC.y = _arg3;
_local4 = 50;
pCharacter_MC.y = ((pCharacter_MC.y - _local4) - _arg2);
}
public function Chase(){
var _local1:int;
var _local2:int;
var _local3:Boolean;
var _local4:Boolean;
_local2 = pSpeed;
_local3 = false;
_local4 = false;
if (pWorldX > gGameObj.heroClassRef.pWorldX){
_local1 = (pWorldX - gGameObj.heroClassRef.pWorldX);
if (_local1 > 50){
_local3 = WorldTranslate(-((_local2 + (_local2 * 0.25))), 0, 0, true);
if (_local3 == true){
_local4 = true;
};
pAction = "swl";
};
};
if (pWorldX < gGameObj.heroClassRef.pWorldX){
_local1 = (gGameObj.heroClassRef.pWorldX - pWorldX);
if (_local1 > 50){
_local3 = WorldTranslate((_local2 + (_local2 * 0.25)), 0, 0, true);
if (_local3 == true){
_local4 = true;
};
pAction = "swr";
};
};
if (pWorldZ > gGameObj.heroClassRef.pWorldZ){
_local1 = (pWorldZ - gGameObj.heroClassRef.pWorldZ);
if (_local1 > 50){
_local3 = WorldTranslate(0, 0, -(_local2), true);
if (_local3 == true){
_local4 = true;
};
pAction = "wb";
};
};
if (pWorldZ < gGameObj.heroClassRef.pWorldZ){
_local1 = (gGameObj.heroClassRef.pWorldZ - pWorldZ);
if (_local1 > 50){
_local3 = WorldTranslate(0, 0, _local2, true);
if (_local3 == true){
_local4 = true;
};
pAction = "wf";
};
};
if (_local4 == false){
switch (pAction){
case "swr":
pAction = "ssr";
break;
case "swl":
pAction = "ssl";
break;
case "wf":
pAction = "sf";
break;
case "wb":
pAction = "sb";
break;
};
};
}
}
}//package com.polimon
Section 5
//RunningMate (com.polimon.RunningMate)
package com.polimon {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.utils.*;
public class RunningMate extends NPC {
public var pState:String;// = "1"
public var pDeathDir:String;
var pCameraDir:String;
private var lastTime:int;
var pCameraFlash_MC:MovieClip;
public var pDeathState:String;
private var pStartTime:int;
public var pType:String;
var pCameraState:String;// = "1"
public var pDeathDelay:int;
public function RunningMate(_arg1:Object, _arg2:Object){
var _local3:MovieClip;
pState = "1";
pCameraState = "1";
super();
gGameObj = _arg1;
MainObj = gGameObj.MainObj;
gGameObj.pDisplay_Registry_List.push(this);
gGameObj.pCharacter_Registry_List.push(this);
gGameObj.pNPC_Registry_List.push(this);
gGameObj.pRunningMateClassRef = this;
gamemap = MainObj.gamemap;
pWorldX = _arg2.X;
pWorldY = _arg2.Y;
pWorldZ = _arg2.Z;
pSpeed = _arg2.spd;
pMode = _arg2.mode;
pType = _arg2.type;
pSpawnName = _arg2.name;
pStartX = pWorldX;
pStartY = pWorldY;
pStartZ = pWorldZ;
pWaypoints_List = _arg2.waypoints;
switch (pType){
case "Obama":
_local3 = new ObamaMapMovieClip();
break;
case "Biden":
_local3 = new BidenMapMovieClip();
break;
case "Palin":
_local3 = new PalinMapMovieClip();
break;
case "McCain":
_local3 = new McCainMapMovieClip();
break;
};
pCharacter_MC = _local3;
pNPCType = "RunningMate";
initShadowMovieClipAttributes();
initRunningMateMovieClipAttributes();
SetWorldPosition(pWorldX, pWorldY, pWorldZ);
MainObj.addEventListener(Event.ENTER_FRAME, GameUpdate);
}
public function CheckForPlayer(_arg1:int){
var _local2:Array;
var _local3:Array;
var _local4:Number;
_local2 = [pWorldX, pWorldY, pWorldZ];
_local3 = [gGameObj.heroClassRef.pWorldX, gGameObj.heroClassRef.pWorldY, gGameObj.heroClassRef.pWorldZ];
_local4 = gGameObj.DistanceTo(_local2, _local3);
if (_local4 < _arg1){
return (true);
};
return (false);
}
public function DestroyRunningMate(){
var _local1:*;
var _local2:*;
var _local3:*;
gGameObj.pViceLastPos = [pWorldX, pWorldY, pWorldZ];
gamemap.removeChild(pShadow_MC);
pShadow_MC = null;
gamemap.removeChild(pCharacter_MC);
pCharacter_MC = null;
if (pCameraFlash_MC != null){
gamemap.removeChild(pCameraFlash_MC);
pCameraFlash_MC = null;
};
_local1 = 0;
while (_local1 < gGameObj.pNPC_Registry_List.length) {
_local2 = gGameObj.pNPC_Registry_List[_local1];
if (_local2 == this){
gGameObj.pNPC_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
_local1 = 0;
while (_local1 < gGameObj.pDisplay_Registry_List.length) {
_local3 = gGameObj.pDisplay_Registry_List[_local1];
if (_local3 == this){
gGameObj.pDisplay_Registry_List.splice(_local1, 1);
break;
};
_local1++;
};
MainObj.removeEventListener(Event.ENTER_FRAME, GameUpdate);
}
public function RunningMateLogic(){
var _local1:Point;
var _local2:int;
var _local3:Object;
switch (pState){
case "1":
_local1 = gGameObj.pActiveCharacterClassRef.pRearPos;
_local2 = (getTimer() - pStartTime);
if (_local2 > 0){
if (pWaypoints_List.length > 0){
_local3 = pWaypoints_List[(pWaypoints_List.length - 1)];
pX_Destin = _local3.x;
pZ_Destin = _local3.z;
if (((!((pX_Destin == pWorldX))) || (!((pZ_Destin == pWorldZ))))){
pWaypoints_List = [{x:_local1.x, y:0, z:_local1.y, spd:5, t:0}];
};
} else {
if (((!((_local1.x == pWorldX))) || (!((_local1.y == pWorldZ))))){
pWaypoints_List = [{x:_local1.x, y:0, z:_local1.y, spd:5, t:0}];
};
};
pStartTime = getTimer();
};
break;
case "2":
break;
};
}
public function Animate(){
var _local1:int;
var _local2:Number;
var _local3:Number;
if (lastTime == 0){
lastTime = getTimer();
};
_local1 = (getTimer() - lastTime);
if (_local1 > 100){
switch (pAction){
case "swr":
_local2 = 4;
_local3 = 5;
break;
case "swl":
_local2 = 6;
_local3 = 7;
break;
case "wf":
_local2 = 2;
_local3 = 3;
break;
case "wb":
_local2 = 9;
_local3 = 10;
break;
case "ssr":
_local2 = 4;
_local3 = 4;
break;
case "ssl":
_local2 = 6;
_local3 = 6;
break;
case "sf":
_local2 = 1;
_local3 = 1;
break;
case "sb":
_local2 = 8;
_local3 = 8;
break;
};
if (pCharacter_MC.currentFrame >= _local3){
pCharacter_MC.gotoAndStop(_local2);
lastTime = getTimer();
} else {
if (pCharacter_MC.currentFrame < _local2){
pCharacter_MC.gotoAndStop(_local2);
lastTime = getTimer();
} else {
pCharacter_MC.gotoAndStop((pCharacter_MC.currentFrame + 1));
lastTime = getTimer();
};
};
};
}
public function FadeOut(){
var _local1:Number;
var _local2:Number;
_local1 = pCharacter_MC.alpha;
_local2 = 0.025;
if (_local1 > 0){
_local1 = (_local1 - gGameObj.Translate_Increment(_local2, 50, 30));
};
if (_local1 < 0){
_local1 = 0;
};
pCharacter_MC.alpha = _local1;
if (_local1 > 0.4){
_local1 = 0.4;
};
pShadow_MC.alpha = _local1;
}
public function FadeIn(){
var _local1:Number;
var _local2:Number;
_local1 = pCharacter_MC.alpha;
_local2 = 0.025;
if (_local1 < 1){
_local1 = (_local1 + gGameObj.Translate_Increment(_local2, 50, 30));
};
if (_local1 > 1){
_local1 = 1;
};
pCharacter_MC.alpha = _local1;
if (_local1 > 0.4){
_local1 = 0.4;
};
pShadow_MC.alpha = _local1;
}
public function CheckModes(){
switch (pMode){
case "Follow":
WayPoints();
RunningMateLogic();
Animate();
break;
};
}
public function initRunningMateMovieClipAttributes(){
gamemap = gGameObj.MainObj.gamemap;
pCharacter_MC.gotoAndStop(1);
pAction = "sf";
pCharacter_MC.alpha = 1;
pShadow_MC.alpha = 0.4;
gamemap.addChild(pCharacter_MC);
}
public function GameUpdate(_arg1:Event){
switch (gGameObj.gGame_Status){
case "GameMap":
CheckModes();
break;
case "CleanUp":
DestroyRunningMate();
break;
};
}
}
}//package com.polimon
Section 6
//BackButton (BackButton)
package {
import flash.display.*;
public dynamic class BackButton extends MovieClip {
}
}//package
Section 7
//BattleChallenger (BattleChallenger)
package {
import flash.display.*;
public dynamic class BattleChallenger extends MovieClip {
}
}//package
Section 8
//BattleChallengerCircle (BattleChallengerCircle)
package {
import flash.display.*;
public dynamic class BattleChallengerCircle extends MovieClip {
}
}//package
Section 9
//BattleChallengerNameText (BattleChallengerNameText)
package {
import flash.display.*;
public dynamic class BattleChallengerNameText extends MovieClip {
}
}//package
Section 10
//BattleChallengerStatbox (BattleChallengerStatbox)
package {
import flash.display.*;
public dynamic class BattleChallengerStatbox extends MovieClip {
public var battle_challenger_healthbar:MovieClip;
public var battle_challenger_name_text:BattleChallengerNameText;
}
}//package
Section 11
//BattleHealthBarBackframe (BattleHealthBarBackframe)
package {
import flash.display.*;
public dynamic class BattleHealthBarBackframe extends MovieClip {
}
}//package
Section 12
//BattlePlayer (BattlePlayer)
package {
import flash.display.*;
public dynamic class BattlePlayer extends MovieClip {
}
}//package
Section 13
//BattlePlayerCircle (BattlePlayerCircle)
package {
import flash.display.*;
public dynamic class BattlePlayerCircle extends MovieClip {
}
}//package
Section 14
//BattlePlayerHitPointText (BattlePlayerHitPointText)
package {
import flash.display.*;
public dynamic class BattlePlayerHitPointText extends MovieClip {
}
}//package
Section 15
//BattlePlayerNameText (BattlePlayerNameText)
package {
import flash.display.*;
public dynamic class BattlePlayerNameText extends MovieClip {
}
}//package
Section 16
//BattlePlayerStatbox (BattlePlayerStatbox)
package {
import flash.display.*;
public dynamic class BattlePlayerStatbox extends MovieClip {
public var battle_player_healthbar:MovieClip;
public var battle_player_name_text:BattlePlayerNameText;
}
}//package
Section 17
//BattleThemeBG (BattleThemeBG)
package {
import flash.media.*;
public dynamic class BattleThemeBG extends Sound {
}
}//package
Section 18
//BidenGetUpSnd (BidenGetUpSnd)
package {
import flash.media.*;
public dynamic class BidenGetUpSnd extends Sound {
}
}//package
Section 19
//BidenMapMovieClip (BidenMapMovieClip)
package {
import flash.display.*;
public dynamic class BidenMapMovieClip extends MovieClip {
}
}//package
Section 20
//ChallengerShadow (ChallengerShadow)
package {
import flash.display.*;
public dynamic class ChallengerShadow extends MovieClip {
}
}//package
Section 21
//CharShadowMovieClip (CharShadowMovieClip)
package {
import flash.display.*;
public dynamic class CharShadowMovieClip extends MovieClip {
}
}//package
Section 22
//CollisionMap1 (CollisionMap1)
package {
import flash.display.*;
public dynamic class CollisionMap1 extends MovieClip {
}
}//package
Section 23
//CollisionMap1Bk (CollisionMap1Bk)
package {
import flash.display.*;
public dynamic class CollisionMap1Bk extends MovieClip {
}
}//package
Section 24
//ContinueButton (ContinueButton)
package {
import flash.display.*;
public dynamic class ContinueButton extends MovieClip {
}
}//package
Section 25
//CreditsButton (CreditsButton)
package {
import flash.display.*;
public dynamic class CreditsButton extends MovieClip {
}
}//package
Section 26
//FundraiserIcon (FundraiserIcon)
package {
import flash.display.*;
public dynamic class FundraiserIcon extends MovieClip {
}
}//package
Section 27
//FundraiserOverlay (FundraiserOverlay)
package {
import flash.display.*;
public dynamic class FundraiserOverlay extends MovieClip {
}
}//package
Section 28
//GameMap1 (GameMap1)
package {
import flash.display.*;
public dynamic class GameMap1 extends MovieClip {
public var dot1:VoterDot;
public var dot2:VoterDot;
public var dot4:VoterDot;
public var dot6:VoterDot;
public var dot7:VoterDot;
public var dot9:VoterDot;
public var fund2:FundraiserIcon;
public var dot8:VoterDot;
public var dot3:VoterDot;
public var dot11:VoterDot;
public var dot14:VoterDot;
public var dot5:VoterDot;
public var dot18:VoterDot;
public var dot19:VoterDot;
public var dot16:VoterDot;
public var dot17:VoterDot;
public var fund3:FundraiserIcon;
public var dot15:VoterDot;
public var dot13:VoterDot;
public var dot21:VoterDot;
public var dot12:VoterDot;
public var dot20:VoterDot;
public var dot24:VoterDot;
public var dot22:VoterDot;
public var dot23:VoterDot;
public var dot10:VoterDot;
public var fund1:FundraiserIcon;
public var tutorial_campaign_stop:TutorialCampaignStop;
public var map_oceanwave1:OceanWave1;
public var map_oceanwave2:OceanWave2;
}
}//package
Section 29
//HealthBar (HealthBar)
package {
import flash.display.*;
public dynamic class HealthBar extends MovieClip {
}
}//package
Section 30
//HealthIcon (HealthIcon)
package {
import flash.display.*;
public dynamic class HealthIcon extends MovieClip {
}
}//package
Section 31
//LoaderBar (LoaderBar)
package {
import flash.display.*;
public dynamic class LoaderBar extends MovieClip {
}
}//package
Section 32
//LoaderBg (LoaderBg)
package {
import flash.display.*;
public dynamic class LoaderBg extends MovieClip {
}
}//package
Section 33
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import com.polimon.*;
import flash.utils.*;
public dynamic class Main extends MovieClip {
public var battle_player_statbox:BattlePlayerStatbox;
public var battle_challenger_statbox:BattleChallengerStatbox;
public var new_game_button:NewGameButton;
public var challenger_podium:Podium;
public var gamemap:GameMap1;
public var battle_player:BattlePlayer;
public var PresidentHealthBar:HealthBar;
public var battle_challenger:BattleChallenger;
public var wildpolimon_AA:MovieClip;
public var gLastMilliseconds:int;
public var mccain_palin_team_button:McCainPalinTeamButton;
public var credits_button:CreditsButton;
public var wildpolimon_CP:MovieClip;
public var wildpolimon_CW:MovieClip;
public var showdownbarBackFrame:ShowdownBarBackFrame;
public var battle_player_circle:BattlePlayerCircle;
public var gTimeinterval:int;
public var black_screen:MovieClip;
public var PresidentHealthIcon:HealthIcon;
public var obama_ending_picture:ObamaEndingPicture;
public var battle_challenger_circle:BattleChallengerCircle;
public var wildpolimon_WC:MovieClip;
public var collisionmap:CollisionMap1;
public var showdown_bar:ShowdownBar;
public var obama_biden_team_button:ObamaBidenTeamButton;
public var wildpolimon_R:MovieClip;
public var wildpolimon_E:MovieClip;
public var fundraiser_overlay:FundraiserOverlay;
public var wildpolimon_H:MovieClip;
public var ViceHealthBar:HealthBar;
public var battle_challenger_shadow:ChallengerShadow;
public var wildpolimon_HL:MovieClip;
public var yeswecan_text:YesWeCanEndingText;
public var wildpolimon_C:MovieClip;
public var tutorial_fill_meter:TutorialFillMeter;
public var prepare_finalshowdown_overlay:PrepareFinalShowdownOverlay;
public var ViceHealthIcon:HealthIcon;
public var back_button:BackButton;
public var wildpolimon_ME:MovieClip;
public var continue_button:ContinueButton;
public var loader_bar:LoaderBar;
public var loader_bg:LoaderBg;
public var sociotown_clicklogo:SocioTownClickLogo;
public function Main(){
var _local1:GameObjClass;
super();
this.addEventListener(Event.ENTER_FRAME, gameLoop);
_local1 = new GameObjClass(this);
}
public function gameLoop(_arg1:Event){
var _local2:int;
_local2 = getTimer();
gTimeinterval = (_local2 - gLastMilliseconds);
gLastMilliseconds = _local2;
}
}
}//package
Section 34
//MapThemeBG (MapThemeBG)
package {
import flash.media.*;
public dynamic class MapThemeBG extends Sound {
}
}//package
Section 35
//McCainEndingPicture (McCainEndingPicture)
package {
import flash.display.*;
public dynamic class McCainEndingPicture extends MovieClip {
}
}//package
Section 36
//McCainEndingSongBG (McCainEndingSongBG)
package {
import flash.media.*;
public dynamic class McCainEndingSongBG extends Sound {
}
}//package
Section 37
//McCainMapMovieClip (McCainMapMovieClip)
package {
import flash.display.*;
public dynamic class McCainMapMovieClip extends MovieClip {
}
}//package
Section 38
//McCainPalinTeamButton (McCainPalinTeamButton)
package {
import flash.display.*;
public dynamic class McCainPalinTeamButton extends MovieClip {
}
}//package
Section 39
//McCainPenguinSnd (McCainPenguinSnd)
package {
import flash.media.*;
public dynamic class McCainPenguinSnd extends Sound {
}
}//package
Section 40
//McCainPowSnd (McCainPowSnd)
package {
import flash.media.*;
public dynamic class McCainPowSnd extends Sound {
}
}//package
Section 41
//McCainSuspendCampaignSnd (McCainSuspendCampaignSnd)
package {
import flash.media.*;
public dynamic class McCainSuspendCampaignSnd extends Sound {
}
}//package
Section 42
//NewGameButton (NewGameButton)
package {
import flash.display.*;
public dynamic class NewGameButton extends MovieClip {
}
}//package
Section 43
//ObamaBidenTeamButton (ObamaBidenTeamButton)
package {
import flash.display.*;
public dynamic class ObamaBidenTeamButton extends MovieClip {
}
}//package
Section 44
//ObamaChantSnd (ObamaChantSnd)
package {
import flash.media.*;
public dynamic class ObamaChantSnd extends Sound {
}
}//package
Section 45
//ObamaEndingPicture (ObamaEndingPicture)
package {
import flash.display.*;
public dynamic class ObamaEndingPicture extends MovieClip {
}
}//package
Section 46
//ObamaEndingSongBG (ObamaEndingSongBG)
package {
import flash.media.*;
public dynamic class ObamaEndingSongBG extends Sound {
}
}//package
Section 47
//ObamaMapMovieClip (ObamaMapMovieClip)
package {
import flash.display.*;
public dynamic class ObamaMapMovieClip extends MovieClip {
}
}//package
Section 48
//ObamaNuanceSnd (ObamaNuanceSnd)
package {
import flash.media.*;
public dynamic class ObamaNuanceSnd extends Sound {
}
}//package
Section 49
//ObamaYesWeCanSnd (ObamaYesWeCanSnd)
package {
import flash.media.*;
public dynamic class ObamaYesWeCanSnd extends Sound {
}
}//package
Section 50
//OceanWave1 (OceanWave1)
package {
import flash.display.*;
public dynamic class OceanWave1 extends MovieClip {
}
}//package
Section 51
//OceanWave2 (OceanWave2)
package {
import flash.display.*;
public dynamic class OceanWave2 extends MovieClip {
}
}//package
Section 52
//PalinFolksySnd (PalinFolksySnd)
package {
import flash.media.*;
public dynamic class PalinFolksySnd extends Sound {
}
}//package
Section 53
//PalinMapMovieClip (PalinMapMovieClip)
package {
import flash.display.*;
public dynamic class PalinMapMovieClip extends MovieClip {
}
}//package
Section 54
//PalinMoleculeSnd (PalinMoleculeSnd)
package {
import flash.media.*;
public dynamic class PalinMoleculeSnd extends Sound {
}
}//package
Section 55
//Podium (Podium)
package {
import flash.display.*;
public dynamic class Podium extends MovieClip {
}
}//package
Section 56
//PrepareFinalShowdownOverlay (PrepareFinalShowdownOverlay)
package {
import flash.display.*;
public dynamic class PrepareFinalShowdownOverlay extends MovieClip {
}
}//package
Section 57
//PunchHardSnd (PunchHardSnd)
package {
import flash.media.*;
public dynamic class PunchHardSnd extends Sound {
}
}//package
Section 58
//SarahChantSnd (SarahChantSnd)
package {
import flash.media.*;
public dynamic class SarahChantSnd extends Sound {
}
}//package
Section 59
//ShowdownBar (ShowdownBar)
package {
import flash.display.*;
public dynamic class ShowdownBar extends MovieClip {
}
}//package
Section 60
//ShowdownBarBackFrame (ShowdownBarBackFrame)
package {
import flash.display.*;
public dynamic class ShowdownBarBackFrame extends MovieClip {
}
}//package
Section 61
//ShowdownBarFrame (ShowdownBarFrame)
package {
import flash.display.*;
public dynamic class ShowdownBarFrame extends MovieClip {
}
}//package
Section 62
//SocioTownClickLogo (SocioTownClickLogo)
package {
import flash.display.*;
public dynamic class SocioTownClickLogo extends MovieClip {
}
}//package
Section 63
//TitleThemeBG (TitleThemeBG)
package {
import flash.media.*;
public dynamic class TitleThemeBG extends Sound {
}
}//package
Section 64
//TutorialCampaignStop (TutorialCampaignStop)
package {
import flash.display.*;
public dynamic class TutorialCampaignStop extends MovieClip {
}
}//package
Section 65
//TutorialFillMeter (TutorialFillMeter)
package {
import flash.display.*;
public dynamic class TutorialFillMeter extends MovieClip {
}
}//package
Section 66
//VoterDot (VoterDot)
package {
import flash.display.*;
public dynamic class VoterDot extends MovieClip {
}
}//package
Section 67
//YesWeCanEndingText (YesWeCanEndingText)
package {
import flash.display.*;
public dynamic class YesWeCanEndingText extends MovieClip {
}
}//package