Section 1 (1.37 KiB) ●
//ElectButton (classes.game.ElectButton)
package classes.game {
import spil.Sound.*;
import flash.display.*;
import spil.Events.*;
import classes.global.*;
import spil.Button.*;
public class ElectButton extends SpilTextButton {
private var sndFX:SpilSound;
public static const EVENT_UPDATE_MASK:String = "EVENT_UPDATE_MASK";
public function ElectButton(_arg1:MovieClip):void{
super(_arg1, ("0" + Global.getInstance().xmlLocalization.game.btnelectdisabled), onEventHandler);
disable();
movieClip.stage.addEventListener(EVENT_UPDATE_MASK, onUpdateMask, false, 0, true);
sndFX = new SpilSound(Global.getInstance().main.getAsset("sndButtonActions"), SpilSound.TYPE_SFX, null, false, 0, 0);
SpilSoundManager.getInstance().addSound(sndFX);
setFxClick(sndFX);
}
private function onEventHandler(_arg1:SpilEvent):void{
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
Global.getInstance().manager.dispatchReward();
break;
};
}
private function onUpdateMask(_arg1:PotatoEvent):void{
var _local2:Number;
_local2 = Number(_arg1.param);
if (_local2 <= 0){
setText(Global.getInstance().xmlLocalization.game.btnelect);
enable();
} else {
setText(((100 - int((_local2 * 100))) + Global.getInstance().xmlLocalization.game.btnelectdisabled));
movieClip.disabled.mcMask.scaleX = _local2;
};
}
}
}//package classes.game
Section 2 (1.54 KiB) ●
//Element (classes.game.Element)
package classes.game {
public class Element {
private var iId:uint;
private var strType:String;
private var strCharName:String;
private var strMcName:String;
private var bSelected:Boolean;
private var strParty:String;
private var strNews:String;
public static const TYPE_MOUTH:String = "mouth";
public static const TYPE_HAIR:String = "hair";
public static const TYPE_ACCESSORY:String = "accessory";
public static const PARTY_REPUBLICAN:String = "republican";
public static const TYPE_EARS:String = "ears";
public static const TYPE_FEET:String = "feet";
public static const TYPE_EYES:String = "eyes";
public static const TYPE_NOSE:String = "nose";
public static const PARTY_DEMOCRAT:String = "democrat";
public function Element(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:uint):void{
strCharName = _arg1;
strType = _arg2;
strMcName = _arg3;
strNews = _arg4;
strParty = _arg5;
bSelected = false;
iId = _arg6;
}
public function getNews():String{
return (strNews);
}
public function getSelected():Boolean{
return (bSelected);
}
public function setSelected(_arg1:Boolean):void{
bSelected = _arg1;
}
public function getParty():String{
return (strParty);
}
public function getID():uint{
return (iId);
}
public function getMcName():String{
return (strMcName);
}
public function getCharName():String{
return (strCharName);
}
public function getType():String{
return (strType);
}
}
}//package classes.game
Section 3 (3.47 KiB) ●
//ElementButton (classes.game.ElementButton)
package classes.game {
import spil.Sound.*;
import flash.display.*;
import spil.Events.*;
import flash.events.*;
import classes.global.*;
import spil.Button.*;
public class ElementButton extends SpilButton {
private var arSFX:Array;
private var element:Element;
public function ElementButton(_arg1:MovieClip):void{
var _local2:SpilSound;
element = null;
super(_arg1, onEventHandler);
arSFX = new Array();
arSFX["pickup"] = new SpilSound(Global.getInstance().main.getAsset("sndPickup"), SpilSound.TYPE_SFX, null, false, 0, 0);
arSFX["dropWrong"] = new SpilSound(Global.getInstance().main.getAsset("sndDropWrong"), SpilSound.TYPE_SFX, null, false, 0, 0);
arSFX["snap"] = new SpilSound(Global.getInstance().main.getAsset("sndSnap"), SpilSound.TYPE_SFX, null, false, 0, 0);
for each (_local2 in arSFX) {
SpilSoundManager.getInstance().addSound(_local2);
};
}
public function update():void{
if ((((((element == null)) || ((movieClip.mcDummy.numChildren == 0)))) || ((element.getSelected() == true)))){
disable();
} else {
enable();
};
}
private function onMouseUp(_arg1:MouseEvent):void{
movieClip.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp, false);
Global.getInstance().mouse.removeDragItem(element.getMcName());
if ((((DisplayObject(_arg1.target).name == "mcPotato")) || (((!((DisplayObject(_arg1.target).parent == null))) && ((DisplayObject(_arg1.target).parent.name == "mcPotato")))))){
DisplayObject(_arg1.target).stage.dispatchEvent(new PotatoEvent(Potato.EVENT_ADD_ELEMENT, element));
arSFX["snap"].play();
} else {
arSFX["dropWrong"].play();
enable();
};
}
private function onEventHandler(_arg1:SpilEvent):void{
var _local2:String;
var _local3:MovieClip;
switch (_arg1.event){
case SpilEvent.EVENT_ENABLE:
case SpilEvent.EVENT_INIT:
movieClip.selected.visible = false;
break;
case SpilEvent.EVENT_MOUSEDOWN:
_local2 = element.getMcName();
if (element.getType() == Element.TYPE_ACCESSORY){
_local2 = (_local2 + "_cursor");
};
_local3 = MovieClip(new (Global.getInstance().main.getAsset(_local2)));
_local3.stop();
_local3.x = (_local3.width * -0.5);
Global.getInstance().mouse.addDragItem(element.getMcName(), _local3, element);
arSFX["pickup"].play();
movieClip.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true);
break;
case SpilEvent.EVENT_DISABLE:
if (element != null){
movieClip.selected.visible = true;
movieClip.disabled.visible = false;
};
break;
};
}
private function attachImage():Boolean{
var _local1:Class;
var _local2:MovieClip;
_local1 = Global.getInstance().main.getAsset((element.getMcName() + "_icon"));
if (_local1 == null){
return (false);
};
_local2 = MovieClip(new (_local1));
_local2.x = (_local2.width * -0.5);
_local2.y = (_local2.height * -0.5);
movieClip.mcDummy.addChild(_local2);
return (true);
}
public function setElement(_arg1:Element):void{
if (element != null){
removeImage();
};
element = _arg1;
if (_arg1 != null){
if ((((attachImage() == false)) || ((element.getSelected() == true)))){
disable();
} else {
enable();
};
} else {
disable();
};
}
private function removeImage():void{
if (movieClip.mcDummy.numChildren > 0){
movieClip.mcDummy.removeChildAt(0);
};
}
}
}//package classes.game
Section 4 (10.1 KiB) ● ●
//InterfaceElements (classes.game.InterfaceElements)
package classes.game {
import spil.Sound.*;
import flash.display.*;
import spil.Events.*;
import classes.global.*;
import spil.Button.*;
public class InterfaceElements {
private var btnTabMouths:SpilButton;
private var btnTabEars:SpilButton;
private var btnTabEyes:SpilButton;
private var arMouths:Array;
private var arHairs:Array;
private var arEars:Array;
private var btnElement1:ElementButton;
private var btnElement2:ElementButton;
private var btnElement3:ElementButton;
private var btnElement4:ElementButton;
private var btnTabHairs:SpilButton;
private var btnElement5:ElementButton;
private var btnElement6:ElementButton;
private var arAccessories:Array;
private var arEyes:Array;
private var mcInterface:MovieClip;
private var arNoses:Array;
private var btnTabAccessories:SpilButton;
private var btnTabFeet:SpilButton;
private var btnTabNoses:SpilButton;
private var sndFX:SpilSound;
private var arFeet:Array;
public static const EVENT_UPDATE_INTERFACE:String = "EVENT_UPDATE_INTERFACE";
public static const EVENT_RANDOM:String = "EVENT_RANDOM";
public function InterfaceElements(_arg1:MovieClip):void{
arHairs = new Array();
arEyes = new Array();
arNoses = new Array();
arEars = new Array();
arMouths = new Array();
arAccessories = new Array();
arFeet = new Array();
mcInterface = _arg1;
sndFX = new SpilSound(Global.getInstance().main.getAsset("sndButtonActions"), SpilSound.TYPE_SFX, null, false, 0, 0);
SpilSoundManager.getInstance().addSound(sndFX);
createElements(Element.TYPE_HAIR, XMLElements.elements.hairs.hair, arHairs);
createElements(Element.TYPE_EYES, XMLElements.elements.eyes.eye, arEyes);
createElements(Element.TYPE_NOSE, XMLElements.elements.noses.nose, arNoses);
createElements(Element.TYPE_EARS, XMLElements.elements.ears.ear, arEars);
createElements(Element.TYPE_MOUTH, XMLElements.elements.mouths.mouth, arMouths);
createElements(Element.TYPE_ACCESSORY, XMLElements.elements.accessories.accessory, arAccessories);
createElements(Element.TYPE_FEET, XMLElements.elements.feet.foot, arFeet);
btnTabHairs = new SpilButton(mcInterface.mcTabs.mcBtnHairs, onEventTabHairButton);
btnTabEyes = new SpilButton(mcInterface.mcTabs.mcBtnEyes, onEventTabEyeButton);
btnTabNoses = new SpilButton(mcInterface.mcTabs.mcBtnNoses, onEventTabNoseButton);
btnTabEars = new SpilButton(mcInterface.mcTabs.mcBtnEars, onEventTabEarButton);
btnTabMouths = new SpilButton(mcInterface.mcTabs.mcBtnMouths, onEventTabMouthButton);
btnTabAccessories = new SpilButton(mcInterface.mcTabs.mcBtnAccessories, onEventTabEyebrowButton);
btnTabFeet = new SpilButton(mcInterface.mcTabs.mcBtnFeet, onEventTabFootButton);
btnTabHairs.setFxClick(sndFX);
btnTabEyes.setFxClick(sndFX);
btnTabNoses.setFxClick(sndFX);
btnTabEars.setFxClick(sndFX);
btnTabMouths.setFxClick(sndFX);
btnTabAccessories.setFxClick(sndFX);
btnTabFeet.setFxClick(sndFX);
btnElement1 = new ElementButton(mcInterface.mcBtnElement1);
btnElement2 = new ElementButton(mcInterface.mcBtnElement2);
btnElement3 = new ElementButton(mcInterface.mcBtnElement3);
btnElement4 = new ElementButton(mcInterface.mcBtnElement4);
btnElement5 = new ElementButton(mcInterface.mcBtnElement5);
btnElement6 = new ElementButton(mcInterface.mcBtnElement6);
btnTabHairs.disable();
mcInterface.stage.addEventListener(EVENT_UPDATE_INTERFACE, onEventUpdateButtons, false, 0, true);
mcInterface.stage.addEventListener(EVENT_RANDOM, onEventRandom, false, 0, true);
}
private function onEventTabEyebrowButton(_arg1:SpilEvent):void{
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
mcInterface.mcTabs.gotoAndStop("accessories");
if (btnTabHairs != null){
btnTabHairs.enable();
};
if (btnTabEyes != null){
btnTabEyes.enable();
};
if (btnTabNoses != null){
btnTabNoses.enable();
};
if (btnTabEars != null){
btnTabEars.enable();
};
if (btnTabMouths != null){
btnTabMouths.enable();
};
if (btnTabAccessories != null){
btnTabAccessories.disable();
};
if (btnTabFeet != null){
btnTabFeet.enable();
};
break;
case SpilEvent.EVENT_DISABLE:
setButtonElements(arAccessories);
break;
};
}
private function createElements(_arg1:String, _arg2:XMLList, _arg3:Array):void{
var _local4:XMLList;
var _local5:XMLList;
var _local6:*;
_local4 = Global.getInstance().xmlLocalization.characters.char;
_local5 = Global.getInstance().xmlLocalization.reward.news;
for each (_local6 in _arg2) {
_arg3.push(new Element(_local4[(uint(_local6.char) - 1)], _arg1, _local6.mcname, _local5.child(_local6.news), _local6.party, uint(_local6.char)));
};
}
private function onEventRandom(_arg1:PotatoEvent):void{
random(arEars);
random(arAccessories);
random(arEyes);
random(arFeet);
random(arHairs);
random(arMouths);
random(arNoses);
}
private function onEventTabNoseButton(_arg1:SpilEvent):void{
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
mcInterface.mcTabs.gotoAndStop("noses");
if (btnTabHairs != null){
btnTabHairs.enable();
};
if (btnTabEyes != null){
btnTabEyes.enable();
};
if (btnTabNoses != null){
btnTabNoses.disable();
};
if (btnTabEars != null){
btnTabEars.enable();
};
if (btnTabMouths != null){
btnTabMouths.enable();
};
if (btnTabAccessories != null){
btnTabAccessories.enable();
};
if (btnTabFeet != null){
btnTabFeet.enable();
};
break;
case SpilEvent.EVENT_DISABLE:
setButtonElements(arNoses);
break;
};
}
private function onEventUpdateButtons(_arg1:PotatoEvent):void{
btnElement1.update();
btnElement2.update();
btnElement3.update();
btnElement4.update();
btnElement5.update();
btnElement6.update();
}
private function onEventTabEarButton(_arg1:SpilEvent):void{
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
mcInterface.mcTabs.gotoAndStop("ears");
if (btnTabHairs != null){
btnTabHairs.enable();
};
if (btnTabEyes != null){
btnTabEyes.enable();
};
if (btnTabNoses != null){
btnTabNoses.enable();
};
if (btnTabEars != null){
btnTabEars.disable();
};
if (btnTabMouths != null){
btnTabMouths.enable();
};
if (btnTabAccessories != null){
btnTabAccessories.enable();
};
if (btnTabFeet != null){
btnTabFeet.enable();
};
break;
case SpilEvent.EVENT_DISABLE:
setButtonElements(arEars);
break;
};
}
private function onEventTabEyeButton(_arg1:SpilEvent):void{
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
mcInterface.mcTabs.gotoAndStop("eyes");
if (btnTabHairs != null){
btnTabHairs.enable();
};
if (btnTabEyes != null){
btnTabEyes.disable();
};
if (btnTabNoses != null){
btnTabNoses.enable();
};
if (btnTabEars != null){
btnTabEars.enable();
};
if (btnTabMouths != null){
btnTabMouths.enable();
};
if (btnTabAccessories != null){
btnTabAccessories.enable();
};
if (btnTabFeet != null){
btnTabFeet.enable();
};
break;
case SpilEvent.EVENT_DISABLE:
setButtonElements(arEyes);
break;
};
}
private function random(_arg1:Array):void{
var _local2:Element;
_local2 = _arg1[int((_arg1.length * Math.random()))];
mcInterface.stage.dispatchEvent(new PotatoEvent(Potato.EVENT_ADD_ELEMENT, _local2));
}
private function setButtonElements(_arg1:Array):void{
btnElement1.setElement(_arg1[0]);
btnElement2.setElement(_arg1[1]);
btnElement3.setElement(_arg1[2]);
btnElement4.setElement(_arg1[3]);
btnElement5.setElement(_arg1[4]);
btnElement6.setElement(_arg1[5]);
}
private function onEventTabMouthButton(_arg1:SpilEvent):void{
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
mcInterface.mcTabs.gotoAndStop("mouths");
if (btnTabHairs != null){
btnTabHairs.enable();
};
if (btnTabEyes != null){
btnTabEyes.enable();
};
if (btnTabNoses != null){
btnTabNoses.enable();
};
if (btnTabEars != null){
btnTabEars.enable();
};
if (btnTabMouths != null){
btnTabMouths.disable();
};
if (btnTabAccessories != null){
btnTabAccessories.enable();
};
if (btnTabFeet != null){
btnTabFeet.enable();
};
break;
case SpilEvent.EVENT_DISABLE:
setButtonElements(arMouths);
break;
};
}
private function onEventTabHairButton(_arg1:SpilEvent):void{
switch (_arg1.event){
case SpilEvent.EVENT_INIT:
case SpilEvent.EVENT_MOUSECLICK:
mcInterface.mcTabs.gotoAndStop("hair");
if (btnTabHairs != null){
btnTabHairs.disable();
};
if (btnTabEyes != null){
btnTabEyes.enable();
};
if (btnTabNoses != null){
btnTabNoses.enable();
};
if (btnTabEars != null){
btnTabEars.enable();
};
if (btnTabMouths != null){
btnTabMouths.enable();
};
if (btnTabAccessories != null){
btnTabAccessories.enable();
};
if (btnTabFeet != null){
btnTabFeet.enable();
};
break;
case SpilEvent.EVENT_DISABLE:
setButtonElements(arHairs);
break;
};
}
private function onEventTabFootButton(_arg1:SpilEvent):void{
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
mcInterface.mcTabs.gotoAndStop("feet");
if (btnTabHairs != null){
btnTabHairs.enable();
};
if (btnTabEyes != null){
btnTabEyes.enable();
};
if (btnTabNoses != null){
btnTabNoses.enable();
};
if (btnTabEars != null){
btnTabEars.enable();
};
if (btnTabMouths != null){
btnTabMouths.enable();
};
if (btnTabAccessories != null){
btnTabAccessories.enable();
};
if (btnTabFeet != null){
btnTabFeet.disable();
};
break;
case SpilEvent.EVENT_DISABLE:
setButtonElements(arFeet);
break;
};
}
}
}//package classes.game
Section 5 (7.28 KiB) ● ●
//Potato (classes.game.Potato)
package classes.game {
import flash.display.*;
import spil.Events.*;
import classes.global.*;
import spil.Utils.*;
import spil.Button.*;
public class Potato {
private var iTimeAnim:int;
private var arElements:Array;
private var strAnim:String;
private var btnPotato:SpilButton;
private var iRemainingElements:uint;
private var mcArmAnim:MovieClip;
private var mcPotato:MovieClip;
public static const EVENT_ADD_ELEMENT:String = "EVENT_ADD_ELEMENT";
private static const MAX_ELEMENTS:uint = 7;
public function Potato(_arg1:MovieClip):void{
iRemainingElements = MAX_ELEMENTS;
mcPotato = _arg1;
btnPotato = new SpilButton(mcPotato, onEventHandler);
arElements = new Array();
iTimeAnim = 0;
mcArmAnim = null;
mcPotato.mcOver.visible = false;
mcPotato.mcOut.visible = true;
mcPotato.mcArmLeft.gotoAndStop("stopped");
mcPotato.mcArmRight.gotoAndStop("stopped");
SpilMovieClip.addLabelScript(mcPotato.mcArmLeft, "endMove1", animArms);
SpilMovieClip.addLabelScript(mcPotato.mcArmLeft, "endMove2", animArms);
SpilMovieClip.addLabelScript(mcPotato.mcArmRight, "endMove1", animArms);
SpilMovieClip.addLabelScript(mcPotato.mcArmRight, "endMove2", animArms);
mcPotato.stage.addEventListener(EVENT_ADD_ELEMENT, onEventAddElement, false, 0, true);
}
public function animArms():void{
var _local1:String;
var _local2:Array;
var _local3:MovieClip;
iTimeAnim--;
if (iTimeAnim > 0){
mcArmAnim.gotoAndPlay(strAnim);
return;
};
iTimeAnim = (int((Math.random() * 5)) + 3);
_local1 = Element(arElements[Element.TYPE_ACCESSORY]).getMcName().toLocaleLowerCase();
_local2 = new Array("move1", "move2");
if ((((((_local1.indexOf("pig") > -1)) || ((_local1.indexOf("pitbull") > -1)))) || ((_local1.indexOf("mccain") > -1)))){
mcArmAnim = mcPotato.mcArmRight;
} else {
_local3 = ((Math.random() > 0.5)) ? mcPotato.mcArmRight : mcPotato.mcArmLeft;
if (((!((mcArmAnim == null))) && (!((_local3 == mcArmAnim))))){
mcArmAnim.gotoAndStop("stopped");
};
mcArmAnim = _local3;
};
strAnim = _local2[int((Math.random() * _local2.length))];
mcArmAnim.gotoAndPlay(strAnim);
}
public function getNews():String{
var _local1:String;
var _local2:Element;
_local1 = "";
for each (_local2 in arElements) {
if (_local2 == null){
} else {
if (_local1 != ""){
_local1 = (_local1 + " | ");
};
_local1 = (_local1 + _local2.getNews());
};
};
_local1 = (_local1 + " | .");
return (_local1);
}
public function release():void{
var _local1:String;
var _local2:Element;
if (btnPotato != null){
btnPotato.unregisterEvents();
};
mcPotato.stage.removeEventListener(EVENT_ADD_ELEMENT, onEventAddElement, false);
for each (_local2 in arElements) {
if (_local2 == null){
} else {
_local1 = _local2.getType();
if (_local2.getType() == Element.TYPE_EARS){
if ((((_local2.getCharName().toLowerCase().indexOf("pitbull") > -1)) || ((_local2.getCharName().toLowerCase().indexOf("pig") > -1)))){
_local1 = (_local1 + "Animal");
} else {
_local1 = (_local1 + "Human");
};
} else {
if ((((_local2.getType() == Element.TYPE_ACCESSORY)) && ((_local2.getCharName().toLowerCase().indexOf("palin") > -1)))){
_local1 = (_local1 + "Back");
};
};
MovieClip(mcPotato.getChildByName(_local1)).removeChildAt(0);
};
};
arElements.splice();
}
public function getMessage():String{
var _local1:String;
var _local2:uint;
var _local3:uint;
var _local4:Element;
_local2 = 0;
_local3 = 0;
for each (_local4 in arElements) {
if (_local4 == null){
} else {
if (_local4.getParty() == Element.PARTY_DEMOCRAT){
_local3++;
} else {
_local2++;
};
};
};
if (_local3 > _local2){
_local1 = Global.getInstance().xmlLocalization.reward.messagedemocrat;
} else {
_local1 = Global.getInstance().xmlLocalization.reward.messagerepublican;
};
return (_local1);
}
public function disabledButton(){
MovieClip(mcPotato.eyes.getChildAt(0)).play();
MovieClip(mcPotato.mouth.getChildAt(0)).play();
btnPotato.unregisterEvents();
btnPotato = null;
}
public function getURLElements():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + ("-" + (Element(arElements[Element.TYPE_ACCESSORY]).getID() - 1)));
_local1 = (_local1 + ("-" + (Element(arElements[Element.TYPE_EARS]).getID() - 1)));
_local1 = (_local1 + ("-" + (Element(arElements[Element.TYPE_EYES]).getID() - 1)));
_local1 = (_local1 + ("-" + (Element(arElements[Element.TYPE_FEET]).getID() - 1)));
_local1 = (_local1 + ("-" + (Element(arElements[Element.TYPE_HAIR]).getID() - 1)));
_local1 = (_local1 + ("-" + (Element(arElements[Element.TYPE_MOUTH]).getID() - 1)));
_local1 = (_local1 + ("-" + (Element(arElements[Element.TYPE_NOSE]).getID() - 1)));
return (_local1);
}
private function attachImage(_arg1:Element):void{
var _local2:MovieClip;
var _local3:MovieClip;
_local3 = MovieClip(new (Global.getInstance().main.getAsset(_arg1.getMcName())));
removeImage(arElements[_arg1.getType()]);
_local2 = getDummy(_arg1.getType(), _arg1.getCharName());
_local3.stop();
_local3.x = (_local3.width * -0.5);
_local3.y = (_local3.height * -0.5);
_local2.addChild(_local3);
SpilMovieClip.setMouseEnabled(_local2, false);
}
private function onEventHandler(_arg1:SpilEvent):void{
switch (_arg1.event){
case SpilEvent.EVENT_MOUSEOVER:
if (Global.getInstance().mouse.isEmpty() == false){
mcPotato.mcOver.visible = true;
mcPotato.mcOut.visible = false;
};
break;
case SpilEvent.EVENT_MOUSEUP:
case SpilEvent.EVENT_MOUSEOUT:
mcPotato.mcOver.visible = false;
mcPotato.mcOut.visible = true;
break;
};
}
private function getDummy(_arg1:String, _arg2:String):MovieClip{
var _local3:String;
_local3 = _arg1;
_local3 = _arg1;
if (_arg1 == Element.TYPE_EARS){
if ((((_arg2.toLowerCase().indexOf("pitbull") > -1)) || ((_arg2.toLowerCase().indexOf("pig") > -1)))){
_local3 = (_local3 + "Animal");
} else {
_local3 = (_local3 + "Human");
};
} else {
if ((((_arg1 == Element.TYPE_ACCESSORY)) && ((_arg2.toLowerCase().indexOf("palin") > -1)))){
_local3 = (_local3 + "Back");
};
};
return (MovieClip(mcPotato.getChildByName(_local3)));
}
private function onEventAddElement(_arg1:PotatoEvent):void{
var _local2:Element;
_local2 = Element(_arg1.param);
attachImage(_local2);
if (arElements[_local2.getType()] != null){
arElements[_local2.getType()].setSelected(false);
} else {
iRemainingElements--;
mcPotato.stage.dispatchEvent(new PotatoEvent(ElectButton.EVENT_UPDATE_MASK, (iRemainingElements / MAX_ELEMENTS)));
};
arElements[_local2.getType()] = _local2;
_local2.setSelected(true);
mcPotato.stage.dispatchEvent(new PotatoEvent(InterfaceElements.EVENT_UPDATE_INTERFACE));
}
private function removeImage(_arg1:Element):void{
var _local2:MovieClip;
if (_arg1 == null){
return;
};
_local2 = getDummy(_arg1.getType(), _arg1.getCharName());
if (_local2.numChildren > 0){
_local2.removeChildAt(0);
};
}
}
}//package classes.game
Section 6 (481 B)
//PotatoEvent (classes.game.PotatoEvent)
package classes.game {
import flash.events.*;
public class PotatoEvent extends Event {
private var strEvent:String;
private var objParam:Object;
public function PotatoEvent(_arg1:String, _arg2:Object=null){
strEvent = _arg1;
objParam = _arg2;
super(strEvent);
}
public function get param():Object{
return (objParam);
}
public function get event():String{
return (strEvent);
}
}
}//package classes.game
Section 7 (1.37 KiB) ●
//PotatoNews (classes.game.PotatoNews)
package classes.game {
import flash.text.*;
public class PotatoNews {
private var strNews:String;
private var txtNews1:TextField;
private var txtNews2:TextField;
private var bMoveText1:Boolean;
private var bMoveText2:Boolean;
private static const MOVE_SPEED:uint = 2;
private static const START_X:uint = 600;
public function PotatoNews(_arg1:String, _arg2:TextField, _arg3:TextField){
txtNews1 = _arg2;
txtNews2 = _arg3;
strNews = _arg1;
txtNews1.autoSize = TextFieldAutoSize.LEFT;
txtNews2.autoSize = TextFieldAutoSize.LEFT;
txtNews1.text = strNews;
txtNews2.text = strNews;
bMoveText1 = true;
bMoveText2 = false;
txtNews1.x = START_X;
txtNews2.x = START_X;
}
public function process(_arg1:Object){
if (bMoveText1 == true){
txtNews1.x = (txtNews1.x - MOVE_SPEED);
if ((txtNews1.x + txtNews1.width) < 0){
txtNews1.x = START_X;
bMoveText1 = false;
} else {
if ((txtNews1.x + txtNews1.width) <= START_X){
bMoveText2 = true;
};
};
};
if (bMoveText2 == true){
txtNews2.x = (txtNews2.x - MOVE_SPEED);
if ((txtNews2.x + txtNews2.width) < 0){
txtNews2.x = START_X;
bMoveText2 = false;
} else {
if ((txtNews2.x + txtNews2.width) <= START_X){
bMoveText1 = true;
};
};
};
}
}
}//package classes.game
Section 8 (17 KiB) ● ● ●
//Global (classes.global.Global)
package classes.global {
import classes.manager.*;
import spil.Mouse.*;
import spil.Manager.*;
public class Global extends SpilGlobal {
private var m_life:Number;// = 5
private var m_scoreLevel:Number;// = 0
private var m_score:Number;// = 0
private var m_url1Send:String;
private var m_url2Send:String;
private var m_manager:ManagerGAME;// = null
public function Global(){
m_scoreLevel = 0;
m_score = 0;
m_life = 5;
m_manager = null;
super();
}
public function get life():Number{
return (m_life);
}
private function setXMLLocalization(){
switch (localization_language_nr){
case 1:
m_xmlLocalization = getXMLLocalization1();
break;
case 2:
m_xmlLocalization = getXMLLocalization2();
break;
case 3:
m_xmlLocalization = getXMLLocalization3();
break;
case 4:
m_xmlLocalization = getXMLLocalization4();
break;
case 5:
m_xmlLocalization = getXMLLocalization5();
break;
case 6:
m_xmlLocalization = getXMLLocalization6();
break;
case 7:
m_xmlLocalization = getXMLLocalization7();
break;
case 8:
m_xmlLocalization = getXMLLocalization8();
break;
case 9:
m_xmlLocalization = getXMLLocalization9();
break;
case 10:
m_xmlLocalization = getXMLLocalization10();
break;
case 11:
m_xmlLocalization = getXMLLocalization11();
break;
case 12:
m_xmlLocalization = getXMLLocalization12();
break;
case 13:
m_xmlLocalization = getXMLLocalization13();
break;
case 14:
m_xmlLocalization = getXMLLocalization14();
break;
case 15:
m_xmlLocalization = getXMLLocalization15();
break;
case 16:
m_xmlLocalization = getXMLLocalization16();
break;
case 17:
m_xmlLocalization = getXMLLocalization17();
break;
};
}
public function get score():Number{
return (m_score);
}
public function get mouse():SpilDragMouse{
return (SpilDragMouse(m_mouse));
}
public function get scoreLevel():Number{
return (m_scoreLevel);
}
public function set score(_arg1:Number){
m_score = _arg1;
}
public function get manager():ManagerGAME{
return (m_manager);
}
public function set scoreLevel(_arg1:Number){
m_scoreLevel = _arg1;
}
public function get main():Main{
return (Main(m_main));
}
private function getXMLLocalization12():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"unicode\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
private function getXMLLocalization13():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
private function getXMLLocalization15():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
public function get send_url():String{
if (isSpilGroup() == true){
return (m_url2Send);
};
return ((m_url1Send + hostingdomain));
}
private function getXMLLocalization11():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
private function getXMLLocalization16():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
private function getXMLLocalization17():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
override public function set localization_language_nr(_arg1:Number){
super.localization_language_nr = _arg1;
setXMLLocalization();
}
private function getXMLLocalization14():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
public function set mouse(_arg1:SpilDragMouse){
m_mouse = _arg1;
}
private function getXMLLocalization2():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
private function getXMLLocalization3():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
public function set manager(_arg1:ManagerGAME){
m_manager = _arg1;
}
private function getXMLLocalization1():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "<symbol_cash>$</symbol_cash>\n");
_local1 = (_local1 + "<sarah>Heather</sarah>");
_local1 = (_local1 + "<loading>\n");
_local1 = (_local1 + "<title>Loading...</title>\n");
_local1 = (_local1 + "<msg>MORE FREE ONLINE GAMES AT:</msg>\n");
_local1 = (_local1 + "</loading>\n");
_local1 = (_local1 + "<mainmenu>\n");
_local1 = (_local1 + "<startgame>START GAME</startgame>\n");
_local1 = (_local1 + "<howtoplay>HOW TO PLAY</howtoplay>\n");
_local1 = (_local1 + "<moregames>MORE GAMES</moregames>\n");
_local1 = (_local1 + "<quality>Quality:</quality>\n");
_local1 = (_local1 + "<high>HIGH</high>");
_local1 = (_local1 + "<medium>MEDIUM</medium>");
_local1 = (_local1 + "<low>LOW</low>");
_local1 = (_local1 + "</mainmenu>\n");
_local1 = (_local1 + "<game>\n");
_local1 = (_local1 + "<btnrandom>Random</btnrandom>\n");
_local1 = (_local1 + "<btnelect>Elect!</btnelect>\n");
_local1 = (_local1 + "<btnelectdisabled>% of votes counted</btnelectdisabled>\n");
_local1 = (_local1 + "<howtoplay>Drag parts to the potato to create your ideal president.</howtoplay>\n");
_local1 = (_local1 + "</game>\n");
_local1 = (_local1 + "<characters>\n");
_local1 = (_local1 + "<char>John McCain</char>\n");
_local1 = (_local1 + "<char>Sarah Palin</char>\n");
_local1 = (_local1 + "<char>Barack Obama</char>\n");
_local1 = (_local1 + "<char>Joe Biden</char>\n");
_local1 = (_local1 + "<char>Pitbull</char>\n");
_local1 = (_local1 + "<char>Pig</char>\n");
_local1 = (_local1 + "</characters>\n");
_local1 = (_local1 + "<reward>\n");
_local1 = (_local1 + "<btnplayagain>Play Again</btnplayagain>\n");
_local1 = (_local1 + "<btnsendtofriend>Tell a friend</btnsendtofriend>\n");
_local1 = (_local1 + "<live>Potato speaks live as newly elected president</live>\n");
_local1 = (_local1 + "<messagedemocrat>This president leans to the left and talks about change, the environment, and raising taxes to support the poor. Is pro-choice, supportive of gay civil unions, and well-liked in Europe - except by CEOs.</messagedemocrat>\n");
_local1 = (_local1 + "<messagerepublican>This president has conservative values and believes in the power of capitalism. Religious and with a lust for oil, the president would be well-supported in the Middle East - if we weren't invading it all the time.</messagerepublican>\n");
_local1 = (_local1 + "<news>\n");
_local1 = (_local1 + "<R1a>Potato keeps eye on tech future: purchases 1st VCR.</R1a>\n");
_local1 = (_local1 + "<R1b>Potato: end to sexism, still welcomes sexy-isms.</R1b>\n");
_local1 = (_local1 + "<D1a>Potato: ducks controversy with new middle name - Luther.</D1a>\n");
_local1 = (_local1 + "<D1b>Card-shop disturbance: Potato demanding 'one of those race, sex, or POW cards.'</D1b>\n");
_local1 = (_local1 + "<A1a>Potato asks press: cease high-heel comments - 'Just look at my new lipstick.'</A1a>\n");
_local1 = (_local1 + "<A1b>Potato clarifies pig with lipstick remark: 'I was talking about Hillary.'</A1b>\n");
_local1 = (_local1 + "<R2a>Potato clarifies: thought he was signing up for 100 years of presidency.</R2a>\n");
_local1 = (_local1 + "<R2b>Potato qualified to discuss Iraq: she viewed photos.</R2b>\n");
_local1 = (_local1 + "<D2a>Potato: 'Troop surge success can work with withdrawal... …If you see how, please tell.'</D2a>\n");
_local1 = (_local1 + "<D2b>Potato: has learned lesson, will just agree with Other Potato.</D2b>\n");
_local1 = (_local1 + "<A2a>Potato: We must be on ATTACK against Iran— - er, Iraq?</A2a>\n");
_local1 = (_local1 + "<A2b>Potato: Don't wallow in the mud. End oil - uh, violence— - and get out.</A2b>\n");
_local1 = (_local1 + "<R3a>Potato asks abortion question: 'Well, what does the center think?'</R3a>\n");
_local1 = (_local1 + "<R3b>Potato will not end any budding life - —except her daughter's.</R3b>\n");
_local1 = (_local1 + "<D3a>Potato can be Christian and pro-life: 'I am both black and white.'</D3a>\n");
_local1 = (_local1 + "<D3b>Potato proud of wife's PhD (Pretty hot Derrière).</D3b>\n");
_local1 = (_local1 + "<A3a>Potato: 'Pitbulls not related to apes!'</A3a>\n");
_local1 = (_local1 + "<A3b>Potato in the slophouse, must cling to guns and religion.</A3b>\n");
_local1 = (_local1 + "<R4a>Potato: 'Boo! Muslim! Scared yet?'</R4a>\n");
_local1 = (_local1 + "<R4b>Potato, international expert: thought about Russia and saw Canada.</R4b>\n");
_local1 = (_local1 + "<D4a>Potato: will negotiate with terrorists, not hockey moms.</D4a>\n");
_local1 = (_local1 + "<D4b>Potato: plenty of fencing for border - —use one blocking him from White House.</D4b>\n");
_local1 = (_local1 + "<A4a>Vice Potato ready to attack Russia, or any other country in sight from house.</A4a>\n");
_local1 = (_local1 + "<A4b>Potato: 'They love pigs in Europe.'</A4b>\n");
_local1 = (_local1 + "<R5a>Potato vows to protect big business: 'Look what I did for Enron!'</R5a>\n");
_local1 = (_local1 + "<R5b>Potato: 'The moose ate my personal finances report.'</R5b>\n");
_local1 = (_local1 + "<D5a>Potato: poor is patriotic— - no, wait, helping poor is patriotic.</D5a>\n");
_local1 = (_local1 + "<D5b>Potato can't speak, foot lodged in mouth.</D5b>\n");
_local1 = (_local1 + "<A5a>Potato: won't take money from public's hands, but is for sale privately.</A5a>\n");
_local1 = (_local1 + "<A5b>Potato for private - —no, public - —no, private campaign financing.</A5b>\n");
_local1 = (_local1 + "<R6a>Potato issues environmental statement: opposite of whatever Bush said.</R6a>\n");
_local1 = (_local1 + "<R6b>Potato: Alaska a unique state full of important environmental assets: oil.</R6b>\n");
_local1 = (_local1 + "<D6a>Potato to press: 'Is it hot on this planet, or is it just me?'</D6a>\n");
_local1 = (_local1 + "<D6b>Potato on offshore drilling: better than Alaska!</D6b>\n");
_local1 = (_local1 + "<A6a>Potato: global warming a myth, just like economic crisis.</A6a>\n");
_local1 = (_local1 + "<A6b>Potato: 'Environment... …environment... …Gore?!!”</A6b>\n");
_local1 = (_local1 + "<R7a>Potato denies temper, YOU #&@%!</R7a>\n");
_local1 = (_local1 + "<R7b>Potato: 'These questions sure are harder than ones at beauty pageants.'</R7b>\n");
_local1 = (_local1 + "<D7a>Press drools over potato in 57 states.</D7a>\n");
_local1 = (_local1 + "<D7b>Potato not as 'articulate, bright, and clean' as Other Potato.</D7b>\n");
_local1 = (_local1 + "<A7a>Vice Potato: 'But, I thought you liked stupid. You elected him twice.'</A7a>\n");
_local1 = (_local1 + "<A7b>Potato tries to walk on water, takes swim.</A7b>\n");
_local1 = (_local1 + "</news>\n");
_local1 = (_local1 + "</reward>\n");
_local1 = (_local1 + "<sendtofriend>\n");
_local1 = (_local1 + "<help>Send this link to your friends and let them create their own President!\nCopy this link by pressing the button and paste it (Ctrl + v) in an email or chat window to show them your president and let them create their own!</help>\n");
_local1 = (_local1 + "<name>Insert your name:</name>\n");
_local1 = (_local1 + "<link>Link:</link>\n");
_local1 = (_local1 + "<title>Send to your friends:</title>\n");
_local1 = (_local1 + "<restrict>A-Za-zÀ-ú0-9</restrict>\n");
_local1 = (_local1 + "<btncopy>Copy</btncopy>\n");
_local1 = (_local1 + "</sendtofriend>\n");
_local1 = (_local1 + "<friend>\n");
_local1 = (_local1 + "<btnplay>Play Now</btnplay>\n");
_local1 = (_local1 + "<msg>%PLAYER% created this President. Create your own ultimate Potato President now!</msg>\n");
_local1 = (_local1 + "</friend>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
private function getXMLLocalization9():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
private function getXMLLocalization4():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
private function getXMLLocalization6():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
private function getXMLLocalization10():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
private function getXMLLocalization8():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
public function set main(_arg1:Main){
m_main = _arg1;
}
private function getXMLLocalization5():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
public function set life(_arg1:Number){
m_life = _arg1;
}
public function set send_url1(_arg1:String):void{
m_url1Send = _arg1;
}
public function set send_url2(_arg1:String):void{
m_url2Send = _arg1;
}
private function getXMLLocalization7():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<localization>\n");
_local1 = (_local1 + "</localization>\n");
_local2 = new XML(_local1);
return (_local2);
}
public static function getInstance():Global{
if (instance == null){
instance = new (Global);
};
return (Global(instance));
}
}
}//package classes.global
Section 9 (16.27 KiB) ● ● ●
//XMLElements (classes.global.XMLElements)
package classes.global {
public class XMLElements {
public static var elements:XML;
public static function init(){
elements = getElements();
}
private static function getEars():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "<ears>\n");
_local1 = (_local1 + "<ear>\n");
_local1 = (_local1 + "<char>1</char>\n");
_local1 = (_local1 + "<mcname>mcMcCain_ears</mcname>\n");
_local1 = (_local1 + "<news>R3a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</ear>\n");
_local1 = (_local1 + "<ear>\n");
_local1 = (_local1 + "<char>2</char>\n");
_local1 = (_local1 + "<mcname>mcPalin_ears</mcname>\n");
_local1 = (_local1 + "<news>R3b</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</ear>\n");
_local1 = (_local1 + "<ear>\n");
_local1 = (_local1 + "<char>3</char>\n");
_local1 = (_local1 + "<mcname>mcBarack_ears</mcname>\n");
_local1 = (_local1 + "<news>D3a</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</ear>\n");
_local1 = (_local1 + "<ear>\n");
_local1 = (_local1 + "<char>4</char>\n");
_local1 = (_local1 + "<mcname>mcBiden_ears</mcname>\n");
_local1 = (_local1 + "<news>D3b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</ear>\n");
_local1 = (_local1 + "<ear>\n");
_local1 = (_local1 + "<char>5</char>\n");
_local1 = (_local1 + "<mcname>mcPitbull_ears</mcname>\n");
_local1 = (_local1 + "<news>A3a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</ear>\n");
_local1 = (_local1 + "<ear>\n");
_local1 = (_local1 + "<char>6</char>\n");
_local1 = (_local1 + "<mcname>mcPig_ears</mcname>\n");
_local1 = (_local1 + "<news>A3b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</ear>\n");
_local1 = (_local1 + "</ears>\n");
return (_local1);
}
private static function getFeet():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "<feet>\n");
_local1 = (_local1 + "<foot>\n");
_local1 = (_local1 + "<char>1</char>\n");
_local1 = (_local1 + "<mcname>mcMcCain_feet</mcname>\n");
_local1 = (_local1 + "<news>R7a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</foot>\n");
_local1 = (_local1 + "<foot>\n");
_local1 = (_local1 + "<char>2</char>\n");
_local1 = (_local1 + "<mcname>mcPalin_feet</mcname>\n");
_local1 = (_local1 + "<news>R7b</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</foot>\n");
_local1 = (_local1 + "<foot>\n");
_local1 = (_local1 + "<char>3</char>\n");
_local1 = (_local1 + "<mcname>mcBarack_feet</mcname>\n");
_local1 = (_local1 + "<news>D7a</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</foot>\n");
_local1 = (_local1 + "<foot>\n");
_local1 = (_local1 + "<char>4</char>\n");
_local1 = (_local1 + "<mcname>mcBiden_feet</mcname>\n");
_local1 = (_local1 + "<news>D7b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</foot>\n");
_local1 = (_local1 + "<foot>\n");
_local1 = (_local1 + "<char>5</char>\n");
_local1 = (_local1 + "<mcname>mcPitbull_feet</mcname>\n");
_local1 = (_local1 + "<news>A7a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</foot>\n");
_local1 = (_local1 + "<foot>\n");
_local1 = (_local1 + "<char>6</char>\n");
_local1 = (_local1 + "<mcname>mcPig_feet</mcname>\n");
_local1 = (_local1 + "<news>A7b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</foot>\n");
_local1 = (_local1 + "</feet>\n");
return (_local1);
}
private static function getEyes():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "<eyes>\n");
_local1 = (_local1 + "<eye>\n");
_local1 = (_local1 + "<char>1</char>\n");
_local1 = (_local1 + "<mcname>mcMcCain_eyes</mcname>\n");
_local1 = (_local1 + "<news>R1a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</eye>\n");
_local1 = (_local1 + "<eye>\n");
_local1 = (_local1 + "<char>2</char>\n");
_local1 = (_local1 + "<mcname>mcPalin_eyes</mcname>\n");
_local1 = (_local1 + "<news>R1b</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</eye>\n");
_local1 = (_local1 + "<eye>\n");
_local1 = (_local1 + "<char>3</char>\n");
_local1 = (_local1 + "<mcname>mcBarack_eyes</mcname>\n");
_local1 = (_local1 + "<news>D1a</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</eye>\n");
_local1 = (_local1 + "<eye>\n");
_local1 = (_local1 + "<char>4</char>\n");
_local1 = (_local1 + "<mcname>mcBiden_eyes</mcname>\n");
_local1 = (_local1 + "<news>D1b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</eye>\n");
_local1 = (_local1 + "<eye>\n");
_local1 = (_local1 + "<char>5</char>\n");
_local1 = (_local1 + "<mcname>mcPitbull_eyes</mcname>\n");
_local1 = (_local1 + "<news>A1a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</eye>\n");
_local1 = (_local1 + "<eye>\n");
_local1 = (_local1 + "<char>6</char>\n");
_local1 = (_local1 + "<mcname>mcPig_eyes</mcname>\n");
_local1 = (_local1 + "<news>A1b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</eye>\n");
_local1 = (_local1 + "</eyes>\n");
return (_local1);
}
private static function getMouths():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "<mouths>\n");
_local1 = (_local1 + "<mouth>\n");
_local1 = (_local1 + "<char>1</char>\n");
_local1 = (_local1 + "<mcname>mcMcCain_mouth</mcname>\n");
_local1 = (_local1 + "<news>R6a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</mouth>\n");
_local1 = (_local1 + "<mouth>\n");
_local1 = (_local1 + "<char>2</char>\n");
_local1 = (_local1 + "<mcname>mcPalin_mouth</mcname>\n");
_local1 = (_local1 + "<news>R6b</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</mouth>\n");
_local1 = (_local1 + "<mouth>\n");
_local1 = (_local1 + "<char>3</char>\n");
_local1 = (_local1 + "<mcname>mcBarack_mouth</mcname>\n");
_local1 = (_local1 + "<news>D6a</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</mouth>\n");
_local1 = (_local1 + "<mouth>\n");
_local1 = (_local1 + "<char>4</char>\n");
_local1 = (_local1 + "<mcname>mcBiden_mouth</mcname>\n");
_local1 = (_local1 + "<news>D6b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</mouth>\n");
_local1 = (_local1 + "<mouth>\n");
_local1 = (_local1 + "<char>5</char>\n");
_local1 = (_local1 + "<mcname>mcPitbull_mouth</mcname>\n");
_local1 = (_local1 + "<news>A6a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</mouth>\n");
_local1 = (_local1 + "<mouth>\n");
_local1 = (_local1 + "<char>6</char>\n");
_local1 = (_local1 + "<mcname>mcPig_mouth</mcname>\n");
_local1 = (_local1 + "<news>A6b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</mouth>\n");
_local1 = (_local1 + "</mouths>\n");
return (_local1);
}
private static function getNoses():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "<noses>\n");
_local1 = (_local1 + "<nose>\n");
_local1 = (_local1 + "<char>1</char>\n");
_local1 = (_local1 + "<mcname>mcMcCain_nose</mcname>\n");
_local1 = (_local1 + "<news>R4a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</nose>\n");
_local1 = (_local1 + "<nose>\n");
_local1 = (_local1 + "<char>2</char>\n");
_local1 = (_local1 + "<mcname>mcPalin_nose</mcname>\n");
_local1 = (_local1 + "<news>R4b</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</nose>\n");
_local1 = (_local1 + "<nose>\n");
_local1 = (_local1 + "<char>3</char>\n");
_local1 = (_local1 + "<mcname>mcBarack_nose</mcname>\n");
_local1 = (_local1 + "<news>D4a</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</nose>\n");
_local1 = (_local1 + "<nose>\n");
_local1 = (_local1 + "<char>4</char>\n");
_local1 = (_local1 + "<mcname>mcBiden_nose</mcname>\n");
_local1 = (_local1 + "<news>D4b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</nose>\n");
_local1 = (_local1 + "<nose>\n");
_local1 = (_local1 + "<char>5</char>\n");
_local1 = (_local1 + "<mcname>mcPitbull_nose</mcname>\n");
_local1 = (_local1 + "<news>A4a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</nose>\n");
_local1 = (_local1 + "<nose>\n");
_local1 = (_local1 + "<char>6</char>\n");
_local1 = (_local1 + "<mcname>mcPig_nose</mcname>\n");
_local1 = (_local1 + "<news>A4b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</nose>\n");
_local1 = (_local1 + "</noses>\n");
return (_local1);
}
private static function getHairs():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "<hairs>\n");
_local1 = (_local1 + "<hair>\n");
_local1 = (_local1 + "<char>1</char>\n");
_local1 = (_local1 + "<mcname>mcMcCain_hair</mcname>\n");
_local1 = (_local1 + "<news>R5a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</hair>\n");
_local1 = (_local1 + "<hair>\n");
_local1 = (_local1 + "<char>2</char>\n");
_local1 = (_local1 + "<mcname>mcPalin_hair</mcname>\n");
_local1 = (_local1 + "<news>R5b</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</hair>\n");
_local1 = (_local1 + "<hair>\n");
_local1 = (_local1 + "<char>3</char>\n");
_local1 = (_local1 + "<mcname>mcBarack_hair</mcname>\n");
_local1 = (_local1 + "<news>D5a</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</hair>\n");
_local1 = (_local1 + "<hair>\n");
_local1 = (_local1 + "<char>4</char>\n");
_local1 = (_local1 + "<mcname>mcBiden_hair</mcname>\n");
_local1 = (_local1 + "<news>D5b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</hair>\n");
_local1 = (_local1 + "<hair>\n");
_local1 = (_local1 + "<char>5</char>\n");
_local1 = (_local1 + "<mcname>mcPitbull_hair</mcname>\n");
_local1 = (_local1 + "<news>A5a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</hair>\n");
_local1 = (_local1 + "<hair>\n");
_local1 = (_local1 + "<char>6</char>\n");
_local1 = (_local1 + "<mcname>mcPig_hair</mcname>\n");
_local1 = (_local1 + "<news>A5b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</hair>\n");
_local1 = (_local1 + "</hairs>\n");
return (_local1);
}
private static function getAccessory():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "<accessories>\n");
_local1 = (_local1 + "<accessory>\n");
_local1 = (_local1 + "<char>1</char>\n");
_local1 = (_local1 + "<mcname>mcMcCain_accessory</mcname>\n");
_local1 = (_local1 + "<news>R2a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</accessory>\n");
_local1 = (_local1 + "<accessory>\n");
_local1 = (_local1 + "<char>2</char>\n");
_local1 = (_local1 + "<mcname>mcPalin_accessory</mcname>\n");
_local1 = (_local1 + "<news>R2b</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</accessory>\n");
_local1 = (_local1 + "<accessory>\n");
_local1 = (_local1 + "<char>3</char>\n");
_local1 = (_local1 + "<mcname>mcBarack_accessory</mcname>\n");
_local1 = (_local1 + "<news>D2a</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</accessory>\n");
_local1 = (_local1 + "<accessory>\n");
_local1 = (_local1 + "<char>4</char>\n");
_local1 = (_local1 + "<mcname>mcBiden_accessory</mcname>\n");
_local1 = (_local1 + "<news>D2b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</accessory>\n");
_local1 = (_local1 + "<accessory>\n");
_local1 = (_local1 + "<char>5</char>\n");
_local1 = (_local1 + "<mcname>mcPitbull_accessory</mcname>\n");
_local1 = (_local1 + "<news>A2a</news>\n");
_local1 = (_local1 + "<party>republican</party>\n");
_local1 = (_local1 + "</accessory>\n");
_local1 = (_local1 + "<accessory>\n");
_local1 = (_local1 + "<char>6</char>\n");
_local1 = (_local1 + "<mcname>mcPig_accessory</mcname>\n");
_local1 = (_local1 + "<news>A2b</news>\n");
_local1 = (_local1 + "<party>democrat</party>\n");
_local1 = (_local1 + "</accessory>\n");
_local1 = (_local1 + "</accessories>\n");
return (_local1);
}
private static function getElements():XML{
var _local1:String;
var _local2:XML;
_local1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
_local1 = (_local1 + "<elements>\n");
_local1 = (_local1 + getEyes());
_local1 = (_local1 + getAccessory());
_local1 = (_local1 + getEars());
_local1 = (_local1 + getNoses());
_local1 = (_local1 + getHairs());
_local1 = (_local1 + getMouths());
_local1 = (_local1 + getFeet());
_local1 = (_local1 + "</elements>\n");
_local2 = new XML(_local1);
return (_local2);
}
}
}//package classes.global
Section 10 (4.29 KiB) ●
//Main (classes.manager.Main)
package classes.manager {
import spil.Sound.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import classes.global.*;
import spil.Mouse.*;
import spil.Utils.*;
import spil.Manager.*;
public class Main extends SpilMain {
public var mcMsg:TextField;
public var btnSound:MovieClip;
public var mcBtnPlayAgain:MovieClip;
public var mcBtnElect:MovieClip;
public var mcLogo:MovieClip;
public var mcTitle:MovieClip;
public var mcTvEffect:MovieClip;
public var txtTitleName:TextField;
public var btnStartGame:MovieClip;
public var txtLink:TextField;
public var mcBtnSendToFriend:MovieClip;
public var mcElements:MovieClip;
public var mcTitleLoading:TextField;
public var btnQuality:MovieClip;
public var mcSpil:MovieClip;
public var txtName:TextField;
public var btnMusic:MovieClip;
public var txtNews1:TextField;
public var txtNews2:TextField;
public var mcBtnRandom:MovieClip;
public var mcBtnPlay:MovieClip;
public var mcPotato:MovieClip;
public var mcLoadingBar:MovieClip;
public var btnMoreGames:MovieClip;
public var txtMessage:TextField;
public var mcValue:TextField;
public var mcBtnCopy:MovieClip;
public var txtLive:TextField;
public var mcHowToPlay:MovieClip;
public var txtHelp:TextField;
public var txtTitleLink:TextField;
public function Main(){
addFrameScript(0, frame1, 10, frame11, 58, frame59, 59, frame60, 60, frame61);
super();
initGlobal();
initSound();
stage.addEventListener(KeyboardEvent.KEY_DOWN, onCheatKeyDown);
}
private function onClickLogo(_arg1:MouseEvent):void{
SpilURLNavigator.changePage((Global.getInstance().localization_url + "&utm_term=logo_preloader"), "_blank");
}
function frame1(){
Global.getInstance().spilGroupUrl.push("localhost");
Global.getInstance().spilGroupUrl.push("www8.agame.com");
Global.getInstance().localization_url = "http://www.agame.com/moregames/?utm_source=brandedgames_external&utm_medium=potato_president&utm_campaign=";
Global.getInstance().localization_url2 = "http://www.agame.com/moregames/?utm_source=brandedgames_internal&utm_medium=potato_president";
Global.getInstance().localization_language_nr = 1;
Global.getInstance().localization_branding_nr = 1;
Global.getInstance().send_url1 = "http://www.agame.com/game/Potato-president.html?utm_source=brandedgames_external&utm_medium=potato_president&utm_term=send_to_friend&utm_campaign=";
Global.getInstance().send_url2 = "http://www.agame.com/game/Potato-president.html?utm_source=brandedgames_internal&utm_term=send_to_friend&utm_medium=potato_president";
Global.getInstance().main.onInit();
}
function frame11(){
stop();
}
override protected function onUpdateFrame(_arg1:Event):void{
var _local2:Number;
if (this.loaderInfo.bytesLoaded < this.loaderInfo.bytesTotal){
_local2 = (Math.floor((this.loaderInfo.bytesLoaded * 100)) / this.loaderInfo.bytesTotal);
this.mcValue.text = String(Math.round(_local2));
this.mcLoadingBar.mcMask.width = ((_local2 / 100) * 225);
return;
};
if (Global.getInstance().manager == null){
this.mcLogo.removeEventListener(MouseEvent.CLICK, onClickLogo);
Global.getInstance().manager = new ManagerGAME(this);
Global.getInstance().mouse.register();
};
super.onUpdateFrame(_arg1);
if (Global.getInstance().manager != null){
Global.getInstance().manager.process(objTransport);
};
}
public function onCheatKeyDown(_arg1:KeyboardEvent){
if (_arg1.keyCode == 50){
};
}
function frame59(){
stop();
}
private function initGlobal(){
Global.getInstance().main = this;
Global.getInstance().mouse = new SpilDragMouse(this);
XMLElements.init();
}
function frame60(){
stop();
}
function frame61(){
stop();
}
public function onInit(){
this.mcTitleLoading.text = Global.getInstance().xmlLocalization.loading.title;
this.mcMsg.text = Global.getInstance().xmlLocalization.loading.msg;
this.mcValue.text = "0";
this.mcLogo.gotoAndStop(Global.getInstance().localization_branding_nr);
this.mcLogo.addEventListener(MouseEvent.CLICK, onClickLogo);
}
private function initSound(){
SpilSoundManager.getInstance().setMusicVolume(50);
SpilSoundManager.getInstance().setSFXVolume(70);
}
}
}//package classes.manager
Section 11 (21.35 KiB) ● ● ●
//ManagerGAME (classes.manager.ManagerGAME)
package classes.manager {
import spil.Sound.*;
import flash.display.*;
import spil.Events.*;
import flash.events.*;
import classes.game.*;
import spil.StateMachine.*;
import flash.text.*;
import classes.global.*;
import spil.Utils.*;
import spil.Button.*;
import flash.external.*;
import flash.system.*;
public class ManagerGAME {
private var stage:MovieClip;
private var buttons:Array;
private var sndAnthem:SpilSound;
private var btnElect:ElectButton;
private var arSFX:Array;
private var sndAmbient1:SpilSound;
private var potato:Potato;
private var sndAmbient2:SpilSound;
private var stMachine:SpilStateMachine;
private var scenary:Bitmap;
private var news:PotatoNews;
private var iElapsedTimePot:Number;
private var elements:InterfaceElements;
private var arFriendData:Array;
static const EVENT_GO_TO_REWARD:String = "EVENT_GO_TO_REWARD";
static const ST_MAIN_MENU:String = "ST_MAIN_MENU";
static const ST_SEND_TO_FRIEND:String = "ST_SEND_TO_FRIEND";
static const EVENT_GO_TO_GAME:String = "EVENT_GO_TO_GAME";
static const ST_REWARD:String = "ST_REWARD";
static const ST_GAME:String = "ST_GAME";
static const EVENT_GO_TO_MENU:String = "EVENT_GO_TO_MENU";
static const EVENT_GO_TO_SEND:String = "EVENT_GO_TO_SEND";
static const ST_FRIEND:String = "ST_FRIEND";
public function ManagerGAME(_arg1:MovieClip){
var _local2:SpilSound;
super();
this.buttons = new Array();
this.stage = _arg1;
this.arFriendData = new Array();
this.news = null;
this.arSFX = null;
stMachine = new SpilStateMachine(null);
sndAnthem = new SpilSound(Global.getInstance().main.getAsset("sndAnthem"), SpilSound.TYPE_MUSIC, null, true, 2000, 2000);
sndAmbient1 = new SpilSound(Global.getInstance().main.getAsset("sndCrowdAmbience01"), SpilSound.TYPE_MUSIC, null, true, 2000, 2000);
sndAmbient2 = new SpilSound(Global.getInstance().main.getAsset("sndCrowdAmbience02"), SpilSound.TYPE_MUSIC, null, true, 2000, 2000);
SpilSoundManager.getInstance().addSound(sndAnthem);
SpilSoundManager.getInstance().addSound(sndAmbient1);
SpilSoundManager.getInstance().addSound(sndAmbient2);
arSFX = new Array();
arSFX["mouseClick"] = new SpilSound(Global.getInstance().main.getAsset("sndMouseClick"), SpilSound.TYPE_SFX, null, false, 0, 0);
arSFX["random"] = new SpilSound(Global.getInstance().main.getAsset("sndRandom"), SpilSound.TYPE_SFX, null, false, 0, 0);
arSFX["play"] = new SpilSound(Global.getInstance().main.getAsset("sndPlay"), SpilSound.TYPE_SFX, null, false, 0, 0);
for each (_local2 in arSFX) {
SpilSoundManager.getInstance().addSound(_local2);
};
getParams();
this.iElapsedTimePot = 0;
stMachine.createEvent(EVENT_GO_TO_MENU, null);
stMachine.createEvent(EVENT_GO_TO_GAME, null);
stMachine.createEvent(EVENT_GO_TO_REWARD, null);
stMachine.createEvent(EVENT_GO_TO_SEND, null);
stMachine.createState(ST_MAIN_MENU, false, this, startMainMenu, processMainMenu, stopMainMenu);
stMachine.createState(ST_GAME, false, this, startGame, processGame, stopGame);
stMachine.createState(ST_REWARD, false, this, startReward, processReward, stopReward);
stMachine.createState(ST_SEND_TO_FRIEND, false, this, startSendToFriend, processSendToFriend, stopSendToFriend);
stMachine.createState(ST_FRIEND, false, this, startFriend, processFriend, stopFriend);
stMachine.createTransition(ST_MAIN_MENU, EVENT_GO_TO_GAME, ST_GAME);
stMachine.createTransition(ST_GAME, EVENT_GO_TO_MENU, ST_MAIN_MENU);
stMachine.createTransition(ST_GAME, EVENT_GO_TO_REWARD, ST_REWARD);
stMachine.createTransition(ST_REWARD, EVENT_GO_TO_GAME, ST_GAME);
stMachine.createTransition(ST_REWARD, EVENT_GO_TO_SEND, ST_SEND_TO_FRIEND);
stMachine.createTransition(ST_SEND_TO_FRIEND, EVENT_GO_TO_GAME, ST_GAME);
stMachine.createTransition(ST_FRIEND, EVENT_GO_TO_MENU, ST_MAIN_MENU);
if (arFriendData.length != 9){
stMachine.initialize(ST_MAIN_MENU);
} else {
stMachine.initialize(ST_FRIEND);
};
}
private function onEventQuality(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
switch (stage.stage.quality){
case "BEST":
stage.stage.quality = StageQuality.LOW;
break;
case "HIGH":
stage.stage.quality = StageQuality.BEST;
break;
case "MEDIUM":
stage.stage.quality = StageQuality.HIGH;
break;
case "LOW":
stage.stage.quality = StageQuality.MEDIUM;
break;
};
buttons["quality"].setText(((Global.getInstance().xmlLocalization.mainmenu.quality + " ") + stage.stage.quality));
break;
case SpilEvent.EVENT_INIT:
break;
case SpilEvent.EVENT_MOUSEOUT:
break;
case SpilEvent.EVENT_MOUSEOVER:
break;
};
}
private function onFinishRewardLoadFrame(){
SpilMovieClip.addLabelScript(stage, "onFinishRewardLoadFrame", null);
stage.stop();
stage.txtMessage.text = potato.getMessage();
}
public function dispatchGame(){
try {
return (stMachine.receiveEvent(EVENT_GO_TO_GAME));
} catch(e:Error) {
};
}
private function onEventFX(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_ON:
SpilSoundManager.getInstance().setSFXVolume(100);
break;
case SpilEvent.EVENT_OFF:
SpilSoundManager.getInstance().setSFXVolume(0);
break;
};
}
private function processGame(_arg1:Object){
}
private function onEventCopy(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
System.setClipboard(stage.txtLink.text);
break;
case SpilEvent.EVENT_INIT:
break;
case SpilEvent.EVENT_MOUSEOUT:
break;
case SpilEvent.EVENT_MOUSEOVER:
break;
};
}
private function stopGame(){
sndAmbient2.stop();
btnElect.unregisterEvents();
btnElect = null;
elements = null;
deleteButton("random");
deleteButton("sound");
deleteButton("music");
}
public function onEventFocusOutName(_arg1:FocusEvent):void{
if (stage.txtName.text.length == 0){
stage.txtName.text = "<PLAYER>";
};
stage.txtName.setSelection(0, stage.txtName.text.length);
onEventChangeName(null);
}
private function startFriend():void{
stage.gotoAndPlay("friend");
SpilMovieClip.addLabelScript(stage, "friend", onFriendLoadFrame);
sndAnthem.play();
sndAmbient1.play();
}
private function startSendToFriend():void{
stage.gotoAndPlay("sendToFriend");
SpilMovieClip.addLabelScript(stage, "sendToFriend", onSendToFriendLoadFrame);
}
private function onEventRandom(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
stage.stage.dispatchEvent(new PotatoEvent(InterfaceElements.EVENT_RANDOM));
break;
};
}
public function dispatchSend(){
try {
return (stMachine.receiveEvent(EVENT_GO_TO_SEND));
} catch(e:Error) {
};
}
private function dispachtElement(_arg1:String, _arg2:XML){
var _local3:XMLList;
var _local4:XMLList;
var _local5:Element;
_local3 = Global.getInstance().xmlLocalization.characters.char;
_local4 = Global.getInstance().xmlLocalization.reward.news;
_local5 = new Element(_local3[(uint(_arg2.char) - 1)], _arg1, _arg2.mcname, _local4.child(_arg2.news), _arg2.party, uint(_arg2.char));
stage.stage.dispatchEvent(new PotatoEvent(Potato.EVENT_ADD_ELEMENT, _local5));
}
private function processSendToFriend(_arg1:Object):void{
if (news != null){
news.process(_arg1);
};
}
private function startReward():void{
stage.gotoAndPlay("reward");
SpilMovieClip.addLabelScript(stage, "reward", onRewardLoadFrame);
potato.disabledButton();
potato.animArms();
sndAnthem.play();
sndAmbient1.play();
}
private function onFinishGameLoadFrame(){
SpilMovieClip.addLabelScript(stage, "finishGame", null);
stage.stop();
}
private function onClickLogo(_arg1:MouseEvent):void{
var _local2:String;
_local2 = "";
switch (stMachine.getCurrentState().getName()){
case ST_FRIEND:
_local2 = "&utm_term=logo_view_send_to_friend";
break;
case ST_GAME:
_local2 = "&utm_term=logo_create_potato";
break;
case ST_MAIN_MENU:
_local2 = "&utm_term=logo_main";
break;
case ST_REWARD:
_local2 = "&utm_term=logo_finished_potato";
break;
case ST_SEND_TO_FRIEND:
_local2 = "&utm_term=logo_send_to_friend";
break;
};
SpilURLNavigator.changePage((Global.getInstance().localization_url + _local2), "_blank");
}
private function onGameLoadFrame(){
stage.mcLogo.gotoAndStop(Global.getInstance().localization_branding_nr);
stage.mcLogo.addEventListener(MouseEvent.CLICK, onClickLogo);
this.potato = new Potato(stage.mcPotato);
SpilMovieClip.addLabelScript(stage, "game", null);
SpilMovieClip.addLabelScript(stage, "finishGame", onFinishGameLoadFrame);
stage.mcHowToPlay.txtHowToPlay.text = Global.getInstance().xmlLocalization.game.howtoplay;
elements = new InterfaceElements(this.stage.mcElements);
btnElect = new ElectButton(this.stage.mcBtnElect);
buttons["random"] = new SpilTextButton(stage.mcBtnRandom, Global.getInstance().xmlLocalization.game.btnrandom, onEventRandom);
buttons["sound"] = new SpilSwitchButton(stage.btnSound, onEventFX);
if (SpilSoundManager.getInstance().getSFXVolume() == 0){
buttons["sound"].off();
};
buttons["music"] = new SpilSwitchButton(stage.btnMusic, onEventMusic);
if (SpilSoundManager.getInstance().getMusicVolume() == 0){
buttons["music"].off();
};
setSFX();
SpilButton(buttons["random"]).setFxClick(arSFX["random"]);
}
private function onMainMenuLoadFrame(){
SpilMovieClip.addLabelScript(stage, "menu", null);
stage.stop();
stage.mcLogo.gotoAndStop(Global.getInstance().localization_branding_nr);
stage.mcLogo.addEventListener(MouseEvent.CLICK, onClickLogo);
stage.mcSpil.addEventListener(MouseEvent.CLICK, onClickSpil);
buttons["startgame"] = new SpilTextButton(stage.btnStartGame, Global.getInstance().xmlLocalization.friend.btnplay, onEventStartGame);
buttons["moregames"] = new SpilTextButton(stage.btnMoreGames, Global.getInstance().xmlLocalization.mainmenu.moregames, onEventMoreGames);
buttons["quality"] = new SpilTextButton(stage.btnQuality, ((Global.getInstance().xmlLocalization.mainmenu.quality + " ") + stage.stage.quality), onEventQuality);
buttons["sound"] = new SpilSwitchButton(stage.btnSound, onEventFX);
if (SpilSoundManager.getInstance().getSFXVolume() == 0){
buttons["sound"].off();
};
buttons["music"] = new SpilSwitchButton(stage.btnMusic, onEventMusic);
if (SpilSoundManager.getInstance().getMusicVolume() == 0){
buttons["music"].off();
};
setSFX();
SpilButton(buttons["startgame"]).setFxClick(arSFX["play"]);
}
private function onEventMoreGames(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
SpilURLNavigator.changePage((Global.getInstance().localization_url + "&utm_term=button_moregames"), "_blank");
break;
case SpilEvent.EVENT_INIT:
break;
case SpilEvent.EVENT_MOUSEOUT:
break;
case SpilEvent.EVENT_MOUSEOVER:
break;
};
}
private function onEventStartGame(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
dispatchGame();
break;
case SpilEvent.EVENT_INIT:
break;
case SpilEvent.EVENT_MOUSEOUT:
break;
case SpilEvent.EVENT_MOUSEOVER:
break;
};
}
private function startMainMenu(){
stage.gotoAndPlay("menu");
SpilMovieClip.addLabelScript(this.stage, "menu", onMainMenuLoadFrame);
sndAmbient2.play();
}
private function onEventSendToFriend(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
dispatchSend();
break;
case SpilEvent.EVENT_INIT:
break;
case SpilEvent.EVENT_MOUSEOUT:
break;
case SpilEvent.EVENT_MOUSEOVER:
break;
};
}
private function deleteButton(_arg1:String):void{
buttons[_arg1].unregisterEvents();
delete buttons[_arg1];
buttons[_arg1] = undefined;
}
private function stopFriend():void{
deleteButton("play");
deleteButton("sound");
deleteButton("music");
sndAnthem.stop();
}
private function setSFX():void{
var _local1:SpilButton;
for each (_local1 in buttons) {
if (_local1 == null){
} else {
_local1.setFxClick(arSFX["mouseClick"]);
};
};
}
public function onEventChangeName(_arg1:Event):void{
stage.txtLink.text = ((((Global.getInstance().send_url + ((Global.getInstance().send_url.indexOf("?") == -1)) ? "?" : "&") + "varpot=") + stage.txtName.text) + potato.getURLElements());
}
private function processMainMenu(_arg1:Object){
iElapsedTimePot = (iElapsedTimePot + _arg1.time);
if (iElapsedTimePot >= 5000){
if (stage.mcPotato.totalFrames == stage.mcPotato.currentFrame){
stage.mcPotato.gotoAndStop(1);
} else {
stage.mcPotato.nextFrame();
};
iElapsedTimePot = 0;
};
}
public function dispatchReward(){
try {
return (stMachine.receiveEvent(EVENT_GO_TO_REWARD));
} catch(e:Error) {
};
}
private function stopSendToFriend():void{
stage.txtName.removeEventListener(Event.CHANGE, onEventChangeName, false);
stage.txtName.removeEventListener(MouseEvent.CLICK, onEventClickName, false);
stage.txtName.removeEventListener(FocusEvent.FOCUS_OUT, onEventFocusOutName, false);
stage.txtLink.removeEventListener(MouseEvent.CLICK, onEventClickName, false);
deleteButton("playAgain");
deleteButton("sound");
deleteButton("music");
deleteButton("copy");
}
private function onClickSpil(_arg1:MouseEvent):void{
SpilURLNavigator.changePage("http://www.gameportal.net/", "_blank");
}
private function stopReward():void{
deleteButton("playAgain");
deleteButton("sendToFriend");
deleteButton("sound");
deleteButton("music");
}
public function dispatchMainMenu(){
try {
return (stMachine.receiveEvent(EVENT_GO_TO_MENU));
} catch(e:Error) {
};
}
private function onEventPlay(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
dispatchMainMenu();
break;
case SpilEvent.EVENT_INIT:
break;
case SpilEvent.EVENT_MOUSEOUT:
break;
case SpilEvent.EVENT_MOUSEOVER:
break;
};
}
private function onEventPlayAgain(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
dispatchGame();
break;
case SpilEvent.EVENT_INIT:
break;
case SpilEvent.EVENT_MOUSEOUT:
break;
case SpilEvent.EVENT_MOUSEOVER:
break;
};
}
private function onRewardLoadFrame(){
SpilMovieClip.addLabelScript(stage, "reward", null);
SpilMovieClip.addLabelScript(stage, "finishReward", onFinishRewardLoadFrame);
stage.mcLogo.gotoAndStop(Global.getInstance().localization_branding_nr);
stage.mcLogo.addEventListener(MouseEvent.CLICK, onClickLogo);
SpilMovieClip.setMouseEnabled(stage.mcTvEffect, false);
stage.txtLive.text = Global.getInstance().xmlLocalization.reward.live;
news = new PotatoNews(potato.getNews(), stage.txtNews1, stage.txtNews2);
buttons["playAgain"] = new SpilTextButton(stage.mcBtnPlayAgain, Global.getInstance().xmlLocalization.reward.btnplayagain, onEventPlayAgain);
buttons["sendToFriend"] = new SpilTextButton(stage.mcBtnSendToFriend, Global.getInstance().xmlLocalization.reward.btnsendtofriend, onEventSendToFriend);
buttons["sound"] = new SpilSwitchButton(stage.btnSound, onEventFX);
if (SpilSoundManager.getInstance().getSFXVolume() == 0){
buttons["sound"].off();
};
buttons["music"] = new SpilSwitchButton(stage.btnMusic, onEventMusic);
if (SpilSoundManager.getInstance().getMusicVolume() == 0){
buttons["music"].off();
};
setSFX();
SpilButton(buttons["playAgain"]).setFxClick(arSFX["play"]);
}
private function stopMainMenu(){
sndAmbient2.stop();
deleteButton("startgame");
deleteButton("moregames");
deleteButton("quality");
deleteButton("sound");
deleteButton("music");
}
private function onFriendLoadFrame(){
var _local1:String;
SpilMovieClip.addLabelScript(stage, "friend", null);
stage.stop();
stage.mcLogo.gotoAndStop(Global.getInstance().localization_branding_nr);
stage.mcLogo.addEventListener(MouseEvent.CLICK, onClickLogo);
SpilMovieClip.setMouseEnabled(stage.mcTvEffect, false);
potato = new Potato(stage.mcPotato);
dispachtElement(Element.TYPE_ACCESSORY, XMLElements.elements.accessories.accessory[arFriendData[2]]);
dispachtElement(Element.TYPE_EARS, XMLElements.elements.ears.ear[arFriendData[3]]);
dispachtElement(Element.TYPE_EYES, XMLElements.elements.eyes.eye[arFriendData[4]]);
dispachtElement(Element.TYPE_FEET, XMLElements.elements.feet.foot[arFriendData[5]]);
dispachtElement(Element.TYPE_HAIR, XMLElements.elements.hairs.hair[arFriendData[6]]);
dispachtElement(Element.TYPE_MOUTH, XMLElements.elements.mouths.mouth[arFriendData[7]]);
dispachtElement(Element.TYPE_NOSE, XMLElements.elements.noses.nose[arFriendData[8]]);
potato.disabledButton();
potato.animArms();
_local1 = Global.getInstance().xmlLocalization.friend.msg;
_local1 = SpilStringUtil.tagReplacer(_local1, "%PLAYER%", arFriendData[1]);
stage.txtName.text = _local1;
buttons["play"] = new SpilTextButton(stage.mcBtnPlay, Global.getInstance().xmlLocalization.friend.btnplay, onEventPlay);
buttons["sound"] = new SpilSwitchButton(stage.btnSound, onEventFX);
if (SpilSoundManager.getInstance().getSFXVolume() == 0){
buttons["sound"].off();
};
buttons["music"] = new SpilSwitchButton(stage.btnMusic, onEventMusic);
if (SpilSoundManager.getInstance().getMusicVolume() == 0){
buttons["music"].off();
};
setSFX();
SpilButton(buttons["play"]).setFxClick(arSFX["play"]);
}
private function onSendToFriendLoadFrame(){
SpilMovieClip.addLabelScript(stage, "sendToFriend", null);
stage.stop();
stage.mcLogo.gotoAndStop(Global.getInstance().localization_branding_nr);
stage.mcLogo.addEventListener(MouseEvent.CLICK, onClickLogo);
stage.mcTitle.mc1.txtText.text = Global.getInstance().xmlLocalization.sendtofriend.title;
stage.mcTitle.mc2.txtText.text = Global.getInstance().xmlLocalization.sendtofriend.title;
stage.txtHelp.text = Global.getInstance().xmlLocalization.sendtofriend.help;
stage.txtTitleName.text = Global.getInstance().xmlLocalization.sendtofriend.name;
stage.txtName.text = "<PLAYER>";
stage.txtName.restrict = Global.getInstance().xmlLocalization.sendtofriend.restrict;
stage.txtName.alwaysShowSelection = true;
stage.txtName.setSelection(0, stage.txtName.text.length);
stage.txtName.addEventListener(Event.CHANGE, onEventChangeName, false, 0, true);
stage.txtName.addEventListener(MouseEvent.CLICK, onEventClickName, false, 0, true);
stage.txtName.addEventListener(FocusEvent.FOCUS_OUT, onEventFocusOutName, false, 0, true);
stage.txtLink.addEventListener(MouseEvent.CLICK, onEventClickName, false, 0, true);
stage.txtTitleLink.text = Global.getInstance().xmlLocalization.sendtofriend.link;
onEventChangeName(null);
buttons["playAgain"] = new SpilTextButton(stage.mcBtnPlayAgain, Global.getInstance().xmlLocalization.reward.btnplayagain, onEventPlayAgain);
buttons["copy"] = new SpilTextButton(stage.mcBtnCopy, Global.getInstance().xmlLocalization.sendtofriend.btncopy, onEventCopy);
buttons["sound"] = new SpilSwitchButton(stage.btnSound, onEventFX);
if (SpilSoundManager.getInstance().getSFXVolume() == 0){
buttons["sound"].off();
};
buttons["music"] = new SpilSwitchButton(stage.btnMusic, onEventMusic);
if (SpilSoundManager.getInstance().getMusicVolume() == 0){
buttons["music"].off();
};
setSFX();
SpilButton(buttons["playAgain"]).setFxClick(arSFX["play"]);
}
private function processFriend(_arg1:Object):void{
}
public function process(_arg1:Object){
stMachine.process(_arg1);
}
private function onEventMusic(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_ON:
SpilSoundManager.getInstance().setMusicVolume(50);
break;
case SpilEvent.EVENT_OFF:
SpilSoundManager.getInstance().setMusicVolume(0);
break;
};
}
private function startGame(){
stage.gotoAndPlay("game");
SpilMovieClip.addLabelScript(stage, "game", onGameLoadFrame);
sndAmbient2.play();
sndAmbient1.stop();
sndAnthem.stop();
if (potato != null){
potato.release();
potato = null;
};
}
public function onEventClickName(_arg1:MouseEvent):void{
TextField(_arg1.target).setSelection(0, TextField(_arg1.target).text.length);
}
private function getParams():void{
var loc:*;
var strData:String;
var index:int;
var strParam:String;
var arParam:Array;
var i:uint;
try {
loc = ExternalInterface.call("window.location.href.toString");
} catch(e:Error) {
loc = null;
};
if (((((!((loc == null))) && (!((loc == ""))))) && ((loc.indexOf(".swf") == -1)))){
strData = String(loc);
index = strData.indexOf("varpot=");
if (index != -1){
arFriendData.push(null);
strParam = strData.substring((index + 7), strData.length).split(/&/)[0];
arParam = strParam.split(/-/);
i = 1;
while (i < arParam.length) {
arParam[i] = uint(arParam[i]);
if ((((arParam[i] < 0)) || ((arParam[i] > 6)))){
arParam[i] = uint((Math.random() * 7));
};
i = (i + 1);
};
arFriendData = arFriendData.concat(arParam);
} else {
arFriendData.push(null);
};
};
}
private function processReward(_arg1:Object):void{
if (news != null){
news.process(_arg1);
};
}
}
}//package classes.manager
Section 12 (381 B)
//btn_big_69 (potato_president_agame_com_fla.btn_big_69)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class btn_big_69 extends MovieClip {
public var out:MovieClip;
public var disabled:MovieClip;
public var down:MovieClip;
public var btnHitArea:SimpleButton;
public var over:MovieClip;
}
}//package potato_president_agame_com_fla
Section 13 (336 B)
//btn_big_disabled_70 (potato_president_agame_com_fla.btn_big_disabled_70)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_big_disabled_70 extends MovieClip {
public var mcMask:MovieClip;
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 14 (293 B)
//btn_big_down_74 (potato_president_agame_com_fla.btn_big_down_74)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_big_down_74 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 15 (290 B)
//btn_big_out_72 (potato_president_agame_com_fla.btn_big_out_72)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_big_out_72 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 16 (293 B)
//btn_big_over_73 (potato_president_agame_com_fla.btn_big_over_73)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_big_over_73 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 17 (357 B)
//btn_litle_120 (potato_president_agame_com_fla.btn_litle_120)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class btn_litle_120 extends MovieClip {
public var out:MovieClip;
public var down:MovieClip;
public var btnHitArea:SimpleButton;
public var over:MovieClip;
}
}//package potato_president_agame_com_fla
Section 18 (302 B)
//btn_litle_down_123 (potato_president_agame_com_fla.btn_litle_down_123)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_litle_down_123 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 19 (299 B)
//btn_litle_out_121 (potato_president_agame_com_fla.btn_litle_out_121)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_litle_out_121 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 20 (302 B)
//btn_litle_over_122 (potato_president_agame_com_fla.btn_litle_over_122)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_litle_over_122 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 21 (506 B)
//btn_music_86 (potato_president_agame_com_fla.btn_music_86)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class btn_music_86 extends MovieClip {
public var out:MovieClip;
public var down:MovieClip;
public var btnHitArea:SimpleButton;
public var over:MovieClip;
public function btn_music_86(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package potato_president_agame_com_fla
Section 22 (357 B)
//btn_normal_76 (potato_president_agame_com_fla.btn_normal_76)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class btn_normal_76 extends MovieClip {
public var out:MovieClip;
public var down:MovieClip;
public var btnHitArea:SimpleButton;
public var over:MovieClip;
}
}//package potato_president_agame_com_fla
Section 23 (302 B)
//btn_normal_down_79 (potato_president_agame_com_fla.btn_normal_down_79)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_normal_down_79 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 24 (299 B)
//btn_normal_out_77 (potato_president_agame_com_fla.btn_normal_out_77)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_normal_out_77 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 25 (302 B)
//btn_normal_over_78 (potato_president_agame_com_fla.btn_normal_over_78)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_normal_over_78 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 26 (357 B)
//btn_short_114 (potato_president_agame_com_fla.btn_short_114)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class btn_short_114 extends MovieClip {
public var out:MovieClip;
public var down:MovieClip;
public var btnHitArea:SimpleButton;
public var over:MovieClip;
}
}//package potato_president_agame_com_fla
Section 27 (302 B)
//btn_short_down_117 (potato_president_agame_com_fla.btn_short_down_117)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_short_down_117 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 28 (299 B)
//btn_short_out_115 (potato_president_agame_com_fla.btn_short_out_115)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_short_out_115 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 29 (302 B)
//btn_short_over_116 (potato_president_agame_com_fla.btn_short_over_116)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_short_over_116 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 30 (506 B)
//btn_sound_80 (potato_president_agame_com_fla.btn_sound_80)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class btn_sound_80 extends MovieClip {
public var out:MovieClip;
public var down:MovieClip;
public var btnHitArea:SimpleButton;
public var over:MovieClip;
public function btn_sound_80(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package potato_president_agame_com_fla
Section 31 (354 B)
//cursor_splash_190 (potato_president_agame_com_fla.cursor_splash_190)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class cursor_splash_190 extends MovieClip {
public function cursor_splash_190(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package potato_president_agame_com_fla
Section 32 (350 B)
//mcArmLeftGame_97 (potato_president_agame_com_fla.mcArmLeftGame_97)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class mcArmLeftGame_97 extends MovieClip {
public function mcArmLeftGame_97(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package potato_president_agame_com_fla
Section 33 (354 B)
//mcArmRightGame_98 (potato_president_agame_com_fla.mcArmRightGame_98)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class mcArmRightGame_98 extends MovieClip {
public function mcArmRightGame_98(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package potato_president_agame_com_fla
Section 34 (467 B)
//mcBtnElements_109 (potato_president_agame_com_fla.mcBtnElements_109)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class mcBtnElements_109 extends MovieClip {
public var out:MovieClip;
public var disabled:MovieClip;
public var down:MovieClip;
public var selected:MovieClip;
public var mcDummy:MovieClip;
public var btnHitArea:SimpleButton;
public var over:MovieClip;
}
}//package potato_president_agame_com_fla
Section 35 (866 B)
//mcBtnTab_100 (potato_president_agame_com_fla.mcBtnTab_100)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class mcBtnTab_100 extends MovieClip {
public var mcBtnEars:MovieClip;
public var mcBtnMouths:MovieClip;
public var mcBtnAccessories:MovieClip;
public var mcBtnEyes:MovieClip;
public var mcBtnHairs:MovieClip;
public var mcBtnNoses:MovieClip;
public var mcBtnFeet:MovieClip;
public function mcBtnTab_100(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
function frame7(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
function frame5(){
stop();
}
}
}//package potato_president_agame_com_fla
Section 36 (286 B)
//mcBtnTabSelect_107 (potato_president_agame_com_fla.mcBtnTabSelect_107)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class mcBtnTabSelect_107 extends MovieClip {
public var btnHitArea:SimpleButton;
}
}//package potato_president_agame_com_fla
Section 37 (298 B)
//mcHowToPlay_118 (potato_president_agame_com_fla.mcHowToPlay_118)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mcHowToPlay_118 extends MovieClip {
public var txtHowToPlay:TextField;
}
}//package potato_president_agame_com_fla
Section 38 (519 B)
//mcInterfaceElements_99 (potato_president_agame_com_fla.mcInterfaceElements_99)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class mcInterfaceElements_99 extends MovieClip {
public var mcTabs:MovieClip;
public var mcBtnElement1:MovieClip;
public var mcBtnElement3:MovieClip;
public var mcBtnElement4:MovieClip;
public var mcBtnElement2:MovieClip;
public var mcBtnElement5:MovieClip;
public var mcBtnElement6:MovieClip;
}
}//package potato_president_agame_com_fla
Section 39 (644 B)
//mcPotato_93 (potato_president_agame_com_fla.mcPotato_93)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class mcPotato_93 extends MovieClip {
public var mcOut:MovieClip;
public var mcArmLeft:MovieClip;
public var accessory:MovieClip;
public var accessoryBack:MovieClip;
public var earsAnimal:MovieClip;
public var earsHuman:MovieClip;
public var eyes:MovieClip;
public var mcOver:MovieClip;
public var feet:MovieClip;
public var mouth:MovieClip;
public var mcArmRight:MovieClip;
public var nose:MovieClip;
public var hair:MovieClip;
}
}//package potato_president_agame_com_fla
Section 40 (581 B)
//mcPotatoMenu_24 (potato_president_agame_com_fla.mcPotatoMenu_24)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class mcPotatoMenu_24 extends MovieClip {
public function mcPotatoMenu_24(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package potato_president_agame_com_fla
Section 41 (317 B)
//mcTxtSendToFriends1_126 (potato_president_agame_com_fla.mcTxtSendToFriends1_126)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mcTxtSendToFriends1_126 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 42 (317 B)
//mcTxtSendToFriends2_125 (potato_president_agame_com_fla.mcTxtSendToFriends2_125)
package potato_president_agame_com_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mcTxtSendToFriends2_125 extends MovieClip {
public var txtText:TextField;
}
}//package potato_president_agame_com_fla
Section 43 (319 B)
//send_to_friends_top_124 (potato_president_agame_com_fla.send_to_friends_top_124)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class send_to_friends_top_124 extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
}
}//package potato_president_agame_com_fla
Section 44 (252 B)
//Symbol1_2 (potato_president_agame_com_fla.Symbol1_2)
package potato_president_agame_com_fla {
import flash.display.*;
public dynamic class Symbol1_2 extends MovieClip {
public var mcMask:MovieClip;
}
}//package potato_president_agame_com_fla
Section 45 (6.26 KiB) ● ●
//SpilButton (spil.Button.SpilButton)
package spil.Button {
import spil.Sound.*;
import flash.display.*;
import spil.Events.*;
import flash.events.*;
public class SpilButton {
protected var hitArea:Object;
private var fxOver:SpilSound;
private var fxClick:SpilSound;
protected var movieClip:MovieClip;
private var fxOut:SpilSound;
public var onEvent:Function;
public function SpilButton(_arg1:MovieClip, _arg2:Function){
fxOver = null;
movieClip = _arg1;
updateFields();
onEvent = _arg2;
registerEvents();
if (onEvent != null){
onEvent(new SpilEvent(SpilEvent.EVENT_INIT, movieClip));
//unresolved jump
};
}
public function hide(){
this.movieClip.visible = false;
}
public function enable():void{
hitArea.mouseEnabled = true;
if (movieClip.disabled != undefined){
movieClip.disabled.visible = false;
if (movieClip.out != undefined){
movieClip.out.visible = true;
};
if (movieClip.over != undefined){
movieClip.over.visible = false;
};
if (movieClip.down != undefined){
movieClip.down.visible = false;
};
};
if (onEvent != null){
onEvent(new SpilEvent(SpilEvent.EVENT_ENABLE, movieClip));
};
}
public function setFxOver(_arg1:SpilSound):void{
this.fxOver = _arg1;
}
protected function onMCRollOver(_arg1:MouseEvent):void{
if ((((hitArea == null)) || ((hitArea.mouseEnabled == true)))){
if (fxOver != null){
fxOver.play();
};
if (movieClip.out != undefined){
movieClip.out.visible = false;
};
if (movieClip.over != undefined){
movieClip.over.visible = true;
};
if (movieClip.down != undefined){
movieClip.down.visible = false;
};
if (onEvent != null){
onEvent(new SpilEvent(SpilEvent.EVENT_MOUSEOVER, movieClip));
};
};
_arg1.updateAfterEvent();
}
protected function onMCClick(_arg1:MouseEvent):void{
if ((((hitArea == null)) || ((hitArea.mouseEnabled == true)))){
if (fxClick != null){
fxClick.play();
};
if (movieClip.out != undefined){
movieClip.out.visible = false;
};
if (movieClip.over != undefined){
movieClip.over.visible = true;
};
if (onEvent != null){
onEvent(new SpilEvent(SpilEvent.EVENT_MOUSECLICK, movieClip));
};
_arg1.updateAfterEvent();
};
}
public function setFxClick(_arg1:SpilSound):void{
this.fxClick = _arg1;
}
public function setFxOut(_arg1:SpilSound):void{
this.fxOut = _arg1;
}
protected function registerEvents():void{
hitArea.addEventListener(MouseEvent.ROLL_OVER, onMCRollOver, false, 0, true);
hitArea.addEventListener(MouseEvent.ROLL_OUT, onMCRollOut, false, 0, true);
hitArea.addEventListener(MouseEvent.CLICK, onMCClick, false, 0, true);
hitArea.addEventListener(MouseEvent.MOUSE_DOWN, onMCDown, false, 0, true);
hitArea.addEventListener(MouseEvent.MOUSE_UP, onMCUp, false, 0, true);
}
protected function updateFields():void{
if (movieClip.out != undefined){
movieClip.out.visible = true;
//unresolved jump
};
if (movieClip.over != undefined){
movieClip.over.visible = false;
//unresolved jump
};
if (movieClip.down != undefined){
movieClip.down.visible = false;
//unresolved jump
};
if (movieClip.disabled != undefined){
movieClip.disabled.visible = false;
//unresolved jump
};
if (movieClip.btnHitArea != null){
hitArea = movieClip.btnHitArea;
} else {
hitArea = movieClip;
};
}
protected function onMCRollOut(_arg1:MouseEvent):void{
if ((((hitArea == null)) || ((hitArea.mouseEnabled == true)))){
if (fxOut != null){
fxOut.play();
};
if (movieClip.out != undefined){
movieClip.out.visible = true;
};
if (movieClip.over != undefined){
movieClip.over.visible = false;
};
if (movieClip.down != undefined){
movieClip.down.visible = false;
};
if (onEvent != null){
onEvent(new SpilEvent(SpilEvent.EVENT_MOUSEOUT, movieClip));
};
};
_arg1.updateAfterEvent();
}
public function disable():void{
hitArea.mouseEnabled = false;
if (movieClip.disabled != undefined){
movieClip.disabled.visible = true;
if (movieClip.out != undefined){
movieClip.out.visible = false;
};
} else {
if (movieClip.out != undefined){
movieClip.out.visible = true;
};
};
if (movieClip.over != undefined){
movieClip.over.visible = false;
};
if (movieClip.down != undefined){
movieClip.down.visible = false;
};
if (onEvent != null){
onEvent(new SpilEvent(SpilEvent.EVENT_DISABLE, movieClip));
};
}
protected function onMCUp(_arg1:MouseEvent):void{
if ((((hitArea == null)) || ((hitArea.mouseEnabled == true)))){
if (movieClip.down != undefined){
if (((((movieClip.down is MovieClip) == true)) && ((movieClip.down.currentFrame < 2)))){
movieClip.down.visible = false;
};
if (movieClip.out != undefined){
movieClip.out.visible = false;
};
if (movieClip.over != undefined){
movieClip.over.visible = true;
};
};
if (onEvent != null){
onEvent(new SpilEvent(SpilEvent.EVENT_MOUSEUP, movieClip));
};
};
_arg1.updateAfterEvent();
}
public function unregisterEvents():void{
hitArea.removeEventListener(MouseEvent.ROLL_OVER, onMCRollOver, false);
hitArea.removeEventListener(MouseEvent.ROLL_OUT, onMCRollOut, false);
hitArea.removeEventListener(MouseEvent.CLICK, onMCClick, false);
hitArea.removeEventListener(MouseEvent.MOUSE_DOWN, onMCDown, false);
hitArea.removeEventListener(MouseEvent.MOUSE_UP, onMCUp, false);
}
protected function onMCDown(_arg1:MouseEvent):void{
if ((((hitArea == null)) || ((hitArea.mouseEnabled == true)))){
if (movieClip.down != undefined){
if (movieClip.out != undefined){
movieClip.out.visible = false;
};
if (movieClip.over != undefined){
movieClip.over.visible = false;
};
movieClip.down.visible = true;
if (((((movieClip.down is MovieClip) == true)) && ((movieClip.down.totalFrames > 1)))){
movieClip.down.gotoAndPlay(2);
};
};
if (onEvent != null){
onEvent(new SpilEvent(SpilEvent.EVENT_MOUSEDOWN, movieClip));
};
};
_arg1.updateAfterEvent();
}
public function show(){
this.movieClip.visible = true;
}
}
}//package spil.Button
Section 46 (2.42 KiB) ●
//SpilSwitchButton (spil.Button.SpilSwitchButton)
package spil.Button {
import flash.display.*;
import spil.Events.*;
import spil.Utils.*;
public class SpilSwitchButton extends SpilButton {
private var eventHandler:Function;
private var over:Boolean;
public function SpilSwitchButton(_arg1:MovieClip, _arg2:Function){
this.over = false;
this.eventHandler = _arg2;
super(_arg1, onBtnEvent);
}
private function update(){
if (movieClip.out != undefined){
if (over){
movieClip.out.visible = false;
} else {
movieClip.out.visible = true;
};
//unresolved jump
};
if (movieClip.over != undefined){
if (over){
movieClip.over.visible = true;
} else {
movieClip.over.visible = false;
};
//unresolved jump
};
if (movieClip.down != undefined){
movieClip.down.visible = false;
//unresolved jump
};
if (movieClip.disabled != undefined){
movieClip.disabled.visible = false;
//unresolved jump
};
}
private function onLoadFrame(){
var _local1:int;
movieClip.stop();
update();
SpilMovieClip.addLabelScript(movieClip, "off", null);
SpilMovieClip.addLabelScript(movieClip, "on", null);
_local1 = SpilMovieClip.getIndexLabel(movieClip, "on");
if (_local1 == movieClip.currentFrame){
if (eventHandler != null){
eventHandler(new SpilEvent(SpilEvent.EVENT_ON, movieClip));
};
} else {
if (eventHandler != null){
eventHandler(new SpilEvent(SpilEvent.EVENT_OFF, movieClip));
};
};
}
protected function onBtnEvent(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
if (movieClip.currentFrame == 1){
off();
} else {
on();
};
break;
case SpilEvent.EVENT_MOUSEOUT:
over = false;
if (eventHandler != null){
eventHandler(new SpilEvent(SpilEvent.EVENT_MOUSEOUT, movieClip));
};
break;
case SpilEvent.EVENT_MOUSEOVER:
over = true;
if (eventHandler != null){
eventHandler(new SpilEvent(SpilEvent.EVENT_MOUSEOVER, movieClip));
};
break;
default:
if (eventHandler != null){
eventHandler(_arg1);
};
break;
};
}
public function on(){
movieClip.gotoAndStop("on");
SpilMovieClip.addLabelScript(movieClip, "on", onLoadFrame);
}
public function off(){
movieClip.gotoAndStop("off");
SpilMovieClip.addLabelScript(movieClip, "off", onLoadFrame);
}
}
}//package spil.Button
Section 47 (2.79 KiB) ●
//SpilTextButton (spil.Button.SpilTextButton)
package spil.Button {
import flash.display.*;
import spil.Events.*;
import flash.text.*;
public class SpilTextButton extends SpilButton {
private var textValue:String;
private var eventHandler:Function;
private var vertAlignInitY:Number;
private var vertAlignFinishY:Number;
public function SpilTextButton(_arg1:MovieClip, _arg2:String, _arg3:Function){
this.textValue = _arg2;
this.eventHandler = _arg3;
this.vertAlignInitY = -1;
this.vertAlignFinishY = -1;
super(_arg1, onBtnEvent);
}
private function updateVertAlign(){
if ((((this.vertAlignFinishY == -1)) || ((this.vertAlignInitY == -1)))){
return;
};
if (movieClip.out != undefined){
updateVertAlignMovieClip(movieClip.out);
};
if (movieClip.over != undefined){
updateVertAlignMovieClip(movieClip.over);
};
if (movieClip.down != undefined){
updateVertAlignMovieClip(movieClip.down);
};
if (movieClip.disable != undefined){
updateVertAlignMovieClip(movieClip.disable);
};
}
public function setVertAlign(_arg1:Number, _arg2:Number){
this.vertAlignInitY = _arg1;
this.vertAlignFinishY = _arg2;
if ((((this.vertAlignFinishY == -1)) || ((this.vertAlignInitY == -1)))){
return;
};
updateVertAlign();
}
protected function onBtnEvent(_arg1:SpilEvent){
switch (_arg1.event){
case SpilEvent.EVENT_MOUSECLICK:
break;
case SpilEvent.EVENT_INIT:
onEventInit();
break;
case SpilEvent.EVENT_MOUSEOUT:
break;
case SpilEvent.EVENT_MOUSEOVER:
break;
};
if (eventHandler != null){
eventHandler(_arg1);
};
}
private function setTexts(){
if (movieClip.out != undefined){
movieClip.out.txtText.text = textValue;
};
if (movieClip.over != undefined){
movieClip.over.txtText.text = textValue;
};
if (movieClip.down != undefined){
movieClip.down.txtText.text = textValue;
};
if (movieClip.disabled != undefined){
movieClip.disabled.txtText.text = textValue;
};
updateVertAlign();
}
private function updateVertAlignMovieClip(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
if ((this.vertAlignFinishY - this.vertAlignInitY) < _local2){
_arg1.txtText.y = this.vertAlignInitY;
} else {
_local2 = _arg1.txtText.textHeight;
_local3 = ((this.vertAlignFinishY - this.vertAlignInitY) - _local2);
_local3 = (_local3 / 2);
_local3 = Math.floor(_local3);
_arg1.txtText.y = (this.vertAlignInitY + _local3);
if (_arg1.txtText.y < this.vertAlignInitY){
_arg1.txtText.y = this.vertAlignInitY;
};
};
}
public function setText(_arg1:String){
this.textValue = _arg1;
setTexts();
}
protected function onEventInit(){
if (textValue != null){
setTexts();
};
}
}
}//package spil.Button
Section 48 (3.09 KiB) ●
//SpilEvent (spil.Events.SpilEvent)
package spil.Events {
public class SpilEvent {
public var transport:Object;
public var event:String;
public static const EVENT_PROFILE_LOAD:String = "EVENT_PROFILE_LOAD";
public static const EVENT_DISABLE:String = "EVENT_DISABLE";
public static const EVENT_OPTION_MUSICDECREASE:String = "EVENT_OPTION_MUSICDECREASE";
public static const EVENT_PROFILE_BACK:String = "EVENT_PROFILE_BACK";
public static const EVENT_OFF:String = "EVENT_OFF";
public static const EVENT_PROFILE_DELETE:String = "EVENT_PROFILE_DELETE";
public static const EVENT_OPTION_WINDOWMODE:String = "EVENT_OPTION_WINDOWMODE";
public static const EVENT_DIALOG_NO:String = "EVENT_DIALOG_NO";
public static const EVENT_MOUSEUP:String = "EVENT_MOUSEUP";
public static const EVENT_OPTION_SFXDECREASE:String = "EVENT_OPTION_SFXDECREASE";
public static const EVENT_OPTION_QUALITYDECREASE:String = "EVENT_OPTION_QUALITYDECREASE";
public static const EVENT_PROFILE_DUPLICATEOK:String = "EVENT_PROFILE_DUPLICATEOK";
public static const EVENT_STOP:String = "EVENT_STOP";
public static const EVENT_OPTION_MUSICINCREASE:String = "EVENT_OPTION_MUSICINCREASE";
public static const EVENT_MOUSEOUT:String = "EVENT_MOUSEOUT";
public static const EVENT_INIT:String = "EVENT_INIT";
public static const EVENT_LPAJSTART:String = "EVENT_LPAJSTART";
public static const EVENT_LPAJEND:String = "EVENT_LPAJEND";
public static const EVENT_MOUSEDOWN:String = "EVENT_MOUSEDOWN";
public static const EVENT_OPTION_QUALITYINCREASE:String = "EVENT_OPTION_QUALITYINCREASE";
public static const EVENT_FADEOUTEND:String = "EVENT_FADEOUTEND";
public static const EVENT_PROFILE_CONFIRMDELETEYES:String = "EVENT_PROFILE_CONFIRMDELETEYES";
public static const EVENT_OPTION_SFXINCREASE:String = "EVENT_OPTION_SFXINCREASE";
public static const EVENT_FADEINBEGIN:String = "EVENT_FADEINBEGIN";
public static const EVENT_PROFILE_DUPLICATE:String = "EVENT_PROFILE_DUPLICATE";
public static const EVENT_OPTION_SAVE:String = "EVENT_OPTION_SAVE";
public static const EVENT_DIALOG_YES:String = "EVENT_DIALOG_YES";
public static const EVENT_MOUSEMOVE:String = "EVENT_MOUSEMOVE";
public static const EVENT_ON:String = "EVENT_ON";
public static const EVENT_MOUSEOVER:String = "EVENT_MOUSEOVER";
public static const EVENT_PROFILE_CONFIRMDELETENO:String = "EVENT_PROFILE_CONFIRMDELETENO";
public static const EVENT_DIALOG_OK:String = "EVENT_DIALOG_OK";
public static const EVENT_PROFILE_CREATE:String = "EVENT_PROFILE_CREATE";
public static const EVENT_MOUSECLICK:String = "EVENT_MOUSECLICK";
public static const EVENT_FADEOUTBEGIN:String = "EVENT_FADEOUTBEGIN";
public static const EVENT_ENABLE:String = "EVENT_ENABLE";
public static const EVENT_LPAJAPEX:String = "EVENT_LPAJAPEX";
public static const EVENT_FADEINEND:String = "EVENT_FADEINEND";
public static const EVENT_PROFILE_INPUT:String = "EVENT_PROFILE_INPUT";
public static const EVENT_OPTION_CANCEL:String = "EVENT_OPTION_CANCEL";
public function SpilEvent(_arg1:String, _arg2:Object){
this.event = _arg1;
this.transport = _arg2;
}
}
}//package spil.Events
Section 49 (516 B)
//SpilStateMachineEvent (spil.Events.SpilStateMachineEvent)
package spil.Events {
public class SpilStateMachineEvent {
private var objParam:Object;
private var strName:String;
public function SpilStateMachineEvent(_arg1:String, _arg2:Object){
this.strName = _arg1;
this.objParam = _arg2;
}
function getName():String{
return (this.strName);
}
function destroy(){
delete ??getglobalscope
[this];
}
function getParam():Object{
return (this.objParam);
}
}
}//package spil.Events
Section 50 (2.38 KiB) ●
//SpilGlobal (spil.Manager.SpilGlobal)
package spil.Manager {
import flash.net.*;
import spil.Mouse.*;
public class SpilGlobal {
protected var m_SpilGroupUrl:Array;
protected var hostingdomain:String;
protected var m_localization_url2:String;
protected var m_main:SpilMain;
protected var m_mouse:SpilMouse;
protected var m_localization_url:String;
protected var localConnection:LocalConnection;
protected var m_localization_branding_nr:Number;
protected var m_cookie:SharedObject;
protected var m_localization_language_nr:Number;
protected var m_xmlLocalization:XML;
protected static var instance:SpilGlobal = null;
public function SpilGlobal(){
m_main = null;
m_mouse = null;
m_localization_language_nr = 0;
m_localization_branding_nr = 0;
m_localization_url = "";
m_localization_url2 = "";
m_xmlLocalization = null;
m_cookie = null;
localConnection = new LocalConnection();
m_SpilGroupUrl = new Array();
hostingdomain = localConnection.domain;
}
public function set cookie(_arg1:SharedObject){
m_cookie = _arg1;
}
public function get localization_url():String{
if (m_localization_url2 == ""){
return (m_localization_url);
};
if (isSpilGroup() == true){
return (m_localization_url2);
};
return ((m_localization_url + hostingdomain));
}
public function set localization_language_nr(_arg1:Number){
m_localization_language_nr = _arg1;
}
public function get spilGroupUrl():Array{
return (m_SpilGroupUrl);
}
public function isSpilGroup():Boolean{
var _local1:int;
_local1 = 0;
while (_local1 < m_SpilGroupUrl.length) {
if (localConnection.domain == m_SpilGroupUrl[_local1]){
return (true);
};
_local1++;
};
return (false);
}
public function get xmlLocalization():XML{
return (m_xmlLocalization);
}
public function set localization_url(_arg1:String){
m_localization_url = _arg1;
}
public function set localization_branding_nr(_arg1:Number){
m_localization_branding_nr = _arg1;
}
public function set localization_url2(_arg1:String){
m_localization_url2 = _arg1;
}
public function get localization_branding_nr():Number{
return (m_localization_branding_nr);
}
public function get cookie():SharedObject{
return (m_cookie);
}
public function get localization_language_nr():Number{
return (m_localization_language_nr);
}
}
}//package spil.Manager
Section 51 (1.31 KiB) ●
//SpilMain (spil.Manager.SpilMain)
package spil.Manager {
import spil.Sound.*;
import flash.display.*;
import flash.events.*;
import flash.system.*;
import flash.utils.*;
public class SpilMain extends MovieClip {
protected var nLastTime:Number;
protected var elapsed:Number;
protected var fps:Number;
protected var objTransport:Object;
public function SpilMain(){
this.stop();
stage.quality = StageQuality.HIGH;
stage.showDefaultContextMenu = false;
stage.addEventListener(Event.ENTER_FRAME, onUpdateFrame);
System.useCodePage = true;
objTransport = new Object();
objTransport.time = 0;
objTransport.fps = 0;
nLastTime = getTimer();
elapsed = 0;
fps = 1;
}
public function getAsset(_arg1:String):Class{
var pClass:Class;
var strName = _arg1;
try {
pClass = (getDefinitionByName(strName) as Class);
} catch(e:Error) {
return (null);
};
return (pClass);
}
protected function onUpdateFrame(_arg1:Event):void{
var _local2:Number;
_local2 = getTimer();
objTransport.time = (_local2 - nLastTime);
nLastTime = _local2;
elapsed = (elapsed + objTransport.time);
if (elapsed > 1000){
objTransport.fps = fps;
fps = 1;
elapsed = 0;
};
fps++;
SpilSoundManager.getInstance().process(objTransport);
}
}
}//package spil.Manager
Section 52 (1.97 KiB) ●
//SpilDragMouse (spil.Mouse.SpilDragMouse)
package spil.Mouse {
import flash.display.*;
import spil.Utils.*;
public class SpilDragMouse extends SpilMouse {
protected var dragItens:Array;
public function SpilDragMouse(_arg1:MovieClip){
super(_arg1);
dragItens = new Array();
}
public function isEmpty():Boolean{
return ((dragItens.length == 0));
}
public function containItem(_arg1:String):Boolean{
var _local2:String;
if (dragItens.length > 0){
for (_local2 in dragItens) {
if ((((_local2 == _arg1)) && (!((dragItens[_local2] == null))))){
return (true);
};
};
};
return (false);
}
public function getQtdDragItems():Number{
return (dragItens.length);
}
public function removeDragItem(_arg1:String):MovieClip{
var _local2:Object;
if (dragItens[_arg1] != null){
_local2 = dragItens[_arg1];
mcMouse.mcDummy.removeChild(_local2.mc);
dragItens[_arg1] = null;
dragItens.length--;
if (dragItens.length == 0){
mcMouse.mcDrag.visible = false;
mcMouse.mcPointer.visible = true;
};
SpilMovieClip.setMouseEnabled(_local2.mc, true);
return (_local2.mc);
};
return (null);
}
override public function register(){
super.register();
mcMouse.mcDrag.visible = false;
mcMouse.mcPointer.visible = true;
if ((((mcMouse.mcDummy == null)) || ((mcMouse.mcDummy == undefined)))){
};
}
public function getDragItem(_arg1:String):Object{
if ((((dragItens.length == 0)) || ((dragItens[_arg1] == null)))){
return (null);
};
return (dragItens[_arg1].drag);
}
public function addDragItem(_arg1:String, _arg2:MovieClip, _arg3:Object){
var _local4:Object;
_local4 = new Object();
_local4.mc = _arg2;
_local4.drag = _arg3;
mcMouse.mcDummy.addChild(_arg2);
dragItens[_arg1] = _local4;
dragItens.length++;
mcMouse.mcDrag.visible = true;
mcMouse.mcPointer.visible = false;
SpilMovieClip.setMouseEnabled(mcMouse, false);
}
}
}//package spil.Mouse
Section 53 (4.11 KiB) ●
//SpilMouse (spil.Mouse.SpilMouse)
package spil.Mouse {
import spil.Sound.*;
import flash.display.*;
import spil.Events.*;
import flash.events.*;
import spil.Utils.*;
import flash.geom.*;
import flash.ui.*;
import flash.utils.*;
public class SpilMouse {
private var bRegistered:Boolean;
private var scene:MovieClip;
private var pCoord:Point;
private var arEvents:Array;
protected var mcMouse:MovieClip;
private var fxMouseDown:SpilSound;
public function SpilMouse(_arg1:MovieClip){
scene = _arg1;
bRegistered = false;
arEvents = new Array();
arEvents[SpilEvent.EVENT_MOUSEMOVE] = new Array();
pCoord = new Point(0, 0);
scene.stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true);
scene.stage.addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true);
scene.stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true);
}
private function dispatchEvent(_arg1:SpilEvent){
var _local2:Array;
var _local3:*;
_local2 = arEvents[_arg1.event];
for (_local3 in _local2) {
if (_local2[_local3](_arg1) == true){
break;
};
};
}
public function hide(){
this.mcMouse.visible = false;
}
public function registerEvent(_arg1:String, _arg2:Function):Boolean{
arEvents[_arg1].push(_arg2);
return (true);
}
protected function onMouseDown(_arg1:MouseEvent):void{
if (bRegistered){
if (this.fxMouseDown != null){
this.fxMouseDown.play();
};
};
_arg1.updateAfterEvent();
}
public function removeImage(_arg1:String, _arg2:String){
var _local3:MovieClip;
if ((((_arg2 == null)) || ((_arg2 == "")))){
_local3 = mcMouse;
} else {
_local3 = MovieClip(mcMouse.getChildByName(_arg2));
};
_local3.removeChild(_local3.getChildByName(_arg1));
}
public function showIcon(_arg1:String){
this.mcMouse.gotoAndStop(_arg1);
}
protected function onMouseClick(_arg1:MouseEvent):void{
if (bRegistered){
if (mcMouse.splash != null){
mcMouse.splash.gotoAndPlay(2);
};
};
_arg1.updateAfterEvent();
}
public function register(){
var _local1:Class;
if (bRegistered){
return;
};
Mouse.hide();
_local1 = (getDefinitionByName("mouseCursor") as Class);
mcMouse = new (_local1);
scene.stage.addChild(mcMouse);
SpilMovieClip.setMouseEnabled(mcMouse, false);
bRegistered = true;
}
public function getImage(_arg1:String, _arg2:String){
var _local3:MovieClip;
if ((((_arg2 == null)) || ((_arg2 == "")))){
_local3 = mcMouse;
} else {
_local3 = MovieClip(mcMouse.getChildByName(_arg2));
};
return (_local3);
}
public function attachImage(_arg1:String, _arg2:MovieClip, _arg3:String){
var mcTarget:MovieClip;
var p_frame = _arg1;
var p_mc = _arg2;
var p_target = _arg3;
mcMouse.gotoAndStop(p_frame);
SpilMovieClip.addLabelScript(mcMouse, p_frame, function (){
SpilMovieClip.addLabelScript(mcMouse, p_frame, null);
if ((((p_target == null)) || ((p_target == "")))){
mcTarget = mcMouse;
} else {
mcTarget = MovieClip(mcMouse.getChildByName(p_target));
};
mcTarget.addChild(p_mc);
SpilMovieClip.setMouseEnabled(mcTarget, false);
});
}
protected function onMouseMove(_arg1:MouseEvent):void{
if (bRegistered){
mcMouse.x = (pCoord.x = scene.stage.mouseX);
mcMouse.y = (pCoord.y = scene.stage.mouseY);
dispatchEvent(new SpilEvent(SpilEvent.EVENT_MOUSEMOVE, (pCoord as Object)));
};
_arg1.updateAfterEvent();
}
public function setFxMouseDown(_arg1:SpilSound){
this.fxMouseDown = _arg1;
}
public function unregister(){
if (!bRegistered){
return;
};
Mouse.show();
scene.mouseDummy.removeChild(DisplayObject(mcMouse));
bRegistered = false;
}
public function show(){
this.mcMouse.visible = true;
}
public function unregisterEvent(_arg1:String, _arg2:Function):Boolean{
var _local3:Array;
var _local4:Number;
_local3 = arEvents[_arg1];
_local4 = 0;
while (_local4 < _local3.length) {
if (_local3[_local4] == _arg2){
_local3.splice(_local4, 1);
return (true);
};
_local4++;
};
return (false);
}
}
}//package spil.Mouse
Section 54 (3.22 KiB) ●
//SpilSound (spil.Sound.SpilSound)
package spil.Sound {
import flash.media.*;
public class SpilSound {
private var iType:Number;
private var arSoundChannel:Array;
private var iTimesToPlay:Number;
private var iVolume:Number;
private var bLoop:Boolean;
private var pClass:Sound;
private var bPaused:Boolean;
private var pEventCallback:Function;
private var iFadeOutDuration:Number;
private var iFadeInDuration:Number;
public static const TYPE_MUSIC:Number = 0;
public static const TYPE_SFX:Number = 1;
public function SpilSound(_arg1:Class, _arg2:Number, _arg3:Function=null, _arg4:Boolean=false, _arg5:Number=0, _arg6:Number=0, _arg7:Number=1){
this.iVolume = 0;
this.iType = _arg2;
this.bLoop = _arg4;
this.iFadeInDuration = _arg5;
this.iFadeOutDuration = _arg6;
this.iTimesToPlay = _arg7;
this.pEventCallback = _arg3;
this.pClass = new (_arg1);
this.bPaused = SpilSoundManager.getInstance().isPaused();
arSoundChannel = new Array();
}
public function stop():Boolean{
var _local1:Number;
_local1 = 0;
while (_local1 < arSoundChannel.length) {
arSoundChannel[_local1].stop();
_local1++;
};
return (true);
}
public function pause():Boolean{
var _local1:Number;
bPaused = true;
_local1 = 0;
while (_local1 < arSoundChannel.length) {
arSoundChannel[_local1].pause();
_local1++;
};
return (true);
}
public function setVolume(_arg1:Number){
var _local2:Number;
iVolume = _arg1;
_local2 = 0;
while (_local2 < arSoundChannel.length) {
arSoundChannel[_local2].setVolume(_arg1);
_local2++;
};
}
public function execFadeOut(_arg1:Number){
var _local2:*;
for (_local2 in arSoundChannel) {
arSoundChannel[_local2].execFadeOut(_arg1);
};
}
public function setFadeOutDuration(_arg1:Number){
var _local2:*;
for (_local2 in arSoundChannel) {
arSoundChannel[_local2].setFadeOutDuration(_arg1);
};
}
public function resume():Boolean{
var _local1:Number;
bPaused = false;
_local1 = 0;
while (_local1 < arSoundChannel.length) {
arSoundChannel[_local1].resume();
_local1++;
};
return (true);
}
public function process(_arg1:Object){
var _local2:*;
for (_local2 in arSoundChannel) {
arSoundChannel[_local2].process(_arg1);
if (arSoundChannel[_local2].getState() == SpilSoundChannel.ST_STOPPED){
arSoundChannel.splice(_local2, 1);
};
};
}
public function execFadeIn(_arg1:Number){
var _local2:*;
for (_local2 in arSoundChannel) {
arSoundChannel[_local2].execFadeIn(_arg1);
};
}
public function play():SpilSoundChannel{
var _local1:Number;
var _local2:SpilSoundChannel;
_local1 = arSoundChannel.length;
_local2 = new SpilSoundChannel(pClass, iType, pEventCallback, bLoop, iFadeInDuration, iFadeOutDuration, iTimesToPlay);
arSoundChannel.push(_local2);
if (bPaused == true){
_local2.pause();
};
_local2.setVolume(iVolume);
_local2.play();
return (_local2);
}
public function setFadeInDuration(_arg1:Number){
var _local2:*;
for (_local2 in arSoundChannel) {
arSoundChannel[_local2].setFadeInDuration(_arg1);
};
}
public function getType():Number{
return (iType);
}
}
}//package spil.Sound
Section 55 (9.15 KiB) ● ●
//SpilSoundChannel (spil.Sound.SpilSoundChannel)
package spil.Sound {
import spil.Events.*;
import flash.events.*;
import spil.StateMachine.*;
import flash.media.*;
public class SpilSoundChannel {
private var pSoundChannel:SoundChannel;
private var elapsedFadeTime:Number;
private var iCurrentVolume:Number;
private var iTimesToPlay:Number;
private var bLoop:Boolean;
private var iFakeFadeOutDuration:Number;
private var iPosition:Number;
private var stMachine:SpilStateMachine;
private var bPaused:Boolean;
private var iFadeOutDuration:Number;
private var iFadeInDuration:Number;
private var iType:Number;
private var bExecPlayInResume:Boolean;
private var iVolume:Number;
private var iFakeFadeInDuration:Number;
private var pEventCallback:Function;
private var pSound:Sound;
public static const EVENT_STOP:String = "EVENT_STOP";
public static const TYPE_MUSIC:Number = 0;
public static const ST_STOPPED:String = "ST_STOPPED";
public static const ST_PLAYING:String = "ST_PLAYING";
public static const TYPE_SFX:Number = 1;
public static const ST_FADINGOUT:String = "ST_FADINGOUT";
public static const EVENT_PLAY:String = "EVENT_PLAY";
public static const ST_FADINGIN:String = "ST_FADINGIN";
private static var iNumChannels:Number = 0;
private static var MAX_CHANNELS:Number = 32;
public function SpilSoundChannel(_arg1:Sound, _arg2:Number, _arg3:Function=null, _arg4:Boolean=false, _arg5:Number=0, _arg6:Number=0, _arg7:Number=1){
stMachine = new SpilStateMachine(null);
stMachine.createEvent(EVENT_PLAY, null);
stMachine.createEvent(EVENT_STOP, null);
stMachine.createState(ST_FADINGIN, false, this, startFadeIn, processFadeIn, null);
stMachine.createState(ST_PLAYING, false, this, null, processPlay, null);
stMachine.createState(ST_FADINGOUT, false, this, startFadeOut, processFadeOut, null);
stMachine.createState(ST_STOPPED, false, this, startStopped, null, null);
stMachine.createTransition(ST_STOPPED, EVENT_PLAY, ST_FADINGIN);
stMachine.createTransition(ST_FADINGIN, EVENT_STOP, ST_STOPPED);
stMachine.createTransition(ST_FADINGIN, EVENT_PLAY, ST_PLAYING);
stMachine.createTransition(ST_PLAYING, EVENT_STOP, ST_FADINGOUT);
stMachine.createTransition(ST_FADINGOUT, EVENT_STOP, ST_STOPPED);
stMachine.createTransition(ST_PLAYING, EVENT_PLAY, ST_PLAYING);
stMachine.initialize(ST_STOPPED);
this.iType = _arg2;
this.bLoop = _arg4;
this.iFadeInDuration = _arg5;
this.iFadeOutDuration = _arg6;
this.iTimesToPlay = _arg7;
this.pEventCallback = _arg3;
pSound = _arg1;
pSoundChannel = null;
iVolume = 0;
iCurrentVolume = 0;
elapsedFadeTime = 0;
bExecPlayInResume = false;
bPaused = false;
iPosition = 0;
}
public function stop():Boolean{
if (pSoundChannel == null){
return (false);
};
bExecPlayInResume = false;
return (stMachine.receiveEvent(EVENT_STOP));
}
private function startStopped():void{
if (pSoundChannel){
pSoundChannel.stop();
pSoundChannel = null;
iNumChannels--;
bPaused = false;
iPosition = 0;
};
if (pEventCallback != null){
pEventCallback(new SpilEvent(SpilEvent.EVENT_STOP, this));
};
}
private function processFadeIn(_arg1:Object):void{
elapsedFadeTime = (elapsedFadeTime + _arg1.time);
if (elapsedFadeTime >= iFadeInDuration){
if (pEventCallback != null){
pEventCallback(new SpilEvent(SpilEvent.EVENT_FADEINEND, this));
};
applyVolumeToChannel((iVolume / 100));
stMachine.receiveEvent(EVENT_PLAY);
} else {
applyVolumeToChannel((((elapsedFadeTime * iVolume) / iFadeInDuration) / 100));
};
}
public function setVolume(_arg1:Number):void{
iVolume = _arg1;
if (((pSoundChannel) && ((stMachine.getCurrentState().getName() == ST_PLAYING)))){
applyVolumeToChannel((iVolume / 100));
};
}
public function setFadeOutDuration(_arg1:Number):void{
this.iFadeOutDuration = _arg1;
}
public function resume():Boolean{
var _local1:Boolean;
_local1 = true;
if (bPaused == false){
return (false);
};
iPosition = 0;
bPaused = false;
if (bExecPlayInResume == true){
bExecPlayInResume = false;
_local1 = play();
} else {
if (stMachine.getCurrentState().getName() != ST_STOPPED){
pSoundChannel = pSound.play(iPosition, ((bLoop == true)) ? 9999999 : this.iTimesToPlay);
setVolume(iVolume);
if (pSoundChannel != null){
pSoundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler, false, 0, true);
} else {
return (false);
};
};
};
return (_local1);
}
public function getType():Number{
return (iType);
}
public function play():Boolean{
if ((((iNumChannels >= MAX_CHANNELS)) || (!((pSoundChannel == null))))){
return (false);
};
if (this.bPaused == true){
if (stMachine.getCurrentState().getName() == ST_STOPPED){
bExecPlayInResume = true;
};
return (false);
};
return (stMachine.receiveEvent(EVENT_PLAY));
}
public function execFadeIn(_arg1:Number):void{
elapsedFadeTime = 0;
this.iFakeFadeInDuration = _arg1;
}
private function applyVolumeToChannel(_arg1:Number):void{
var _local2:SoundTransform;
if (pSoundChannel == null){
return;
};
_local2 = pSoundChannel.soundTransform;
_local2.volume = _arg1;
pSoundChannel.soundTransform = _local2;
}
private function soundCompleteHandler(_arg1:Event):void{
if (stMachine.getCurrentState().getName() == "ST_PLAYING"){
stMachine.receiveEvent(EVENT_STOP);
};
}
private function startFadeIn():void{
pSoundChannel = pSound.play(0, ((bLoop == true)) ? 9999999 : this.iTimesToPlay);
iNumChannels++;
if (pSoundChannel != null){
pSoundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler, false, 0, true);
} else {
soundCompleteHandler(null);
return;
};
if (iFadeInDuration == 0){
if (pEventCallback != null){
pEventCallback(new SpilEvent(SpilEvent.EVENT_FADEINBEGIN, this));
};
if (pEventCallback != null){
pEventCallback(new SpilEvent(SpilEvent.EVENT_FADEINEND, this));
};
applyVolumeToChannel((iVolume / 100));
stMachine.receiveEvent(EVENT_PLAY);
} else {
applyVolumeToChannel(0);
elapsedFadeTime = 0;
if (pEventCallback != null){
pEventCallback(new SpilEvent(SpilEvent.EVENT_FADEINBEGIN, this));
};
};
}
private function processPlay(_arg1:Object):void{
if (iFakeFadeInDuration > 0){
elapsedFadeTime = (elapsedFadeTime + _arg1.time);
if (elapsedFadeTime >= iFakeFadeInDuration){
applyVolumeToChannel((iVolume / 100));
iFakeFadeInDuration = 0;
} else {
applyVolumeToChannel((((elapsedFadeTime * iVolume) / iFakeFadeInDuration) / 100));
};
} else {
if (iFakeFadeOutDuration > 0){
elapsedFadeTime = (elapsedFadeTime - _arg1.time);
if (elapsedFadeTime <= 0){
applyVolumeToChannel(0);
iFakeFadeOutDuration = 0;
} else {
applyVolumeToChannel((((elapsedFadeTime * iVolume) / iFakeFadeOutDuration) / 100));
};
};
};
if ((((iFadeOutDuration > 0)) && (!(bLoop)))){
if (pSoundChannel.position >= (pSound.length - iFadeOutDuration)){
stMachine.receiveEvent(EVENT_STOP);
};
};
}
public function getState():String{
return (stMachine.getCurrentState().getName());
}
public function execFadeOut(_arg1:Number):void{
elapsedFadeTime = _arg1;
this.iFakeFadeOutDuration = _arg1;
}
private function processFadeOut(_arg1:Object):void{
elapsedFadeTime = (elapsedFadeTime - _arg1.time);
if (elapsedFadeTime <= 0){
if (pSoundChannel != null){
pSoundChannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
pSoundChannel.stop();
pSoundChannel = null;
};
iNumChannels--;
if (pEventCallback != null){
pEventCallback(new SpilEvent(SpilEvent.EVENT_FADEOUTEND, this));
};
stMachine.receiveEvent(EVENT_STOP);
} else {
applyVolumeToChannel((((elapsedFadeTime * iVolume) / iFadeOutDuration) / 100));
};
}
public function process(_arg1:Object):void{
if (bPaused == true){
return;
};
stMachine.process(_arg1);
}
private function startFadeOut():void{
if (iFadeOutDuration == 0){
pSoundChannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
pSoundChannel.stop();
pSoundChannel = null;
iNumChannels--;
if (pEventCallback != null){
pEventCallback(new SpilEvent(SpilEvent.EVENT_FADEOUTBEGIN, this));
};
if (pEventCallback != null){
pEventCallback(new SpilEvent(SpilEvent.EVENT_FADEOUTEND, this));
};
stMachine.receiveEvent(EVENT_STOP);
} else {
if (pEventCallback != null){
pEventCallback(new SpilEvent(SpilEvent.EVENT_FADEOUTBEGIN, this));
};
elapsedFadeTime = iFadeOutDuration;
};
}
public function setFadeInDuration(_arg1:Number):void{
this.iFadeInDuration = _arg1;
}
public function pause():Boolean{
if (bPaused == true){
return (false);
};
bPaused = true;
if (pSoundChannel == null){
return (true);
};
iPosition = pSoundChannel.position;
pSoundChannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
pSoundChannel.stop();
return (true);
}
}
}//package spil.Sound
Section 56 (2.85 KiB) ●
//SpilSoundManager (spil.Sound.SpilSoundManager)
package spil.Sound {
public class SpilSoundManager {
private var bPaused:Boolean;
private var arSound:Array;
private static var MUSIC_VOLUME:Number = 50;
protected static var pInstance:SpilSoundManager = null;
private static var SFX_VOLUME:Number = 100;
public function SpilSoundManager():void{
bPaused = false;
arSound = new Array();
}
public function getSFXVolume():Number{
return (SFX_VOLUME);
}
public function setSFXVolume(_arg1:Number):void{
var _local2:SpilSound;
var _local3:*;
if (_arg1 > 100){
_arg1 = 100;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
SFX_VOLUME = _arg1;
for (_local3 in arSound) {
_local2 = (arSound[_local3] as SpilSound);
if (_local2.getType() == SpilSound.TYPE_SFX){
_local2.setVolume(SFX_VOLUME);
};
};
}
public function getMusicVolume():Number{
return (MUSIC_VOLUME);
}
public function removeSound(_arg1:SpilSound):Boolean{
var _local2:Number;
_local2 = 0;
while (_local2 < arSound.length) {
if ((arSound[_local2] as SpilSound) == _arg1){
_arg1.stop();
arSound.splice(_local2, 1);
return (true);
};
_local2++;
};
return (false);
}
public function resume():void{
var _local1:*;
bPaused = false;
for (_local1 in arSound) {
(arSound[_local1] as SpilSound).resume();
};
}
public function addSound(_arg1:SpilSound):Boolean{
var _local2:*;
for (_local2 in arSound) {
if ((arSound[_local2] as SpilSound) == _arg1){
if (bPaused == true){
_arg1.pause();
};
return (false);
};
};
arSound.push(_arg1);
if (bPaused == true){
_arg1.pause();
};
switch (_arg1.getType()){
case SpilSound.TYPE_MUSIC:
_arg1.setVolume(MUSIC_VOLUME);
break;
case SpilSound.TYPE_SFX:
_arg1.setVolume(SFX_VOLUME);
break;
};
return (true);
}
public function process(_arg1:Object):void{
var _local2:*;
for (_local2 in arSound) {
(arSound[_local2] as SpilSound).process(_arg1);
};
}
public function pause():void{
var _local1:*;
bPaused = true;
for (_local1 in arSound) {
(arSound[_local1] as SpilSound).pause();
};
}
public function isPaused():Boolean{
return (bPaused);
}
public function setMusicVolume(_arg1:Number):void{
var _local2:SpilSound;
var _local3:*;
if (_arg1 > 100){
_arg1 = 100;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
MUSIC_VOLUME = _arg1;
for (_local3 in arSound) {
_local2 = (arSound[_local3] as SpilSound);
if (_local2.getType() == SpilSound.TYPE_MUSIC){
_local2.setVolume(MUSIC_VOLUME);
};
};
}
public static function getInstance():SpilSoundManager{
if (pInstance == null){
pInstance = new (SpilSoundManager);
};
return (pInstance);
}
}
}//package spil.Sound
Section 57 (6.21 KiB) ● ●
//SpilStateMachine (spil.StateMachine.SpilStateMachine)
package spil.StateMachine {
import spil.Events.*;
public class SpilStateMachine {
private var listState:Array;
private var eventHandler:Function;
private var currentState:SpilStateMachineState;
private var listTransition:Array;
private var listEvent:Array;
private var bReady:Boolean;
public static var SM_STATECHANGE:Number = 1;
public static var SM_EVENTARRIVE:Number = 5;
public static var SM_PROCESS:Number = 4;
public static var SM_EVENT:Number = 2;
public static var SM_ENDSTATE:Number = 3;
public static var SM_INITIALIZE:Number = 0;
public function SpilStateMachine(_arg1:Function){
this.bReady = false;
this.listState = new Array();
this.listEvent = new Array();
this.listTransition = new Array();
this.eventHandler = _arg1;
this.currentState = null;
}
private function clearList(_arg1:Array){
var _local2:Object;
var _local3:*;
for (_local3 in _arg1) {
_local2 = _arg1.pop();
_local2.destroy();
};
}
public function getCurrentState():SpilStateMachineState{
return (currentState);
}
private function init(_arg1:SpilStateMachineState):Boolean{
if (this.currentState != null){
if (this.currentState.getCallBackStop() != null){
this.currentState.getCallBackStop().call(_arg1.getParam());
};
};
this.currentState = _arg1;
if (this.eventHandler != null){
this.eventHandler(SM_STATECHANGE, this.currentState);
if (this.currentState.isEndState()){
this.eventHandler(SM_ENDSTATE, this.currentState);
};
};
if (this.currentState.getCallBackStart() != null){
this.currentState.getCallBackStart().call(this.currentState.getParam());
};
return (true);
}
private function searchTransition(_arg1:String, _arg2:String):SpilStateMachineTransition{
var _local3:Array;
var _local4:String;
var _local5:*;
_local3 = this.listTransition[((_arg1 + "-") + _arg2)];
if (_local3 == null){
throw (new Error((((("Transition state: " + _arg1) + " event: ") + _arg2) + " does not exist!")));
};
for (_local5 in _local3) {
_local4 = _local5;
break;
};
return (_local3[_local4]);
}
public function initialize(_arg1:String):Boolean{
var _local2:SpilStateMachineState;
if (this.listTransition.length == 0){
throw (new Error("It does not have any transitions registered!"));
};
if (!this.existState(_arg1)){
throw (new Error((("State " + _arg1) + " does not exist!")));
};
_local2 = this.listState[_arg1];
if (this.eventHandler != null){
this.eventHandler(SM_INITIALIZE, _local2);
};
this.init(_local2);
this.bReady = true;
return (true);
}
private function existEvent(_arg1:String):Boolean{
return (!((listEvent[_arg1] == null)));
}
private function existState(_arg1:String):Boolean{
return (!((listState[_arg1] == null)));
}
private function existTransition(_arg1:String, _arg2:String, _arg3:String){
var _local4:Array;
_local4 = this.listTransition[((_arg1 + "-") + _arg2)];
if (_local4 == null){
return (false);
};
return (!((_local4[_arg3] == null)));
}
public function process(_arg1:Object){
if (!bReady){
throw (new Error("State Machine not initialized!"));
};
if (this.eventHandler != null){
this.eventHandler(SM_PROCESS, this.currentState);
};
if (this.currentState.getCallBackRun() != null){
(this.currentState.getCallBackRun() as Function).call(this.currentState.getParam(), _arg1);
};
}
public function createTransition(_arg1:String, _arg2:String, _arg3:String){
var _local4:SpilStateMachineState;
var _local5:SpilStateMachineEvent;
var _local6:SpilStateMachineState;
var _local7:SpilStateMachineTransition;
var _local8:Array;
var _local9:SpilStateMachineTransition;
if (!this.existState(_arg1)){
throw (new Error((("State " + _arg1) + " does not exist!")));
};
if (!this.existState(_arg3)){
throw (new Error((("State " + _arg3) + " does not exist!")));
};
if (!existEvent(_arg2)){
throw (new Error((("Event " + _arg2) + " does not exist!")));
};
if (existTransition(_arg1, _arg2, _arg3)){
throw (new Error((((((("Transition " + _arg1) + "-") + _arg2) + "-") + _arg3) + " already exists!")));
};
_local4 = this.listState[_arg1];
_local5 = this.listEvent[_arg2];
_local6 = this.listState[_arg3];
_local9 = new SpilStateMachineTransition(_local4, _local5, _local6);
_local8 = this.listTransition[((_arg1 + "-") + _arg2)];
if (_local8 == null){
_local8 = new Array();
this.listTransition[((_arg1 + "-") + _arg2)] = _local8;
this.listTransition.length++;
};
_local8[_arg3] = _local9;
_local8.length++;
}
public function createState(_arg1:String, _arg2:Boolean, _arg3:Object, _arg4:Function, _arg5:Function, _arg6:Function){
var _local7:SpilStateMachineState;
if (this.existState(_arg1)){
throw (new Error((("State " + _arg1) + " already exists!")));
};
_local7 = new SpilStateMachineState(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
this.listState[_arg1] = _local7;
this.listState.length++;
}
public function receiveEvent(_arg1:String):Boolean{
var _local2:SpilStateMachineTransition;
if (!bReady){
throw (new Error("State Machine not initialized!"));
};
if (this.eventHandler != null){
this.eventHandler(SM_EVENT, this.listEvent[_arg1]);
};
if (this.currentState.isEndState()){
return (false);
};
if (!existEvent(_arg1)){
throw (new Error((("Event " + _arg1) + " does not exist!")));
};
if (this.eventHandler != null){
this.eventHandler(SM_EVENTARRIVE, this.listEvent[_arg1]);
};
_local2 = this.searchTransition(this.currentState.getName(), _arg1);
return (this.init(_local2.getNewState()));
}
public function destroy(){
this.clearList(this.listState);
this.clearList(this.listEvent);
this.clearList(this.listTransition);
delete ??getglobalscope
[this];
}
public function createEvent(_arg1:String, _arg2:Object){
var _local3:SpilStateMachineEvent;
if (existEvent(_arg1)){
throw (new Error((("Event " + _arg1) + " already exists!")));
};
_local3 = new SpilStateMachineEvent(_arg1, _arg2);
this.listEvent[_arg1] = _local3;
this.listEvent.length++;
}
}
}//package spil.StateMachine
Section 58 (1.17 KiB) ●
//SpilStateMachineState (spil.StateMachine.SpilStateMachineState)
package spil.StateMachine {
public class SpilStateMachineState {
private var callBackRun:Function;
private var callBackStop:Function;
private var objParam:Object;
private var strName:String;
private var callBackStart:Function;
private var bEndState:Boolean;
public function SpilStateMachineState(_arg1:String, _arg2:Boolean, _arg3:Object, _arg4:Function, _arg5:Function, _arg6:Function){
this.strName = _arg1;
this.bEndState = _arg2;
this.callBackStart = _arg4;
this.callBackRun = _arg5;
this.callBackStop = _arg6;
this.objParam = _arg3;
}
public function isEndState():Boolean{
return (this.bEndState);
}
public function getCallBackStop():Function{
return (this.callBackStop);
}
public function getName():String{
return (this.strName);
}
public function destroy():void{
delete ??getglobalscope
[this];
}
public function getCallBackStart():Function{
return (this.callBackStart);
}
public function getCallBackRun():Function{
return (this.callBackRun);
}
public function getParam():Object{
return (this.objParam);
}
}
}//package spil.StateMachine
Section 59 (861 B)
//SpilStateMachineTransition (spil.StateMachine.SpilStateMachineTransition)
package spil.StateMachine {
import spil.Events.*;
public class SpilStateMachineTransition {
private var newState:SpilStateMachineState;
private var currentState:SpilStateMachineState;
private var event:SpilStateMachineEvent;
public function SpilStateMachineTransition(_arg1:SpilStateMachineState, _arg2:SpilStateMachineEvent, _arg3:SpilStateMachineState){
this.currentState = _arg1;
this.newState = _arg3;
this.event = _arg2;
}
function getEvent():SpilStateMachineEvent{
return (this.event);
}
function destroy(){
delete ??getglobalscope
[this];
}
function getCurrentState():SpilStateMachineState{
return (this.currentState);
}
function getNewState():SpilStateMachineState{
return (this.newState);
}
}
}//package spil.StateMachine
Section 60 (2.07 KiB) ●
//SpilMovieClip (spil.Utils.SpilMovieClip)
package spil.Utils {
import flash.display.*;
import flash.text.*;
public class SpilMovieClip {
public static const RESIZE_UP:String = "RESIZE_UP";
public static const RESIZE_DOWN:String = "RESIZE_DOWN";
public static function setTextBalloon(_arg1:String, _arg2:TextField, _arg3:MovieClip, _arg4:String, _arg5:uint=0, _arg6:uint=0, _arg7:MovieClip=null){
var _local8:Number;
_arg2.autoSize = "center";
_arg2.text = _arg1;
if (_arg4 == RESIZE_UP){
_local8 = (_arg3.y + _arg3.height);
_arg3.height = ((_arg2.height + _arg6) + _arg5);
_arg3.y = (_local8 - _arg3.height);
} else {
_local8 = _arg3.y;
_arg3.height = ((_arg2.height + _arg6) + _arg5);
_arg3.y = _local8;
};
_arg2.y = (_arg3.y + _arg5);
if (_arg7 != null){
_arg7.y = ((_arg3.y + _arg3.height) - (_arg7.height / 2));
};
}
public static function setMouseEnabled(_arg1:DisplayObjectContainer, _arg2:Boolean){
var _local3:uint;
var _local4:*;
_arg1.mouseEnabled = _arg2;
_local3 = 0;
while (_local3 < _arg1.numChildren) {
_local4 = _arg1.getChildAt(_local3);
if ((_local4 is MovieClip)){
setMouseEnabled(MovieClip(_local4), _arg2);
} else {
if ((_local4 is InteractiveObject)){
_arg1.mouseEnabled = _arg2;
};
};
_local3++;
};
}
public static function getIndexLabel(_arg1:MovieClip, _arg2:String):int{
var _local3:*;
var _local4:Array;
var _local5:int;
_local3 = -1;
_local4 = _arg1.currentLabels;
_local5 = 0;
while (_local5 < _local4.length) {
if (_local4[_local5].name == _arg2){
_local3 = (_local5 + 1);
break;
};
_local5++;
};
return (_local3);
}
public static function addLabelScript(_arg1:MovieClip, _arg2:String, _arg3:Function){
var _local4:Array;
var _local5:int;
_local4 = _arg1.currentLabels;
_local5 = 0;
while (_local5 < _local4.length) {
if (_local4[_local5].name == _arg2){
_arg1.addFrameScript((_local4[_local5].frame - 1), _arg3);
};
_local5++;
};
}
}
}//package spil.Utils
Section 61 (1.92 KiB) ●
//SpilStringUtil (spil.Utils.SpilStringUtil)
package spil.Utils {
public class SpilStringUtil {
public static var TAG_NEWLINE:String = "%newline%";
public static function timeConverter(_arg1:Number):String{
var _local2:String;
var _local3:Number;
var _local4:Number;
_local3 = int((_arg1 / 1000));
_local4 = int((_local3 / 60));
_local2 = (String(_local4) + ":");
_local3 = (_local3 - (_local4 * 60));
if (_local3 < 10){
_local2 = (_local2 + ("0" + String(_local3)));
} else {
_local2 = (_local2 + String(_local3));
};
return (_local2);
}
public static function replace(_arg1:String, _arg2:String, _arg3:String):String{
var _local4:RegExp;
_local4 = /search/gi;
return (_arg1.replace(_local4, _arg3));
}
public static function numberConverter(_arg1:Number, _arg2:String):String{
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:String;
_local3 = String(_arg1);
_local4 = (_local3.length - 1);
_local5 = 1;
while (_local4 >= 0) {
if ((((_local5 == 3)) && ((_local4 > 0)))){
_local6 = _local3.substr(0, _local4);
_local6 = (_local6 + _arg2);
_local6 = (_local6 + _local3.substr(_local4, (_local3.length - _local4)));
_local3 = _local6;
_local5 = 0;
};
_local4--;
_local5++;
};
return (_local3);
}
public static function tagReplacer(_arg1:String, _arg2:String, _arg3:String=null):String{
var _local4:String;
var _local5:Number;
_local4 = "";
_local5 = _arg1.indexOf(_arg2);
while (_local5 != -1) {
_local4 = (_local4 + _arg1.substr(0, _local5));
if (_arg2 == TAG_NEWLINE){
_local4 = (_local4 + "\n");
} else {
_local4 = (_local4 + _arg3);
};
_local4 = (_local4 + _arg1.substr((_local5 + _arg2.length), _arg1.length));
_arg1 = _local4;
_local4 = "";
_local5 = _arg1.indexOf(_arg2);
};
return (_arg1);
}
}
}//package spil.Utils
Section 62 (858 B)
//SpilURLNavigator (spil.Utils.SpilURLNavigator)
package spil.Utils {
import flash.net.*;
import flash.external.*;
public class SpilURLNavigator {
public static function changePage(_arg1, _arg2:String="_self"):void{
var _local3:URLRequest;
var _local4:String;
_local3 = ((_arg1 is String)) ? new URLRequest(_arg1) : _arg1;
if (!ExternalInterface.available){
navigateToURL(_local3, _arg2);
} else {
_local4 = String(ExternalInterface.call("function() {return navigator.userAgent;}")).toLowerCase();
if (((!((_local4.indexOf("firefox") == -1))) || (((!((_local4.indexOf("msie") == -1))) && ((uint(_local4.substr((_local4.indexOf("msie") + 5), 3)) >= 7)))))){
ExternalInterface.call("window.open", _local3.url, _arg2);
} else {
navigateToURL(_local3, _arg2);
};
};
}
}
}//package spil.Utils
Section 63 (154 B)
//mcBarack_accessory (mcBarack_accessory)
package {
import flash.display.*;
public dynamic class mcBarack_accessory extends MovieClip {
}
}//package
Section 64 (175 B)
//mcBarack_accessory_cursor (mcBarack_accessory_cursor)
package {
import flash.display.*;
public dynamic class mcBarack_accessory_cursor extends MovieClip {
}
}//package
Section 65 (169 B)
//mcBarack_accessory_icon (mcBarack_accessory_icon)
package {
import flash.display.*;
public dynamic class mcBarack_accessory_icon extends MovieClip {
}
}//package
Section 66 (139 B)
//mcBarack_ears (mcBarack_ears)
package {
import flash.display.*;
public dynamic class mcBarack_ears extends MovieClip {
}
}//package
Section 67 (154 B)
//mcBarack_ears_icon (mcBarack_ears_icon)
package {
import flash.display.*;
public dynamic class mcBarack_ears_icon extends MovieClip {
}
}//package
Section 68 (151 B)
//mcBarack_eyebrows (mcBarack_eyebrows)
package {
import flash.display.*;
public dynamic class mcBarack_eyebrows extends MovieClip {
}
}//package
Section 69 (166 B)
//mcBarack_eyebrows_icon (mcBarack_eyebrows_icon)
package {
import flash.display.*;
public dynamic class mcBarack_eyebrows_icon extends MovieClip {
}
}//package
Section 70 (139 B)
//mcBarack_eyes (mcBarack_eyes)
package {
import flash.display.*;
public dynamic class mcBarack_eyes extends MovieClip {
}
}//package
Section 71 (154 B)
//mcBarack_eyes_icon (mcBarack_eyes_icon)
package {
import flash.display.*;
public dynamic class mcBarack_eyes_icon extends MovieClip {
}
}//package
Section 72 (139 B)
//mcBarack_feet (mcBarack_feet)
package {
import flash.display.*;
public dynamic class mcBarack_feet extends MovieClip {
}
}//package
Section 73 (154 B)
//mcBarack_feet_icon (mcBarack_feet_icon)
package {
import flash.display.*;
public dynamic class mcBarack_feet_icon extends MovieClip {
}
}//package
Section 74 (139 B)
//mcBarack_hair (mcBarack_hair)
package {
import flash.display.*;
public dynamic class mcBarack_hair extends MovieClip {
}
}//package
Section 75 (154 B)
//mcBarack_hair_icon (mcBarack_hair_icon)
package {
import flash.display.*;
public dynamic class mcBarack_hair_icon extends MovieClip {
}
}//package
Section 76 (142 B)
//mcBarack_mouth (mcBarack_mouth)
package {
import flash.display.*;
public dynamic class mcBarack_mouth extends MovieClip {
}
}//package
Section 77 (157 B)
//mcBarack_mouth_icon (mcBarack_mouth_icon)
package {
import flash.display.*;
public dynamic class mcBarack_mouth_icon extends MovieClip {
}
}//package
Section 78 (139 B)
//mcBarack_nose (mcBarack_nose)
package {
import flash.display.*;
public dynamic class mcBarack_nose extends MovieClip {
}
}//package
Section 79 (154 B)
//mcBarack_nose_icon (mcBarack_nose_icon)
package {
import flash.display.*;
public dynamic class mcBarack_nose_icon extends MovieClip {
}
}//package
Section 80 (151 B)
//mcBiden_accessory (mcBiden_accessory)
package {
import flash.display.*;
public dynamic class mcBiden_accessory extends MovieClip {
}
}//package
Section 81 (172 B)
//mcBiden_accessory_cursor (mcBiden_accessory_cursor)
package {
import flash.display.*;
public dynamic class mcBiden_accessory_cursor extends MovieClip {
}
}//package
Section 82 (166 B)
//mcBiden_accessory_icon (mcBiden_accessory_icon)
package {
import flash.display.*;
public dynamic class mcBiden_accessory_icon extends MovieClip {
}
}//package
Section 83 (136 B)
//mcBiden_ears (mcBiden_ears)
package {
import flash.display.*;
public dynamic class mcBiden_ears extends MovieClip {
}
}//package
Section 84 (151 B)
//mcBiden_ears_icon (mcBiden_ears_icon)
package {
import flash.display.*;
public dynamic class mcBiden_ears_icon extends MovieClip {
}
}//package
Section 85 (148 B)
//mcBiden_eyebrows (mcBiden_eyebrows)
package {
import flash.display.*;
public dynamic class mcBiden_eyebrows extends MovieClip {
}
}//package
Section 86 (163 B)
//mcBiden_eyebrows_icon (mcBiden_eyebrows_icon)
package {
import flash.display.*;
public dynamic class mcBiden_eyebrows_icon extends MovieClip {
}
}//package
Section 87 (136 B)
//mcBiden_eyes (mcBiden_eyes)
package {
import flash.display.*;
public dynamic class mcBiden_eyes extends MovieClip {
}
}//package
Section 88 (151 B)
//mcBiden_eyes_icon (mcBiden_eyes_icon)
package {
import flash.display.*;
public dynamic class mcBiden_eyes_icon extends MovieClip {
}
}//package
Section 89 (136 B)
//mcBiden_feet (mcBiden_feet)
package {
import flash.display.*;
public dynamic class mcBiden_feet extends MovieClip {
}
}//package
Section 90 (151 B)
//mcBiden_feet_icon (mcBiden_feet_icon)
package {
import flash.display.*;
public dynamic class mcBiden_feet_icon extends MovieClip {
}
}//package
Section 91 (136 B)
//mcBiden_hair (mcBiden_hair)
package {
import flash.display.*;
public dynamic class mcBiden_hair extends MovieClip {
}
}//package
Section 92 (151 B)
//mcBiden_hair_icon (mcBiden_hair_icon)
package {
import flash.display.*;
public dynamic class mcBiden_hair_icon extends MovieClip {
}
}//package
Section 93 (139 B)
//mcBiden_mouth (mcBiden_mouth)
package {
import flash.display.*;
public dynamic class mcBiden_mouth extends MovieClip {
}
}//package
Section 94 (154 B)
//mcBiden_mouth_icon (mcBiden_mouth_icon)
package {
import flash.display.*;
public dynamic class mcBiden_mouth_icon extends MovieClip {
}
}//package
Section 95 (136 B)
//mcBiden_nose (mcBiden_nose)
package {
import flash.display.*;
public dynamic class mcBiden_nose extends MovieClip {
}
}//package
Section 96 (151 B)
//mcBiden_nose_icon (mcBiden_nose_icon)
package {
import flash.display.*;
public dynamic class mcBiden_nose_icon extends MovieClip {
}
}//package
Section 97 (154 B)
//mcMcCain_accessory (mcMcCain_accessory)
package {
import flash.display.*;
public dynamic class mcMcCain_accessory extends MovieClip {
}
}//package
Section 98 (175 B)
//mcMcCain_accessory_cursor (mcMcCain_accessory_cursor)
package {
import flash.display.*;
public dynamic class mcMcCain_accessory_cursor extends MovieClip {
}
}//package
Section 99 (169 B)
//mcMcCain_accessory_icon (mcMcCain_accessory_icon)
package {
import flash.display.*;
public dynamic class mcMcCain_accessory_icon extends MovieClip {
}
}//package
Section 100 (139 B)
//mcMcCain_ears (mcMcCain_ears)
package {
import flash.display.*;
public dynamic class mcMcCain_ears extends MovieClip {
}
}//package
Section 101 (154 B)
//mcMcCain_ears_icon (mcMcCain_ears_icon)
package {
import flash.display.*;
public dynamic class mcMcCain_ears_icon extends MovieClip {
}
}//package
Section 102 (151 B)
//mcMcCain_eyebrows (mcMcCain_eyebrows)
package {
import flash.display.*;
public dynamic class mcMcCain_eyebrows extends MovieClip {
}
}//package
Section 103 (166 B)
//mcMcCain_eyebrows_icon (mcMcCain_eyebrows_icon)
package {
import flash.display.*;
public dynamic class mcMcCain_eyebrows_icon extends MovieClip {
}
}//package
Section 104 (139 B)
//mcMcCain_eyes (mcMcCain_eyes)
package {
import flash.display.*;
public dynamic class mcMcCain_eyes extends MovieClip {
}
}//package
Section 105 (154 B)
//mcMcCain_eyes_icon (mcMcCain_eyes_icon)
package {
import flash.display.*;
public dynamic class mcMcCain_eyes_icon extends MovieClip {
}
}//package
Section 106 (139 B)
//mcMcCain_feet (mcMcCain_feet)
package {
import flash.display.*;
public dynamic class mcMcCain_feet extends MovieClip {
}
}//package
Section 107 (154 B)
//mcMcCain_feet_icon (mcMcCain_feet_icon)
package {
import flash.display.*;
public dynamic class mcMcCain_feet_icon extends MovieClip {
}
}//package
Section 108 (139 B)
//mcMcCain_hair (mcMcCain_hair)
package {
import flash.display.*;
public dynamic class mcMcCain_hair extends MovieClip {
}
}//package
Section 109 (154 B)
//mcMcCain_hair_icon (mcMcCain_hair_icon)
package {
import flash.display.*;
public dynamic class mcMcCain_hair_icon extends MovieClip {
}
}//package
Section 110 (142 B)
//mcMcCain_mouth (mcMcCain_mouth)
package {
import flash.display.*;
public dynamic class mcMcCain_mouth extends MovieClip {
}
}//package
Section 111 (157 B)
//mcMcCain_mouth_icon (mcMcCain_mouth_icon)
package {
import flash.display.*;
public dynamic class mcMcCain_mouth_icon extends MovieClip {
}
}//package
Section 112 (139 B)
//mcMcCain_nose (mcMcCain_nose)
package {
import flash.display.*;
public dynamic class mcMcCain_nose extends MovieClip {
}
}//package
Section 113 (154 B)
//mcMcCain_nose_icon (mcMcCain_nose_icon)
package {
import flash.display.*;
public dynamic class mcMcCain_nose_icon extends MovieClip {
}
}//package
Section 114 (151 B)
//mcPalin_accessory (mcPalin_accessory)
package {
import flash.display.*;
public dynamic class mcPalin_accessory extends MovieClip {
}
}//package
Section 115 (172 B)
//mcPalin_accessory_cursor (mcPalin_accessory_cursor)
package {
import flash.display.*;
public dynamic class mcPalin_accessory_cursor extends MovieClip {
}
}//package
Section 116 (166 B)
//mcPalin_accessory_icon (mcPalin_accessory_icon)
package {
import flash.display.*;
public dynamic class mcPalin_accessory_icon extends MovieClip {
}
}//package
Section 117 (136 B)
//mcPalin_ears (mcPalin_ears)
package {
import flash.display.*;
public dynamic class mcPalin_ears extends MovieClip {
}
}//package
Section 118 (151 B)
//mcPalin_ears_icon (mcPalin_ears_icon)
package {
import flash.display.*;
public dynamic class mcPalin_ears_icon extends MovieClip {
}
}//package
Section 119 (148 B)
//mcPalin_eyebrows (mcPalin_eyebrows)
package {
import flash.display.*;
public dynamic class mcPalin_eyebrows extends MovieClip {
}
}//package
Section 120 (163 B)
//mcPalin_eyebrows_icon (mcPalin_eyebrows_icon)
package {
import flash.display.*;
public dynamic class mcPalin_eyebrows_icon extends MovieClip {
}
}//package
Section 121 (136 B)
//mcPalin_eyes (mcPalin_eyes)
package {
import flash.display.*;
public dynamic class mcPalin_eyes extends MovieClip {
}
}//package
Section 122 (151 B)
//mcPalin_eyes_icon (mcPalin_eyes_icon)
package {
import flash.display.*;
public dynamic class mcPalin_eyes_icon extends MovieClip {
}
}//package
Section 123 (136 B)
//mcPalin_feet (mcPalin_feet)
package {
import flash.display.*;
public dynamic class mcPalin_feet extends MovieClip {
}
}//package
Section 124 (151 B)
//mcPalin_feet_icon (mcPalin_feet_icon)
package {
import flash.display.*;
public dynamic class mcPalin_feet_icon extends MovieClip {
}
}//package
Section 125 (136 B)
//mcPalin_hair (mcPalin_hair)
package {
import flash.display.*;
public dynamic class mcPalin_hair extends MovieClip {
}
}//package
Section 126 (151 B)
//mcPalin_hair_icon (mcPalin_hair_icon)
package {
import flash.display.*;
public dynamic class mcPalin_hair_icon extends MovieClip {
}
}//package
Section 127 (139 B)
//mcPalin_mouth (mcPalin_mouth)
package {
import flash.display.*;
public dynamic class mcPalin_mouth extends MovieClip {
}
}//package
Section 128 (154 B)
//mcPalin_mouth_icon (mcPalin_mouth_icon)
package {
import flash.display.*;
public dynamic class mcPalin_mouth_icon extends MovieClip {
}
}//package
Section 129 (136 B)
//mcPalin_nose (mcPalin_nose)
package {
import flash.display.*;
public dynamic class mcPalin_nose extends MovieClip {
}
}//package
Section 130 (151 B)
//mcPalin_nose_icon (mcPalin_nose_icon)
package {
import flash.display.*;
public dynamic class mcPalin_nose_icon extends MovieClip {
}
}//package
Section 131 (145 B)
//mcPig_accessory (mcPig_accessory)
package {
import flash.display.*;
public dynamic class mcPig_accessory extends MovieClip {
}
}//package
Section 132 (166 B)
//mcPig_accessory_cursor (mcPig_accessory_cursor)
package {
import flash.display.*;
public dynamic class mcPig_accessory_cursor extends MovieClip {
}
}//package
Section 133 (160 B)
//mcPig_accessory_icon (mcPig_accessory_icon)
package {
import flash.display.*;
public dynamic class mcPig_accessory_icon extends MovieClip {
}
}//package
Section 134 (130 B)
//mcPig_ears (mcPig_ears)
package {
import flash.display.*;
public dynamic class mcPig_ears extends MovieClip {
}
}//package
Section 135 (145 B)
//mcPig_ears_icon (mcPig_ears_icon)
package {
import flash.display.*;
public dynamic class mcPig_ears_icon extends MovieClip {
}
}//package
Section 136 (142 B)
//mcPig_eyebrows (mcPig_eyebrows)
package {
import flash.display.*;
public dynamic class mcPig_eyebrows extends MovieClip {
}
}//package
Section 137 (157 B)
//mcPig_eyebrows_icon (mcPig_eyebrows_icon)
package {
import flash.display.*;
public dynamic class mcPig_eyebrows_icon extends MovieClip {
}
}//package
Section 138 (130 B)
//mcPig_eyes (mcPig_eyes)
package {
import flash.display.*;
public dynamic class mcPig_eyes extends MovieClip {
}
}//package
Section 139 (145 B)
//mcPig_eyes_icon (mcPig_eyes_icon)
package {
import flash.display.*;
public dynamic class mcPig_eyes_icon extends MovieClip {
}
}//package
Section 140 (130 B)
//mcPig_feet (mcPig_feet)
package {
import flash.display.*;
public dynamic class mcPig_feet extends MovieClip {
}
}//package
Section 141 (145 B)
//mcPig_feet_icon (mcPig_feet_icon)
package {
import flash.display.*;
public dynamic class mcPig_feet_icon extends MovieClip {
}
}//package
Section 142 (130 B)
//mcPig_hair (mcPig_hair)
package {
import flash.display.*;
public dynamic class mcPig_hair extends MovieClip {
}
}//package
Section 143 (145 B)
//mcPig_hair_icon (mcPig_hair_icon)
package {
import flash.display.*;
public dynamic class mcPig_hair_icon extends MovieClip {
}
}//package
Section 144 (133 B)
//mcPig_mouth (mcPig_mouth)
package {
import flash.display.*;
public dynamic class mcPig_mouth extends MovieClip {
}
}//package
Section 145 (148 B)
//mcPig_mouth_icon (mcPig_mouth_icon)
package {
import flash.display.*;
public dynamic class mcPig_mouth_icon extends MovieClip {
}
}//package
Section 146 (130 B)
//mcPig_nose (mcPig_nose)
package {
import flash.display.*;
public dynamic class mcPig_nose extends MovieClip {
}
}//package
Section 147 (145 B)
//mcPig_nose_icon (mcPig_nose_icon)
package {
import flash.display.*;
public dynamic class mcPig_nose_icon extends MovieClip {
}
}//package
Section 148 (157 B)
//mcPitbull_accessory (mcPitbull_accessory)
package {
import flash.display.*;
public dynamic class mcPitbull_accessory extends MovieClip {
}
}//package
Section 149 (178 B)
//mcPitbull_accessory_cursor (mcPitbull_accessory_cursor)
package {
import flash.display.*;
public dynamic class mcPitbull_accessory_cursor extends MovieClip {
}
}//package
Section 150 (172 B)
//mcPitbull_accessory_icon (mcPitbull_accessory_icon)
package {
import flash.display.*;
public dynamic class mcPitbull_accessory_icon extends MovieClip {
}
}//package
Section 151 (142 B)
//mcPitbull_ears (mcPitbull_ears)
package {
import flash.display.*;
public dynamic class mcPitbull_ears extends MovieClip {
}
}//package
Section 152 (157 B)
//mcPitbull_ears_icon (mcPitbull_ears_icon)
package {
import flash.display.*;
public dynamic class mcPitbull_ears_icon extends MovieClip {
}
}//package
Section 153 (154 B)
//mcPitbull_eyebrows (mcPitbull_eyebrows)
package {
import flash.display.*;
public dynamic class mcPitbull_eyebrows extends MovieClip {
}
}//package
Section 154 (169 B)
//mcPitbull_eyebrows_icon (mcPitbull_eyebrows_icon)
package {
import flash.display.*;
public dynamic class mcPitbull_eyebrows_icon extends MovieClip {
}
}//package
Section 155 (142 B)
//mcPitbull_eyes (mcPitbull_eyes)
package {
import flash.display.*;
public dynamic class mcPitbull_eyes extends MovieClip {
}
}//package
Section 156 (157 B)
//mcPitbull_eyes_icon (mcPitbull_eyes_icon)
package {
import flash.display.*;
public dynamic class mcPitbull_eyes_icon extends MovieClip {
}
}//package
Section 157 (142 B)
//mcPitbull_feet (mcPitbull_feet)
package {
import flash.display.*;
public dynamic class mcPitbull_feet extends MovieClip {
}
}//package
Section 158 (157 B)
//mcPitbull_feet_icon (mcPitbull_feet_icon)
package {
import flash.display.*;
public dynamic class mcPitbull_feet_icon extends MovieClip {
}
}//package
Section 159 (142 B)
//mcPitbull_hair (mcPitbull_hair)
package {
import flash.display.*;
public dynamic class mcPitbull_hair extends MovieClip {
}
}//package
Section 160 (157 B)
//mcPitbull_hair_icon (mcPitbull_hair_icon)
package {
import flash.display.*;
public dynamic class mcPitbull_hair_icon extends MovieClip {
}
}//package
Section 161 (145 B)
//mcPitbull_mouth (mcPitbull_mouth)
package {
import flash.display.*;
public dynamic class mcPitbull_mouth extends MovieClip {
}
}//package
Section 162 (160 B)
//mcPitbull_mouth_icon (mcPitbull_mouth_icon)
package {
import flash.display.*;
public dynamic class mcPitbull_mouth_icon extends MovieClip {
}
}//package
Section 163 (142 B)
//mcPitbull_nose (mcPitbull_nose)
package {
import flash.display.*;
public dynamic class mcPitbull_nose extends MovieClip {
}
}//package
Section 164 (157 B)
//mcPitbull_nose_icon (mcPitbull_nose_icon)
package {
import flash.display.*;
public dynamic class mcPitbull_nose_icon extends MovieClip {
}
}//package
Section 165 (262 B)
//mouseCursor (mouseCursor)
package {
import flash.display.*;
public dynamic class mouseCursor extends MovieClip {
public var splash:MovieClip;
public var mcDummy:MovieClip;
public var mcPointer:MovieClip;
public var mcDrag:MovieClip;
}
}//package
Section 166 (121 B)
//sndAnthem (sndAnthem)
package {
import flash.media.*;
public dynamic class sndAnthem extends Sound {
}
}//package
Section 167 (142 B)
//sndButtonActions (sndButtonActions)
package {
import flash.media.*;
public dynamic class sndButtonActions extends Sound {
}
}//package
Section 168 (148 B)
//sndCrowdAmbience01 (sndCrowdAmbience01)
package {
import flash.media.*;
public dynamic class sndCrowdAmbience01 extends Sound {
}
}//package
Section 169 (148 B)
//sndCrowdAmbience02 (sndCrowdAmbience02)
package {
import flash.media.*;
public dynamic class sndCrowdAmbience02 extends Sound {
}
}//package
Section 170 (130 B)
//sndDropWrong (sndDropWrong)
package {
import flash.media.*;
public dynamic class sndDropWrong extends Sound {
}
}//package
Section 171 (133 B)
//sndMouseClick (sndMouseClick)
package {
import flash.media.*;
public dynamic class sndMouseClick extends Sound {
}
}//package
Section 172 (121 B)
//sndPickup (sndPickup)
package {
import flash.media.*;
public dynamic class sndPickup extends Sound {
}
}//package
Section 173 (115 B)
//sndPlay (sndPlay)
package {
import flash.media.*;
public dynamic class sndPlay extends Sound {
}
}//package
Section 174 (121 B)
//sndRandom (sndRandom)
package {
import flash.media.*;
public dynamic class sndRandom extends Sound {
}
}//package
Section 175 (114 B)
//sndSnap (sndSnap)
package {
import flash.media.*;
public dynamic class sndSnap extends Sound {
}
}//package