Section 1
//EXPORT_16 (electionmadness_fla.EXPORT_16)
package electionmadness_fla {
import flash.display.*;
public dynamic class EXPORT_16 extends MovieClip {
public var MMenu:mainMenu;
public var MInterface:Interface;
public var CObama:obama;
public var MSelect:select;
public var CHillary:hillary;
public var MEnding:ending;
public var CCain:cain;
public function EXPORT_16(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
MInterface.stop();
MSelect.stop();
MMenu.stop();
MEnding.stop();
CObama.stop();
CHillary.stop();
CCain.stop();
}
}
}//package electionmadness_fla
Section 2
//MainTimeline (electionmadness_fla.MainTimeline)
package electionmadness_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var percent:int;
public var hog:MovieClip;
public var load_bar:MovieClip;
public var enableSiteLock:Boolean;
public var bExecPlay:SimpleButton;
public var obc;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function showSite(){
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = root.loaderInfo.loaderURL.split("://");
_local2 = _local1[1].split("/");
_local3 = root.loaderInfo.loaderURL;
}
public function cekLocalSite():Boolean{
if (root.loaderInfo.loaderURL == "file:///F|/ferry%20FLASH%20GAME%20DEV/ObamaHillary/electionmadness.swf"){
return (true);
};
return (false);
}
public function cekWebSite():Boolean{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = root.loaderInfo.loaderURL.split("://");
_local2 = _local1[1].split("/");
_local3 = _local2[0];
if (_local3 == "www.artlogicgames.com"){
return (true);
};
if (_local3 == "artlogicgames.com"){
return (true);
};
return (false);
}
function frame3(){
stop();
obc = new GameManager();
stage.addChild(obc);
obc.initialise();
}
function frame1(){
stop();
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.showDefaultContextMenu = false;
enableSiteLock = false;
MochiAd.showPreGameAd({clip:root, id:"8bb304ace478fa09", res:"640x480"});
trace(root.loaderInfo.loaderURL);
trace(loaderInfo.url);
addEventListener(Event.ENTER_FRAME, showProgress);
hog.btnLink.addEventListener(MouseEvent.CLICK, linkClick);
}
function frame4(){
stop();
}
public function showProgress(_arg1:Event):void{
percent = Math.round(((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100));
this.load_bar.scaleX = (percent / 100);
trace((("Loading... " + percent) + "%"));
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
trace("Done loading");
this.removeEventListener(Event.ENTER_FRAME, showProgress);
hog.btnLink.removeEventListener(MouseEvent.CLICK, linkClick);
};
}
function frame2(){
stop();
bExecPlay.addEventListener(MouseEvent.CLICK, playClick);
}
public function playClick(_arg1:MouseEvent):void{
bExecPlay.removeEventListener(MouseEvent.CLICK, playClick);
gotoAndStop(3);
}
public function linkClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadehog.com");
navigateToURL(_local2, "_blank");
}
}
}//package electionmadness_fla
Section 3
//panelBar_20 (electionmadness_fla.panelBar_20)
package electionmadness_fla {
import flash.display.*;
public dynamic class panelBar_20 extends MovieClip {
public var spBar:MovieClip;
public var lifeBar:MovieClip;
}
}//package electionmadness_fla
Section 4
//pictureCandidate_50 (electionmadness_fla.pictureCandidate_50)
package electionmadness_fla {
import flash.display.*;
public dynamic class pictureCandidate_50 extends MovieClip {
public function pictureCandidate_50(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package electionmadness_fla
Section 5
//Timeline_11 (electionmadness_fla.Timeline_11)
package electionmadness_fla {
import flash.display.*;
public dynamic class Timeline_11 extends MovieClip {
public function Timeline_11(){
addFrameScript(25, frame26);
}
function frame26(){
stop();
}
}
}//package electionmadness_fla
Section 6
//Timeline_3 (electionmadness_fla.Timeline_3)
package electionmadness_fla {
import flash.display.*;
public dynamic class Timeline_3 extends MovieClip {
public var btnLink:SimpleButton;
public function Timeline_3(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package electionmadness_fla
Section 7
//AnimatedBitmap (fzero.base.animBitmap.AnimatedBitmap)
package fzero.base.animBitmap {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class AnimatedBitmap extends Bitmap {
private var _point:Point;
private var _isPlaying:Boolean;
private var _rect:Rectangle;
private var _frameNr:int;
private var _buffer:BitmapData;
private var _frameAmount:int;
private var _timer:FrameRateTimer;
public function AnimatedBitmap(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean=true, _arg6:String="auto", _arg7:Boolean=false){
super(new BitmapData(_arg2, _arg3, _arg5, 0), _arg6, _arg7);
_buffer = _arg1.clone();
_frameAmount = (_buffer.width / width);
_frameNr = 1;
_isPlaying = false;
_timer = new FrameRateTimer(_arg4);
_point = new Point(0, 0);
_rect = new Rectangle(0, 0, width, height);
bitmapData.copyPixels(_buffer, _rect, _point);
}
public function stop():void{
if (_isPlaying){
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, playForward);
_isPlaying = false;
};
}
public function gotoAndStop(_arg1:int):void{
if (_arg1 >= _frameNr){
_frameNr = (_arg1 - 1);
nextFrame();
} else {
_frameNr = (_arg1 + 1);
prevFrame();
};
}
public function setFrameRateTimer(_arg1:FrameRateTimer):void{
if (_isPlaying){
stop();
_timer = _arg1;
play();
} else {
_timer = _arg1;
};
}
public function play():void{
if (!_isPlaying){
_isPlaying = true;
_timer.addEventListener(TimerEvent.TIMER, playForward);
_timer.start();
} else {
stop();
play();
};
}
public function getFrameRate():int{
return (_timer.getFrameRate());
}
public function nextFrame():void{
if (_isPlaying){
stop();
};
_frameNr++;
if (_frameNr > _frameAmount){
_frameNr = _frameAmount;
};
draw();
}
public function gotoAndPlay(_arg1:int):void{
_frameNr = (_arg1 - 1);
play();
}
public function getTotalFrames():int{
return (_frameAmount);
}
public function isPlaying():Boolean{
return (_isPlaying);
}
public function getCurrentFrame():int{
return (_frameNr);
}
private function playForward(_arg1:TimerEvent=null):void{
_frameNr++;
if (_frameNr > _frameAmount){
_frameNr = 1;
} else {
if (_frameNr < 1){
_frameNr = _frameAmount;
};
};
draw();
}
public function prevFrame():void{
if (_isPlaying){
stop();
};
_frameNr--;
if (_frameNr < 1){
_frameNr = 1;
};
draw();
}
private function draw():void{
dispatchEvent(new FrameEvent(FrameEvent.ENTER));
_rect = new Rectangle(((_frameNr - 1) * width), 0, width, height);
bitmapData.copyPixels(_buffer, _rect, _point);
}
}
}//package fzero.base.animBitmap
Section 8
//FrameEvent (fzero.base.animBitmap.FrameEvent)
package fzero.base.animBitmap {
import flash.events.*;
public class FrameEvent extends Event {
public static const ENTER:String = "enter";
public function FrameEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
}
}//package fzero.base.animBitmap
Section 9
//FrameRateTimer (fzero.base.animBitmap.FrameRateTimer)
package fzero.base.animBitmap {
import flash.utils.*;
public class FrameRateTimer extends Timer {
private var _fps:int;
public function FrameRateTimer(_arg1:int=-1){
_fps = ((_arg1)>-1) ? _arg1 : 24;
super(Math.round((1000 / _fps)), 0);
}
public function getFrameRate():int{
return (_fps);
}
}
}//package fzero.base.animBitmap
Section 10
//Entity (fzero.base.Entity)
package fzero.base {
import fzero.base.animBitmap.*;
public class Entity {
public function Entity(_arg1, _arg2){
var _local3:AnimatedBitmap;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
super();
_local4 = 300;
_local5 = 0;
_local6 = 0;
_local7 = 24;
_local8 = 0;
_local8 = 0;
while (_local8 <= _local4) {
_local3 = new AnimatedBitmap(new _arg2(672, 32), 32, 32, _local7);
_arg1.addChild(_local3);
_local3.x = _local5;
_local3.y = _local6;
_local3.play();
if (_local5 > 640){
_local5 = 0;
_local6 = (_local6 + 32);
} else {
_local5 = (_local5 + 32);
};
_local7 = Math.round((1 + (Math.random() * 100)));
_local8++;
};
}
}
}//package fzero.base
Section 11
//ItemClass (src.ItemClass)
package src {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class ItemClass extends MovieClip {
const floor = 450;
const max_x = 550;
const _banana = 1;
const min_x = 90;
private var friction:Number;// = 0.97
private var life:int;// = 5
public var enableHit:Boolean;// = false
private var dispCont;
private var price:int;// = 0
private var pow:int;// = 1
private var gravity:Number;// = 0.5
private var rt:Number;// = 0
private var hitType:int;// = 1
private var soundMgr;
private var bounce:Number;// = -0.7
private var charMgrA;
private var charMgrB;
private var enableExplo:Boolean;// = false
private var vx:Number;// = 0
private var vy:Number;// = 0
private var hitTest;
private var idleTimer:Timer;// = null
private var typeID:int;// = 0
public var isPaused:Boolean;// = false
public function ItemClass(){
isPaused = false;
enableHit = false;
typeID = 0;
vx = 0;
vy = 0;
rt = 0;
friction = 0.97;
gravity = 0.5;
bounce = -0.7;
life = 5;
pow = 1;
hitType = 1;
enableExplo = false;
price = 0;
idleTimer = null;
super();
trace("create item ... ok! ");
}
public function destroy(){
if (idleTimer){
idleTimer.stop();
idleTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
idleTimer = null;
};
removeEventListener(Event.ENTER_FRAME, itemHandle);
dispCont.removeChild(this);
dispCont = null;
hitTest = null;
soundMgr = null;
charMgrA = null;
charMgrB = null;
}
private function itemHandle(_arg1:Event):void{
if (isPaused){
return;
};
if (this.currentLabel == "destroy"){
destroy();
return;
};
if ((((this.currentLabel == "fade")) || ((this.currentLabel == "break")))){
return;
};
if ((((vx > -0.1)) && ((vx < 0.1)))){
vx = 0;
};
if ((((vy > -0.1)) && ((vy < 0.1)))){
vy = 0;
};
if ((((rt > -0.1)) && ((rt < 0.1)))){
rt = 0;
};
vx = (vx * friction);
this.x = (this.x + vx);
if (this.y < (floor - (this.height * 0.5))){
vy = (vy + gravity);
};
this.y = (this.y + vy);
rt = (rt * friction);
this.rotation = (this.rotation + rt);
if ((this.y + (this.height * 0.5)) > floor){
enableHit = false;
this.y = (floor - (this.height * 0.5));
if (Math.abs((vy * bounce)) > 2){
vy = (vy * bounce);
rt = -(rt);
} else {
vy = 0;
};
} else {
if ((this.x - (this.width * 0.5)) < 0){
this.x = (0 + (this.width * 0.5));
vx = (vx * bounce);
} else {
if ((this.x + (this.width * 0.5)) > 640){
this.x = (640 - (this.width * 0.5));
vx = (vx * bounce);
};
};
};
if (this.hitTestObject(charMgrA.getObj())){
if ((((((((((((((((((((((((((((charMgrA.getObj().currentLabel == "stand")) || ((charMgrA.getObj().currentLabel == "action1")))) || ((charMgrA.getObj().currentLabel == "action1N")))) || ((charMgrA.getObj().currentLabel == "action2")))) || ((charMgrA.getObj().currentLabel == "action2N")))) || ((charMgrA.getObj().currentLabel == "action3")))) || ((charMgrA.getObj().currentLabel == "action3N")))) || ((charMgrA.getObj().currentLabel == "action4")))) || ((charMgrA.getObj().currentLabel == "action4N")))) || ((charMgrA.getObj().currentLabel == "special")))) || ((charMgrA.getObj().currentLabel == "specialN")))) || ((charMgrA.getObj().currentLabel == "taunt1")))) || ((charMgrA.getObj().currentLabel == "taunt2")))) || ((charMgrA.getObj().currentLabel == "taunt3")))){
if (enableHit){
if (((!((charMgrA.getObj().currentLabel == "special"))) && (!((charMgrA.getObj().currentLabel == "specialN"))))){
if (hitType == 1){
charMgrA.getObj().gotoAndPlay("hit");
} else {
charMgrA.getObj().gotoAndPlay("hit2");
};
charMgrA.setPopularity((charMgrA.getPopularity() - pow));
charMgrA.setSpecial((charMgrA.getSpecial() + 2));
};
launch(7, 6, 5, true);
};
} else {
hitTest.run(charMgrA, this);
};
} else {
if (this.hitTestObject(charMgrB.getObj())){
if ((((((((((((((((((((((((((((charMgrB.getObj().currentLabel == "stand")) || ((charMgrB.getObj().currentLabel == "action1")))) || ((charMgrB.getObj().currentLabel == "action1N")))) || ((charMgrB.getObj().currentLabel == "action2")))) || ((charMgrB.getObj().currentLabel == "action2N")))) || ((charMgrB.getObj().currentLabel == "action3")))) || ((charMgrB.getObj().currentLabel == "action3N")))) || ((charMgrB.getObj().currentLabel == "action4")))) || ((charMgrB.getObj().currentLabel == "action4N")))) || ((charMgrB.getObj().currentLabel == "special")))) || ((charMgrB.getObj().currentLabel == "specialN")))) || ((charMgrB.getObj().currentLabel == "taunt1")))) || ((charMgrB.getObj().currentLabel == "taunt2")))) || ((charMgrB.getObj().currentLabel == "taunt3")))){
if (enableHit){
if (((!((charMgrB.getObj().currentLabel == "special"))) && (!((charMgrB.getObj().currentLabel == "specialN"))))){
if (hitType == 1){
charMgrB.getObj().gotoAndPlay("hit");
} else {
charMgrB.getObj().gotoAndPlay("hit2");
};
charMgrB.setPopularity((charMgrB.getPopularity() - pow));
charMgrB.setSpecial((charMgrB.getSpecial() + 2));
};
launch(7, 6, 5, false);
};
} else {
hitTest.run(charMgrB, this);
};
};
};
if ((((((vx == 0)) && ((vy == 0)))) && ((rt == 0)))){
if (idleTimer.running == false){
idleTimer.start();
trace("hell go run");
};
};
}
public function playDestroy(){
vx = 0;
vy = 0;
rt = 0;
this.gotoAndPlay("break");
if (enableExplo){
if (this.hitTestObject(charMgrA.getObj())){
if (charMgrA.getObj().currentLabel != "special"){
charMgrA.getObj().gotoAndPlay("hit2");
charMgrA.setPopularity((charMgrA.getPopularity() - (pow * 3)));
};
} else {
if (this.hitTestObject(charMgrB.getObj())){
if (charMgrB.getObj().currentLabel != "special"){
charMgrB.getObj().gotoAndPlay("hit2");
charMgrB.setPopularity((charMgrB.getPopularity() - (pow * 3)));
};
};
};
};
}
public function getPrice(){
return (price);
}
public function isOnGround():Boolean{
if (this.y > (floor - 10)){
return (true);
};
return (false);
}
public function launch(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean){
if (_arg4){
vx = _arg1;
rt = _arg3;
} else {
vx = -(_arg1);
rt = -(_arg3);
};
vy = -(_arg2);
idleTimer.stop();
idleTimer.reset();
enableHit = true;
}
public function initialise(_arg1, _arg2:int, _arg3, _arg4, _arg5, _arg6:Boolean){
dispCont = _arg1;
typeID = _arg2;
soundMgr = _arg3;
charMgrA = _arg4;
charMgrB = _arg5;
dispCont.addChild(this);
hitTest = new HitClass();
if (_arg6){
this.x = 90;
} else {
this.x = 550;
};
if (Math.random() < 0.6){
this.x = 90;
} else {
this.x = 550;
};
this.y = 0;
vy = 1;
enableHit = true;
if (_arg2 == 1){
friction = 0.97;
gravity = 0.6;
bounce = -0.9;
life = 10;
pow = 5;
hitType = 2;
enableExplo = false;
price = 50;
} else {
if (_arg2 == 2){
friction = 0.97;
gravity = 0.5;
bounce = -0.7;
life = 3;
pow = 3;
hitType = 1;
enableExplo = true;
price = 100;
} else {
if (_arg2 == 3){
friction = 0.97;
gravity = 0.4;
bounce = -0.6;
life = 3;
pow = 1;
hitType = 1;
enableExplo = false;
price = 10;
} else {
if (_arg2 == 4){
friction = 0.97;
gravity = 0.5;
bounce = -0.6;
life = 6;
pow = 3;
hitType = 2;
enableExplo = false;
price = 20;
} else {
if (_arg2 == 5){
friction = 0.97;
gravity = 0.8;
bounce = -0.3;
life = 8;
pow = 8;
hitType = 2;
enableExplo = false;
price = 200;
this.scaleX = 0.9;
this.scaleY = 0.9;
} else {
if (_arg2 == 6){
friction = 0.97;
gravity = 0.3;
bounce = -0.4;
life = 3;
pow = 1;
hitType = 1;
enableExplo = false;
price = 5;
} else {
if (_arg2 == 7){
friction = 0.97;
gravity = 0.5;
bounce = -0.5;
life = 4;
pow = 4;
hitType = 1;
enableExplo = false;
price = 30;
this.scaleX = 1.2;
this.scaleY = 1.2;
} else {
if (_arg2 == 8){
friction = 0.97;
gravity = 0.75;
bounce = -0.4;
life = 6;
pow = 6;
hitType = 2;
enableExplo = false;
price = 150;
this.scaleX = 0.8;
this.scaleY = 0.8;
} else {
if (_arg2 == 9){
friction = 0.97;
gravity = 0.5;
bounce = -0.6;
life = 4;
pow = 6;
hitType = 1;
enableExplo = false;
price = 60;
this.scaleX = 1.2;
this.scaleY = 1.2;
};
};
};
};
};
};
};
};
};
addEventListener(Event.ENTER_FRAME, itemHandle, false, 0, true);
idleTimer = new Timer(5000, 1);
idleTimer.stop();
idleTimer.addEventListener(TimerEvent.TIMER_COMPLETE, timerComplete, false, 0, true);
}
public function getObj(){
if (this){
return (this);
};
}
public function playHit(){
this.gotoAndPlay("hit");
}
public function playFade(){
vx = 0;
vy = 0;
rt = 0;
this.gotoAndPlay("fade");
}
private function timerComplete(_arg1:TimerEvent):void{
if (idleTimer){
idleTimer.stop();
idleTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
idleTimer = null;
};
this.gotoAndPlay("fade");
}
public function setLife(_arg1:int){
life = Math.max(Math.min(_arg1, 9999999), 0);
}
public function getLife(){
return (life);
}
}
}//package src
Section 12
//BaseSound (BaseSound)
package {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class BaseSound extends Sound {
private var sndTransform:SoundTransform;
private var sndFadeOut:Boolean;
private var sndFadeIn:Boolean;
private var sndPosTime:Number;
private var loop:Boolean;
private var sndObj:Sound;
private var sndChannel:SoundChannel;
private var sndTimer:Timer;
private var sndVolume:Number;
private var sndPan:Number;
public function BaseSound(){
sndObj = this;
sndChannel = null;
sndTransform = null;
sndVolume = 1;
sndPan = 0;
sndPosTime = 0;
sndFadeIn = false;
sndFadeOut = false;
loop = false;
sndTimer = new Timer(50);
sndTimer.addEventListener(TimerEvent.TIMER, sndTimerHandler);
sndTimer.start();
}
public function setVolume(_arg1:Number):void{
var _local2:SoundTransform;
sndVolume = _arg1;
if (sndChannel){
_local2 = sndChannel.soundTransform;
_local2.volume = sndVolume;
sndChannel.soundTransform = _local2;
};
}
public function stopSound():void{
if (sndChannel){
sndChannel.stop();
sndChannel.removeEventListener(Event.SOUND_COMPLETE, sound_loop);
loop = false;
trace("stopSound() ");
};
}
public function fadeOut(_arg1:Boolean):void{
sndFadeOut = true;
sndFadeIn = false;
if (_arg1){
setVolume(1);
};
trace("Fade Out Effect ");
}
public function pauseSound():void{
if (sndChannel){
sndPosTime = sndChannel.position;
sndChannel.stop();
sndChannel.removeEventListener(Event.SOUND_COMPLETE, sound_loop);
trace(("pauseSound(), Position :" + String(sndPosTime)));
};
}
public function playSound():void{
stopSound();
sndChannel = sndObj.play();
setVolume(sndVolume);
setPan(sndPan);
trace("playSound() ");
}
public function fadeIn(_arg1:Boolean):void{
sndFadeIn = true;
sndFadeOut = false;
if (_arg1){
setVolume(0);
};
trace("Fade In Effect ");
}
private function sndTimerHandler(_arg1:TimerEvent):void{
if (((sndFadeIn) && (sndFadeOut))){
sndFadeIn = false;
sndFadeOut = false;
setVolume(1);
};
if (sndFadeIn){
sndVolume = (sndVolume + 0.01);
if (sndVolume > 1){
setVolume(1);
sndFadeIn = false;
} else {
setVolume(sndVolume);
};
};
if (sndFadeOut){
sndVolume = (sndVolume - 0.01);
if (sndVolume < 0){
setVolume(0);
sndFadeOut = false;
} else {
setVolume(sndVolume);
};
};
}
public function setPan(_arg1:Number):void{
var _local2:SoundTransform;
sndPan = _arg1;
if (sndChannel){
_local2 = sndChannel.soundTransform;
_local2.pan = sndPan;
sndChannel.soundTransform = _local2;
};
}
public function resumeSound():void{
stopSound();
sndChannel = sndObj.play(sndPosTime);
if (loop){
sndChannel.addEventListener(Event.SOUND_COMPLETE, sound_loop);
};
setVolume(sndVolume);
setPan(sndPan);
trace("resumeSound() ");
}
private function sound_loop(_arg1:Event){
sndChannel = sndObj.play();
setVolume(sndVolume);
setPan(sndPan);
sndChannel.addEventListener(Event.SOUND_COMPLETE, sound_loop);
trace("Loop Back ");
}
public function playSoundLoop():void{
stopSound();
sndChannel = sndObj.play();
sndChannel.addEventListener(Event.SOUND_COMPLETE, sound_loop);
setVolume(sndVolume);
setPan(sndPan);
loop = true;
trace("playSoundLoop() ");
}
}
}//package
Section 13
//BG (BG)
package {
import flash.display.*;
public dynamic class BG extends Sprite {
}
}//package
Section 14
//cain (cain)
package {
import flash.display.*;
public dynamic class cain extends MovieClip {
public function cain(){
addFrameScript(23, frame24, 68, frame69, 128, frame129, 167, frame168, 179, frame180, 190, frame191, 210, frame211, 235, frame236, 269, frame270, 309, frame310, 355, frame356, 398, frame399, 579, frame580);
}
function frame270(){
gotoAndPlay("stand");
}
function frame399(){
stop();
}
function frame168(){
gotoAndPlay("stand");
}
function frame310(){
gotoAndPlay("stand");
}
function frame211(){
gotoAndPlay("stand");
}
function frame180(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("stand");
}
function frame191(){
gotoAndPlay("stand");
}
function frame356(){
stop();
}
function frame236(){
gotoAndPlay("stand");
}
function frame580(){
gotoAndPlay("stand");
}
function frame129(){
gotoAndPlay("stand");
}
function frame69(){
gotoAndPlay("stand");
}
}
}//package
Section 15
//CharacterManager (CharacterManager)
package {
public class CharacterManager {
const mr_obama = 1;
const mc_cain = 3;
const as_P1 = 1;
const as_P2 = 2;
const as_COM = 0;
const max_special = 100;
const ms_hillary = 2;
const max_popularity = 100;
const RIGHT_POS = 2;
const LEFT_POS = 1;
private var score:int;// = 0
private var popularity:int;// = 50
private var special:int;// = 0
private var pos:int;// = 1
private var control:int;// = 0
private var charID:int;// = 0
private var objEnt;// = null
private var dispCont;// = null
public var isPaused:Boolean;// = false
public function CharacterManager(){
isPaused = false;
dispCont = null;
objEnt = null;
charID = 0;
control = 0;
pos = 1;
popularity = (max_popularity / 2);
special = 0;
score = 0;
super();
}
public function getMaxPopularity():int{
return (max_popularity);
}
public function isMaxSpecial(){
if (special == max_special){
return (true);
};
return (false);
}
public function playWin(){
objEnt.gotoAndPlay("win");
}
public function getSpecial():int{
return (special);
}
public function playAction3(){
if ((((((((objEnt.currentLabel == "stand")) || ((objEnt.currentLabel == "taunt1")))) || ((objEnt.currentLabel == "taunt2")))) || ((objEnt.currentLabel == "taunt3")))){
objEnt.gotoAndPlay("action3");
};
}
public function playAction2(){
if ((((((((objEnt.currentLabel == "stand")) || ((objEnt.currentLabel == "taunt1")))) || ((objEnt.currentLabel == "taunt2")))) || ((objEnt.currentLabel == "taunt3")))){
objEnt.gotoAndPlay("action2");
};
}
public function isRight():Boolean{
if (pos == RIGHT_POS){
return (true);
};
return (false);
}
public function playLose(){
objEnt.gotoAndPlay("lose");
}
public function getControl():int{
return (control);
}
public function getMaxSpecial():int{
return (max_special);
}
public function getPopularity():int{
return (popularity);
}
public function setPopularity(_arg1:int){
popularity = Math.max(Math.min(_arg1, max_popularity), 0);
}
public function getObj(){
if (objEnt){
return (objEnt);
};
}
public function isLeft():Boolean{
if (pos == LEFT_POS){
return (true);
};
return (false);
}
public function setScore(_arg1:int){
score = Math.max(Math.min(_arg1, 9999999), 0);
}
public function getScore():int{
return (score);
}
public function playPose(){
var _local1:Number;
if (objEnt.currentLabel == "stand"){
_local1 = Math.random();
if (_local1 < 0.3){
objEnt.gotoAndPlay("taunt1");
} else {
if ((((_local1 >= 0.3)) && ((_local1 < 0.6)))){
objEnt.gotoAndPlay("taunt2");
} else {
objEnt.gotoAndPlay("taunt3");
};
};
};
}
public function getCharID(){
return (charID);
}
public function playSpecial(){
if ((((((((objEnt.currentLabel == "stand")) || ((objEnt.currentLabel == "taunt1")))) || ((objEnt.currentLabel == "taunt2")))) || ((objEnt.currentLabel == "taunt3")))){
if (special >= max_special){
objEnt.gotoAndPlay("special");
special = 0;
};
};
}
public function playAction1(){
if ((((((((objEnt.currentLabel == "stand")) || ((objEnt.currentLabel == "taunt1")))) || ((objEnt.currentLabel == "taunt2")))) || ((objEnt.currentLabel == "taunt3")))){
objEnt.gotoAndPlay("action1");
};
}
public function playAction4(){
if ((((((((objEnt.currentLabel == "stand")) || ((objEnt.currentLabel == "taunt1")))) || ((objEnt.currentLabel == "taunt2")))) || ((objEnt.currentLabel == "taunt3")))){
objEnt.gotoAndPlay("action4");
};
}
public function destroy(){
dispCont.removeChild(objEnt);
dispCont = null;
objEnt = null;
}
public function setup(_arg1, _arg2:int, _arg3:int, _arg4:int){
dispCont = _arg1;
charID = _arg2;
control = _arg4;
pos = _arg3;
popularity = max_popularity;
special = 0;
score = 0;
if (charID == mr_obama){
objEnt = new obama();
} else {
if (charID == ms_hillary){
objEnt = new hillary();
} else {
if (charID == mc_cain){
objEnt = new cain();
};
};
};
dispCont.addChild(objEnt);
if (pos == LEFT_POS){
objEnt.x = 70;
objEnt.y = 440;
objEnt.scaleX = -0.75;
} else {
objEnt.x = 570;
objEnt.y = 440;
objEnt.scaleX = 0.75;
};
objEnt.scaleY = 0.75;
}
public function setSpecial(_arg1:int){
special = Math.max(Math.min(_arg1, max_special), 0);
}
}
}//package
Section 16
//clapclap (clapclap)
package {
public dynamic class clapclap extends BaseSound {
}
}//package
Section 17
//ending (ending)
package {
import flash.display.*;
public dynamic class ending extends MovieClip {
public var bEndPlayMore:SimpleButton;
public var bEndMainMenu:SimpleButton;
public function ending(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 18
//GameManager (GameManager)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class GameManager extends Sprite {
private var BG_CONT;
private var itemMgr;
private var objP2;
private var upArrow:Boolean;
private var MENU_CONT;
private var objP1;
private var menuMgr;
private var leftArrow:Boolean;
private var rightArrow:Boolean;
public var gm_stage:int;// = 1
private var objBG;
private var downArrow:Boolean;
private var soundMgr;
public var gm_time:int;// = 120
private var charMgrA;
private var charMgrB;
private var PLAYER_CONT;
private var ITEM_CONT;
private var thisParent;
public function GameManager(){
gm_time = 120;
gm_stage = 1;
super();
}
public function playBattle(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
charMgrA.setup(PLAYER_CONT, _arg1, charMgrA.LEFT_POS, _arg2);
charMgrB.setup(PLAYER_CONT, _arg3, charMgrB.RIGHT_POS, _arg4);
gm_time = 120;
thisParent.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed, false, 0, true);
thisParent.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedA, false, 0, true);
thisParent.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedB, false, 0, true);
thisParent.addEventListener(Event.ENTER_FRAME, gameHandle, false, 0, true);
thisParent.stage.focus = this;
}
public function destroyAll(){
itemDropEnd();
destroyBg();
thisParent.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
thisParent.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressedA);
thisParent.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressedB);
thisParent.removeEventListener(Event.ENTER_FRAME, gameHandle);
charMgrA.destroy();
charMgrB.destroy();
}
public function itemDropFade(){
var _local1:int;
var _local2:Array;
var _local3:int;
if (itemMgr){
itemMgr.remove();
};
itemMgr = null;
_local1 = ITEM_CONT.numChildren;
_local2 = new Array(_local1);
_local3 = 0;
_local3 = 0;
while (_local3 < _local1) {
_local2[_local3] = ITEM_CONT.getChildAt(_local3);
_local3++;
};
_local3 = 0;
while (_local3 < _local1) {
if (_local2[_local3]){
_local2[_local3].playFade();
};
_local3++;
};
}
public function createBg(){
if (objBG){
BG_CONT.removeChild(objBG);
};
objBG = new BG();
BG_CONT.addChild(objBG);
}
private function AIHandleCain(_arg1){
var _local2:*;
var _local3:int;
var _local4:int;
var _local5:int;
if ((((_arg1.getCharID() == _arg1.mc_cain)) && ((_arg1.getControl() == _arg1.as_COM)))){
_local3 = 0;
_local4 = ITEM_CONT.numChildren;
_local5 = -1;
while (++_local5 < _local4) {
_local2 = ITEM_CONT.getChildAt(_local5);
if (_local2.isOnGround()){
} else {
if (Math.abs((_arg1.getObj().x - _local2.x)) < 220){
if ((Math.abs((_arg1.getObj().y - _local2.y)) < 380)){
_local3 = 1;
};
if ((Math.abs((_arg1.getObj().y - _local2.y)) < 270)){
_local3 = 2;
};
if ((Math.abs((_arg1.getObj().y - _local2.y)) < 200)){
_local3 = 3;
};
break;
};
};
};
if (_local3 == 1){
if (Math.random() < 0.5){
_arg1.playAction4();
} else {
_arg1.playAction3();
};
} else {
if (_local3 == 2){
if (Math.random() < 0.4){
_arg1.playAction2();
} else {
if (Math.abs((_arg1.getObj().x - _local2.x)) < 100){
_arg1.playAction1();
} else {
_arg1.playAction2();
};
};
} else {
if (_local3 == 3){
if (_arg1.isMaxSpecial()){
_arg1.playSpecial();
} else {
if (Math.random() < 0.2){
_arg1.playAction2();
} else {
_arg1.playAction1();
};
};
};
};
};
if (_local3 == 0){
if ((_arg1.getPopularity() / _arg1.getMaxPopularity()) < 0.9){
if (_arg1.getObj().currentFrame == 1){
if (Math.random() < 0.3){
_arg1.playPose();
};
};
};
};
};
}
public function initialise(){
thisParent = this;
menuMgr = new MenuManager();
soundMgr = new SoundManager();
charMgrA = new CharacterManager();
charMgrB = new CharacterManager();
BG_CONT = new Sprite();
thisParent.addChild(BG_CONT);
PLAYER_CONT = new Sprite();
thisParent.addChild(PLAYER_CONT);
ITEM_CONT = new Sprite();
thisParent.addChild(ITEM_CONT);
MENU_CONT = new Sprite();
thisParent.addChild(MENU_CONT);
menuMgr.create(this, MENU_CONT, soundMgr, charMgrA, charMgrB);
menuMgr.showMainMenu();
}
private function gameHandle(_arg1:Event):void{
AIHandleObama(charMgrA);
AIHandleObama(charMgrB);
AIHandleHillary(charMgrA);
AIHandleHillary(charMgrB);
AIHandleCain(charMgrA);
AIHandleCain(charMgrB);
}
private function keyPressed(_arg1:KeyboardEvent):void{
}
public function itemDropStop(){
if (itemMgr){
itemMgr.remove();
};
itemMgr = null;
}
private function AIHandleObama(_arg1){
var _local2:*;
var _local3:int;
var _local4:int;
var _local5:int;
if ((((_arg1.getCharID() == _arg1.mr_obama)) && ((_arg1.getControl() == _arg1.as_COM)))){
_local3 = 0;
_local4 = ITEM_CONT.numChildren;
_local5 = -1;
while (++_local5 < _local4) {
_local2 = ITEM_CONT.getChildAt(_local5);
if (_local2.isOnGround()){
} else {
if (Math.abs((_arg1.getObj().x - _local2.x)) < 200){
if ((Math.abs((_arg1.getObj().y - _local2.y)) < 350)){
_local3 = 1;
};
if ((Math.abs((_arg1.getObj().y - _local2.y)) < 270)){
_local3 = 2;
};
if ((Math.abs((_arg1.getObj().y - _local2.y)) < 200)){
_local3 = 3;
};
break;
};
};
};
if (_local3 == 1){
if (Math.random() < 0.5){
_arg1.playAction4();
} else {
_arg1.playAction3();
};
} else {
if (_local3 == 2){
if (Math.random() < 0.4){
_arg1.playAction3();
} else {
_arg1.playAction2();
};
} else {
if (_local3 == 3){
if (_arg1.isMaxSpecial()){
_arg1.playSpecial();
} else {
if (Math.random() < 0.2){
_arg1.playAction2();
} else {
_arg1.playAction1();
};
};
};
};
};
if (_local3 == 0){
if ((_arg1.getPopularity() / _arg1.getMaxPopularity()) < 0.9){
if (_arg1.getObj().currentFrame == 1){
if (Math.random() < 0.3){
_arg1.playPose();
};
};
};
};
};
}
public function itemDropEnd(){
var _local1:int;
var _local2:Array;
var _local3:int;
if (itemMgr){
itemMgr.remove();
};
itemMgr = null;
_local1 = ITEM_CONT.numChildren;
_local2 = new Array(_local1);
_local3 = 0;
_local3 = 0;
while (_local3 < _local1) {
_local2[_local3] = ITEM_CONT.getChildAt(_local3);
_local3++;
};
_local3 = 0;
while (_local3 < _local1) {
if (_local2[_local3]){
_local2[_local3].destroy();
};
_local3++;
};
}
public function itemDropStart(){
if (itemMgr == null){
itemMgr = new ItemManager(ITEM_CONT, soundMgr, charMgrA, charMgrB);
itemMgr.initialise();
};
}
private function keyPressedA(_arg1:KeyboardEvent):void{
if (charMgrA.getControl() == charMgrA.as_P1){
if (_arg1.keyCode == 65){
charMgrA.playPose();
} else {
if (_arg1.keyCode == 81){
charMgrA.playAction1();
} else {
if (_arg1.keyCode == 87){
charMgrA.playAction2();
} else {
if (_arg1.keyCode == 69){
charMgrA.playAction3();
} else {
if (_arg1.keyCode == 82){
charMgrA.playAction4();
} else {
if (_arg1.keyCode == 83){
charMgrA.playSpecial();
};
};
};
};
};
};
};
}
public function destroyBg(){
if (objBG){
BG_CONT.removeChild(objBG);
};
objBG = null;
}
private function keyPressedB(_arg1:KeyboardEvent):void{
if (charMgrB.getControl() == charMgrB.as_P2){
if (_arg1.keyCode == Keyboard.NUMPAD_0){
charMgrB.playPose();
} else {
if (_arg1.keyCode == Keyboard.NUMPAD_1){
charMgrB.playAction1();
} else {
if (_arg1.keyCode == Keyboard.NUMPAD_2){
charMgrB.playAction2();
} else {
if (_arg1.keyCode == Keyboard.NUMPAD_3){
charMgrB.playAction3();
} else {
if (_arg1.keyCode == Keyboard.NUMPAD_4){
charMgrB.playAction4();
} else {
if (_arg1.keyCode == Keyboard.NUMPAD_5){
charMgrB.playSpecial();
};
};
};
};
};
};
};
}
private function AIHandleHillary(_arg1){
var _local2:*;
var _local3:int;
var _local4:int;
var _local5:int;
if ((((_arg1.getCharID() == _arg1.ms_hillary)) && ((_arg1.getControl() == _arg1.as_COM)))){
_local3 = 0;
_local4 = ITEM_CONT.numChildren;
_local5 = -1;
while (++_local5 < _local4) {
_local2 = ITEM_CONT.getChildAt(_local5);
if (_local2.isOnGround()){
} else {
if (Math.abs((_arg1.getObj().x - _local2.x)) < 220){
if ((Math.abs((_arg1.getObj().y - _local2.y)) < 380)){
_local3 = 1;
};
if ((Math.abs((_arg1.getObj().y - _local2.y)) < 270)){
_local3 = 2;
};
if ((Math.abs((_arg1.getObj().y - _local2.y)) < 200)){
_local3 = 3;
};
break;
};
};
};
if (_local3 == 1){
if (Math.random() < 0.5){
_arg1.playAction4();
} else {
_arg1.playAction3();
};
} else {
if (_local3 == 2){
if (Math.random() < 0.4){
_arg1.playAction3();
} else {
if (Math.abs((_arg1.getObj().x - _local2.x)) < 100){
_arg1.playAction2();
} else {
_arg1.playAction1();
};
};
} else {
if (_local3 == 3){
if (_arg1.isMaxSpecial()){
_arg1.playSpecial();
} else {
if (Math.random() < 0.2){
_arg1.playAction2();
} else {
_arg1.playAction1();
};
};
};
};
};
if (_local3 == 0){
if ((_arg1.getPopularity() / _arg1.getMaxPopularity()) < 0.9){
if (_arg1.getObj().currentFrame == 1){
if (Math.random() < 0.3){
_arg1.playPose();
};
};
};
};
};
}
}
}//package
Section 19
//hillary (hillary)
package {
import flash.display.*;
public dynamic class hillary extends MovieClip {
public function hillary(){
addFrameScript(11, frame12, 44, frame45, 92, frame93, 122, frame123, 134, frame135, 145, frame146, 182, frame183, 204, frame205, 238, frame239, 276, frame277, 329, frame330, 372, frame373, 555, frame556);
}
function frame277(){
gotoAndPlay("stand");
}
function frame556(){
gotoAndPlay("stand");
}
function frame205(){
gotoAndPlay("stand");
}
function frame330(){
stop();
}
function frame12(){
gotoAndPlay("stand");
}
function frame93(){
gotoAndPlay("stand");
}
function frame183(){
gotoAndPlay("stand");
}
function frame239(){
gotoAndPlay("stand");
}
function frame123(){
gotoAndPlay("stand");
}
function frame45(){
gotoAndPlay("stand");
}
function frame373(){
stop();
}
function frame135(){
gotoAndPlay("stand");
}
function frame146(){
gotoAndPlay("stand");
}
}
}//package
Section 20
//HitClass (HitClass)
package {
import flash.display.*;
public class HitClass extends Sprite {
private function hitTestFunc(_arg1, _arg2, _arg3:int, _arg4:int, _arg5:int, _arg6:int){
_arg1.setScore((_arg1.getScore() + _arg2.getPrice()));
_arg2.setLife((_arg2.getLife() - 1));
if (_arg2.getLife() <= 0){
_arg1.setScore((_arg1.getScore() + (_arg2.getPrice() * _arg3)));
_arg2.playDestroy();
} else {
if (_arg1.isLeft()){
_arg2.launch(_arg4, _arg5, _arg6, true);
} else {
_arg2.launch(_arg4, _arg5, _arg6, false);
};
_arg2.playHit();
};
}
public function run(_arg1, _arg2):Boolean{
if (!_arg2.getObj().hitTestObject(_arg1.getObj())){
return (false);
};
if (_arg2.getObj().currentLabel != "pose"){
return (false);
};
if (_arg1.getCharID() == _arg1.mr_obama){
if (_arg1.getObj().currentLabel == "act1Hit"){
hitTestFunc(_arg1, _arg2, 5, 22, 8, 10);
return (true);
};
if (_arg1.getObj().currentLabel == "act2Hit"){
hitTestFunc(_arg1, _arg2, 8, 30, 12, 20);
return (true);
};
if (_arg1.getObj().currentLabel == "act3Hit"){
hitTestFunc(_arg1, _arg2, 10, 20, 15, 30);
return (true);
};
if (_arg1.getObj().currentLabel == "act4Hit"){
hitTestFunc(_arg1, _arg2, 12, 15, 18, 50);
return (true);
};
if (_arg1.getObj().currentLabel == "spHit"){
hitTestFunc(_arg1, _arg2, 15, (10 + (Math.random() * 30)), (5 + (((_arg1.getObj().y - _arg2.y) * 0.15) * Math.random())), (20 + (Math.random() * 40)));
return (true);
};
} else {
if (_arg1.getCharID() == _arg1.ms_hillary){
if (_arg1.getObj().currentLabel == "act1Hit"){
hitTestFunc(_arg1, _arg2, 5, 25, 8, 15);
return (true);
};
if (_arg1.getObj().currentLabel == "act2Hit"){
hitTestFunc(_arg1, _arg2, 8, 27, 15, 20);
return (true);
};
if (_arg1.getObj().currentLabel == "act3Hit"){
hitTestFunc(_arg1, _arg2, 10, 18, 15, 10);
return (true);
};
if (_arg1.getObj().currentLabel == "act4Hit"){
hitTestFunc(_arg1, _arg2, 12, 20, 20, 50);
return (true);
};
if (_arg1.getObj().currentLabel == "spHit"){
hitTestFunc(_arg1, _arg2, 15, (10 + (Math.random() * 30)), (5 + (((_arg1.getObj().y - _arg2.y) * 0.15) * Math.random())), (20 + (Math.random() * 40)));
return (true);
};
} else {
if (_arg1.getCharID() == _arg1.mc_cain){
if (_arg1.getObj().currentLabel == "act1Hit"){
hitTestFunc(_arg1, _arg2, 5, 20, 12, 20);
return (true);
};
if (_arg1.getObj().currentLabel == "act2Hit"){
hitTestFunc(_arg1, _arg2, 8, 28, 10, 15);
return (true);
};
if (_arg1.getObj().currentLabel == "act3Hit"){
hitTestFunc(_arg1, _arg2, 10, 20, 20, 30);
return (true);
};
if (_arg1.getObj().currentLabel == "act4Hit"){
hitTestFunc(_arg1, _arg2, 12, 20, 25, 50);
return (true);
};
if (_arg1.getObj().currentLabel == "spHit"){
hitTestFunc(_arg1, _arg2, 15, (10 + (Math.random() * 30)), (5 + (((_arg1.getObj().y - _arg2.y) * 0.15) * Math.random())), (20 + (Math.random() * 40)));
return (true);
};
};
};
};
return (false);
}
}
}//package
Section 21
//Interface (Interface)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Interface extends MovieClip {
public var bIQuit:SimpleButton;
public var bLogo:MovieClip;
public var leftPanel:MovieClip;
public var rightPanel:MovieClip;
public var timex:TextField;
public var bIRetry:SimpleButton;
public var leftScore:TextField;
public var rightScore:TextField;
public var bIPlayMore:SimpleButton;
public function Interface(){
addFrameScript(55, frame56, 85, frame86, 115, frame116, 160, frame161, 206, frame207, 252, frame253, 272, frame273, 273, frame274);
}
function frame273(){
stop();
}
function frame274(){
stop();
}
function frame86(){
stop();
}
function frame161(){
stop();
}
function frame207(){
stop();
}
function frame116(){
stop();
}
function frame253(){
stop();
}
function frame56(){
stop();
}
}
}//package
Section 22
//item_ban (item_ban)
package {
import src.*;
public dynamic class item_ban extends ItemClass {
public function item_ban(){
addFrameScript(0, frame1, 5, frame6, 24, frame25, 35, frame36, 36, frame37);
}
function frame6(){
gotoAndPlay("pose");
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop("destroy");
}
function frame37(){
stop();
}
function frame36(){
gotoAndStop("destroy");
}
}
}//package
Section 23
//item_bom (item_bom)
package {
import src.*;
public dynamic class item_bom extends ItemClass {
public function item_bom(){
addFrameScript(0, frame1, 5, frame6, 24, frame25, 34, frame35);
}
function frame6(){
gotoAndPlay("pose");
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop("destroy");
}
function frame35(){
gotoAndStop("destroy");
}
}
}//package
Section 24
//item_hotdog (item_hotdog)
package {
import src.*;
public dynamic class item_hotdog extends ItemClass {
public function item_hotdog(){
addFrameScript(0, frame1, 5, frame6, 24, frame25, 35, frame36);
}
function frame6(){
gotoAndPlay("pose");
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop("destroy");
}
function frame36(){
gotoAndStop("destroy");
}
}
}//package
Section 25
//item_labu (item_labu)
package {
import src.*;
public dynamic class item_labu extends ItemClass {
public function item_labu(){
addFrameScript(0, frame1, 5, frame6, 24, frame25, 35, frame36);
}
function frame6(){
gotoAndPlay("pose");
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop("destroy");
}
function frame36(){
gotoAndStop("destroy");
}
}
}//package
Section 26
//item_lemari (item_lemari)
package {
import src.*;
public dynamic class item_lemari extends ItemClass {
public function item_lemari(){
addFrameScript(0, frame1, 5, frame6, 24, frame25, 35, frame36);
}
function frame6(){
gotoAndPlay("pose");
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop("destroy");
}
function frame36(){
gotoAndStop("destroy");
}
}
}//package
Section 27
//item_ranting (item_ranting)
package {
import src.*;
public dynamic class item_ranting extends ItemClass {
public function item_ranting(){
addFrameScript(0, frame1, 5, frame6, 24, frame25, 35, frame36);
}
function frame6(){
gotoAndPlay("pose");
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop("destroy");
}
function frame36(){
gotoAndStop("destroy");
}
}
}//package
Section 28
//item_semangka (item_semangka)
package {
import src.*;
public dynamic class item_semangka extends ItemClass {
public function item_semangka(){
addFrameScript(0, frame1, 5, frame6, 24, frame25, 35, frame36);
}
function frame6(){
gotoAndPlay("pose");
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop("destroy");
}
function frame36(){
gotoAndStop("destroy");
}
}
}//package
Section 29
//item_tv (item_tv)
package {
import src.*;
public dynamic class item_tv extends ItemClass {
public function item_tv(){
addFrameScript(0, frame1, 5, frame6, 24, frame25, 35, frame36);
}
function frame6(){
gotoAndPlay("pose");
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop("destroy");
}
function frame36(){
gotoAndStop("destroy");
}
}
}//package
Section 30
//item_vas (item_vas)
package {
import src.*;
public dynamic class item_vas extends ItemClass {
public function item_vas(){
addFrameScript(0, frame1, 5, frame6, 24, frame25, 35, frame36);
}
function frame6(){
gotoAndPlay("pose");
}
function frame1(){
stop();
}
function frame25(){
gotoAndStop("destroy");
}
function frame36(){
gotoAndStop("destroy");
}
}
}//package
Section 31
//ItemManager (ItemManager)
package {
import flash.events.*;
import flash.utils.*;
import fzero.base.*;
public class ItemManager {
private var charMgrB;
private var ITEM_CONT;
private var thisParent;
private var soundMgr;
private var spawnTimer:Timer;// = null
public var isPaused:Boolean;// = false
private var charMgrA;
public function ItemManager(_arg1, _arg2, _arg3, _arg4){
isPaused = false;
spawnTimer = null;
super();
ITEM_CONT = _arg1;
soundMgr = _arg2;
charMgrA = _arg3;
charMgrB = _arg4;
}
public function remove(){
if (spawnTimer){
spawnTimer.stop();
spawnTimer.removeEventListener(TimerEvent.TIMER, runSpawn);
spawnTimer = null;
};
}
public function initialise(){
spawnItem(3000);
}
private function gameHandle(_arg1:Event):void{
}
public function spawnItem(_arg1:int){
if (spawnTimer){
spawnTimer.stop();
spawnTimer.removeEventListener(TimerEvent.TIMER, runSpawn);
spawnTimer = null;
};
spawnTimer = new Timer(_arg1, 0);
spawnTimer.start();
spawnTimer.addEventListener(TimerEvent.TIMER, runSpawn, false, 0, true);
}
public function TestRingClipMC(_arg1, _arg2){
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:*;
_local3 = 3000;
_local4 = 0;
_local5 = 0;
_local6 = 0;
_local6 = 0;
while (_local6 <= _local3) {
_local7 = new (_arg2);
_arg1.addChild(_local7);
_local7.x = _local4;
_local7.y = _local5;
_local7.play();
if (_local4 > 640){
_local4 = 0;
_local5 = (_local5 + 32);
} else {
_local4 = (_local4 + 32);
};
_local6++;
};
}
public function TestRingClipAB(_arg1, _arg2){
new Entity(_arg1, _arg2);
}
private function runSpawn(_arg1:TimerEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = null;
_local3 = Math.random();
_local4 = Math.random();
if (_local3 < 0.4){
if (_local4 < 0.4){
_local2 = new item_hotdog();
_local2.initialise(ITEM_CONT, 3, soundMgr, charMgrA, charMgrB, true);
} else {
if ((((_local4 >= 0.4)) && ((_local4 < 0.7)))){
_local2 = new item_ranting();
_local2.initialise(ITEM_CONT, 6, soundMgr, charMgrA, charMgrB, true);
} else {
_local2 = new item_semangka();
_local2.initialise(ITEM_CONT, 7, soundMgr, charMgrA, charMgrB, true);
};
};
} else {
if ((((_local3 >= 0.4)) && ((_local3 < 0.7)))){
if (_local4 < 0.4){
_local2 = new item_labu();
_local2.initialise(ITEM_CONT, 4, soundMgr, charMgrA, charMgrB, true);
} else {
if ((((_local4 >= 0.4)) && ((_local4 < 0.7)))){
_local2 = new item_vas();
_local2.initialise(ITEM_CONT, 9, soundMgr, charMgrA, charMgrB, true);
} else {
_local2 = new item_ban();
_local2.initialise(ITEM_CONT, 1, soundMgr, charMgrA, charMgrB, true);
};
};
} else {
if (_local4 < 0.4){
_local2 = new item_bom();
_local2.initialise(ITEM_CONT, 2, soundMgr, charMgrA, charMgrB, true);
} else {
if ((((_local4 >= 0.4)) && ((_local4 < 0.7)))){
_local2 = new item_tv();
_local2.initialise(ITEM_CONT, 8, soundMgr, charMgrA, charMgrB, true);
} else {
_local2 = new item_lemari();
_local2.initialise(ITEM_CONT, 5, soundMgr, charMgrA, charMgrB, true);
};
};
};
};
}
}
}//package
Section 32
//mainBgm (mainBgm)
package {
public dynamic class mainBgm extends BaseSound {
}
}//package
Section 33
//mainMenu (mainMenu)
package {
import flash.display.*;
public dynamic class mainMenu extends MovieClip {
public var bPlayMore:SimpleButton;
public var bIOk:SimpleButton;
public var bAddGame:SimpleButton;
public var bCredit:SimpleButton;
public var bCBack:SimpleButton;
public var bInstruction:SimpleButton;
public var bVersus:SimpleButton;
public var bPlayStory:SimpleButton;
public function mainMenu(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 34
//MenuManager (MenuManager)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class MenuManager extends Sprite {
private var _winChar:int;// = 0
private var _gameMode:int;// = 0
private var _charA_ctrl:int;// = 0
private var _mnState:int;// = 0
private var _playLv:int;// = 1
private var playMoreLink:String;// = "http://www.arcadehog.com"
private var gmMgr;// = null
private var _winState:int;// = 0
private var countTimer:Timer;// = null
private var soundMgr;// = null
private var charMgrA;// = null
private var charMgrB;// = null
private var _charA:int;// = 0
private var _charB:int;// = 0
private var _scoreSave:int;// = 0
private var _charB_ctrl:int;// = 0
private var objCont;// = null
private var addGameLink:String;// = "http://www.arcadehog.com/freewebsitegames.php"
private var objMenu;// = null
public function MenuManager(){
objCont = null;
objMenu = null;
soundMgr = null;
charMgrA = null;
charMgrB = null;
gmMgr = null;
playMoreLink = "http://www.arcadehog.com";
addGameLink = "http://www.arcadehog.com/freewebsitegames.php";
countTimer = null;
_playLv = 1;
_mnState = 0;
_charA = 0;
_charB = 0;
_charA_ctrl = 0;
_charB_ctrl = 0;
_winChar = 0;
_winState = 0;
_gameMode = 0;
_scoreSave = 0;
super();
}
private function endHandle(_arg1:Event):void{
if (objMenu.currentLabel == "interface"){
if (_winState == 1){
objMenu.gotoAndPlay("timeup");
} else {
objMenu.gotoAndPlay("ko");
};
};
if ((((objMenu.currentLabel == "koEnd")) || ((objMenu.currentLabel == "timeupEnd")))){
gmMgr.itemDropFade();
if (charMgrA.getPopularity() > charMgrB.getPopularity()){
_winChar = charMgrA.getCharID();
} else {
_winChar = charMgrB.getCharID();
};
if (_winChar == 1){
objMenu.gotoAndPlay("obamaWin");
} else {
if (_winChar == 2){
objMenu.gotoAndPlay("hillaryWin");
} else {
if (_winChar == 3){
objMenu.gotoAndPlay("cainWin");
};
};
};
if (charMgrA.getPopularity() <= charMgrB.getPopularity()){
charMgrA.playLose();
charMgrB.playWin();
} else {
charMgrB.playLose();
charMgrA.playWin();
};
};
if ((((((objMenu.currentLabel == "obamaWinEnd")) || ((objMenu.currentLabel == "hillaryWinEnd")))) || ((objMenu.currentLabel == "cainWinEnd")))){
if ((((_gameMode == 1)) && ((charMgrA.getPopularity() <= charMgrB.getPopularity())))){
objMenu.gotoAndStop("replay");
objMenu.removeEventListener(Event.ENTER_FRAME, endHandle);
objMenu.addEventListener(Event.ENTER_FRAME, replayInit, false, 0, true);
} else {
objMenu.gotoAndPlay("end");
};
};
if (objMenu.currentLabel == "theEnd"){
objMenu.removeEventListener(Event.ENTER_FRAME, endHandle);
if (_gameMode == 1){
_scoreSave = charMgrA.getScore();
gmMgr.destroyAll();
if (_playLv == 1){
_playLv = 2;
_charB++;
if (_charB > 3){
_charB = 1;
};
if (_charB == _charA){
_charB++;
};
if (_charB > 3){
_charB = 1;
};
showMenuInterface();
} else {
_scoreSave = 0;
showEnding(charMgrA.getCharID());
};
} else {
if (_gameMode == 2){
gmMgr.destroyAll();
_scoreSave = 0;
_gameMode = 2;
showSelect(true);
};
};
};
}
private function iRetryClick(_arg1:MouseEvent):void{
objMenu.bIRetry.removeEventListener(MouseEvent.CLICK, iRetryClick);
objMenu.bIQuit.removeEventListener(MouseEvent.CLICK, iQuitClick);
objMenu.bIPlayMore.removeEventListener(MouseEvent.CLICK, iPlayMoreClick);
_gameMode = 1;
gmMgr.destroyAll();
showMenuInterface();
}
public function create(_arg1, _arg2, _arg3, _arg4, _arg5){
gmMgr = _arg1;
soundMgr = _arg3;
charMgrA = _arg4;
charMgrB = _arg5;
objCont = _arg2;
}
private function iQuitClick(_arg1:MouseEvent):void{
objMenu.bIRetry.removeEventListener(MouseEvent.CLICK, iRetryClick);
objMenu.bIQuit.removeEventListener(MouseEvent.CLICK, iQuitClick);
objMenu.bIPlayMore.removeEventListener(MouseEvent.CLICK, iPlayMoreClick);
gmMgr.destroyAll();
showMainMenu();
}
private function addGameClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest(addGameLink);
navigateToURL(_local2, "_blank");
}
private function selectInit(_arg1:Event):void{
if (objMenu.currentFrame == 1){
if (((((((objMenu.bStoryPrevChar) && (objMenu.bStoryNextChar))) && (objMenu.bSLBegin))) && (objMenu.bSLBack))){
objMenu.bStoryPrevChar.addEventListener(MouseEvent.CLICK, storyPrevCharClick, false, 0, true);
objMenu.bStoryNextChar.addEventListener(MouseEvent.CLICK, storyNextCharClick, false, 0, true);
objMenu.bSLBegin.addEventListener(MouseEvent.CLICK, storyBeginClick, false, 0, true);
objMenu.bSLBack.addEventListener(MouseEvent.CLICK, backClick, false, 0, true);
objMenu.removeEventListener(Event.ENTER_FRAME, selectInit);
_charA = 1;
_charB = 2;
objMenu.storyPic.gotoAndStop(_charA);
_charA_ctrl = 1;
_charB_ctrl = 0;
trace("init story ");
};
} else {
if (objMenu.currentFrame == 2){
if (((((((((((objMenu.bVsP1Prev) && (objMenu.bVsP1Next))) && (objMenu.bVsP2Prev))) && (objMenu.bVsP2Next))) && (objMenu.bSLBegin))) && (objMenu.bSLBack))){
objMenu.bVsP1Prev.addEventListener(MouseEvent.CLICK, versusPrevCharP1Click, false, 0, true);
objMenu.bVsP1Next.addEventListener(MouseEvent.CLICK, versusNextCharP1Click, false, 0, true);
objMenu.bVsP2Prev.addEventListener(MouseEvent.CLICK, versusPrevCharP2Click, false, 0, true);
objMenu.bVsP2Next.addEventListener(MouseEvent.CLICK, versusNextCharP2Click, false, 0, true);
objMenu.bSLBegin.addEventListener(MouseEvent.CLICK, versusBeginClick, false, 0, true);
objMenu.bSLBack.addEventListener(MouseEvent.CLICK, backClick, false, 0, true);
objMenu.removeEventListener(Event.ENTER_FRAME, selectInit);
_charA = 1;
_charB = 2;
objMenu.vsPicP1.gotoAndStop(_charA);
objMenu.vsPicP2.gotoAndStop(_charB);
_charA_ctrl = 1;
_charB_ctrl = 2;
trace("init versus ");
};
};
};
}
private function storyBeginClick(_arg1:MouseEvent):void{
removeSelect();
showMenuInterface();
if (_charA == _charB){
_charB++;
};
if (_charB > 3){
_charB = 1;
};
_gameMode = 1;
_playLv = 1;
_scoreSave = 0;
}
private function versusPrevCharP1Click(_arg1:MouseEvent):void{
_charA--;
if (_charA < 1){
_charA = 3;
};
if (_charA == _charB){
_charA--;
};
if (_charA < 1){
_charA = 3;
};
objMenu.vsPicP1.gotoAndStop(_charA);
}
private function creditClick(_arg1:MouseEvent):void{
objMenu.gotoAndStop(3);
trace((("credit click " + "frame no = ") + String(objMenu.currentFrame)));
}
private function storyNextCharClick(_arg1:MouseEvent):void{
_charA++;
if (_charA > 3){
_charA = 1;
};
objMenu.storyPic.gotoAndStop(_charA);
}
private function removeMainMenu(){
if (objMenu.bPlayStory){
objMenu.bPlayStory.removeEventListener(MouseEvent.CLICK, playStoryClick);
};
if (objMenu.bVersus){
objMenu.bVersus.removeEventListener(MouseEvent.CLICK, versusClick);
};
if (objMenu.bInstruction){
objMenu.bInstruction.removeEventListener(MouseEvent.CLICK, instructionClick);
};
if (objMenu.bCredit){
objMenu.bCredit.removeEventListener(MouseEvent.CLICK, creditClick);
};
if (objMenu.bAddGame){
objMenu.bAddGame.removeEventListener(MouseEvent.CLICK, addGameClick);
};
if (objMenu.bPlayMore){
objMenu.bPlayMore.removeEventListener(MouseEvent.CLICK, playMoreClick);
};
if (objMenu.bIOk){
objMenu.bIOk.removeEventListener(MouseEvent.CLICK, IOKClick);
};
if (objMenu.bCBack){
objMenu.bIOk.removeEventListener(MouseEvent.CLICK, CBackClick);
};
}
private function playMoreClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest(playMoreLink);
navigateToURL(_local2, "_blank");
}
private function versusNextCharP1Click(_arg1:MouseEvent):void{
_charA++;
if (_charA > 3){
_charA = 1;
};
if (_charA == _charB){
_charA++;
};
if (_charA > 3){
_charA = 1;
};
objMenu.vsPicP1.gotoAndStop(_charA);
}
public function showSelect(_arg1:Boolean=false){
if (((objCont) && (objMenu))){
objCont.removeChild(objMenu);
};
objMenu = new select();
objCont.addChild(objMenu);
if (_arg1){
objMenu.gotoAndStop(2);
} else {
objMenu.gotoAndStop(1);
};
_charA = 1;
_charB = 2;
_charA_ctrl = 1;
_charB_ctrl = 0;
objMenu.addEventListener(Event.ENTER_FRAME, selectInit, false, 0, true);
}
private function versusNextCharP2Click(_arg1:MouseEvent):void{
_charB++;
if (_charB > 3){
_charB = 1;
};
if (_charB == _charA){
_charB++;
};
if (_charB > 3){
_charB = 1;
};
objMenu.vsPicP2.gotoAndStop(_charB);
}
public function showEnding(_arg1:int=1){
if (((objCont) && (objMenu))){
objCont.removeChild(objMenu);
};
objMenu = new ending();
objCont.addChild(objMenu);
if (_arg1 == 1){
objMenu.gotoAndStop("obamaEnding");
} else {
if (_arg1 == 2){
objMenu.gotoAndStop("hillaryEnding");
} else {
objMenu.gotoAndStop("cainEnding");
};
};
soundMgr.playBgm(4);
objMenu.bEndPlayMore.addEventListener(MouseEvent.CLICK, endPlayMore, false, 0, true);
objMenu.bEndMainMenu.addEventListener(MouseEvent.CLICK, endMainMenu, false, 0, true);
}
private function versusClick(_arg1:MouseEvent):void{
_gameMode = 2;
removeMainMenu();
showSelect(true);
}
private function countDown(_arg1:TimerEvent):void{
objMenu.timex.htmlText = String(("<b>" + gmMgr.gm_time));
gmMgr.gm_time = Math.max((gmMgr.gm_time - 1), 0);
charMgrA.setSpecial((charMgrA.getSpecial() + 1));
charMgrB.setSpecial((charMgrB.getSpecial() + 1));
if ((((((charMgrA.getObj().currentLabel == "taunt1")) || ((charMgrA.getObj().currentLabel == "taunt2")))) || ((charMgrA.getObj().currentLabel == "taunt3")))){
charMgrA.setPopularity((charMgrA.getPopularity() + 2));
};
if ((((((charMgrB.getObj().currentLabel == "taunt1")) || ((charMgrB.getObj().currentLabel == "taunt2")))) || ((charMgrB.getObj().currentLabel == "taunt3")))){
charMgrB.setPopularity((charMgrB.getPopularity() + 2));
};
}
private function replayInit(_arg1:Event):void{
if (((((objMenu.bIRetry) && (objMenu.bIQuit))) && (objMenu.bIPlayMore))){
objMenu.bIRetry.addEventListener(MouseEvent.CLICK, iRetryClick, false, 0, true);
objMenu.bIQuit.addEventListener(MouseEvent.CLICK, iQuitClick, false, 0, true);
objMenu.bIPlayMore.addEventListener(MouseEvent.CLICK, iPlayMoreClick, false, 0, true);
objMenu.removeEventListener(Event.ENTER_FRAME, replayInit);
};
}
private function iPlayMoreClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest(playMoreLink);
navigateToURL(_local2, "_blank");
}
public function showMenuInterface(){
if (((objCont) && (objMenu))){
objCont.removeChild(objMenu);
};
objMenu = new Interface();
objCont.addChild(objMenu);
objMenu.gotoAndPlay("start");
objMenu.addEventListener(Event.ENTER_FRAME, interfaceInit, false, 0, true);
gmMgr.createBg();
}
private function instructionClick(_arg1:MouseEvent):void{
objMenu.gotoAndStop(2);
trace((("instruction click " + "frame no = ") + String(objMenu.currentFrame)));
}
private function removeSelect(){
if (objMenu.bStoryPrevChar){
objMenu.bStoryPrevChar.removeEventListener(MouseEvent.CLICK, storyPrevCharClick);
};
if (objMenu.bStoryNextChar){
objMenu.bStoryNextChar.removeEventListener(MouseEvent.CLICK, storyNextCharClick);
};
if (objMenu.bStoryBegin){
objMenu.bStoryBegin.removeEventListener(MouseEvent.CLICK, storyBeginClick);
};
if (objMenu.bStoryBack){
objMenu.bStoryBack.removeEventListener(MouseEvent.CLICK, backClick);
};
if (objMenu.bVersusPrevCharP1){
objMenu.bVersusPrevCharP1.removeEventListener(MouseEvent.CLICK, versusPrevCharP1Click);
};
if (objMenu.bVersusNextCharP1){
objMenu.bVersusNextCharP1.removeEventListener(MouseEvent.CLICK, versusNextCharP1Click);
};
if (objMenu.bVersusPrevCharP2){
objMenu.bVersusPrevCharP2.removeEventListener(MouseEvent.CLICK, versusPrevCharP2Click);
};
if (objMenu.bVersusNextCharP2){
objMenu.bVersusNextCharP2.removeEventListener(MouseEvent.CLICK, versusNextCharP2Click);
};
if (objMenu.bVersusBegin){
objMenu.bVersusBegin.removeEventListener(MouseEvent.CLICK, versusBeginClick);
};
if (objMenu.bVersusBack){
objMenu.bVersusBack.removeEventListener(MouseEvent.CLICK, backClick);
};
}
private function logoClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest(playMoreLink);
navigateToURL(_local2, "_blank");
}
private function endMainMenu(_arg1:MouseEvent):void{
objMenu.bEndPlayMore.removeEventListener(MouseEvent.CLICK, endPlayMore);
objMenu.bEndMainMenu.removeEventListener(MouseEvent.CLICK, endMainMenu);
showMainMenu();
}
private function IOKClick(_arg1:MouseEvent):void{
objMenu.gotoAndStop(1);
trace((("ins ok click " + "frame no = ") + String(objMenu.currentFrame)));
}
private function interfaceHandle(_arg1:Event):void{
if (objMenu.bLogo){
objMenu.bLogo.addEventListener(MouseEvent.CLICK, logoClick, false, 0, true);
};
objMenu.leftScore.htmlText = String((("<b>" + "Score ") + (charMgrA.getScore() + _scoreSave)));
objMenu.rightScore.htmlText = String((("<b>" + "Score ") + charMgrB.getScore()));
objMenu.leftPanel.lifeBar.scaleX = (charMgrA.getPopularity() / charMgrA.getMaxPopularity());
objMenu.rightPanel.lifeBar.scaleX = (charMgrB.getPopularity() / charMgrB.getMaxPopularity());
objMenu.leftPanel.spBar.scaleX = (charMgrA.getSpecial() / charMgrA.getMaxSpecial());
objMenu.rightPanel.spBar.scaleX = (charMgrB.getSpecial() / charMgrB.getMaxSpecial());
if (gmMgr.gm_time <= 0){
_winState = 1;
} else {
if ((((charMgrA.getPopularity() <= 0)) || ((charMgrB.getPopularity() <= 0)))){
_winState = 2;
} else {
_winState = 0;
};
};
if ((((_winState == 1)) || ((_winState == 2)))){
trace(("winState = " + String(_winState)));
gmMgr.itemDropStop();
if (countTimer){
countTimer.stop();
countTimer.removeEventListener(TimerEvent.TIMER, countDown);
countTimer = null;
};
objMenu.removeEventListener(Event.ENTER_FRAME, interfaceHandle);
objMenu.addEventListener(Event.ENTER_FRAME, endHandle, false, 0, true);
};
}
private function versusPrevCharP2Click(_arg1:MouseEvent):void{
_charB--;
if (_charB < 1){
_charB = 3;
};
if (_charB == _charA){
_charB--;
};
if (_charB < 1){
_charB = 3;
};
objMenu.vsPicP2.gotoAndStop(_charB);
}
private function endPlayMore(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest(playMoreLink);
navigateToURL(_local2, "_blank");
}
private function versusBeginClick(_arg1:MouseEvent):void{
removeSelect();
_charA_ctrl = 1;
_charB_ctrl = 2;
_gameMode = 2;
showMenuInterface();
}
public function showMainMenu(){
if (((objCont) && (objMenu))){
objCont.removeChild(objMenu);
};
objMenu = new mainMenu();
objCont.addChild(objMenu);
objMenu.gotoAndStop(1);
mainMenuInit();
_scoreSave = 0;
soundMgr.playBgm(1);
soundMgr.setVolume(0.7);
}
private function CBackClick(_arg1:MouseEvent):void{
objMenu.gotoAndStop(1);
trace((("credit back click " + "frame no = ") + String(objMenu.currentFrame)));
}
private function backClick(_arg1:MouseEvent):void{
removeSelect();
showMainMenu();
}
private function interfaceInit(_arg1:Event):void{
if (objMenu.currentLabel == "interface"){
soundMgr.playBgm(2);
soundMgr.setVolume(0.5);
gmMgr.playBattle(_charA, _charA_ctrl, _charB, _charB_ctrl);
gmMgr.itemDropStart();
if (countTimer){
countTimer.stop();
countTimer.removeEventListener(TimerEvent.TIMER, countDown);
countTimer = null;
};
countTimer = new Timer(1000, 0);
countTimer.start();
countTimer.addEventListener(TimerEvent.TIMER, countDown, false, 0, true);
objMenu.addEventListener(Event.ENTER_FRAME, interfaceHandle, false, 0, true);
objMenu.removeEventListener(Event.ENTER_FRAME, interfaceInit);
};
}
private function playStoryClick(_arg1:MouseEvent):void{
_gameMode = 1;
removeMainMenu();
showSelect();
}
private function mainMenuInit(){
if (((((((((((objMenu.bPlayStory) && (objMenu.bVersus))) && (objMenu.bAddGame))) && (objMenu.bVersus))) && (objMenu.bInstruction))) && (objMenu.bCredit))){
objMenu.bPlayStory.addEventListener(MouseEvent.CLICK, playStoryClick, false, 0, true);
objMenu.bVersus.addEventListener(MouseEvent.CLICK, versusClick, false, 0, true);
objMenu.bAddGame.addEventListener(MouseEvent.CLICK, addGameClick, false, 0, true);
objMenu.bPlayMore.addEventListener(MouseEvent.CLICK, playMoreClick, false, 0, true);
objMenu.bInstruction.addEventListener(MouseEvent.CLICK, instructionClick, false, 0, true);
objMenu.bCredit.addEventListener(MouseEvent.CLICK, creditClick, false, 0, true);
objMenu.bIOk.addEventListener(MouseEvent.CLICK, IOKClick, false, 0, true);
objMenu.bCBack.addEventListener(MouseEvent.CLICK, CBackClick, false, 0, true);
};
}
private function storyPrevCharClick(_arg1:MouseEvent):void{
_charA--;
if (_charA < 1){
_charA = 3;
};
objMenu.storyPic.gotoAndStop(_charA);
}
}
}//package
Section 35
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class MochiAd {
public static function getVersion():String{
return ("2.2");
}
public static function showTimedAd(_arg1:Object):void{
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}};
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_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.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
_local3 = true;
};
};
};
if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
lv = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:Object;
_arg1 = parseInt(_arg1.toString());
_local3 = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
_local4 = [];
_local5 = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
_local6 = _local3[1];
_local7 = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local2:Array;
var _local3:Function;
var _local4:Number;
var _local5:Array;
mc._endpoint = _arg1;
_local2 = mc._queue;
delete mc._queue;
_local3 = mc.doSend;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local5:Number;
var _local6:LocalConnection;
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
_local5 = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.gotoAndStop(2);
} 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."));
};
}};
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_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (!this.parent.parent){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
_local4 = true;
};
};
};
if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_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 fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 36
//obama (obama)
package {
import flash.display.*;
public dynamic class obama extends MovieClip {
public function obama(){
addFrameScript(15, frame16, 48, frame49, 100, frame101, 148, frame149, 160, frame161, 171, frame172, 195, frame196, 220, frame221, 254, frame255, 304, frame305, 312, frame313, 355, frame356, 538, frame539);
}
function frame313(){
gotoAndPlay("lose");
}
function frame305(){
gotoAndPlay("stand");
}
function frame161(){
gotoAndPlay("stand");
}
function frame172(){
gotoAndPlay("stand");
}
function frame16(){
gotoAndPlay("stand");
}
function frame221(){
gotoAndPlay("stand");
}
function frame101(){
gotoAndPlay("stand");
}
function frame196(){
gotoAndPlay("stand");
}
function frame356(){
gotoAndPlay("win");
}
function frame49(){
gotoAndPlay("stand");
}
function frame255(){
gotoAndPlay("stand");
}
function frame539(){
gotoAndPlay("stand");
}
function frame149(){
gotoAndPlay("stand");
}
}
}//package
Section 37
//select (select)
package {
import flash.display.*;
public dynamic class select extends MovieClip {
public var bVsP1Next:SimpleButton;
public var bStoryPrevChar:SimpleButton;
public var vsPicP1:MovieClip;
public var bVsP1Prev:SimpleButton;
public var bSLBegin:SimpleButton;
public var vsPicP2:MovieClip;
public var bVsP2Next:SimpleButton;
public var storyPic:MovieClip;
public var bVsP2Prev:SimpleButton;
public var bSLBack:SimpleButton;
public var bStoryNextChar:SimpleButton;
public function select(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 38
//SoundManager (SoundManager)
package {
public class SoundManager {
private var bgmFade:Boolean;// = false
public var select_bgm;// = null
public var stage_bgm;// = null
public var ending_bgm;// = null
public var mmenu_bgm;// = null
private var sndBgm;// = null
public function SoundManager(){
mmenu_bgm = null;
stage_bgm = null;
select_bgm = null;
ending_bgm = null;
sndBgm = null;
bgmFade = false;
super();
mmenu_bgm = new mainBgm();
stage_bgm = new stageBgm();
select_bgm = new stageBgm();
ending_bgm = new clapclap();
trace("init sound Manager ");
}
public function stopBgm(){
if (sndBgm){
sndBgm.stopSound();
};
}
public function fadeBgm(){
if (sndBgm){
sndBgm.fadeOut(false);
};
}
public function playBgm(_arg1:int){
if (sndBgm){
sndBgm.stopSound();
};
if (_arg1 == 1){
sndBgm = mmenu_bgm;
} else {
if (_arg1 == 2){
sndBgm = stage_bgm;
} else {
if (_arg1 == 3){
sndBgm = select_bgm;
} else {
if (_arg1 == 4){
sndBgm = ending_bgm;
};
};
};
};
sndBgm.playSoundLoop();
}
public function setVolume(_arg1:Number){
if (sndBgm){
sndBgm.setVolume(_arg1);
};
}
}
}//package
Section 39
//stageBgm (stageBgm)
package {
public dynamic class stageBgm extends BaseSound {
}
}//package