Section 1
//CustomSound (assets.CustomSound)
package assets {
import flash.events.*;
import flash.media.*;
public class CustomSound extends Sound {
protected var soundObj:Sound;
protected var soundVolume:SoundTransform;
protected var lastPos:int;
protected var loop:Boolean;
protected var soundChannel:SoundChannel;
public function CustomSound(){
soundChannel = new SoundChannel();
super();
soundObj = this;
soundVolume = SoundManager.soundVolume;
}
public function playSound(){
if (SoundManager.muteStatus){
soundVolume.volume = 0;
} else {
soundVolume.volume = 1;
};
stopSound();
lastPos = soundChannel.position;
soundChannel = soundObj.play(lastPos, 0, soundVolume);
if (soundChannel == null){
return;
};
soundChannel.addEventListener(Event.SOUND_COMPLETE, onCompleteSound);
}
public function set loopStatus(_arg1:Boolean):void{
loop = _arg1;
}
public function stopSound(){
if (soundChannel == null){
return;
};
lastPos = soundChannel.position;
soundChannel.stop();
soundChannel.removeEventListener(Event.SOUND_COMPLETE, onCompleteSound);
}
function onCompleteSound(_arg1:Event){
if (soundChannel == null){
return;
};
soundChannel.stop();
soundChannel.removeEventListener(Event.SOUND_COMPLETE, onCompleteSound);
if (loop){
soundChannel = soundObj.play(0, 0, soundVolume);
soundChannel.addEventListener(Event.SOUND_COMPLETE, onCompleteSound);
} else {
SoundManager.callBack.removeFromArray((soundObj as CustomSound));
};
}
public function muteMusic(){
if (soundChannel == null){
return;
};
soundVolume.volume = 0;
playSound();
}
public function unMuteMusic(){
if (soundChannel == null){
return;
};
soundVolume.volume = 1;
playSound();
}
}
}//package assets
Section 2
//FBShare (assets.FBShare)
package assets {
import flash.events.*;
import flash.display.*;
public class FBShare extends MovieClip {
public var fbshare:MovieClip;
public function FBShare(){
init();
}
public function init():void{
addLogoListener();
this.x = 615;
this.y = 435;
}
private function addLogoListener(){
trace("added listener");
fbshare.buttonMode = true;
fbshare.useHandCursor = true;
fbshare.mouseChildren = false;
fbshare.mouseEnabled = true;
fbshare.addEventListener(MouseEvent.CLICK, onClick);
}
private function onClick(_arg1:MouseEvent){
trace("clicked on button");
}
}
}//package assets
Section 3
//G2WGameOver (assets.G2WGameOver)
package assets {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
public class G2WGameOver extends MovieClip {
public var btn_playAgain:SimpleButton;
public var mc_playAgainAll:MovieClip;
public var mcExternalLinks:MovieClip;
private var xmlURL:String;
private var relatedGameXML:XML;
public var parentClip:MovieClip;
private var tempNameText:String;// = ""
private var xmlArray:Array;
private var gameArray:Array;
private var imageLoader:Loader;
private var skipStatus:Boolean;// = false
private var winStatus:Boolean;// = false
private var domainStatus:Boolean;// = false
public function G2WGameOver(){
xmlURL = ((GameObj.relatedGamesXML + "?t=") + getTimer());
xmlArray = new Array();
gameArray = new Array();
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
skipStatus = false;
winStatus = false;
}
public function checkDomainStatus(){
var _local1:* = String(this.root.loaderInfo.url);
if (((!((_local1.indexOf("games2win.com") == -1))) || (!((_local1.indexOf("gangofgamers.com") == -1))))){
GameObj.externalLinkRef = "VT";
domainStatus = true;
} else {
GameObj.externalLinkRef = "BOTH";
domainStatus = false;
};
}
public function init(_arg1:String, _arg2:Boolean){
var _local3:String = String(_arg1);
trace(("asset type loaded = " + _local3));
skipStatus = _arg2;
trace(("skip level status = " + skipStatus));
checkDomainStatus();
if ((((((_local3 == "gamecomplete")) || ((_local3 == "gameComplete")))) || ((_local3 == "GameComplete")))){
winStatus = true;
gotoAndStop(3);
} else {
if (skipStatus){
mc_playAgainAll.gotoAndStop(1);
} else {
mc_playAgainAll.gotoAndStop(2);
};
winStatus = false;
gotoAndStop(2);
};
if (GameObj.externalLinkRef == "FB"){
} else {
if (GameObj.externalLinkRef == "VT"){
} else {
if (GameObj.externalLinkRef == "BOTH"){
};
};
};
addFrameScript(1, frame2Script);
addFrameScript(2, frame3Script);
addFrameScript(3, frame4Script);
}
public function frame2Script(){
if (skipStatus){
mc_playAgainAll.btn_playAgain.addEventListener(MouseEvent.CLICK, levelBtnListener);
} else {
mc_playAgainAll.btn_playAgain.addEventListener(MouseEvent.CLICK, levelBtnListener);
};
}
public function frame3Script(){
btn_playAgain.addEventListener(MouseEvent.CLICK, levelBtnListener);
}
public function frame4Script(){
btn_playAgain.addEventListener(MouseEvent.CLICK, levelBtnListener);
}
public function onClick3(_arg1:MouseEvent){
}
public function onClick4(_arg1:MouseEvent){
}
public function levelBtnListener(_arg1:MouseEvent){
var _local2:* = _arg1.target.name;
trace(("btn name = " + _local2));
if (_local2 == "btn_videoTutorial"){
DocumentClass.callVideo();
trace("video click");
return;
};
if (_local2 == "btn_shareScore"){
DocumentClass.faceBookCall();
trace("video click");
return;
};
if (_local2 == "btn_playAgain"){
if (winStatus){
(parent as DocumentClass).g2wGameOver(true);
} else {
(parent as DocumentClass).g2wGameOver(false);
};
};
if (_local2 == "btn_nextLevel"){
(parent as DocumentClass).g2wSkipLevel();
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
}
}//package assets
Section 4
//InviziAd (assets.InviziAd)
package assets {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.errors.*;
public class InviziAd {
public var movieclip:MovieClip;
public var container:MovieClip;
public var backGround_mc:MovieClip;
private var adVersion:String;// = "1_0"
private var adType:String;// = "pre"
public var iAdsXML:XML;
public var adLoader:Loader;
public var titleTxt:TextField;
public var bottomTxt:TextField;
public var progressBar:MovieClip;
public var square_mc:MovieClip;
public var adContainer:MovieClip;
public var timeCount:int;// = 0
public var theTimer:Timer;
public var showTime:int;
public var mystage:Stage;
public var adWidth:Number;
public var adHeight:Number;
public var onAdFinished:Function;
public var logoPath:String;// = "http://s1.inviziads.com/partner/inviziad_logo.jpg"
public var messageXML:XML;
public var currentMessage:String;// = "Advertisers, try us out for US$250"
public var currentLink:String;// = "http://www.inviziads.com/advertisers-get-started.html?utm_source=4_1&utm_medium=messages&utm_content=1&utm_campaign=invizi"
public var messageTxt:TextField;
public var logo:MovieClip;
public function InviziAd(){
adLoader = new Loader();
super();
Security.allowDomain("*");
}
private function onAddedToStage(_arg1:Event=null):void{
}
public function showPreRoll(_arg1:String, _arg2:String, _arg3:MovieClip):void{
var gameID:String;
var gameHost:String;
var isAvailable:Boolean;
var docURL:String;
var myPattern:RegExp;
var fileURL:String;
var adURLRequest:URLRequest;
var adURLLoader:URLLoader;
var adURLVars:URLVariables;
var gID = _arg1;
var gHost = _arg2;
var clip = _arg3;
movieclip = clip;
mystage = clip.stage;
if (checkAllowedHost() == true){
emptyStage();
} else {
trace("what");
clip.stage.addEventListener("end_of_advertisment", function (_arg1){
trace("what!");
onAdFinished();
});
mystage = clip.stage;
gameID = gID;
gameHost = gHost;
measureComScore(gameHost);
drawContainer();
container = new MovieClip();
movieclip.addChild(container);
mystage.scaleMode = "noScale";
mystage.align = "TL";
isAvailable = false;
docURL = "null";
if (ExternalInterface.available){
try {
ExternalInterface.call("document.URL.toString");
isAvailable = true;
} catch(error:SecurityError) {
docURL = "null";
} catch(err:Error) {
docURL = "null";
};
if (isAvailable){
docURL = ExternalInterface.call("document.URL.toString");
};
};
myPattern = /\/\[\[DYNAMIC\]\]\/1/;
fileURL = movieclip.loaderInfo.url.replace(myPattern, "");
adURLRequest = new URLRequest((((((("http://s1.inviziads.com/lookup.html?g=" + gameID) + "&h=") + gameHost) + "&v=") + adVersion) + "&type=pre&as3=1&"));
adURLLoader = new URLLoader();
adURLVars = new URLVariables();
adURLLoader.addEventListener(Event.COMPLETE, handleLoadSuccessful);
adURLLoader.addEventListener(IOErrorEvent.IO_ERROR, handleNoResponse);
adURLVars.purl = docURL;
adURLVars.hurl = fileURL;
adURLRequest.method = URLRequestMethod.GET;
adURLRequest.data = adURLVars;
adURLLoader.load(adURLRequest);
};
}
public function measureComScore(_arg1:String){
var _local2:String = _arg1.toUpperCase();
var _local3:* = "";
var _local4:* = 0;
_local4 = 0;
while (_local4 < _local2.length) {
_local3 = (_local3 + _local2.charCodeAt(_local4));
_local4++;
};
while (_local3.length < 8) {
_local3 = ("0" + _local3);
};
_local3 = (("10" + _local3) + "000000000");
var _local5:* = ("http://beacon.scorecardresearch.com/scripts/beacon.dll?C1=7&C2=5799339&C3=" + _local3);
var _local6:URLRequest = new URLRequest(_local5);
var _local7:URLLoader = new URLLoader();
_local6.method = URLRequestMethod.GET;
_local7.load(_local6);
}
public function handleLoadSuccessful(_arg1:Event){
iAdsXML = new XML(_arg1.currentTarget.data);
showTime = iAdsXML.t.toString();
adWidth = iAdsXML.x;
adHeight = iAdsXML.y;
theTimer = new Timer(1000, showTime);
initXML();
}
public function initXML(){
var holder:MovieClip;
var mcLoader:Loader;
if (iAdsXML.type == "UPDATE"){
holder = new MovieClip();
container.addChild(holder);
mcLoader = new Loader();
mcLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function (){
});
holder.addChild(mcLoader);
mcLoader.load(new URLRequest(iAdsXML.url));
} else {
adBrain();
};
}
public function drawContainer(){
backGround_mc = new MovieClip();
movieclip.addChild(backGround_mc);
backGround_mc.name = "backGround";
backGround_mc.graphics.beginFill(0xFFFFFF);
backGround_mc.graphics.moveTo(0, 0);
backGround_mc.graphics.lineTo(mystage.stageWidth, 0);
backGround_mc.graphics.lineTo(mystage.stageWidth, mystage.stageHeight);
backGround_mc.graphics.lineTo(0, mystage.stageHeight);
backGround_mc.graphics.lineTo(0, 0);
backGround_mc.graphics.endFill();
}
public function adBrain(){
createAssets();
switch (iAdsXML.type.toString()){
case "FULL":
adLoader.load(new URLRequest(iAdsXML.url));
break;
case "EMBED":
adLoader.load(new URLRequest(iAdsXML.url.toString()));
if (iAdsXML.link != ""){
container.addEventListener(MouseEvent.CLICK, adClickHandler);
};
break;
case "NOOP":
emptyStage();
break;
default:
break;
};
}
public function createAssets(){
var _local1:TextFormat;
adLoader.contentLoaderInfo.addEventListener(Event.INIT, loadInit);
if (iAdsXML.type == "EMBED"){
square_mc = new MovieClip();
container.addChild(square_mc);
adContainer = new MovieClip();
adContainer.name = "adContainer";
container.addChild(adContainer);
adContainer.addChild(adLoader);
_local1 = new TextFormat();
_local1.align = "center";
_local1.font = "Arial";
_local1.size = 11;
titleTxt = new TextField();
bottomTxt = new TextField();
titleTxt.width = (bottomTxt.width = adWidth);
titleTxt.autoSize = (bottomTxt.autoSize = TextFieldAutoSize.CENTER);
bottomTxt.selectable = false;
titleTxt.selectable = false;
bottomTxt.multiline = true;
bottomTxt.defaultTextFormat = (titleTxt.defaultTextFormat = _local1);
titleTxt.text = "";
titleTxt.name = "h_txt";
bottomTxt.name = "b_txt";
progressBar = new MovieClip();
progressBar.name = "progressBar";
container.addChild(progressBar);
container.addChild(titleTxt);
container.addChild(bottomTxt);
} else {
if (iAdsXML.type == "FULL"){
container.addChild(adLoader);
};
};
}
public function loadInit(_arg1:Event){
var bar_mc:MovieClip;
var evt = _arg1;
theTimer.start();
theTimer.addEventListener(TimerEvent.TIMER, timeInc);
theTimer.addEventListener(TimerEvent.TIMER_COMPLETE, endSession);
titleTxt.text = "Advertisement";
progressBar.tim = showTime;
progressBar.start = function (){
var _local1:* = mystage.frameRate;
var _local2:* = (this.width - 2);
this.ad = (_local2 / (this.tim + 1));
this.ad = (this.ad / _local1);
};
bar_mc = new MovieClip();
var box_mc:MovieClip = new MovieClip();
bar_mc.name = "bar";
bar_mc.graphics.beginFill(0x6600);
bar_mc.graphics.moveTo(0, 0);
bar_mc.graphics.lineTo(1, 0);
bar_mc.graphics.lineTo(1, 13);
bar_mc.graphics.lineTo(0, 13);
bar_mc.graphics.lineTo(0, 0);
bar_mc.graphics.endFill();
bar_mc.x = 1.5;
bar_mc.y = 1;
box_mc.graphics.lineStyle(1, 0x333333, 100, true, "none", "round", "miter", 1);
box_mc.graphics.lineTo(adWidth, 0);
box_mc.graphics.lineTo(adWidth, 15);
box_mc.graphics.lineTo(0, 15);
box_mc.graphics.lineTo(0, 0);
progressBar.addChild(bar_mc);
progressBar.addChild(box_mc);
progressBar.start();
progressBar.addEventListener("enterFrame", function (){
if (bar_mc.width < (adWidth - 3)){
bar_mc.width = (bar_mc.width + progressBar.ad);
} else {
bar_mc.width = adWidth;
};
});
var newline:* = "\n";
bottomTxt.text = (("Note" + newline) + "Clicking on the above Ad won't interrupt your game. Ad link opens in a new window.");
var logoLoader:* = new Loader();
logo = new MovieClip();
container.addChild(logo);
logo.addChild(logoLoader);
var imageURLReq:URLRequest = new URLRequest(logoPath);
logoLoader.contentLoaderInfo.addEventListener(Event.INIT, function (){
logo.x = int(((progressBar.x + progressBar.width) - logo.width));
logo.y = int(((progressBar.y + progressBar.height) + 7));
});
logoLoader.load(imageURLReq);
logoLoader.addEventListener("click", function (){
navigateToURL(new URLRequest("http://www.inviziads.com"), "_blank");
});
square_mc.graphics.beginFill(0xFF0000);
square_mc.graphics.moveTo(adWidth, 0);
square_mc.graphics.lineTo(adWidth, adHeight);
square_mc.graphics.lineTo(0, adHeight);
square_mc.graphics.lineTo(0, 0);
square_mc.graphics.endFill();
adContainer.mask = square_mc;
stageResize(null);
loadMessages();
}
public function loadMessages(){
var _local1:URLRequest = new URLRequest("http://s1.inviziads.com/template/invizi_messages.xml");
var _local2:URLLoader = new URLLoader();
_local2.addEventListener(Event.COMPLETE, messageHandlerSuccess);
_local2.addEventListener(IOErrorEvent.IO_ERROR, messageHandlerFails);
messageTxt = new TextField();
messageTxt.autoSize = TextFieldAutoSize.LEFT;
messageTxt.y = (progressBar.y + 20);
messageTxt.selectable = false;
container.addChild(messageTxt);
_local2.load(_local1);
}
public function messageHandlerSuccess(_arg1:Event){
messageXML = new XML(_arg1.target.data);
var _local2:uint = messageXML.message.length();
var _local3:uint = Math.floor((Math.random() * _local2));
if (messageXML.message[_local3] != undefined){
currentMessage = messageXML.message[_local3];
currentLink = messageXML.message[_local3].@link;
};
messageTxt.htmlText = (((("<u><font face='arial' color='#0066CC'><a href='" + currentLink) + "' target='_blank'>") + currentMessage) + "</a></font></u>");
}
public function messageHandlerFails(_arg1:IOErrorEvent){
messageTxt.htmlText = (((("<u><font face='arial' color='#0066CC'><a href='" + currentLink) + "' target='_blank'>") + currentMessage) + "</a></font>/<u>");
}
public function timeInc(_arg1:TimerEvent){
if (movieclip.parent != null){
timeCount = (timeCount + 1);
} else {
theTimer.stop();
};
}
public function endSession(_arg1:TimerEvent){
emptyStage();
}
public function handleNoResponse(_arg1:IOErrorEvent){
emptyStage();
}
public function emptyStage(){
if (container != null){
movieclip.removeChild(backGround_mc);
movieclip.removeChild(container);
};
mystage.scaleMode = "showAll";
mystage.align = "";
trace("end of Advertisement");
try {
trace("calling onAdFinished Handler");
this.onAdFinished();
} catch(err:Error) {
movieclip.gotoAndPlay(2);
trace("onAdFinished Not Found");
};
}
public function stageResize(_arg1:Event){
container.x = ((mystage.stageWidth / 2) - (adWidth / 2));
container.y = ((mystage.stageHeight / 2) - (adHeight / 2));
progressBar.y = (container.height + 5);
logo.x = int(((progressBar.x + progressBar.width) - logo.width));
logo.y = int(((progressBar.y + progressBar.height) + 7));
bottomTxt.y = (progressBar.y + 38);
titleTxt.y = -20;
}
public function adClickHandler(_arg1:Event){
navigateToURL(new URLRequest(iAdsXML.link), "_blank");
}
public function debug(_arg1){
var _local2:TextField = new TextField();
_local2.text = _arg1;
container.addChild(_local2);
}
public function checkAllowedHost(){
var _local1:Array = String(movieclip.root.loaderInfo.url).split("/");
var _local2:String = _local1[2];
var _local3:Boolean;
var _local4 = "games2win.com,gangofgamers.com,spilgames.com,girlsgogames.com,girlsgogames.co.uk,girlsgogames.nl,girlsgogames.fr,girlsgogames.de,girlsgogames.it,girlsgogames.br,girlsgogames.es,girlsgogames.pl,girlsgogames.se,girlsgogames.ru,juegosdechicas.com,ojogos.pt,egames.jp,game.co.in,games.co.id,games.co.uk,gamesgames.com,spelletjes.nl,jeux.fr,jetztspielen.de,gioco.it,juegos.com,ojogos.com.br,gry.pl,ourgames.ru,spela.se,a10.com,agame.com,mygames.co.uk,spel.nl,jeu.fr,spielen.com,giocaregratis.it,clickjogos.com,zapjuegos.com,minigry.pl,spel.eu,flashgames.ru,www8.agame.com,files.game.com.cn,swf.xiaoyouxi.cn,3.xiaoyouxi.cn,files.game.asia,gamedev.dev.spilgames.com";
var _local5:Array = _local4.split(",");
var _local6:* = 0;
while (_local6 < _local5.length) {
if (_local2.indexOf(_local5[_local6]) >= 0){
if ((_local2.indexOf(_local5[_local6]) + _local5[_local6].length) == _local2.length){
_local3 = true;
};
};
_local6++;
};
return (_local3);
}
}
}//package assets
Section 5
//InviziBar (assets.InviziBar)
package assets {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class InviziBar extends MovieClip {
public var loaderClip:MovieClip;
public var mc_common:MovieClip;
public function InviziBar(){
addFrameScript(0, frame1);
addEventListener(Event.ADDED_TO_STAGE, onAdded);
}
private function onAdded(_arg1:Event){
init();
removeEventListener(Event.ADDED_TO_STAGE, onAdded);
}
public function onClick(_arg1:MouseEvent){
}
public function init(){
var imageLoader:*;
var str:String;
mc_common.addEventListener(MouseEvent.CLICK, onClick);
var GameURL:* = String(this.root.loaderInfo.url);
if (((((!((GameURL.indexOf("gangofgamers.com") == -1))) || (!((GameURL.indexOf("games2win.com") == -1))))) || (!((GameURL.indexOf("girlsgogames.com") == -1))))){
mc_common.visible = false;
GameObj._gameHostStatus = true;
} else {
mc_common.visible = true;
try {
imageLoader = new Loader();
str = ((((("http://s1.inviziads.com/lookup.html?type=strip&g=" + GameObj._g2wGameId) + "&h=") + GameObj._gameHost) + "&hurl=") + this.stage.root.loaderInfo.url);
imageLoader.load(new URLRequest(str));
loaderClip.addChild(imageLoader);
} catch(e:Error) {
};
};
}
function frame1(){
stop();
}
}
}//package assets
Section 6
//LevelTracker (assets.LevelTracker)
package assets {
import flash.external.*;
public class LevelTracker {
public static function trackLevel(_arg1:String, _arg2, _arg3:String="event"){
var event = _arg1;
var eventParam = _arg2;
var type = _arg3;
trace(((((("[Games2win LevelTracker]: event::" + event) + " eventParam::") + eventParam) + " type::") + type));
if (ExternalInterface.available){
try {
ExternalInterface.call("track_game_level", event, eventParam, type);
} catch(e) {
trace("Could not Call : trackLevelEvent");
};
};
}
}
}//package assets
Section 7
//LoadingProgress (assets.LoadingProgress)
package assets {
import flash.display.*;
import flash.text.*;
public class LoadingProgress extends MovieClip {
public var percentDisplay:TextField;
public var bar:MovieClip;
private var currentValue:uint;// = 0
public function updateProgress(_arg1):void{
currentValue = _arg1;
percentDisplay.text = currentValue.toString();
bar.scaleX = (_arg1 / 100);
}
}
}//package assets
Section 8
//Logo (assets.Logo)
package assets {
import flash.events.*;
import flash.display.*;
public class Logo extends MovieClip {
public var g2wlogo:MovieClip;
public function Logo(){
init();
}
public function init():void{
addLogoListener();
this.x = 5;
this.y = 10;
}
private function addLogoListener(){
trace("added listener");
}
private function onClick(_arg1:MouseEvent){
trace("clicked on button");
}
}
}//package assets
Section 9
//SoundManager (assets.SoundManager)
package assets {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class SoundManager {
public var inGameSound:Array;
public static var sm:SoundManager;
public static var muteStatus:Boolean = false;
public static var soundVolume:SoundTransform = new SoundTransform();
public function SoundManager(_arg1:SingletonForcing){
inGameSound = new Array();
super();
}
private function checkForRepitation(_arg1:CustomSound){
var _local2:int = (inGameSound.length - 1);
while (_local2 >= 0) {
if (getQualifiedClassName(inGameSound[_local2]) == getQualifiedClassName(_arg1)){
return (true);
};
_local2--;
};
return (false);
}
public function playSound(_arg1:String, _arg2:Boolean=true){
var _local3:Class = (getDefinitionByName(_arg1) as Class);
var _local4:CustomSound = (new (_local3) as CustomSound);
var _local5:Boolean = checkForRepitation(_local4);
if (!_local5){
_local4.loopStatus = _arg2;
if (_local4 != null){
trace(("instance = " + _local4));
inGameSound.push(_local4);
_local4.playSound();
};
};
}
public function removeSound(_arg1:String){
var _local2:Class = (getDefinitionByName(_arg1) as Class);
var _local3:CustomSound = (new (_local2) as CustomSound);
trace(("instance = " + _local3));
_local3.stopSound();
removeFromArray(_local3);
}
public function removeAllSounds(){
var _local1:CustomSound;
for each (_local1 in inGameSound) {
_local1.stopSound();
trace("Removed All Sounds", _local1);
inGameSound.splice(inGameSound.indexOf(_local1), 1);
};
}
public function removeFromArray(_arg1:CustomSound){
var _local2:* = _arg1;
var _local3:int = (inGameSound.length - 1);
while (_local3 >= 0) {
if (getQualifiedClassName(inGameSound[_local3]) == getQualifiedClassName(_local2)){
trace("matched");
inGameSound[_local3].stopSound();
inGameSound.splice(_local3, 1);
};
_local3--;
};
trace(("array after sound removal called = " + inGameSound));
}
public function muteAllMusic(){
var _local1:*;
SoundManager.muteStatus = true;
for each (_local1 in inGameSound) {
_local1.muteMusic();
};
}
public function unMuteAllMusic(){
var _local1:*;
SoundManager.muteStatus = false;
for each (_local1 in inGameSound) {
_local1.unMuteMusic();
};
}
public static function get callBack():SoundManager{
if (sm == null){
sm = new SoundManager(new SingletonForcing());
};
return (sm);
}
}
}//package assets
class SingletonForcing {
private function SingletonForcing(){
}
}
Section 10
//VolumeControl (assets.VolumeControl)
package assets {
import flash.events.*;
import flash.display.*;
import flash.ui.*;
public class VolumeControl extends MovieClip {
public var volumeControl:MovieClip;
public function VolumeControl(){
init();
}
public function init():void{
addVolumeListener();
this.x = 600;
this.y = 18;
}
private function addVolumeListener(){
volumeControl.buttonMode = true;
volumeControl.useHandCursor = true;
volumeControl.mouseChildren = false;
volumeControl.mouseEnabled = true;
volumeControl.addEventListener(MouseEvent.CLICK, onMute);
volumeControl.addEventListener(MouseEvent.ROLL_OVER, onOver);
volumeControl.addEventListener(MouseEvent.ROLL_OUT, onOut);
}
private function onOver(_arg1:MouseEvent){
var _local2:MovieClip = ((this.root as DocumentClass) as MovieClip);
if (_local2 != null){
if (_local2.game_mc != null){
if (_local2.game_mc.gun_mc != null){
if (_local2.game_mc.gun_mc._state){
Mouse.show();
};
};
} else {
if (((!((_local2.demo_mc == null))) && (!((_local2.demo_mc.game_mc.gun_mc == null))))){
if (_local2.demo_mc.game_mc.gun_mc != null){
if (_local2.demo_mc.game_mc.gun_mc._state){
Mouse.show();
};
};
};
};
};
}
private function onOut(_arg1:MouseEvent){
var _local2:MovieClip = ((this.root as DocumentClass) as MovieClip);
if (_local2 != null){
if (_local2.game_mc != null){
if (_local2.game_mc.gun_mc != null){
if (((_local2.game_mc.gun_mc._state) && ((_local2.game_mc.gameState == "init")))){
Mouse.hide();
};
};
} else {
if (((!((_local2.demo_mc == null))) && (!((_local2.demo_mc.game_mc.gun_mc == null))))){
if (_local2.demo_mc.game_mc.gun_mc != null){
if (_local2.demo_mc.game_mc.gun_mc._state){
Mouse.hide();
};
};
};
};
};
}
private function onMute(_arg1:MouseEvent){
if (volumeControl.currentFrame == 1){
SoundManager.callBack.muteAllMusic();
volumeControl.gotoAndStop(2);
} else {
SoundManager.callBack.unMuteAllMusic();
volumeControl.gotoAndStop(1);
};
}
}
}//package assets
Section 11
//ak47_281 (miami_outlaws_gog_fla.ak47_281)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class ak47_281 extends MovieClip {
public var gunr_mc:MovieClip;
public var gun_mc:MovieClip;
public function ak47_281(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 12
//BG_2game_76 (miami_outlaws_gog_fla.BG_2game_76)
package miami_outlaws_gog_fla {
import flash.events.*;
import flash.display.*;
import flash.xml.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class BG_2game_76 extends MovieClip {
public var image_02:MovieClip;
public function BG_2game_76(){
addFrameScript(0, frame1);
}
function frame1(){
image_02.forceSmoothing = true;
}
}
}//package miami_outlaws_gog_fla
Section 13
//BG_3game_79 (miami_outlaws_gog_fla.BG_3game_79)
package miami_outlaws_gog_fla {
import flash.events.*;
import flash.display.*;
import flash.xml.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class BG_3game_79 extends MovieClip {
public var image_03:MovieClip;
public function BG_3game_79(){
addFrameScript(0, frame1);
}
function frame1(){
image_03.forceSmoothing = true;
}
}
}//package miami_outlaws_gog_fla
Section 14
//BG_4game_82 (miami_outlaws_gog_fla.BG_4game_82)
package miami_outlaws_gog_fla {
import flash.events.*;
import flash.display.*;
import flash.xml.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class BG_4game_82 extends MovieClip {
public var image_04:MovieClip;
public function BG_4game_82(){
addFrameScript(0, frame1);
}
function frame1(){
image_04.forceSmoothing = true;
}
}
}//package miami_outlaws_gog_fla
Section 15
//credit_mc_97 (miami_outlaws_gog_fla.credit_mc_97)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class credit_mc_97 extends MovieClip {
public function credit_mc_97(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 16
//cur_mc_241 (miami_outlaws_gog_fla.cur_mc_241)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class cur_mc_241 extends MovieClip {
public function cur_mc_241(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 17
//easy_164 (miami_outlaws_gog_fla.easy_164)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class easy_164 extends MovieClip {
public function easy_164(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 18
//flag_icon_402 (miami_outlaws_gog_fla.flag_icon_402)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class flag_icon_402 extends MovieClip {
public function flag_icon_402(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 19
//g2w_external_links_446 (miami_outlaws_gog_fla.g2w_external_links_446)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class g2w_external_links_446 extends MovieClip {
public var btn_videoTutorial:SimpleButton;
public var btn_shareScore:SimpleButton;
public function g2w_external_links_446(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 20
//game_mcintro_In_169 (miami_outlaws_gog_fla.game_mcintro_In_169)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class game_mcintro_In_169 extends MovieClip {
public var holder_mc:MovieClip;
public var lholder_mc:MovieClip;
public var bg_mc:MovieClip;
public var clip_mc:MovieClip;
public function game_mcintro_In_169(){
addFrameScript(264, frame265);
}
function frame265(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 21
//game_mcintro_Inclick_229 (miami_outlaws_gog_fla.game_mcintro_Inclick_229)
package miami_outlaws_gog_fla {
import flash.events.*;
import flash.display.*;
import flash.xml.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class game_mcintro_Inclick_229 extends MovieClip {
public var bg_mc:MovieClip;
public var gun_mc:main_gun_demo;
public var clip_mc:MovieClip;
public var bar;
public var done:Boolean;
public function game_mcintro_Inclick_229(){
addFrameScript(0, frame1);
}
public function doit_(_arg1:Event):void{
var _local3:blast;
var _local2:MovieClip = (clip_mc.getChildByName("bar_mc") as MovieClip);
_local2.gotoAndStop(Math.floor(((_local2.totalFrames * clip_mc.per) / 100)));
if (((gun_mc.cur_mc.hitTestObject(clip_mc)) && (gun_mc.shoot))){
clip_mc.per = (clip_mc.per - 10);
if ((((clip_mc.per < 0)) && (done))){
done = false;
clip_mc.per = 0;
gun_mc.stopGun();
ScreenShake.go(root, 5, 0.2);
_local3 = new blast();
addChild(_local3);
_local3.x = 249.6;
_local3.y = clip_mc.y;
removeChild(clip_mc);
(this.parent.parent as MovieClip).play_ = true;
(this.parent.getChildByName("pop_up_mc") as MovieClip).play();
};
};
}
function frame1(){
this.addEventListener(Event.ENTER_FRAME, doit_);
clip_mc.per = 100;
bar = new bar_mc();
clip_mc.addChild(bar);
bar.name = "bar_mc";
bar.x = 25;
bar.y = -10;
done = true;
}
}
}//package miami_outlaws_gog_fla
Section 22
//gun_243 (miami_outlaws_gog_fla.gun_243)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class gun_243 extends MovieClip {
public var gun_mc:MovieClip;
public function gun_243(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 23
//gun_sound_345 (miami_outlaws_gog_fla.gun_sound_345)
package miami_outlaws_gog_fla {
import flash.display.*;
import assets.*;
public dynamic class gun_sound_345 extends MovieClip {
public function gun_sound_345(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame1(){
stop();
SoundManager.callBack.removeSound("a");
SoundManager.callBack.removeSound("b");
SoundManager.callBack.removeSound("shoot");
SoundManager.callBack.removeSound("reload");
}
function frame2(){
SoundManager.callBack.removeSound("reload");
SoundManager.callBack.playSound("shoot", true);
}
function frame3(){
stop();
SoundManager.callBack.removeSound("shoot");
SoundManager.callBack.removeSound("a");
SoundManager.callBack.removeSound("b");
SoundManager.callBack.playSound("reload", false);
}
function frame4(){
SoundManager.callBack.removeSound("reload");
SoundManager.callBack.playSound("a", true);
}
function frame5(){
SoundManager.callBack.removeSound("reload");
SoundManager.callBack.playSound("b", true);
}
}
}//package miami_outlaws_gog_fla
Section 24
//hard_167 (miami_outlaws_gog_fla.hard_167)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class hard_167 extends MovieClip {
public function hard_167(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 25
//insT_382 (miami_outlaws_gog_fla.insT_382)
package miami_outlaws_gog_fla {
import flash.events.*;
import flash.display.*;
import flash.xml.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class insT_382 extends MovieClip {
public var back_mc:MovieClip;
public function insT_382(){
addFrameScript(0, frame1, 1, frame2);
}
public function back_(_arg1:MouseEvent):void{
var _local2:MovieClip = (this.parent as MovieClip);
_local2.gameState = "init";
Mouse.hide();
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame2(){
back_mc.addEventListener(MouseEvent.CLICK, back_);
}
}
}//package miami_outlaws_gog_fla
Section 26
//intro_In_168 (miami_outlaws_gog_fla.intro_In_168)
package miami_outlaws_gog_fla {
import flash.events.*;
import flash.display.*;
import flash.xml.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class intro_In_168 extends MovieClip {
public var game_mc:MovieClip;
public function intro_In_168(){
addFrameScript(0, frame1, 102, frame103, 130, frame131);
}
function frame1(){
this.b = false;
}
function frame103(){
this.b = true;
stop();
}
function frame131(){
(this.parent as MovieClip).gotoAndStop("demo_");
}
}
}//package miami_outlaws_gog_fla
Section 27
//m4a101_262 (miami_outlaws_gog_fla.m4a101_262)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class m4a101_262 extends MovieClip {
public var gunr_mc:MovieClip;
public var gun_mc:MovieClip;
public function m4a101_262(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 28
//mag_303 (miami_outlaws_gog_fla.mag_303)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class mag_303 extends MovieClip {
public var gunr_mc:MovieClip;
public var gun_mc:MovieClip;
public function mag_303(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 29
//mc_all_playagain_lose_449 (miami_outlaws_gog_fla.mc_all_playagain_lose_449)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class mc_all_playagain_lose_449 extends MovieClip {
public var btn_playAgain:SimpleButton;
public function mc_all_playagain_lose_449(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 30
//mc_gamesplash_gog_72 (miami_outlaws_gog_fla.mc_gamesplash_gog_72)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class mc_gamesplash_gog_72 extends MovieClip {
public function mc_gamesplash_gog_72(){
addFrameScript(179, frame180);
}
function frame180(){
(this.parent as MovieClip).gotoAndStop("gameStart");
}
}
}//package miami_outlaws_gog_fla
Section 31
//moving_bike_239 (miami_outlaws_gog_fla.moving_bike_239)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class moving_bike_239 extends MovieClip {
public function moving_bike_239(){
addFrameScript(0, frame1, 59, frame60);
}
function frame1(){
stop();
}
function frame60(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 32
//moving_bikecopy_180 (miami_outlaws_gog_fla.moving_bikecopy_180)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class moving_bikecopy_180 extends MovieClip {
public function moving_bikecopy_180(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 33
//mp501_244 (miami_outlaws_gog_fla.mp501_244)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class mp501_244 extends MovieClip {
public var gunr_mc:MovieClip;
public var gun_mc:MovieClip;
public function mp501_244(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 34
//pop_up_385 (miami_outlaws_gog_fla.pop_up_385)
package miami_outlaws_gog_fla {
import flash.events.*;
import flash.display.*;
import flash.xml.*;
import assets.*;
import flash.text.*;
import flash.geom.*;
import spilgames.api.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class pop_up_385 extends MovieClip {
public var mainClip:MovieClip;
public var mainClass;
public function pop_up_385(){
addFrameScript(0, frame1, 85, frame86);
}
function frame1(){
stop();
}
function frame86(){
mainClip = (this.parent as MovieClip);
mainClip.game_mc.removeEventListeners();
if (mainClip.levelNo == 6){
LevelTracker.trackLevel("Win", (this.root as DocumentClass).levelNo, "levels");
mainClip.gameFeed_mc.gotoAndStop(4);
} else {
LevelTracker.trackLevel("Win", (this.root as DocumentClass).levelNo, "levels");
mainClip.gameFeed_mc.gotoAndStop(2);
};
mainClass = mainClip.game_mc;
mainClass.score = (mainClass.score + mainClass.money);
mainClass.score = (mainClass.score * 2);
trace(("guntype" + mainClass.guntype));
if (mainClass.guntype == 3){
mainClip.ak47Count++;
if ((((mainClip.ak47Count == 3)) && ((GameClass.award1Status == true)))){
trace("AWARD1");
GameClass.award1Status = false;
AwardsService.submitAward("award1");
};
};
if ((((mainClass.guntype == 5)) && ((GameClass.award4Status == true)))){
trace("AWARD4");
GameClass.award4Status = false;
AwardsService.submitAward("award4");
};
gotoAndStop(1);
}
}
}//package miami_outlaws_gog_fla
Section 35
//pra_322 (miami_outlaws_gog_fla.pra_322)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class pra_322 extends MovieClip {
public var gunr_mc:MovieClip;
public var gun_mc:MovieClip;
public function pra_322(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 36
//relod_369 (miami_outlaws_gog_fla.relod_369)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class relod_369 extends MovieClip {
public function relod_369(){
addFrameScript(0, frame1, 22, frame23, 29, frame30);
}
function frame1(){
stop();
}
function frame23(){
stop();
}
function frame30(){
gotoAndStop(1);
}
}
}//package miami_outlaws_gog_fla
Section 37
//remote_mc_102 (miami_outlaws_gog_fla.remote_mc_102)
package miami_outlaws_gog_fla {
import flash.events.*;
import flash.display.*;
import flash.xml.*;
import assets.*;
import flash.text.*;
import flash.geom.*;
import spilgames.api.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class remote_mc_102 extends MovieClip {
public var score_txt:TextField;
public var playAgain_mc:MovieClip;
public var mainClass;
public var mainClass2;
public function remote_mc_102(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function playAgain_fun(_arg1:MouseEvent):void{
if (!this.b){
trace((((this.root as DocumentClass).gameFeed_mc + " : ") + _arg1.target.parent.parent));
(this.root as DocumentClass).levelNo++;
(this.root as DocumentClass).gameFeed_mc.gotoAndStop(1);
(this.root as DocumentClass).game_mc.playAgain((this.root as DocumentClass).levelNo);
playSound((this.root as DocumentClass).levelNo);
} else {
(this.root as DocumentClass).gameFeed_mc.gotoAndStop(1);
(this.root as DocumentClass).game_mc.playAgain((this.root as DocumentClass).levelNo);
playSound((this.root as DocumentClass).levelNo);
};
}
public function playSound(_arg1){
SoundManager.callBack.removeAllSounds();
var _local2 = "Ingame";
if ((((((_arg1 == 1)) || ((_arg1 == 3)))) || ((_arg1 == 5)))){
_local2 = "Ingame";
} else {
if ((((((_arg1 == 2)) || ((_arg1 == 4)))) || ((_arg1 == 6)))){
_local2 = "Ingame";
};
};
SoundManager.callBack.playSound(_local2, true);
}
public function playAgain_fun_(_arg1:MouseEvent):void{
trace((this.root as DocumentClass).levelNo);
(this.root as DocumentClass).gameFeed_mc.gotoAndStop(1);
(this.root as DocumentClass).game_mc.playAgain((this.root as DocumentClass).levelNo);
}
public function playAgain_fun__(_arg1:MouseEvent):void{
trace(((this.root as DocumentClass).levelNo + " : "));
(this.root as DocumentClass).levelNo = 1;
(this.root as DocumentClass).gameFeed_mc.gotoAndStop(1);
(this.root as DocumentClass).gotoAndStop("gameStart");
}
function frame1(){
stop();
}
function frame2(){
if (this.b){
playAgain_mc.gotoAndStop(2);
} else {
playAgain_mc.gotoAndStop(1);
};
playAgain_mc.addEventListener(MouseEvent.CLICK, playAgain_fun);
}
function frame3(){
stop();
LevelTracker.trackLevel("Lose", (this.root as DocumentClass).levelNo, "levels");
trace(("suraj = " + playAgain_mc.parent.parent.parent));
mainClass = ((this.parent as MovieClip).game_mc as MovieClip);
score_txt.text = ("" + mainClass.score);
ScoreService.submitScore(mainClass.score);
playAgain_mc.visible = false;
playAgain_mc.addEventListener(MouseEvent.CLICK, playAgain_fun_);
if ((this.root as DocumentClass).levelNo != 6){
(this.root as DocumentClass).doGameOver("gameOver", true, 3, mainClass.score);
} else {
(this.root as DocumentClass).doGameOver("gameOver", false, 3, mainClass.score);
};
}
function frame4(){
stop();
mainClass2 = ((this.parent as MovieClip).game_mc as MovieClip);
mainClass2.score = (mainClass2.score + mainClass2.money);
mainClass2.score = mainClass2.score;
score_txt.text = ("" + mainClass2.score);
ScoreService.submitScore(mainClass2.score);
playAgain_mc.visible = false;
playAgain_mc.addEventListener(MouseEvent.CLICK, playAgain_fun__);
if (((((this.root as DocumentClass).isPlayedAgain == false)) && ((GameClass.award5Status == true)))){
trace("AWARD5");
GameClass.award5Status = false;
AwardsService.submitAward("award5");
};
(this.root as DocumentClass).doGameOver("gameComplete", false, 3, mainClass2.score);
}
}
}//package miami_outlaws_gog_fla
Section 38
//remotemountain_mc_361 (miami_outlaws_gog_fla.remotemountain_mc_361)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class remotemountain_mc_361 extends MovieClip {
public function remotemountain_mc_361(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 39
//sound1_419 (miami_outlaws_gog_fla.sound1_419)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class sound1_419 extends MovieClip {
public function sound1_419(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 40
//Symbol15click_351 (miami_outlaws_gog_fla.Symbol15click_351)
package miami_outlaws_gog_fla {
import flash.events.*;
import flash.display.*;
import flash.xml.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
public dynamic class Symbol15click_351 extends MovieClip {
public function Symbol15click_351(){
addFrameScript(44, frame45, 128, frame129);
}
function frame45(){
if ((this.parent.parent as MovieClip).play_){
} else {
stop();
};
}
function frame129(){
(this.parent.parent as MovieClip).gotoAndStop("level1");
}
}
}//package miami_outlaws_gog_fla
Section 41
//Symbol16_188 (miami_outlaws_gog_fla.Symbol16_188)
package miami_outlaws_gog_fla {
import flash.display.*;
public dynamic class Symbol16_188 extends MovieClip {
public function Symbol16_188(){
addFrameScript(110, frame111);
}
function frame111(){
stop();
}
}
}//package miami_outlaws_gog_fla
Section 42
//AwardsService (spilgames.api.AwardsService)
package spilgames.api {
public class AwardsService {
public static function submitAward(_arg1:String, _arg2:Function=null):int{
return (SpilGamesServices.getInstance().send("Awards", "submitAward", _arg2, {tag:_arg1, userName:User.getUserName(), userHash:User.getUserHash()}));
}
}
}//package spilgames.api
Section 43
//ScoreService (spilgames.api.ScoreService)
package spilgames.api {
public class ScoreService {
public static function submitScore(_arg1:int, _arg2:Function=null):int{
return (SpilGamesServices.getInstance().send("Score", "submitScore", _arg2, {score:_arg1, userName:User.getUserName(), userHash:User.getUserHash()}));
}
}
}//package spilgames.api
Section 44
//SpilGamesServices (spilgames.api.SpilGamesServices)
package spilgames.api {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class SpilGamesServices extends MovieClip {
private const DEFAULT_CONNECTION_LOCATION:String = "http://www8.agame.com/games/flash/services/ServicesConnection.swf";
private var _servicesConnection;// = null
private var _loader:Loader;
private var _connecting:Boolean;// = false
private var _connected:Boolean;// = false
private var _request:URLRequest;
private var _numConnectionLoadTries:uint;// = 0
private var _alwaysInFront:Boolean;// = false
private var currentDelay:Number;// = 0
private var previousFrameTime:Number;
public static const INVALID_ID:int = -1;
public static const INVALID_DOMAIN:String = "invalidDomain";
public static const CONFIGURATION_FAILED:String = "configurationFailure";
private static const MAX_CONNECTION_LOAD_RETRIES:uint = 99;
private static var _instance:SpilGamesServices = null;
public function SpilGamesServices(_arg1:Private=null){
if (!_arg1){
throw (new Error("Cannot instantiate this class, use SpilGamesServices.getInstance"));
};
}
public function get version():String{
return ("1.1");
}
public function get connecting():Boolean{
return (_connecting);
}
public function get connection(){
return (_servicesConnection);
}
public function set alwaysInFront(_arg1:Boolean):void{
if (_alwaysInFront != _arg1){
_alwaysInFront = _arg1;
if (_alwaysInFront){
addEventListener(Event.ENTER_FRAME, bringToFront);
} else {
removeEventListener(Event.ENTER_FRAME, bringToFront);
};
};
}
public function get alwaysInFront():Boolean{
return (_alwaysInFront);
}
public function connect(_arg1:DisplayObjectContainer, ... _args):void{
var _local3:String;
var _local4:URLVariables;
var _local5:Date;
if (((!(_connecting)) && (!(_connected)))){
if (!_arg1.stage){
throw (new Error("The given clip must be present in the display list (added to stage)"));
};
_connecting = true;
_arg1.stage.addChild(this);
addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
if (((root.loaderInfo.parameters["servicesLoc"]) && ((root.loaderInfo.parameters["servicesLoc"].length > 0)))){
_local3 = root.loaderInfo.parameters["servicesLoc"];
_request = new URLRequest(_local3);
} else {
_local3 = DEFAULT_CONNECTION_LOCATION;
_local4 = new URLVariables();
_local5 = new Date();
_local4.nocache = ((((_local5.fullYear * 12) + (_local5.month + 1)) * 31) + _local5.day);
_request = new URLRequest(_local3);
_request.data = _local4;
};
allowDomain(_local3);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_loader.load(_request);
};
}
public function disconnect():void{
if (_servicesConnection){
_servicesConnection.removeEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.removeEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.removeEventListener("serviceError", handleServiceError);
if (_connected){
_servicesConnection.disconnect();
};
removeChild(_servicesConnection);
};
_servicesConnection = null;
if (_loader){
try {
_loader.close();
} catch(e:Error) {
} finally {
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
};
_loader = null;
};
removeEventListener(Event.ENTER_FRAME, bringToFront);
removeEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
if (parent){
parent.removeChild(this);
};
_connected = (_connecting = false);
}
public function getChannelID():int{
if (_servicesConnection != null){
return (_servicesConnection.getChannelID());
};
return (INVALID_ID);
}
public function getSiteID():int{
if (_servicesConnection != null){
return (_servicesConnection.getSiteID());
};
return (INVALID_ID);
}
public function getItemID():int{
if (_servicesConnection != null){
return (_servicesConnection.getItemID());
};
return (INVALID_ID);
}
public function isReady():Boolean{
return (((!((_servicesConnection == null))) && (_servicesConnection.isReady())));
}
public function isDomainAllowed():Boolean{
return (((!((_servicesConnection == null))) && (_servicesConnection.isDomainValid())));
}
public function isServiceAvailable(_arg1:String):Boolean{
return (((isReady()) && (_servicesConnection.isServiceAvailable(_arg1))));
}
public function send(_arg1:String, _arg2:String, _arg3:Function, _arg4:Object=null):int{
if (isReady()){
return (_servicesConnection.send(_arg1, _arg2, _arg3, _arg4));
};
return (INVALID_ID);
}
public function bringToFront(_arg1:Event=null):void{
var e = _arg1;
if (parent){
try {
parent.setChildIndex(this, (parent.numChildren - 1));
} catch(e:Error) {
removeEventListener(Event.ENTER_FRAME, bringToFront);
};
};
}
public function allowDomain(_arg1:String):void{
Security.allowDomain("*");
Security.allowInsecureDomain("*");
}
private function handleRemovedFromStage(_arg1:Event):void{
trace("WARNING: please do not remove SpilGamesServices from the stage");
}
private function handleLoadComplete(_arg1:Event):void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_servicesConnection = LoaderInfo(_arg1.target).content;
_servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.addEventListener("serviceError", handleServiceError);
addChild(_servicesConnection);
}
private function handleIOError(_arg1:IOErrorEvent):void{
_numConnectionLoadTries++;
if (_numConnectionLoadTries > MAX_CONNECTION_LOAD_RETRIES){
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_connecting = false;
trace("ERROR: SpilGamesServices failed to load the connection object");
if (hasEventListener(_arg1.type)){
dispatchEvent(_arg1);
};
} else {
trace(("WARN: SpilGamesServices failed to load the connection object, retry #" + _numConnectionLoadTries));
previousFrameTime = getTimer();
addEventListener(Event.ENTER_FRAME, updateConnectionRetry);
};
}
private function updateConnectionRetry(_arg1:Event):void{
var _local2:Number = getTimer();
var _local3:Number = ((_local2 - previousFrameTime) / 1000);
currentDelay = (currentDelay + _local3);
if (currentDelay >= 2){
trace(("WARN: SpilGamesServices trying to reconnect after: " + currentDelay));
_loader.load(_request);
removeEventListener(Event.ENTER_FRAME, updateConnectionRetry);
currentDelay = 0;
};
previousFrameTime = _local2;
}
private function handleServicesReady(_arg1:Event):void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_connected = true;
_connecting = false;
dispatchEvent(new Event("servicesReady"));
}
private function handleServicesFailed(_arg1:ErrorEvent):void{
_servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.addEventListener("serviceError", handleServiceError);
_connecting = false;
if (hasEventListener("servicesFailed")){
dispatchEvent(new ErrorEvent("servicesFailed", false, false, _arg1.text));
};
}
private function handleServiceError(_arg1:Event):void{
var _local2:String;
if (hasEventListener("serviceError")){
_local2 = "";
if ((_arg1 is ErrorEvent)){
_local2 = ErrorEvent(_arg1).text;
} else {
_local2 = _arg1.toString();
};
dispatchEvent(new ErrorEvent("serviceError", false, false, _local2));
};
}
public static function getInstance():SpilGamesServices{
if (!_instance){
_instance = new SpilGamesServices(new Private());
};
return (_instance);
}
}
}//package spilgames.api
class Private {
private function Private(){
}
}
Section 45
//User (spilgames.api.User)
package spilgames.api {
import flash.display.*;
public class User {
public static function isGuest():Boolean{
var _local2:DisplayObject;
var _local3:Object;
var _local1:* = SpilGamesServices.getInstance().connection;
if (_local1 != null){
return (_local1.isGuest());
};
_local2 = SpilGamesServices.getInstance().root;
if (_local2.loaderInfo != null){
_local3 = _local2.loaderInfo.parameters;
return (((((((!(_local3.username)) || ((_local3.username == "")))) || (!(_local3.hash)))) || ((_local3.hash == ""))));
};
return (false);
}
public static function getUserName():String{
var _local1:* = SpilGamesServices.getInstance().connection;
if (_local1 != null){
return (_local1.getUserName());
};
return ("");
}
public static function getUserHash():String{
var _local1:* = SpilGamesServices.getInstance().connection;
if (_local1 != null){
return (_local1.getUserHash());
};
return ("");
}
}
}//package spilgames.api
Section 46
//Brand (spill.localisation.Brand)
package spill.localisation {
import flash.xml.*;
public class Brand {
public var domain:String;
public var site_id:uint;
public var moreLink:String;// = ""
public var emailLink:String;// = "game"
public var emailPage:String;
public var id:Number;
public var name:String;
public var portalGroup:uint;
public var useGoogleAnalitics:Boolean;// = true
public var hasSendToFriendLink:Boolean;// = true
public var preferedLanguage:String;// = ""
public var isExternal:Boolean;// = false
public var hostingDomain:String;// = ""
private static const topLevelDoubles:String = ((((((((((((((("ac.cn,ac.jp,ac.uk,ad.jp,adm.br,adv.br,agr.br," + "ah.cn,am.br,arq.br,art.br,asn.au,ato.br,av.tr,bel.tr,bio.br,biz.tr,bj.cn,bmd.br,") + "cim.br,cng.br,cnt.br,co.at,co.jp,co.uk,com.au,com.br,com.cn,com.eg,com.hk,com.mx,") + "com.ru,com.tr,com.tw,conf.au,cq.cn,csiro.au,dr.tr,ecn.br,edu.au,edu.br,edu.tr,") + "emu.id.au,eng.br,esp.br,etc.br,eti.br,eun.eg,far.br,fj.cn,fm.br,fnd.br,fot.br,") + "fst.br,g12.br,gb.com,gb.net,gd.cn,gen.tr,ggf.br,gob.mx,gov.au,gov.br,gov.cn,") + "gov.hk,gov.tr,gr.jp,gs.cn,gx.cn,gz.cn,ha.cn,hb.cn,he.cn,hi.cn,hk.cn,hl.cn,hn.cn,") + "id.au,idv.tw,imb.br,ind.br,inf.br,info.au,info.tr,jl.cn,jor.br,js.cn,jx.cn,k12.tr,") + "lel.br,ln.cn,ltd.uk,mat.br,me.uk,med.br,mil.br,mil.tr,mo.cn,mus.br,name.tr,ne.jp,") + "net.au,net.br,net.cn,net.eg,net.hk,net.lu,net.mx,net.ru,net.tr,net.tw,net.uk,") + "nm.cn,no.com,nom.br,not.br,ntr.br,nx.cn,odo.br,oop.br,or.at,or.jp,org.au,org.br,") + "org.cn,org.hk,org.lu,org.ru,org.tr,org.tw,org.uk,plc.uk,pol.tr,pp.ru,ppg.br,pro.br,") + "psc.br,psi.br,qh.cn,qsl.br,rec.br,sc.cn,sd.cn,se.com,se.net,sh.cn,slg.br,sn.cn,") + "srv.br,sx.cn,tel.tr,tj.cn,tmp.br,trd.br,tur.br,tv.br,tw.cn,uk.com,uk.net,vet.br,") + "wattle.id.au,web.tr,xj.cn,xz.cn,yn.cn,zj.cn,zlg.br,co.nr,co.nz,com.fr,com.ph,com.ar,") + "com.id,com.in");
public function getMoreGamesLink(_arg1:String, _arg2:Boolean, _arg3:String="", _arg4:String=""):String{
var _local5:String = ("http://" + domain);
_local5 = (_local5 + ("/" + moreLink));
if (((useGoogleAnalitics) && (_arg2))){
_local5 = (_local5 + ("?utm_medium=brandedgames_" + (_arg2) ? "external" : "internal"));
_local5 = (_local5 + ("&utm_campaign=" + _arg1));
_arg3 = stripSubDomain(_arg3);
if (_arg3 == "localhost"){
_arg3 = "offline_play";
};
_local5 = (_local5 + ("&utm_source=" + _arg3));
if (((!((_arg4 == ""))) && (!((_arg4 == null))))){
_local5 = (_local5 + ("&utm_content=" + _arg4));
};
};
return (_local5);
}
public function getSendToFriendLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String=""):String{
if (!hasSendToFriendLink){
return (getMoreGamesLink(_arg1, _arg3));
};
var _local5:String = ("http://" + domain);
_local5 = (_local5 + ((("/" + emailLink) + "/") + _arg2));
if (useGoogleAnalitics){
_local5 = (_local5 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal"));
_local5 = (_local5 + ("&utm_campaign=" + _arg1));
_arg4 = stripSubDomain(_arg4);
if (_arg4 == "localhost"){
_arg4 = "offline_play";
};
_local5 = (_local5 + ("&utm_source=" + _arg4));
_local5 = (_local5 + "&utm_content=send_to_friend");
};
return (_local5);
}
public function getPromotionLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String="", _arg5:String=""):String{
var _local6:String = ("http://" + domain);
_local6 = (_local6 + ((("/" + emailLink) + "/") + _arg2));
if (useGoogleAnalitics){
_local6 = (_local6 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal"));
_local6 = (_local6 + ("&utm_campaign=" + _arg1));
_arg4 = stripSubDomain(_arg4);
trace(_arg4);
if (_arg4 == "localhost"){
_arg4 = "offline_play";
};
_local6 = (_local6 + ("&utm_source=" + _arg4));
if (((!((_arg5 == ""))) && (!((_arg5 == null))))){
_local6 = (_local6 + ("&utm_content=" + _arg5));
};
};
return (_local6);
}
public function get backgroundColor():uint{
return (PortalGroup.backgroundColors[portalGroup]);
}
public function exportXML():XML{
var _local3:XML;
var _local1:XML = <portal/>
;
_local1.@id = site_id;
_local1.@language = preferedLanguage;
_local1.@channel = portalGroup;
var _local2:XML = <domain/>
;
_local2.appendChild(new XMLNode(3, domain));
_local1.appendChild(_local2);
if (moreLink){
_local3 = <more_games_path/>
;
_local3.appendChild(new XMLNode(3, moreLink));
_local1.appendChild(_local3);
};
_local2 = <game_path/>
;
_local2.appendChild(new XMLNode(3, emailLink));
_local1.appendChild(_local2);
if (!useGoogleAnalitics){
_local1.attributes.noGoogleAnalitics = true;
};
if (!hasSendToFriendLink){
_local1.attributes.noSendToFriendLink = true;
};
return (_local1);
}
public function importXML(_arg1:XMLNode):void{
}
private function get utm_source():String{
return (("utm_source=brandedgames_" + (isExternal) ? "external" : "internal"));
}
private function get utm_term():String{
return ("utm_term=");
}
private function get utm_campaign():String{
if (isExternal){
return (("utm_campaign=" + hostingDomain));
};
return ("");
}
public static function stripSubDomain(_arg1:String):String{
if (!_arg1){
return ("");
};
var _local2:Array = _arg1.split(".");
if (_local2.length <= 2){
return (_arg1);
};
_local2 = _local2.reverse();
if (topLevelDoubles.indexOf((((_local2[1] + ".") + _local2[0]) + ",")) > 0){
return (((((_local2[2] + ".") + _local2[1]) + ".") + _local2[0]));
};
return (((_local2[1] + ".") + _local2[0]));
}
}
}//package spill.localisation
Section 47
//BrandingLogo (spill.localisation.BrandingLogo)
package spill.localisation {
import flash.events.*;
import flash.display.*;
public class BrandingLogo extends MovieClip {
public function BrandingLogo(){
addFrameScript(0, frame1);
super();
stop();
mouseEnabled = false;
mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
if (stage){
added();
};
brandingChanged();
}
private function added(_arg1:Event=null):void{
SpilGame.addEventListener("brandingChanged", brandingChanged, false, 0, true);
brandingChanged();
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("brandingChanged", brandingChanged);
}
private function brandingChanged(_arg1:Event=null):void{
if (SpilGame.currentBranding){
gotoAndStop(SpilGame.currentBranding.domain);
};
}
function frame1(){
stop();
}
}
}//package spill.localisation
Section 48
//Brandings (spill.localisation.Brandings)
package spill.localisation {
public class Brandings {
private static var brands_by_id:Object = new Object();
private static var brands_by_domain:Object = new Object();
public static function initialize():void{
var _local1:Brand;
_local1 = new Brand();
_local1.site_id = 79;
_local1.domain = "www.agame.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.TEENS;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 88;
_local1.domain = "www.gamesgames.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 90;
_local1.domain = "www.girlsgogames.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.GIRL;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 45;
_local1.domain = "www.a10.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.YOUNG_ADULTS;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 92;
_local1.domain = "www.games.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 107;
_local1.domain = "www.agame.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.TEENS;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 138;
_local1.domain = "www.giochi.it";
_local1.preferedLanguage = "it";
_local1.portalGroup = PortalGroup.TEENS;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 102;
_local1.domain = "www.girlsgogames.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.GIRL;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 2;
_local1.domain = "www.game.com.cn";
_local1.moreLink = "moregames/";
_local1.preferedLanguage = "cn";
_local1.portalGroup = PortalGroup.NONE;
_local1.useGoogleAnalitics = false;
_local1.hasSendToFriendLink = false;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 25;
_local1.domain = "www.spel.nl";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 1;
_local1.domain = "www.spelletjes.nl";
_local1.emailLink = "spel";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 93;
_local1.domain = "www.girlsgogames.nl";
_local1.emailLink = "spel";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 12;
_local1.domain = "www.jeu.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 95;
_local1.domain = "www.girlsgogames.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 11;
_local1.domain = "www.jeux.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 26;
_local1.domain = "www.spielen.com";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 94;
_local1.domain = "www.girlsgogames.de";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 5;
_local1.domain = "www.jetztspielen.de";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 109;
_local1.domain = "www.minigry.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 16;
_local1.domain = "www.gry.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 98;
_local1.domain = "www.girlsgogames.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 108;
_local1.domain = "www.spel.se";
_local1.emailLink = "spel_";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "se";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 100;
_local1.domain = "www.girlsgogames.se";
_local1.emailLink = "spel_";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "se";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 44;
_local1.domain = "www.spela.se";
_local1.emailLink = "spel_";
_local1.preferedLanguage = "se";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 106;
_local1.domain = "www.giocaregratis.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 15;
_local1.domain = "www.gioco.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 99;
_local1.domain = "www.girlsgogames.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 97;
_local1.domain = "www.zapjuegos.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 86;
_local1.domain = "www.juegos.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 96;
_local1.domain = "www.juegosdechicas.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 122;
_local1.domain = "www.girlsgogames.es";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 125;
_local1.domain = "www.juegos.mx";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 126;
_local1.domain = "www.juegosdechicas.mx";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 127;
_local1.domain = "www.juegos.com.ar";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 128;
_local1.domain = "www.juegosdechicas.com.ar";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 91;
_local1.domain = "www.clickjogos.com";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 101;
_local1.domain = "www.girlsgogames.com.br";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 50;
_local1.domain = "www.ojogos.com.br";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 55;
_local1.domain = "www.games.co.id";
_local1.emailLink = "permainanme";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "id";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 105;
_local1.domain = "www.flashgames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 104;
_local1.domain = "www.girlsgogames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 103;
_local1.domain = "www.ourgames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 24;
_local1.domain = "www.game.co.in";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "in";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 87;
_local1.domain = "www.ojogos.pt";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "pt";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 120;
_local1.domain = "www.egames.jp";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.TEENS;
_local1.preferedLanguage = "jp";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 121;
_local1.domain = "www.dailygame.com";
_local1.emailLink = "/game/";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "en_us";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 123;
_local1.domain = "www.zapapa.com";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.ZAPAPA;
_local1.preferedLanguage = "en_us";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 124;
_local1.domain = "www.zapapa.nl";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.HYVES;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 0;
_local1.domain = "gamedev.dev.spilgames.com";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "en_us";
addBrand(_local1);
}
public static function hasDomain(_arg1:String):Boolean{
return (!((brands_by_domain[_arg1] == null)));
}
public static function getBrandByDomain(_arg1:String):Brand{
return (brands_by_domain[_arg1]);
}
public static function getBrandByID(_arg1:Number):Brand{
return (brands_by_id[_arg1]);
}
private static function addBrand(_arg1:Brand):Brand{
if (brands_by_domain[_arg1.domain]){
trace(("ERROR: Attempting to add duplicate brand by domain: " + _arg1.domain));
} else {
brands_by_domain[_arg1.domain] = _arg1;
};
if (brands_by_id[_arg1.site_id]){
trace(("ERROR: Attempting to add duplicate brand by id: " + _arg1.site_id));
} else {
brands_by_id[_arg1.site_id] = _arg1;
};
return (_arg1);
}
public static function getBrandsArray():Array{
var _local2:Brand;
var _local1:Array = new Array();
for each (_local2 in brands_by_domain) {
_local1.push(_local2);
};
return (_local1);
}
public static function exportXML():XML{
var _local2:Brand;
var _local1:XML = <portals/>
;
for each (_local2 in brands_by_domain) {
_local1.appendChild(_local2.exportXML());
};
return (_local1);
}
}
}//package spill.localisation
Section 49
//Language (spill.localisation.Language)
package spill.localisation {
import flash.xml.*;
public class Language {
public var name:String;
public var dname:String;
public var id:uint;
public var portal_groups:Array;
public var textLanguage:String;
public var embedFonts:Boolean;// = true
public var embedInputFonts:Boolean;// = true
public var forceFont:String;// = null
public var bwcId:int;
public var references:Array;
public var displayName:String;// = ""
public function Language(_arg1:String, _arg2:String=null){
references = [];
super();
name = _arg1;
dname = _arg2;
portal_groups = new Array();
}
public function get displayAcronim():String{
return ((dname) ? dname : name);
}
public function set p_family(_arg1:String):void{
portal_groups[PortalGroup.FAMILY] = _arg1;
}
public function get p_family():String{
return (portal_groups[PortalGroup.FAMILY]);
}
public function set p_tween(_arg1:String):void{
portal_groups[PortalGroup.TEENS] = _arg1;
}
public function get p_tween():String{
return (portal_groups[PortalGroup.TEENS]);
}
public function set p_girl(_arg1:String):void{
portal_groups[PortalGroup.GIRL] = _arg1;
}
public function get p_girl():String{
trace("Language", portal_groups[PortalGroup.GIRL]);
return (portal_groups[PortalGroup.GIRL]);
}
public function set p_teen(_arg1:String):void{
portal_groups[PortalGroup.YOUNG_ADULTS] = _arg1;
}
public function get p_teen():String{
return (portal_groups[PortalGroup.YOUNG_ADULTS]);
}
public function set p_zapapa(_arg1:String):void{
portal_groups[PortalGroup.ZAPAPA] = _arg1;
}
public function get p_zapapa():String{
return (portal_groups[PortalGroup.ZAPAPA]);
}
public function set p_hyves(_arg1:String):void{
portal_groups[PortalGroup.HYVES] = _arg1;
}
public function get p_hyves():String{
return (portal_groups[PortalGroup.HYVES]);
}
public function exportXML():XMLNode{
var _local1:XMLNode = new XMLNode(1, "language");
_local1.attributes.name = name;
if (textLanguage != null){
_local1.attributes.textLanguage = textLanguage;
};
if (references.length){
_local1.attributes.references = references.toString();
};
_local1.attributes.id = bwcId;
var _local2:XMLNode = new XMLNode(1, "display_name");
_local2.firstChild = new XMLNode(3, displayName);
_local1.appendChild(_local2);
var _local3:Array = [];
var _local4:Array = PortalGroup.channelNames;
var _local5:int;
while (_local5 < _local4.length) {
_local3.push(Brandings.getBrandByDomain(portal_groups[_local5]).site_id);
_local5++;
};
_local1.attributes.channels = _local3.join(",");
return (_local1);
}
}
}//package spill.localisation
Section 50
//Languages (spill.localisation.Languages)
package spill.localisation {
import flash.xml.*;
public class Languages {
public static var languages:Object = new Object();
private static var _init:Boolean = false;
public static function initialize():void{
var _local1:Language;
if (_init){
return;
};
_init = true;
_local1 = new Language("nl");
_local1.displayName = "Nederlands";
_local1.p_family = "www.spelletjes.nl";
_local1.p_tween = "www.spel.nl";
_local1.p_girl = "www.girlsgogames.nl";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.p_hyves = "www.zapapa.nl";
_local1.bwcId = 3;
addLanguage(_local1);
_local1 = new Language("es");
_local1.displayName = "Español";
_local1.p_family = "www.juegos.com";
_local1.p_tween = "www.zapjuegos.com";
_local1.p_girl = "www.girlsgogames.es";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 9;
addLanguage(_local1);
_local1 = new Language("pl");
_local1.displayName = "Polski";
_local1.p_family = "www.gry.pl";
_local1.p_tween = "www.gry.pl";
_local1.p_girl = "www.girlsgogames.pl";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 6;
addLanguage(_local1);
_local1 = new Language("fr");
_local1.displayName = "Français";
_local1.p_family = "www.jeux.fr";
_local1.p_tween = "www.jeu.fr";
_local1.p_girl = "www.girlsgogames.fr";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 4;
addLanguage(_local1);
_local1 = new Language("en_us", "us");
_local1.displayName = "English";
_local1.p_family = "www.gamesgames.com";
_local1.p_tween = "www.agame.com";
_local1.p_girl = "www.girlsgogames.com";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 1;
addLanguage(_local1);
addReference(_local1, "en");
_local1 = new Language("id");
_local1.displayName = "Bahasa Ind.";
_local1.p_family = "www.games.co.id";
_local1.p_tween = "www.games.co.id";
_local1.p_girl = "www.games.co.id";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 11;
addLanguage(_local1);
_local1 = new Language("ru");
_local1.displayName = "Русский";
_local1.p_family = "www.ourgames.ru";
_local1.p_tween = "www.flashgames.ru";
_local1.p_girl = "www.girlsgogames.ru";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 12;
addLanguage(_local1);
_local1 = new Language("se");
_local1.displayName = "Svenska";
_local1.p_family = "www.spela.se";
_local1.p_tween = "www.spel.se";
_local1.p_girl = "www.girlsgogames.se";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 7;
addLanguage(_local1);
addReference(_local1, "sv");
_local1 = new Language("it");
_local1.displayName = "Italiano";
_local1.p_family = "www.gioco.it";
_local1.p_girl = "www.girlsgogames.it";
_local1.p_teen = "www.a10.it";
_local1.p_tween = "www.giochi.it";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 8;
addLanguage(_local1);
_local1 = new Language("en_uk", "uk");
_local1.displayName = "English";
_local1.p_family = "www.games.co.uk";
_local1.p_tween = "www.agame.com";
_local1.p_girl = "www.girlsgogames.co.uk";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 13;
addLanguage(_local1);
_local1 = new Language("cn");
_local1.displayName = "中文";
_local1.p_family = "www.game.com.cn";
_local1.p_tween = "www.game.com.cn";
_local1.p_girl = "www.game.com.cn";
_local1.p_teen = "www.game.com.cn";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 2;
_local1.embedInputFonts = false;
addLanguage(_local1);
addReference(_local1, "zh-CN");
addReference(_local1, "zh-TW");
_local1 = new Language("pt");
_local1.displayName = "Português";
_local1.p_family = "www.ojogos.pt";
_local1.p_tween = "www.ojogos.pt";
_local1.p_girl = "www.ojogos.pt";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 17;
addLanguage(_local1);
_local1 = new Language("in");
_local1.displayName = "English";
_local1.p_family = "www.game.co.in";
_local1.p_tween = "www.game.co.in";
_local1.p_girl = "www.game.co.in";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.textLanguage = "en_uk";
_local1.bwcId = 14;
addLanguage(_local1);
_local1 = new Language("de");
_local1.displayName = "Deutsch";
_local1.p_family = "www.jetztspielen.de";
_local1.p_tween = "www.spielen.com";
_local1.p_girl = "www.girlsgogames.de";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 5;
addLanguage(_local1);
_local1 = new Language("br");
_local1.displayName = "Português (BR)";
_local1.p_family = "www.ojogos.com.br";
_local1.p_tween = "www.clickjogos.com";
_local1.p_girl = "www.girlsgogames.com.br";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 10;
addLanguage(_local1);
_local1 = new Language("jp");
_local1.displayName = "日本語";
_local1.p_family = "www.egames.jp";
_local1.p_tween = "www.egames.jp";
_local1.p_girl = "www.egames.jp";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.embedInputFonts = false;
_local1.bwcId = 19;
addLanguage(_local1);
addReference(_local1, "ja");
_local1 = new Language("ar");
_local1.displayName = "English";
_local1.p_family = "www.dailygame.com";
_local1.p_tween = "www.dailygame.com";
_local1.p_girl = "www.dailygame.com";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 20;
addLanguage(_local1);
addReference(_local1, "ar");
_local1 = new Language("es_mx", "mx");
_local1.displayName = "Español (mx)";
_local1.p_family = "www.juegos.mx";
_local1.p_tween = "www.juegos.mx";
_local1.p_girl = "www.juegosdechicas.mx";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
addLanguage(_local1);
addReference(_local1, "mx");
_local1 = new Language("es_ar", "arg");
_local1.displayName = "Español (ar)";
_local1.p_family = "www.juegos.com.ar";
_local1.p_tween = "www.juegos.com.ar";
_local1.p_girl = "www.juegosdechicas.com.ar";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
addLanguage(_local1);
addReference(_local1, "arg");
}
private static function addReference(_arg1:Language, _arg2:String):void{
languages[_arg2] = _arg1;
_arg1.references.push(_arg2);
}
private static function addLanguage(_arg1:Language):void{
languages[_arg1.name] = _arg1;
}
public static function getLanguage(_arg1:String):Language{
return (languages[_arg1]);
}
public static function getLanguageByOldID(_arg1:int):Language{
var _local2:Language;
for each (_local2 in languages) {
if (_local2.bwcId == _arg1){
return (_local2);
};
};
return (null);
}
public static function getLanguagesArray():Array{
var _local3:Language;
var _local1:Array = new Array();
var _local2:Object = new Object();
for each (_local3 in languages) {
if (!_local2[_local3.name]){
_local1.push(_local3);
_local2[_local3.name] = true;
};
};
return (_local1);
}
public static function exportXML():XMLNode{
var _local3:Language;
var _local1:Array = getLanguagesArray();
var _local2:XMLNode = new XMLNode(1, "languages");
for each (_local3 in _local1) {
_local2.appendChild(_local3.exportXML());
};
return (_local2);
}
}
}//package spill.localisation
Section 51
//LanguageSelectBox (spill.localisation.LanguageSelectBox)
package spill.localisation {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class LanguageSelectBox extends MovieClip {
private var popup:MovieClip;
private var flag:MovieClip;
private var languageName_text:TextField;
private var mc:MovieClip;
public function LanguageSelectBox(){
trace("new langselecbox");
super();
if (numChildren > 0){
removeChildAt(0);
};
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, mouseOut, false, 0, true);
Languages.initialize();
popup = new LanguageSelectPopup_mc();
x = Math.round(x);
y = Math.round(y);
popup.y = (-(Math.floor(popup.height)) + 1);
popup.visible = false;
addChild(popup);
mc = new LanguageSelectBox_mc();
addChild(mc);
flag = mc.flag;
languageName_text = mc.languageName_text;
if (stage){
added();
};
init();
languageChanged();
}
public function init():void{
var _local3:MovieClip;
var _local4:Language;
trace("initselectbox");
var _local1:Array = new Array(popup.l_br, popup.l_de, popup.l_en_us, popup.l_fr, popup.l_in, popup.l_jp, popup.l_pt, popup.l_ru, popup.l_ar, popup.l_cn, popup.l_en_uk, popup.l_es, popup.l_id, popup.l_it, popup.l_nl, popup.l_pl, popup.l_se, popup.l_es_mx, popup.l_es_ar);
var _local2:int;
while (_local2 < _local1.length) {
_local3 = MovieClip(_local1[_local2]);
if (_local3){
_local3.addEventListener(MouseEvent.CLICK, itemClicked, true, 0, true);
_local3.flag.gotoAndStop(_local3.name.substr(2));
_local3.flag.mouseEnabled = false;
_local3.text.mouseEnabled = false;
_local4 = Languages.getLanguage(_local3.name.substr(2));
if (_local4){
_local3.text.text = _local4.displayAcronim;
} else {
trace((("Error, '" + _local3.name.substr(2)) + "' language not found"));
};
} else {
trace((((("Error, btn number '" + _local2) + "' is not a MovieClip or there is no button '") + _local1[_local2]) + "'"));
};
_local2++;
};
}
private function itemClicked(_arg1:MouseEvent):void{
SpilGame.changeLanguage(_arg1.currentTarget.name.substr(2));
popup.visible = false;
}
private function mouseOver(_arg1:MouseEvent):void{
popup.visible = true;
}
private function mouseOut(_arg1:MouseEvent):void{
popup.visible = false;
}
private function added(_arg1:Event=null):void{
trace("addedselebnox");
SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true);
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("languageChanged", languageChanged);
}
private function languageChanged(_arg1:Event=null):void{
if (SpilGame.currentLanguage){
if ((((SpilGame.portalGroup == PortalGroup.HYVES)) && ((SpilGame.currentLanguage.name == "nl")))){
this.visible = false;
return;
};
this.visible = true;
flag.gotoAndStop(SpilGame.currentLanguage.name);
languageName_text.text = SpilGame.currentLanguage.displayName;
languageName_text.embedFonts = SpilGame.currentLanguage.embedInputFonts;
};
}
public function set popupLocation(_arg1:String):void{
trace(("popupLocation = " + _arg1));
if (_arg1 == "bottom"){
popup.y = Math.floor(mc.height);
} else {
popup.y = (-(Math.floor(mc.height)) + 1);
};
}
}
}//package spill.localisation
Section 52
//LanguageSelectBox_mc (spill.localisation.LanguageSelectBox_mc)
package spill.localisation {
import flash.display.*;
import flash.text.*;
public dynamic class LanguageSelectBox_mc extends MovieClip {
public var languageName_text:TextField;
public var flag:MovieClip;
}
}//package spill.localisation
Section 53
//LanguageSelectPopup_mc (spill.localisation.LanguageSelectPopup_mc)
package spill.localisation {
import flash.display.*;
public dynamic class LanguageSelectPopup_mc extends MovieClip {
public var l_ar:MovieClip;
public var l_pt:MovieClip;
public var l_en_uk:MovieClip;
public var l_br:MovieClip;
public var l_ru:MovieClip;
public var l_se:MovieClip;
public var l_in:MovieClip;
public var l_es:MovieClip;
public var l_fr:MovieClip;
public var l_de:MovieClip;
public var l_jp:MovieClip;
public var l_nl:MovieClip;
public var l_pl:MovieClip;
public var l_es_ar:MovieClip;
public var l_id:MovieClip;
public var l_en_us:MovieClip;
public var l_it:MovieClip;
public var l_es_mx:MovieClip;
public var l_cn:MovieClip;
}
}//package spill.localisation
Section 54
//PortalGroup (spill.localisation.PortalGroup)
package spill.localisation {
import flash.xml.*;
public class PortalGroup {
public static const FAMILY:uint = 0;
public static const TEENS:uint = 1;
public static const GIRL:uint = 2;
public static const YOUNG_ADULTS:uint = 3;
public static const ZAPAPA:uint = 4;
public static const HYVES:uint = 5;
public static const NONE:uint = 6;
public static const channelNames:Array = ["family", "tween", "girl", "teen", "zapapa", "hyves"];
public static const backgroundColors:Array = [0xFFFFFF, 0xFFFFFF, 16742331, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF];
public static function getName(_arg1:int):String{
return (channelNames[_arg1]);
}
public static function exportXML():XMLNode{
var _local3:XMLNode;
var _local1:XMLNode = new XMLNode(1, "channels");
var _local2:int;
while (_local2 < 5) {
_local3 = new XMLNode(1, "channel");
_local3.attributes.name = channelNames[_local2];
_local3.attributes.id = _local2;
_local1.appendChild(_local3);
_local2++;
};
return (_local1);
}
}
}//package spill.localisation
Section 55
//spil_internal (spill.localisation.spil_internal)
package spill.localisation {
public namespace spil_internal = "spill.localisation";
}//package spill.localisation
Section 56
//SpilGame (spill.localisation.SpilGame)
package spill.localisation {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
public class SpilGame {
private static const cookiePath:String = "/";
private static const cookieName:String = "spilgames_language_v100";
private static const cookieLanguageVar:String = "savedLang";
public static const LANGUAGE_CHANGED:String = "languageChanged";
public static const BRANDING_CHANGED:String = "brandingChanged";
spil_internal static var gameName:String;
public static var currentBranding:Brand;
public static var currentLanguage:Language;
spil_internal static var emailPage:String;
spil_internal static var portalGroup:uint;
private static var channelLock:Boolean = false;
private static var _init:Boolean = false;
private static var eventDispatcher:EventDispatcher;
private static var localDomains:Object = new Object();
private static var strings:Object = new Object();
private static var contexMenuItem:ContextMenuItem;
private static var stage:Sprite;
spil_internal static var debugHostDomain:String = "";
spil_internal static var debugEmbedDomain:String = "";
public static function initialize(_arg1:String, _arg2:int, _arg3:String, _arg4:Sprite, _arg5:Boolean=false):void{
stage = _arg4;
if (_init){
trace("ERROR: LocalisationManager already initialised");
return;
};
_init = true;
localDomains["localhost"] = true;
localDomains["www8.agame.com"] = true;
localDomains["gamedev.dev.spilgames.com"] = true;
localDomains["stg.spel.nl"] = true;
localDomains["stg.girlsgogames.nl"] = true;
localDomains["stg.pl.spel.nl"] = true;
localDomains["stg.pl.girlsgogames.nl"] = true;
trace(localDomains["stg.girlsgogames.nl"]);
Brandings.initialize();
Languages.initialize();
initContexMenu(_arg4);
channelLock = _arg5;
gameName = _arg1.replace(" ", "_");
portalGroup = _arg2;
emailPage = _arg3;
chooseLanguage();
chooseBranding();
if (portalGroup == PortalGroup.HYVES){
changeLanguage("nl");
};
}
public static function initTextField(_arg1:TextField):void{
var _local2:TextFormat;
trace(_arg1.text);
_arg1.text = _arg1.text.replace(/{([^{}]*)}/g, replaceFn);
trace(_arg1.text);
_arg1.embedFonts = currentLanguage.embedFonts;
if (currentLanguage.forceFont != ""){
_local2 = new TextFormat();
_local2.font = currentLanguage.forceFont;
_arg1.setTextFormat(_local2);
};
}
private static function replaceFn():String{
var _local2:String = SpilGame.getString(arguments[1]);
if (((!(_local2)) || ((_local2 == "")))){
return ((("{" + arguments[1]) + "}"));
};
return (_local2);
}
public static function outputAllBrands():String{
var _local3:Brand;
var _local1:Array = Brandings.getBrandsArray();
var _local2 = "";
for each (_local3 in _local1) {
_local2 = (_local2 + (_local3.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain) + "\n"));
};
return (_local2);
}
public static function traceAllBrands():void{
trace(outputAllBrands());
}
public static function getMoreGamesLink(_arg1:String=""):String{
var _local2:String = (embedDomain) ? embedDomain : hostingDomain;
return (currentBranding.getMoreGamesLink(gameName, isExternal, _local2, _arg1));
}
public static function getSendToFriendLink():String{
return (currentBranding.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain));
}
public static function getPromotionLink(_arg1:String="feature_promotion"):String{
var _local2:String = (embedDomain) ? embedDomain : hostingDomain;
return (currentBranding.getPromotionLink(gameName, emailPage, isExternal, _local2, _arg1));
}
public static function getSpilCompanyLink():String{
var _local1 = "http://www.gameportal.net/";
if (isExternal){
_local1 = (_local1 + ("?utm_medium=brandedgames_" + (isExternal) ? "external" : "internal"));
_local1 = (_local1 + ("&utm_campaign=" + gameName));
_local1 = (_local1 + ("&utm_source=" + Brand.stripSubDomain((embedDomain) ? embedDomain : hostingDomain)));
_local1 = (_local1 + "&utm_content=Branding_Link");
};
return (_local1);
}
public static function importXML(_arg1:XML):void{
var _local2:XML;
var _local3:Object;
var _local4:XML;
for each (_local2 in _arg1.children()) {
_local3 = (strings[_local2.identifier] = new Object());
for each (_local4 in _local2.children()) {
_local3[_local4.name()] = _local4.children()[0].toString();
};
};
}
public static function importXMLv2(_arg1:XML):void{
var _local2:XML;
var _local3:Object;
var _local4:XML;
for each (_local2 in _arg1.children()) {
_local3 = (strings[_local2.attribute("identifier")] = new Object());
for each (_local4 in _local2.children()) {
if (_local4.children().length() > 0){
_local3[_local4.name()] = _local4.children()[0].toString();
} else {
_local3[_local4.name()] = "";
};
};
};
}
public static function getString(_arg1:String):String{
var _local2:Object = strings[_arg1];
if (_local2){
if (currentLanguage.textLanguage){
return (_local2[currentLanguage.textLanguage]);
};
if (_local2[currentLanguage.name]){
return (_local2[currentLanguage.name]);
};
return (_local2["en_us"]);
//unresolved jump
};
return ("");
}
private static function initContexMenu(_arg1:Sprite):void{
contexMenuItem = new ContextMenuItem("");
_arg1.contextMenu = new ContextMenu();
_arg1.contextMenu.customItems.push(contexMenuItem);
contexMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contexMenuClicked);
}
private static function contexMenuClicked(_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest(getMoreGamesLink("Contex_Menu")));
}
spil_internal static function chooseLanguage():void{
if (cookieLanguage != null){
currentLanguage = cookieLanguage;
} else {
if (isExternal){
currentLanguage = systemLanguage;
} else {
currentLanguage = portalLanguage;
if (!currentLanguage){
currentLanguage = systemLanguage;
};
};
};
if (!currentLanguage){
trace("Unable to determine language, using 'English US'");
currentLanguage = Languages.getLanguage("en_us");
};
TextFieldFit.embedFonts = currentLanguage.embedFonts;
TextFieldFit.forceFont = currentLanguage.forceFont;
dispatchEvent(new Event(LANGUAGE_CHANGED));
}
spil_internal static function chooseBranding():void{
currentBranding = Brandings.getBrandByDomain(currentLanguage.portal_groups[portalGroup]);
if (!(currentBranding is Brand)){
currentBranding = Brandings.getBrandByDomain("www.agame.com");
};
contexMenuItem.caption = ("More Games: " + currentBranding.domain);
dispatchEvent(new Event(BRANDING_CHANGED));
}
spil_internal static function changeLanguage(_arg1:String):void{
var _local2:Language = Languages.getLanguage(_arg1);
if (!_local2){
trace("ERROR: Supplied language string does not have a matching language");
} else {
cookieLanguage = _local2;
currentLanguage = _local2;
};
TextFieldFit.embedFonts = currentLanguage.embedFonts;
TextFieldFit.forceFont = currentLanguage.forceFont;
chooseBranding();
dispatchEvent(new Event(LANGUAGE_CHANGED));
}
private static function get portalLanguage():Language{
var _local1:Brand;
var _local2:String;
var _local3:Language;
if (isExternal){
return (null);
};
if (!embedDomain){
return (null);
};
_local1 = Brandings.getBrandByDomain(embedDomain);
if (!_local1){
return (null);
};
_local2 = _local1.preferedLanguage;
if (!_local2){
return (null);
};
_local3 = Languages.getLanguage(_local2);
if (!_local3){
return (null);
};
return (_local3);
}
spil_internal static function get systemLanguage():Language{
return (Languages.getLanguage(Capabilities.language));
}
spil_internal static function get cookieLanguage():Language{
var _local1:SharedObject = SharedObject.getLocal(cookieName, cookiePath);
var _local2:String = String(_local1.data[cookieLanguageVar]);
return (Languages.getLanguage(_local2));
}
spil_internal static function set cookieLanguage(_arg1:Language):void{
var _local2:SharedObject = SharedObject.getLocal(cookieName, cookiePath);
if (_arg1 == null){
_local2.data[cookieLanguageVar] = null;
} else {
_local2.data[cookieLanguageVar] = _arg1.name;
};
_local2.flush();
}
public static function get isExternal():Boolean{
return (((((!(Brandings.hasDomain(embedDomain))) && (!(localDomains[embedDomain])))) && (!(isStagingDomain))));
}
public static function get isStagingDomain():Boolean{
var _local1:String = ("http://" + embedDomain);
return ((_local1.indexOf("http://stg.") >= 0));
}
spil_internal static function get hostingDomain():String{
var _local1:LocalConnection;
if (debugHostDomain != ""){
return (debugHostDomain);
};
_local1 = new LocalConnection();
return (_local1.domain);
}
spil_internal static function get embedDomain():String{
var loc:String;
if (debugEmbedDomain != ""){
return (debugEmbedDomain);
};
if (ExternalInterface.available){
try {
loc = ExternalInterface.call("window.location.href.toString");
if (((!((loc == ""))) && (!((loc == null))))){
trace(("embed domain = " + getDomain(loc)));
return (getDomain(loc));
};
} catch(e:SecurityError) {
trace(("Security Error connecting to external interface, error = " + e));
} catch(e:Error) {
trace(("Error connecting to external interface, error = " + e));
};
};
return (null);
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
spil_internal static function dispatchEvent(_arg1:Event):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.dispatchEvent(_arg1);
}
public static function exportXML():XML{
var _local1:XML = <spil_games/>
;
_local1.appendChild(Brandings.exportXML());
_local1.appendChild(Languages.exportXML());
_local1.appendChild(PortalGroup.exportXML());
return (_local1);
}
private static function getDomain(_arg1:String):String{
var _local2:String;
var _local3:uint;
if (_arg1.indexOf("file") == 0){
return ("offline_play");
};
_local2 = new String();
_local3 = 7;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) == "/"){
break;
};
_local2 = (_local2 + _arg1.charAt(_local3));
_local3++;
};
if (_local2 == "localhost"){
_local2 = "offline_play";
};
return (_local2);
}
}
}//package spill.localisation
Section 57
//TextFieldFit (spill.localisation.TextFieldFit)
package spill.localisation {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
public class TextFieldFit extends MovieClip {
private var field:TextField;
private var w:Number;
private var h:Number;
private var format:TextFormat;
private var embeddedFonts:Array;
private var sizeChanged:Boolean;// = true
private var debugBounding:Sprite;
private var valid:Boolean;// = true
protected var _text:String;// = "default"
protected var _textColor:uint;// = 0
protected var _textSize:Number;// = 12
protected var _multiline:Boolean;// = false
protected var _disableWordwrap:Boolean;// = false
protected var _hAlign:String;// = "left"
protected var _vAlign:String;// = "top"
protected var _bold:Boolean;// = false
protected var _underline:Boolean;// = false
protected var _italic:Boolean;// = false
protected var _selectable:Boolean;// = false
protected var _font:String;// = ""
protected var _embedFonts:Boolean;// = true
protected var _antiAliasType:String;// = "advanced"
protected var _gridFitType:String;// = "pixel"
protected var _useGlowFilter:Boolean;// = false
protected var _glowBlur:Number;// = 3
protected var _glowColor:uint;// = 0
protected var _glowStrength:Number;// = 5
protected var _glowQuality:Number;// = 1
private static const gutter:Number = 2;
spil_internal static var embedFonts:Boolean = true;
spil_internal static var forceFont:String = null;
spil_internal static var forceAAType:String = null;
public static var alwaysCheckWidth:Boolean = false;
public function TextFieldFit(){
var _local1:Boolean = ((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")));
var _local2:Number = width;
var _local3:Number = height;
if (numChildren > 0){
removeChildAt(0);
};
if (!field){
field = new TextField();
addChild(field);
};
field.border = false;
field.background = false;
field.type = TextFieldType.DYNAMIC;
mouseEnabled = false;
mouseChildren = false;
format = new TextFormat();
embeddedFonts = Font.enumerateFonts(false);
setSize(_local2, _local3);
validate();
if (stage){
addEventListener(Event.RENDER, init);
stage.invalidate();
};
init();
}
public function get textField():TextField{
return (field);
}
private function init(_arg1:Event=null):void{
removeEventListener(Event.RENDER, init);
updateProperties();
layoutText();
}
protected function updateProperties():void{
var _local1:Boolean;
var _local2:Font;
field.text = _text;
field.multiline = ((((_text.indexOf(" ") < 0)) && ((_text.length < 14)))) ? false : _multiline;
field.wordWrap = ((field.multiline) && (!(_disableWordwrap)));
field.selectable = _selectable;
field.antiAliasType = (forceAAType) ? forceAAType : _antiAliasType;
field.gridFitType = _gridFitType;
embeddedFonts = Font.enumerateFonts(false);
if (((((_embedFonts) && (!((_font == ""))))) && (TextFieldFit.embedFonts))){
_local1 = false;
for each (_local2 in embeddedFonts) {
if (_font == _local2.fontName){
_local1 = true;
break;
};
};
field.embedFonts = _local1;
if (!_local1){
trace(((("WARNING: Embedded font '" + _font) + "' not found, disabling embedding of fonts, text = ") + _text));
} else {
trace((("Found Embedded font '" + _font) + "' using font"));
};
} else {
field.embedFonts = false;
};
if (TextFieldFit.forceFont){
format.font = TextFieldFit.forceFont;
} else {
format.font = _font;
};
if (sizeChanged){
format.size = _textSize;
};
format.color = _textColor;
format.align = _hAlign;
format.bold = _bold;
format.italic = _italic;
format.underline = _underline;
format.leftMargin = 0;
format.rightMargin = 0;
field.setTextFormat(format);
if (_useGlowFilter){
filters = [new GlowFilter(_glowColor, 1, _glowBlur, _glowBlur, _glowStrength, _glowQuality)];
} else {
filters = [];
};
}
public function setSize(_arg1:Number, _arg2:Number):void{
w = _arg1;
h = _arg2;
scaleX = (scaleY = 1);
field.width = w;
field.height = h;
invalidate();
}
private function layoutText():void{
resizeText();
field.height = (field.textHeight + (gutter * 2));
if (vAlign == "top"){
field.y = 0;
} else {
if (vAlign == "middle"){
field.y = ((h - field.height) / 2);
} else {
if (vAlign == "bottom"){
field.y = (h - field.height);
};
};
};
}
private function resizeText(_arg1:Boolean=false):void{
if (!doesTextFit()){
format.size = Object((Number(format.size) - 1));
if (format.size <= 3){
trace("WARNING: Text resised to 3px, either an error occured or the text just wont fit");
return;
};
field.setTextFormat(format);
resizeText(true);
} else {
if (_arg1 == false){
while (doesTextFit()) {
if (format.size <= textSize){
format.size = Object((Number(format.size) + 1));
field.setTextFormat(format);
if (!doesTextFit()){
format.size = Object((Number(format.size) - 1));
field.setTextFormat(format);
break;
};
} else {
break;
};
};
};
};
}
private function doesTextFit():Boolean{
if (((((field.textHeight + (gutter * 2)) > h)) || (((((field.textWidth + (gutter * 2)) > w)) && (((!(field.multiline)) || (alwaysCheckWidth))))))){
return (false);
};
return (true);
}
private function invalidate():void{
if (valid){
addEventListener(Event.ENTER_FRAME, validate);
if (stage){
stage.invalidate();
};
valid = false;
};
}
private function validate(_arg1:Event=null):void{
updateProperties();
layoutText();
removeEventListener(Event.ENTER_FRAME, validate);
valid = true;
}
public function set text(_arg1:String):void{
_text = _arg1;
invalidate();
}
public function get text():String{
return (_text);
}
public function set textColor(_arg1:uint):void{
_textColor = _arg1;
invalidate();
}
public function get textColor():uint{
return (_textColor);
}
public function set textSize(_arg1:Number):void{
_textSize = _arg1;
sizeChanged = true;
invalidate();
}
public function get textSize():Number{
return (_textSize);
}
public function set multiline(_arg1:Boolean):void{
_multiline = _arg1;
invalidate();
}
public function get multiline():Boolean{
return (_multiline);
}
public function set disableWordwrap(_arg1:Boolean):void{
_disableWordwrap = _arg1;
invalidate();
}
public function get disableWordwrap():Boolean{
return (_disableWordwrap);
}
public function set hAlign(_arg1:String):void{
_hAlign = _arg1;
invalidate();
}
public function get hAlign():String{
return (_hAlign);
}
public function set vAlign(_arg1:String):void{
_vAlign = _arg1;
invalidate();
}
public function get vAlign():String{
return (_vAlign);
}
public function set bold(_arg1:Boolean):void{
_bold = _arg1;
invalidate();
}
public function get bold():Boolean{
return (_bold);
}
public function set underline(_arg1:Boolean):void{
_underline = _arg1;
invalidate();
}
public function get underline():Boolean{
return (_underline);
}
public function set italic(_arg1:Boolean):void{
_italic = _arg1;
invalidate();
}
public function get italic():Boolean{
return (_italic);
}
public function set selectable(_arg1:Boolean):void{
_selectable = _arg1;
invalidate();
}
public function get selectable():Boolean{
return (_selectable);
}
public function set font(_arg1:String):void{
_font = _arg1;
invalidate();
}
public function get font():String{
return (_font);
}
public function set embedFonts(_arg1:Boolean):void{
_embedFonts = _arg1;
invalidate();
}
public function get embedFonts():Boolean{
return (_embedFonts);
}
public function set antiAliasType(_arg1:String):void{
_antiAliasType = _arg1;
invalidate();
}
public function get antiAliasType():String{
return (_antiAliasType);
}
public function set gridFitType(_arg1:String):void{
_gridFitType = _arg1;
invalidate();
}
public function get gridFitType():String{
return (_gridFitType);
}
public function set useGlowFilter(_arg1:Boolean):void{
_useGlowFilter = _arg1;
invalidate();
}
public function get useGlowFilter():Boolean{
return (_useGlowFilter);
}
public function set glowBlur(_arg1:Number):void{
_glowBlur = _arg1;
invalidate();
}
public function get glowBlur():Number{
return (_glowBlur);
}
public function set glowColor(_arg1:uint):void{
_glowColor = _arg1;
invalidate();
}
public function get glowColor():uint{
return (_glowColor);
}
public function set glowStrength(_arg1:Number):void{
_glowStrength = _arg1;
invalidate();
}
public function get glowStrength():Number{
return (_glowStrength);
}
public function set glowQuality(_arg1:Number):void{
_glowQuality = _arg1;
invalidate();
}
public function get glowQuality():Number{
return (_glowQuality);
}
}
}//package spill.localisation
Section 58
//a (a)
package {
import assets.*;
public dynamic class a extends CustomSound {
}
}//package
Section 59
//b (b)
package {
import assets.*;
public dynamic class b extends CustomSound {
}
}//package
Section 60
//bar_mc (bar_mc)
package {
import flash.display.*;
public dynamic class bar_mc extends MovieClip {
public function bar_mc(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 61
//blast (blast)
package {
import flash.display.*;
public dynamic class blast extends MovieClip {
public var mc:MovieClip;
public function blast(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
mc = (this.parent as MovieClip);
if (mc != null){
mc.removeChild(this);
};
}
}
}//package
Section 62
//Clip (Clip)
package {
import flash.events.*;
import flash.display.*;
class Clip extends MovieClip {
public var man2_mc:MovieClip;
public var man1_mc:MovieClip;
public var holder_mc:MovieClip;
var numDoors:Number;
var color:String;
public var press:Boolean;
public var per:Number;
public var reduceVal:Number;
function Clip(){
reduceVal = 0.1;
per = 100;
this.press = false;
this.addEventListener(Event.ENTER_FRAME, doit);
this.addEventListener(Event.REMOVED_FROM_STAGE, removeS);
}
public function removeS(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removeS);
this.removeEventListener(Event.ENTER_FRAME, doit);
}
public function doit(_arg1:Event):void{
var _local2:* = (this.root as MovieClip);
var _local3:MovieClip = _local2.game_mc.clip_meter_mc;
_local3.gotoAndStop(Math.floor(((_local3.totalFrames * per) / 100)));
if (_arg1.target.press){
_arg1.target.press = false;
if (per < 0){
(per == 0);
this.removeEventListener(Event.ENTER_FRAME, doit);
_local2.game_mc.doit(this);
_local2.game_mc.gameOver(true);
};
};
}
public function Reduce():void{
press = true;
}
public function mouseout():void{
press = false;
}
}
}//package
Section 63
//clip1_mc (clip1_mc)
package {
public dynamic class clip1_mc extends Enemy {
}
}//package
Section 64
//clip2_mc (clip2_mc)
package {
public dynamic class clip2_mc extends Enemy {
}
}//package
Section 65
//clip3_mc (clip3_mc)
package {
public dynamic class clip3_mc extends Enemy {
}
}//package
Section 66
//clip4_mc (clip4_mc)
package {
public dynamic class clip4_mc extends Enemy {
}
}//package
Section 67
//clip5_mc (clip5_mc)
package {
public dynamic class clip5_mc extends Enemy {
}
}//package
Section 68
//clip6_mc (clip6_mc)
package {
public dynamic class clip6_mc extends Enemy {
}
}//package
Section 69
//clip7_mc (clip7_mc)
package {
public dynamic class clip7_mc extends Enemy {
}
}//package
Section 70
//cloud1 (cloud1)
package {
import flash.display.*;
public dynamic class cloud1 extends MovieClip {
}
}//package
Section 71
//DamageSmokeClip (DamageSmokeClip)
package {
import flash.display.*;
public dynamic class DamageSmokeClip extends MovieClip {
}
}//package
Section 72
//DocumentClass (DocumentClass)
package {
import flash.events.*;
import flash.display.*;
import assets.*;
import flash.text.*;
import spill.localisation.*;
import spilgames.api.*;
import flash.utils.*;
import flash.ui.*;
import flash.net.*;
import flash.external.*;
import spill.*;
public class DocumentClass extends MovieClip {
public var game_mc:GameClass;
public var bu2_mc:MovieClip;
public var play__mc:MovieClip;
public var bu1_mc:MovieClip;
public var inst_mc:MovieClip;
public var pop_mc:MovieClip;
public var gameFeed_mc:MovieClip;
public var loadingProgress:LoadingProgress;
public var demo_mc:MovieClip;
public var credit_mc:MovieClip;
public var btn_moregamesat:BrandingLogo;
public var credit_Btn:MovieClip;
public var myContextMenu:ContextMenu;
public var spilGamesServices:SpilGamesServices;
public var cMenu:ContextMenu;
public var isPlayedAgain;
public var play_:Boolean;
public var levelNo:Number;
public var ak47Count;
public var gameMode:String;
public var isPlayed:Boolean;// = false
public var completeStatus:Boolean;// = false
public var logo:Logo;// = null
public var vc:VolumeControl;// = null
public var customGameOver:G2WGameOver;
private var timeCounter:uint;// = 0
private var skipOption:Boolean;// = false
private var gameStatus:String;// = "gameover"
private var timeMaxCounter:uint;// = 60
public var inviziad:InviziAd;
public function DocumentClass(){
inviziad = new InviziAd();
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
loadingProgress.visible = false;
addLoader();
loaderInfo.addEventListener(Event.COMPLETE, onCompletelyDownloaded);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressMade);
}
public function playAgainWin(){
trace("win");
gotoAndStop("gameStart");
levelNo = 1;
gameFeed_mc.gotoAndStop(1);
isPlayedAgain = false;
}
public function playAgainLose(){
gameFeed_mc.b = true;
gameFeed_mc.gotoAndStop(2);
isPlayedAgain = true;
}
public function skipLevel(){
trace("yyyyy");
levelNo++;
gameFeed_mc.gotoAndStop(1);
game_mc.playAgain(levelNo);
SoundManager.callBack.removeAllSounds();
var _local1 = "Ingame";
SoundManager.callBack.playSound(_local1, true);
isPlayedAgain = true;
}
public function onServicesReady(_arg1:Event):void{
trace("SpilGamesServices are ready\n");
}
public function onServicesFailed(_arg1:ErrorEvent):void{
trace((("SpilGamesServices failed: " + _arg1.text) + "\n"));
}
public function handle_btnMoreGames2(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(SpilGame.getMoreGamesLink("Mainscreen")), "_blank");
}
public function inst(_arg1:MouseEvent):void{
gotoAndStop("demo");
}
public function onClick1(_arg1:MouseEvent){
trace(credit_mc);
trace("creditttt");
if (credit_mc.currentFrame == 1){
credit_mc.gotoAndPlay(2);
};
}
public function playGame(_arg1:MouseEvent):void{
gotoAndStop("demo");
}
public function initbu(){
var ar:Array;
var clip:MovieClip;
bu1_mc.gotoAndStop(2);
ar = new Array("easy", "hard");
var i:Number = 1;
while (i <= 2) {
var over_:Function = function (_arg1:MouseEvent):void{
var _local3:MovieClip;
var _local2:Number = 1;
while (_local2 <= 2) {
_local3 = (_arg1.target.parent.getChildByName((("bu" + _local2) + "_mc")) as MovieClip);
_local3.gotoAndStop(1);
_local2++;
};
gameMode = ar[(_arg1.target.id - 1)];
trace((gameMode + " :"));
_arg1.target.gotoAndStop(2);
};
var out_:Function = function (_arg1:MouseEvent):void{
_arg1.target.gotoAndStop(1);
};
var _click:Function = function (_arg1:MouseEvent):void{
gotoAndStop("demo");
};
clip = (this.getChildByName((("bu" + i) + "_mc")) as MovieClip);
clip.id = i;
trace((clip.name + " : "));
clip.addEventListener(MouseEvent.CLICK, _click);
clip.buttonMode = true;
clip.mouseChildren = false;
clip.mouseEnabled = true;
clip.addEventListener(MouseEvent.ROLL_OVER, over_);
clip.addEventListener(MouseEvent.ROLL_OUT, out_);
i = (i + 1);
};
}
public function startGame(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 32)) && (demo_mc.b))){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, startGame);
demo_mc.play();
SoundManager.callBack.playSound("glass", false);
};
}
public function addLoader(){
isPlayed = true;
loadingProgress.visible = true;
}
public function onClick(_arg1:MouseEvent){
}
public function onCompletelyDownloaded(_arg1:Event):void{
completeStatus = true;
addEventListener(Event.ENTER_FRAME, onEnter);
}
public function onEnter(_arg1:Event){
var spilGamesServices:SpilGamesServices;
var event = _arg1;
trace("START");
if (((completeStatus) && (isPlayed))){
trace("completed");
spilGamesServices = SpilGamesServices.getInstance();
spilGamesServices.connect(this);
removeEventListener(Event.ENTER_FRAME, onEnter);
inviziad.onAdFinished = function (){
this.gotoAndStop("gameSplash");
};
inviziad.showPreRoll(GameObj._g2wGameId, GameObj._gameHost, MovieClip(root));
};
}
public function createAssets(){
createVolumeControl();
}
public function createLogo(){
trace("created header");
if (logo == null){
logo = new Logo();
};
if (!contains(logo)){
addChild(logo);
};
}
public function createVolumeControl(){
trace("created header");
if (vc == null){
vc = new VolumeControl();
};
if (!contains(vc)){
addChild(vc);
};
}
public function onProgressMade(_arg1:ProgressEvent):void{
trace("running", loadingProgress);
var _local2:* = Math.floor(((100 * loaderInfo.bytesLoaded) / loaderInfo.bytesTotal));
loadingProgress.updateProgress(_local2);
}
public function doGameOver(_arg1:String, _arg2:Boolean, _arg3:uint=1, _arg4=0){
trace("reached here");
GOG.submitGameScore(GameObj._g2wGameId, _arg4, stage);
timeMaxCounter = (_arg3 * this.stage.frameRate);
skipOption = _arg2;
gameStatus = _arg1;
addEventListener(Event.ENTER_FRAME, runTimer);
}
private function runTimer(_arg1:Event){
timeCounter++;
if (timeCounter >= timeMaxCounter){
timeCounter = 0;
removeEventListener(Event.ENTER_FRAME, runTimer);
stage.scaleMode = StageScaleMode.NO_SCALE;
addCustomGameOver();
SoundManager.callBack.removeAllSounds();
trace("Removed All Sounds");
};
}
public function addCustomGameOver(){
customGameOver = new G2WGameOver();
addChild(customGameOver);
customGameOver.init(gameStatus, skipOption);
customGameOver.x = 325;
customGameOver.y = 250;
}
public function g2wGameOver(_arg1:Boolean){
this.removeChild(customGameOver);
this.customGameOver = null;
stage.scaleMode = StageScaleMode.NO_SCALE;
if (_arg1){
playAgainWin();
} else {
playAgainLose();
};
}
public function g2wSkipLevel(){
this.removeChild(customGameOver);
stage.scaleMode = StageScaleMode.NO_SCALE;
this.customGameOver = null;
skipLevel();
}
function frame1(){
stop();
this.tabEnabled = false;
this.stage.stageFocusRect = false;
myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
this.contextMenu = myContextMenu;
stage.scaleMode = StageScaleMode.SHOW_ALL;
}
function frame2(){
stop();
spilGamesServices = SpilGamesServices.getInstance();
spilGamesServices.addEventListener("servicesReady", onServicesReady);
spilGamesServices.addEventListener("servicesFailed", onServicesFailed);
spilGamesServices.connect(this);
SpilGame.initialize("miami_outlaws", PortalGroup.TEENS, "miami_outlaws.html", this);
cMenu = new ContextMenu();
cMenu.hideBuiltInItems();
this.contextMenu = cMenu;
this.tabChildren = false;
btn_moregamesat.buttonMode = true;
btn_moregamesat.mouseEnabled = true;
btn_moregamesat.addEventListener(MouseEvent.CLICK, handle_btnMoreGames2);
this.gotoAndStop("gameSplash");
}
function frame3(){
stop();
isPlayedAgain = false;
}
function frame4(){
play_ = false;
stop();
levelNo = 1;
ak47Count = 0;
inst_mc.addEventListener(MouseEvent.CLICK, inst);
credit_Btn.addEventListener(MouseEvent.CLICK, onClick1);
SoundManager.callBack.removeAllSounds();
SoundManager.callBack.playSound("Title", true);
createAssets();
}
function frame5(){
gameMode = "hard";
play__mc.addEventListener(MouseEvent.CLICK, playGame);
}
function frame6(){
initbu();
}
function frame7(){
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, startGame);
}
function frame8(){
stop();
}
function frame9(){
levelNo = 1;
SoundManager.callBack.removeAllSounds();
SoundManager.callBack.playSound("Ingame", true);
game_mc.startLevel(levelNo);
}
public static function callGangOfGamers(){
var url:String = String(GameObj._logoClick);
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public static function callGangOfGamersThumb(){
var url:String = String(GameObj._gameTrackingThumb);
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public static function callGangOfGamersStrip(){
var url:String = String(GameObj._gameTrackingStrip);
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public static function callVideo(){
var _local1:URLRequest = new URLRequest(GameObj._gameVideoURL);
navigateToURL(_local1, "_blank");
}
public static function faceBookCall(){
var _local1:URLRequest = new URLRequest(GameObj.facebookURL);
navigateToURL(_local1, "_blank");
}
}
}//package
Section 73
//Enemy (Enemy)
package {
import flash.events.*;
import flash.display.*;
class Enemy extends MovieClip {
public var holder_mc:MovieClip;
public var _in_area:Boolean;
public var speed:Number;
var numDoors:Number;
var color:String;
public var bar:bar_mc;
public var press:Boolean;
public var per:Number;
public var reduceVal:Number;
public var _reduceVal:Number;
public var _type:Number;
public var shootVal:Number;
private var removed:Boolean;
function Enemy(){
speed = 1;
_in_area = false;
removed = false;
_reduceVal = 0.1;
reduceVal = 1;
_type = 0;
shootVal = 0.5;
per = 100;
bar = new bar_mc();
bar.name = "bar_mc";
var _local1:MovieClip = (this.getChildByName("holder_mc") as MovieClip);
bar.x = _local1.x;
bar.y = _local1.y;
this.addChild(bar);
this.mouseChildren = false;
this.press = false;
this.addEventListener(Event.ENTER_FRAME, doit);
this.addEventListener(Event.REMOVED_FROM_STAGE, removeS);
}
public function removeS(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removeS);
this.removeEventListener(Event.ENTER_FRAME, doit);
}
public function doit(_arg1:Event):void{
var _local2:* = (this.root as MovieClip);
var _local3:MovieClip = (_arg1.target.getChildByName("bar_mc") as MovieClip);
_local3.gotoAndStop(Math.floor(((_local3.totalFrames * per) / 100)));
if (_arg1.target.press){
per = (per - reduceVal);
if ((((per <= 1)) && (!(removed)))){
per = 1;
_local2.game_mc.doit(this);
removed = true;
};
};
if (_arg1.target._press){
per = (per - _reduceVal);
if ((((per <= 1)) && (!(removed)))){
per = 1;
_local2.game_mc.doit(this);
removed = true;
};
};
}
}
}//package
Section 74
//GameClass (GameClass)
package {
import flash.events.*;
import flash.display.*;
import assets.*;
import flash.geom.*;
import spilgames.api.*;
import flash.utils.*;
import flash.ui.*;
public class GameClass extends MovieClip {
public var down1_mc:MovieClip;
public var pause_mc:MovieClip;
public var holder_mc:MovieClip;
public var right_mc:MovieClip;
public var top_mc:MovieClip;
public var lholder_mc:MovieClip;
public var ins_mc:MovieClip;
public var down_mc:MovieClip;
public var clip_meter_mc:MovieClip;
public var bg_mc:MovieClip;
public var reputation_meter_mc:MovieClip;
public var gun_mc:gun;
public var score:Number;// = 0
public var gameState:String;
public var stagew:Number;// = 800
public var stageh:Number;// = 600
public var reputation_meter:Number;// = 100
public var gamespeed:Number;// = 10
public var groundtype:String;// = "ground1"
private var groundtype_ar:Array;
public var clip;
public var guntype:Number;// = 1
public var mcClip:Me;
public var van_health:Number;// = 100
public var levelNo:Number;
public var _press:Boolean;// = false
public var _reduce_val:Number;// = 0
public var __reduce_val:Number;// = 0
public var ___reduce_val:Number;// = 0
public var money:Number;// = 0
public var curbArray:Array;
private var ar_levelL_l:Array;
private var ar_levelL:Array;
private var ar_level_hdd:Array;
private var ar_level_easy:Array;
private var ar_level:Array;
public var ar_:Array;
public var ar__:Array;
var ar:Array;
private var tempVal:Number;// = 0
public static var award1Status:Boolean = true;
public static var award2Status:Boolean = true;
public static var award3Status:Boolean = true;
public static var award4Status:Boolean = true;
public static var award5Status:Boolean = true;
public function GameClass(){
groundtype_ar = new Array("ground1", "ground2", "ground3", "ground4", "ground5", "ground6", "ground1", "ground2", "ground3", "ground4", "ground5", "ground6");
curbArray = new Array(1, 0, 0, 0, 0, 0, 0, 0);
ar_levelL_l = [[1, 2], [2, 3, 1], [1, 2], [1, 2], [1, 2], [2, 2], [2, 2]];
ar_levelL = [[1, 2, 0, 1], [2, 3, 1], [1, 2], [1, 2], [1, 2], [2, 2, 0, 1], [2, 2]];
ar_level_hdd = [[7, 5], [10, 7, 5], [13, 10, 7, 5], [13, 10, 7, 6, 5], [13, 10, 7, 6, 5, 5], [13, 10, 7, 6, 5, 5, 5]];
ar_level_easy = [[5, 3], [7, 5, 3], [10, 7, 5, 3], [10, 7, 5, 4, 3], [10, 7, 5, 4, 3, 3], [10, 7, 5, 4, 3, 3, 3]];
ar_level = new Array();
ar_ = new Array();
ar__ = new Array();
super();
gameState = "";
var _local1:* = (this.root as MovieClip);
money = 0;
var _local2:MovieClip = (this.getChildByName("pause_mc") as MovieClip);
_local2.useHandCursor = true;
_local2.buttonMode = true;
_local2.mouseEnabled = true;
_local2.mouseChildren = false;
_local2.addEventListener(MouseEvent.CLICK, pauseGame);
_local2.addEventListener(MouseEvent.ROLL_OVER, pauseOver);
_local2.addEventListener(MouseEvent.ROLL_OUT, pauseOut);
}
public function pauseOver(_arg1:MouseEvent):void{
if (((gun_mc._state) && ((gameState == "init")))){
Mouse.show();
};
}
public function pauseOut(_arg1:MouseEvent):void{
if (((gun_mc._state) && ((gameState == "init")))){
Mouse.hide();
};
}
public function playAgain(_arg1){
van_health = 100;
startLevel(_arg1);
}
public function pauseGame(_arg1:MouseEvent):void{
var _local2:MovieClip = (this.getChildByName("ins_mc") as MovieClip);
if (gameState == "pause"){
gameState = "init";
Mouse.hide();
_local2.gotoAndStop(1);
} else {
Mouse.show();
_local2.gotoAndStop(2);
gun_mc.gunSound_mc.gotoAndStop(1);
gameState = "pause";
};
}
public function startLevel(_arg1){
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:String;
var _local17:Class;
var _local18:MovieClip;
var _local19:Number;
var _local20:Number;
var _local21:Point;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:String;
var _local27:Class;
var _local28:MovieClip;
var _local29:Number;
var _local30:*;
var _local31:Point;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:String;
var _local37:Class;
var _local38:MovieClip;
var _local39:Number;
var _local40:*;
var _local41:Point;
LevelTracker.trackLevel("Start", (this.root as DocumentClass).levelNo, "levels");
var _local2:MovieClip = (this.root as MovieClip);
_local2.gameFeed_mc.b = false;
gameState = "init";
var _local3:MovieClip = (this.root as MovieClip);
if (_local3.gameMode == "easy"){
ar_level = ar_level_easy;
} else {
ar_level = ar_level_hdd;
};
var _local4:* = (this.getChildByName("reputation_meter_mc") as MovieClip);
_local4.gotoAndStop(100);
var _local5:int = (_arg1 - 1);
groundtype = groundtype_ar[_local5];
tempVal = 0;
panBG(_arg1);
ar_ = new Array();
ar__ = new Array();
gun_mc.startGun();
mcClip = new Me();
stage.addEventListener(MouseEvent.MOUSE_DOWN, Click);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseout);
holder_mc.addChild(mcClip);
holder_mc.par = _arg1;
lholder_mc.par = _arg1;
mcClip.name = "mcClip";
mcClip.x = 400;
mcClip.y = 170;
mcClip.man1_mc.visible = false;
mcClip.man2_mc.visible = false;
mcClip.per = van_health;
if (curbArray[6] == 1){
mcClip.man1_mc.visible = true;
};
if (curbArray[7] == 1){
mcClip.man2_mc.visible = true;
};
var _local6:Number = (_arg1 - 1);
var _local7:Number = ar_level[_local6].length;
_reduce_val = 7;
if (!isNaN(_local7)){
_local12 = 0;
while (_local12 < _local7) {
_reduce_val--;
_local13 = ar_level[_local6][_local12];
if (!isNaN(_local13)){
_local14 = 0;
while (_local14 < _local13) {
tempVal++;
_local15 = (_local12 + 1);
_local16 = (("clip" + _local15) + "_mc");
_local17 = (getDefinitionByName(_local16) as Class);
_local18 = new (_local17);
holder_mc.addChild(_local18);
ar_.push(_local18);
_local18.name = (((("clip" + _local12) + "_") + _local14) + "_mc");
if (_local12 != 7){
_local18.reduceVal = ((_reduce_val * 2) + guntype);
};
_local18._type = _local12;
_local18.shootVal = ((_local18._type + 1) / 10);
_local18.x = (-(_local18.width) + 10);
_local19 = (Math.random() * right_mc.x);
_local20 = 0;
if ((((_local12 >= 5)) && (!((_local12 == 7))))){
_local20 = (((Math.random() * ((top_mc.y - down_mc.y) + 100)) + top_mc.y) - 100);
} else {
_local20 = (((Math.random() * ((down_mc.y - top_mc.y) - 50)) + top_mc.y) + 10);
};
_local21 = new Point(0, 0);
if (_local12 != 7){
_local21 = new Point((Math.random() * -((stage.stageWidth * (_local12 + (_local13 / 2))))), _local20);
} else {
_local21 = new Point((Math.random() * -(stage.stageWidth)), _local20);
};
_local18.endPoint = _local19;
_local18.x = _local21.x;
_local18.y = _local21.y;
_local18.speed = ((Math.random() * 2) + 2);
_local18.addEventListener(Event.ENTER_FRAME, startMoving);
_local14++;
};
};
_local12++;
};
};
var _local8:Number = 0;
var _local9:Number = ar_levelL[_local6].length;
__reduce_val = _local9;
if (!isNaN(_local9)){
_local22 = 0;
while (_local22 < _local9) {
__reduce_val--;
_local23 = ar_levelL[_local6][_local22];
if (!isNaN(_local23)){
_local24 = 0;
while (_local24 < _local23) {
_local8++;
_local25 = (_local22 + 1);
_local26 = (("lclip" + _local25) + "_mc");
_local27 = (getDefinitionByName(_local26) as Class);
_local28 = new (_local27);
lholder_mc.addChild(_local28);
ar__.push(_local28);
_local28.name = (((("clip" + _local22) + "_") + _local24) + "_mc");
_local28._type = _local22;
_local28.x = (-(_local28.width) + 10);
_local28.reduceVal = (((__reduce_val + 1) * 2) + guntype);
_local29 = ((Math.random() * -(stage.stageWidth)) - 200);
_local30 = (((Math.random() * ((down1_mc.y - down_mc.y) - 50)) + down_mc.y) + 50);
_local31 = new Point((((((Math.random() * stage.stageWidth) * _local22) + _local24) + 1) + stage.stageWidth), _local30);
_local28.endPoint = _local29;
_local28.x = _local31.x;
_local28.y = _local31.y;
_local28.speed = 2;
_local28.startPoint = _local31.x;
_local28.addEventListener(Event.ENTER_FRAME, startMovingl);
_local24++;
};
};
_local22++;
};
};
var _local10:Number = 0;
var _local11:Number = ar_levelL_l[_local6].length;
___reduce_val = _local11;
if (!isNaN(_local11)){
_local32 = 0;
while (_local32 < _local11) {
___reduce_val--;
_local33 = ar_levelL_l[_local6][_local32];
if (!isNaN(_local33)){
_local34 = 0;
while (_local34 < _local33) {
_local10++;
_local35 = (_local32 + 1);
_local36 = (("lclip" + _local35) + "_l_mc");
_local37 = (getDefinitionByName(_local36) as Class);
_local38 = new (_local37);
holder_mc.addChild(_local38);
ar_.push(_local38);
_local38.name = (((("clip" + _local32) + "_") + _local34) + "_l_mc");
_local38.reduceVal = (((___reduce_val + 1) * 10) + guntype);
_local38._type = _local32;
_local38.removeVal = true;
_local38.x = (-(_local28.width) + 10);
_local39 = ((Math.random() * stage.stageWidth) + stage.stageWidth);
_local40 = (((Math.random() * ((down_mc.y - top_mc.y) - 50)) + top_mc.y) + 10);
_local41 = new Point(((Math.random() * stage.stageWidth) - stage.stageWidth), _local40);
_local38.endPoint = _local39;
_local38.x = _local41.x;
_local38.y = _local41.y;
_local38.speed = 2;
_local38.startPoint = _local41.x;
_local38.addEventListener(Event.ENTER_FRAME, startMovingl_l);
_local34++;
};
};
_local32++;
};
};
ar_.sortOn(["y"], Array.NUMERIC);
ar__.sortOn(["y"], Array.NUMERIC);
short(ar_, this.holder_mc);
short(ar__, this.lholder_mc);
}
public function startMoving(_arg1:Event):void{
var _local2:MovieClip;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:String;
var _local9:MovieClip;
if (gameState != "pause"){
if (_arg1.target.x >= 0){
_arg1.target._in_area = true;
mcClip.per = (mcClip.per - (_arg1.target.shootVal / 10));
van_health = mcClip.per;
mcClip.press = true;
if (curbArray[6] == 1){
_arg1.target._reduceVal = 0.1;
_arg1.target._press = true;
};
if (curbArray[7] == 1){
_arg1.target._reduceVal = 0.2;
_arg1.target._press = true;
};
};
if (_arg1.target.x < 0){
_arg1.target._in_area = false;
};
if (_arg1.target.endPoint > _arg1.target.x){
_arg1.target.x = (_arg1.target.x + _arg1.target.speed);
};
_local2 = this.gun_mc.cur_mc;
_local3 = (holder_mc.par - 1);
_local4 = ar_level[_local3].length;
if (!isNaN(_local4)){
_local5 = 0;
while (_local5 < _local4) {
_local6 = ar_level[_local3][_local5];
if (!isNaN(_local6)){
_local7 = 0;
while (_local7 < ar_level[_local3][_local5]) {
_local8 = (((("clip" + _local5) + "_") + _local7) + "_mc");
_local9 = (holder_mc.getChildByName(_local8) as MovieClip);
if (_local9 != null){
if (((((((((_local9.hitTestObject(_local2)) && (this._press))) && ((this.gun_mc.mainVal == 1)))) && (this.gun_mc.mouseDownVal))) && (this.gun_mc.shoot))){
_local9.press = true;
} else {
_local9.press = false;
};
};
_local7++;
};
};
_local5++;
};
};
} else {
if (curbArray[6] == 1){
_arg1.target._reduceVal = 0.1;
_arg1.target._press = false;
};
if (curbArray[7] == 1){
_arg1.target._reduceVal = 0.2;
_arg1.target._press = false;
};
};
}
public function startMovingl(_arg1:Event):void{
var _local2:MovieClip;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:String;
var _local9:MovieClip;
var _local10:Rectangle;
if (gameState != "pause"){
if ((((_arg1.target.x > 0)) && ((_arg1.target.x < stage.stageWidth)))){
_arg1.target._in_area = true;
} else {
_arg1.target._in_area = false;
};
if (_arg1.target.endPoint < _arg1.target.x){
_arg1.target.x = (_arg1.target.x - _arg1.target.speed);
} else {
_arg1.target.x = _arg1.target.startPoint;
};
_local2 = this.gun_mc.cur_mc;
_local3 = (lholder_mc.par - 1);
_local4 = ar_levelL[_local3].length;
if (!isNaN(_local4)){
_local5 = 0;
while (_local5 < _local4) {
_local6 = ar_levelL[_local3][_local5];
if (!isNaN(_local6)){
_local7 = 0;
while (_local7 < ar_levelL[_local3][_local5]) {
_local8 = (((("clip" + _local5) + "_") + _local7) + "_mc");
_local9 = (lholder_mc.getChildByName(_local8) as MovieClip);
if (_local9 != null){
_local10 = getCollisionRect(_local9, _local2, _local2.parent, true, 0xFF);
if (((((((((_local9.hitTestObject(_local2)) && (this._press))) && ((this.gun_mc.mainVal == 1)))) && (this.gun_mc.mouseDownVal))) && (this.gun_mc.shoot))){
_local9.press = true;
} else {
_local9.press = false;
};
};
_local7++;
};
};
_local5++;
};
};
};
}
public function startMovingl_l(_arg1:Event):void{
var _local2:MovieClip;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:String;
var _local9:MovieClip;
var _local10:Rectangle;
if (gameState != "pause"){
if ((((_arg1.target.x > 0)) && ((_arg1.target.x < stage.stageWidth)))){
_arg1.target._in_area = true;
} else {
_arg1.target._in_area = false;
};
if (_arg1.target.endPoint > _arg1.target.x){
_arg1.target.x = (_arg1.target.x + _arg1.target.speed);
} else {
_arg1.target.x = _arg1.target.startPoint;
};
_local2 = this.gun_mc.cur_mc;
_local3 = (lholder_mc.par - 1);
_local4 = ar_levelL_l[_local3].length;
if (!isNaN(_local4)){
_local5 = 0;
while (_local5 < _local4) {
_local6 = ar_levelL_l[_local3][_local5];
if (!isNaN(_local6)){
_local7 = 0;
while (_local7 < _local6) {
_local8 = (((("clip" + _local5) + "_") + _local7) + "_l_mc");
_local9 = (holder_mc.getChildByName(_local8) as MovieClip);
if (_local9 != null){
_local10 = getCollisionRect(_local9, _local2, _local2.parent, true, 0xFF);
if (((((((((_local9.hitTestObject(_local2)) && (this._press))) && ((this.gun_mc.mainVal == 1)))) && (this.gun_mc.mouseDownVal))) && (this.gun_mc.shoot))){
_local9.press = true;
} else {
_local9.press = false;
};
};
_local7++;
};
};
_local5++;
};
};
};
}
public function gameOver(_arg1){
var _local2:MovieClip = (this.root as MovieClip);
if (_arg1){
gameState = "gameOver";
trace("GameOver");
removeEventListeners();
_local2.gameFeed_mc.gotoAndStop(3);
} else {
trace(("van_health" + van_health));
if ((((van_health >= 90)) && ((award2Status == true)))){
trace("AWARD2");
award2Status = false;
AwardsService.submitAward("award2");
};
gameState = "pause";
gun_mc.stopGun();
trace(((("GameWin : " + _local2) + " : ") + _local2.gameFeed_mc));
_local2.pop_mc.play();
trace((_local2.levelNo + " : levelNo"));
};
}
public function removeEventListeners(){
var _local1:int;
var _local2:*;
var _local3:int;
var _local4:*;
stage.removeEventListener(MouseEvent.MOUSE_DOWN, Click);
stage.removeEventListener(MouseEvent.MOUSE_UP, mouseout);
gun_mc.stopGun();
removeChildrenOf_bg_mc(bg_mc.ground_mc);
removeChildrenOf_bg_mc(bg_mc.cloud_mc);
removeChildrenOf_bg_mc(bg_mc.mountain_mc);
if (holder_mc.numChildren != 0){
_local1 = holder_mc.numChildren;
while (_local1--) {
_local2 = holder_mc.getChildAt(_local1);
if (_local2.removeVal){
_local2.removeEventListener(Event.ENTER_FRAME, startMovingl_l);
} else {
_local2.removeEventListener(Event.ENTER_FRAME, startMoving);
};
holder_mc.removeChildAt(_local1);
};
};
if (lholder_mc.numChildren != 0){
_local3 = lholder_mc.numChildren;
while (_local3--) {
_local4 = lholder_mc.getChildAt(_local3);
_local4.removeEventListener(Event.ENTER_FRAME, startMovingl);
lholder_mc.removeChildAt(_local3);
};
};
}
public function removeChildrenOf_bg_mc(_arg1:MovieClip):void{
var _local2:int;
var _local3:*;
if (_arg1.numChildren != 0){
_local2 = _arg1.numChildren;
while (_local2--) {
_local3 = _arg1.getChildAt(_local2);
_local3.removeEventListener(Event.ENTER_FRAME, bgAnimation);
_arg1.removeChildAt(_local2);
};
};
}
public function removeChildrenOf(_arg1:MovieClip):void{
var _local2:int;
if (_arg1.numChildren != 0){
_local2 = _arg1.numChildren;
while (_local2--) {
_arg1.getChildAt(_local2);
};
};
}
public function doit(_arg1):void{
var _local3:*;
var _local2:blast = new blast();
if (tempVal <= 1){
mcClip.reduceVal = 0;
mcClip.press = false;
if (!isNaN(_arg1._type)){
money = (money + ((_arg1._type + 1) * 100));
ScreenShake.go(root, (_arg1._type * 5), 0.2);
trace(((money + " : money ") + (_arg1._type + 1)));
};
holder_mc.addChild(_local2);
_local2.x = (_arg1.x + _arg1.holder_mc.x);
_local2.y = (_arg1.y + _arg1.holder_mc.y);
_arg1.removeEventListener(Event.ENTER_FRAME, startMoving);
holder_mc.removeChild(_arg1);
_local3 = setTimeout(gameOver, 1000, false);
} else {
tempVal--;
mcClip.reduceVal = 0;
mcClip.press = false;
if (!isNaN(_arg1._type)){
money = (money + ((_arg1._type + 1) * 100));
ScreenShake.go(root, (_arg1._type * 5), 0.2);
trace(((money + " : money ") + (_arg1._type + 1)));
};
holder_mc.addChild(_local2);
_local2.x = (_arg1.x + _arg1.holder_mc.x);
_local2.y = (_arg1.y + _arg1.holder_mc.y);
_arg1.removeEventListener(Event.ENTER_FRAME, startMoving);
holder_mc.removeChild(_arg1);
};
}
public function OilTanker_blast(_arg1):void{
var _local2:*;
var _local3:blast;
var _local4:int;
var _local5:*;
var _local6:int;
var _local7:*;
if (tempVal <= 1){
_local2 = setTimeout(gameOver, 1000, false);
} else {
tempVal--;
mcClip.reduceVal = 0;
mcClip.press = false;
if (!isNaN(_arg1._type)){
money = (money + ((_arg1._type + 1) * 100));
ScreenShake.go(root, (_arg1._type * 5), 0.2);
trace(((money + " : money ") + (_arg1._type + 1)));
};
_local3 = new blast();
holder_mc.addChild(_local3);
_local3.x = (_arg1.x + _arg1.holder_mc.x);
_local3.y = (_arg1.y + _arg1.holder_mc.y);
_arg1.removeEventListener(Event.ENTER_FRAME, startMoving);
lholder_mc.removeChild(_arg1);
if (holder_mc.numChildren != 0){
_local4 = holder_mc.numChildren;
while (_local4--) {
_local5 = holder_mc.getChildAt(_local4);
if (_local5 != null){
if (_local5._in_area){
if (_local5.removeVal){
doitl_l(_local5);
} else {
doit(_local5);
};
};
};
};
};
if (lholder_mc.numChildren != 0){
_local6 = lholder_mc.numChildren;
while (_local6--) {
_local7 = lholder_mc.getChildAt(_local6);
if (_local7 != null){
if (_local7._in_area){
doitl(_local7);
};
};
};
};
};
}
public function doitl(_arg1):void{
reputation_meter = (reputation_meter - ((_arg1._type + 1) * 5));
var _local2:Number = reputation_meter;
var _local3:MovieClip = (this.getChildByName("reputation_meter_mc") as MovieClip);
_local3.gotoAndStop(Math.floor(((_local3.totalFrames * _local2) / 100)));
var _local4:blast = new blast();
lholder_mc.addChild(_local4);
_local4.x = (_arg1.x + _arg1.holder_mc.x);
_local4.y = (_arg1.y + _arg1.holder_mc.y);
ScreenShake.go(root, (_arg1._type * 5), 0.2);
_arg1.removeEventListener(Event.ENTER_FRAME, startMovingl);
lholder_mc.removeChild(_arg1);
}
public function doitl_l(_arg1):void{
reputation_meter = (reputation_meter - ((_arg1._type + 1) * 5));
var _local2:Number = reputation_meter;
var _local3:MovieClip = (this.getChildByName("reputation_meter_mc") as MovieClip);
_local3.gotoAndStop(Math.floor(((_local3.totalFrames * _local2) / 100)));
var _local4:blast = new blast();
holder_mc.addChild(_local4);
_local4.x = (_arg1.x + _arg1.holder_mc.x);
_local4.y = (_arg1.y + _arg1.holder_mc.y);
ScreenShake.go(root, (_arg1._type * 5), 0.2);
_arg1.removeEventListener(Event.ENTER_FRAME, startMovingl_l);
holder_mc.removeChild(_arg1);
}
public function Click(_arg1:MouseEvent):void{
this._press = true;
}
public function mouseout(_arg1:MouseEvent):void{
this._press = false;
}
public function panBG(_arg1):void{
bgAttach(bg_mc.ground_mc, ("ground" + _arg1), 0, 0, 1, (100 + Math.floor((Math.random() * 1000))), -(gamespeed));
bgAttach(bg_mc.mountain_mc, ("mountain" + _arg1), 0, 0, 1, (500 + Math.floor((Math.random() * 300))), (-(gamespeed) - 1));
bgAttach(bg_mc.cloud_mc, "cloud1", Math.floor((Math.random() * 500)), -500, (50 + Math.floor((Math.random() * 100))), 1, (-(gamespeed) / 3));
}
public function bgAnimation(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (gameState != "pause"){
_local2 = (_arg1.target.x + _arg1.target.vx);
if (_arg1.target.canattach){
if (_local2 <= _arg1.target.chkpoint1){
_arg1.target.canattach = false;
if (_arg1.target.type == "cloud"){
_local3 = Number(((_local2 + _arg1.target.width) + Math.floor((Math.random() * 500))));
_local4 = (-50 - Math.floor((Math.random() * 100)));
_local5 = (50 + Math.floor((Math.random() * 50)));
bgAttach(_arg1.target.parent, _arg1.target.linkid, _local3, _local4, _local5, 100, _arg1.target.vx);
} else {
if (_arg1.target.type == "mountain"){
bgAttach(_arg1.target.parent, _arg1.target.linkid, (_local2 + _arg1.target.width), _arg1.target.y, 1, (100 + Math.floor((Math.random() * 700))), _arg1.target.vx);
} else {
if ((((groundtype == "ground1")) && ((_arg1.target.linkid == "ground1")))){
bgAttach(_arg1.target.parent, groundtype, (_local2 + _arg1.target.width), _arg1.target.y, 1, (100 + Math.floor((Math.random() * 700))), _arg1.target.vx);
} else {
bgAttach(_arg1.target.parent, groundtype, (_local2 + _arg1.target.width), _arg1.target.y, 1, _arg1.target.width, _arg1.target.vx);
};
if (_arg1.target.linkid != groundtype){
if (groundtype == "ground2"){
groundtype = "ground3";
} else {
if (groundtype == "ground4"){
groundtype = "ground1";
};
};
};
};
};
};
} else {
if (_local2 <= _arg1.target.chkpoint2){
_arg1.target.removeEventListener(Event.ENTER_FRAME, bgAnimation);
_arg1.target.parent.removeChild(DisplayObject(_arg1.target));
};
};
_arg1.target.x = _local2;
};
}
public function bgAttach(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){
var _local8:String = _arg2;
_arg1 = (_arg1 as DisplayObject);
var _local9:Class = (getDefinitionByName(_local8) as Class);
var _local10:MovieClip = new (_local9);
var _local11:Object = _arg1.addChild(_local10);
_local11.name = _local8;
_local11.x = _arg3;
_local11.y = _arg4;
_local11.vx = _arg7;
_local11.scaleX = (_local11.scaleY = 1);
if (_arg5 != _local11.scaleX){
};
if (_local8.substr(0, 5) == "cloud"){
_local11.type = "cloud";
_local11.scaleX = (_local11.scaleY = (_arg5 / 100));
} else {
if (_local8.substr(0, 8) == "mountain"){
_local11.type = "mountain";
} else {
if (_local8.substr(0, 6) == "ground"){
_local11.type = "ground";
};
};
};
_local11.linkid = _local8;
_local11.canattach = true;
_local11.chkpoint1 = (stagew - _local11.width);
_local11.chkpoint2 = -(_local11.width);
_local11.addEventListener(Event.ENTER_FRAME, bgAnimation);
}
public function movieClipToArray(_arg1){
var _local3:int;
var _local2:Array = new Array();
if (_arg1.numChildren != 0){
_local3 = _arg1.numChildren;
while (_local3--) {
if (_arg1.getChildAt(_local3).hasOwnProperty("endPoint")){
_local2.push(_arg1.getChildAt(_local3));
};
};
};
return (_local2);
}
public function arrayedInsertionSort(_arg1:Array):Array{
var _local3:int;
var _local4:MovieClip;
var _local5:MovieClip;
var _local2:Number = _arg1.length;
var _local6 = 1;
while (_local6 < _local2) {
_local5 = _arg1[_local6];
_local3 = _local6;
_local4 = _arg1[int((_local3 - 1))];
while ((((_local3 > 0)) && ((_local4.y > _local5.y)))) {
_arg1[_local3] = _arg1[int((_local3 - 1))];
_local3--;
};
_arg1[_local3] = _local5;
_local6++;
};
return (_arg1);
}
public function short(_arg1, _arg2){
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_arg2.swapChildrenAt(_arg2.getChildIndex(_arg1[_local3]), _local3);
_local3++;
};
}
private function getCollisionRect(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObjectContainer, _arg4:Boolean=false, _arg5:int=0xFF):Rectangle{
var _local6:Rectangle = _arg1.getBounds(_arg3);
var _local7:Rectangle = _arg2.getBounds(_arg3);
var _local8:Rectangle = _local6.intersection(_local7);
if (!_arg4){
return (_local8);
};
_local8.x = Math.floor(_local8.x);
_local8.y = Math.floor(_local8.y);
_local8.width = Math.ceil(_local8.width);
_local8.height = Math.ceil(_local8.height);
if (_local8.isEmpty()){
return (_local8);
};
var _local9:Matrix = _arg3.transform.concatenatedMatrix.clone();
_local9.invert();
var _local10:Matrix = _arg1.transform.concatenatedMatrix.clone();
_local10.concat(_local9);
var _local11:Matrix = _arg2.transform.concatenatedMatrix.clone();
_local11.concat(_local9);
_local10.translate(-(_local8.x), -(_local8.y));
_local11.translate(-(_local8.x), -(_local8.y));
var _local12:BitmapData = new BitmapData(_local8.width, _local8.height, false);
_local12.draw(_arg1, _local10, new ColorTransform(1, 1, 1, 1, 0xFF, -255, -255, _arg5), BlendMode.NORMAL);
_local12.draw(_arg2, _local11, new ColorTransform(1, 1, 1, 1, 0xFF, 0xFF, 0xFF, _arg5), BlendMode.DIFFERENCE);
var _local13:Rectangle = _local12.getColorBoundsRect(4294967295, 4278255615);
_local13.offset(_local8.x, _local8.y);
return (_local13);
}
public function roundDecimalToPlace(_arg1:Number, _arg2:Number):Number{
var _local3:Number = Math.pow(10, Math.round(_arg2));
return ((Math.round((_arg1 * _local3)) / _local3));
}
}
}//package
Section 75
//GameObj (GameObj)
package {
public class GameObj {
public static var _gameHost:String = "spil";
public static var gameScore = 0;
public static var _gameName = "miami_outlaws";
public static var _gameTitle = "MiamiOutlaws";
public static var _g2wGameId = "10091";
public static var _partnerGameId = "miamioutlaws";
public static var _gstatus = "gameover";
public static var _googleText = "Miaami Outlaws";
public static var _gameStageW = 650;
public static var _gameStageH = 490;
public static var _gameHostStatus = false;
public static var _gameScoreOrder = "desc";
public static var _logoClick = "http://www.gangofgamers.com/en/?utm_source=miami_outlaws&utm_medium=logo_link&utm_campaign=gog_fb";
public static var _gameSubmitURL = "http://www.gangofgamers.com/submit_score.asp";
public static var _gameRegisterURL = "http://www.gangofgamers.com/register.asp";
public static var _gameTop10URL = "http://www.gangofgamers.com/get_top_scorer.asp";
public static var _gameDomainName = "gangofgamers.com";
public static var _gameVideoURL = "http://www.gangofgamers.com/videotutorial.html?url=kpUiiQFP0tE&name=Highway Outlaws";
public static var _gameResolution = ((_gameStageW + "x") + _gameStageH);
public static var relatedGamesXML = "http://s1.inviziads.com/partner/gog/related/gamemenu_tag_kissing_games.xml";
public static var relatedGamesTAG = "KSGM";
public static var _gameTrackingThumb = "http://apps.facebook.com/gangofgamers-games/?utm_source=gog_wrapper&utm_content=miami_outlaws&utm_campaign=gog_fb_wrapper&utm_medium=post_rolls";
public static var _gameTrackingStrip = "http://apps.facebook.com/gangofgamers-games/?utm_source=miami_outlaws&utm_medium=logo_link&utm_campaign=gog_fb";
public static var inviziadStr = ((("http://s1.inviziads.com/lookup.html?type=strip&g=" + _g2wGameId) + "&h=") + _gameHost);
public static var facebookURL = ("http://gangs.gangofgamers.com/gangofgamers_ifr/redirect_playpage_2.php?game=" + _g2wGameId);
public static var externalLinkRef = "BOTH";
public static var inviziads = (((("http://s1.inviziads.com/lookup.html?g=" + _g2wGameId) + "&h=") + _gameHost) + "&l=");
public static var facebookShareURL = (("http://www.facebook.com/share.php?u=http://gangs.gangofgamers.com/gangofgamers_ifr/redirect_playpage_2.php?game=" + _g2wGameId) + "");
}
}//package
Section 76
//glass (glass)
package {
import assets.*;
public dynamic class glass extends CustomSound {
}
}//package
Section 77
//GOG (GOG)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.external.*;
public class GOG {
private static var gameRoot;
private static var loader:URLLoader;
private static var request:URLRequest;
private static function addFBSessionVars(_arg1){
var _local2:String;
var _local3:String;
for (_local2 in LoaderInfo(gameRoot.loaderInfo).parameters) {
if (_local2.indexOf("fb_sig") == 0){
_local3 = String(LoaderInfo(gameRoot.loaderInfo).parameters[_local2]);
_arg1[_local2] = _local3;
};
};
}
private static function parseResponse(_arg1){
var _local3:*;
var _local2:URLLoader = _arg1.currentTarget;
debug(_local2.data.type);
if (((!((_local2.data.type == undefined))) && (!((_local2.data.type == "blank"))))){
debug(_local2.data.type);
_local3 = ((_local2.data.userlist) || ("-"));
ExternalInterface.call("g2wShareScore", _local2.data.type, _local2.data.userlist);
ExternalInterface.call("refresh_gamepage_score");
};
}
public static function submitGameScore(_arg1, _arg2, _arg3){
var _local4:URLVariables;
debug(((("Submitting Score gameid:" + _arg1) + " gamescore:") + _arg2));
debug(LoaderInfo(_arg3.loaderInfo).parameters["score_enable"]);
if (LoaderInfo(_arg3.loaderInfo).parameters["score_enable"] == "true"){
gameRoot = _arg3;
trace("submitting score");
loader = new URLLoader();
request = new URLRequest("http://gangs.gangofgamers.com/gangofgamers_ifr/score_submit.php");
_local4 = new URLVariables();
_local4.game = _arg1;
_local4.score = _arg2;
addFBSessionVars(_local4);
request.data = _local4;
request.method = URLRequestMethod.POST;
debug("POST URL : http://gangs.gangofgamers.com/gangofgamers_ifr/score_submit.php");
debug(("POST Variables " + _local4));
loader.addEventListener(Event.COMPLETE, parseResponse);
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.load(request);
};
}
private static function debug(_arg1){
trace(_arg1);
}
private static function trim(_arg1:String){
var _local3:*;
var _local2:* = 0;
while (_arg1.charCodeAt(_local2) < 33) {
_local3 = (_arg1.length - 1);
while (_arg1.charCodeAt(_local3) < 33) {
return (_arg1.substring(_local2, (_local3 + 1)));
_local3--;
};
_local2++;
};
}
}
}//package
Section 78
//ground1 (ground1)
package {
import flash.display.*;
public dynamic class ground1 extends MovieClip {
}
}//package
Section 79
//ground2 (ground2)
package {
import flash.display.*;
public dynamic class ground2 extends MovieClip {
}
}//package
Section 80
//ground3 (ground3)
package {
import flash.display.*;
public dynamic class ground3 extends MovieClip {
}
}//package
Section 81
//ground4 (ground4)
package {
import flash.display.*;
public dynamic class ground4 extends MovieClip {
}
}//package
Section 82
//ground5 (ground5)
package {
import flash.display.*;
public dynamic class ground5 extends MovieClip {
}
}//package
Section 83
//ground6 (ground6)
package {
import flash.display.*;
public dynamic class ground6 extends MovieClip {
}
}//package
Section 84
//gun (gun)
package {
public dynamic class gun extends Guns {
public function gun(){
addFrameScript(0, frame1);
}
function frame1(){
this.parent.x = 0;
this.parent.y = 0;
}
}
}//package
Section 85
//Guns (Guns)
package {
import flash.events.*;
import flash.display.*;
import assets.*;
import flash.text.*;
import flash.ui.*;
class Guns extends MovieClip {
public var bar_mc:MovieClip;
public var gunSound_mc:MovieClip;
public var reload_mc:MovieClip;
public var t_txt:TextField;
public var cur_mc:MovieClip;
public var gun_mc:MovieClip;
private var per:Number;// = 100
public var mainClass:MovieClip;
public var gunBullets:Number;// = 30
public var maxBullets:Number;
public var shoot:Boolean;// = false
public var perviousBullets:Number;
public var val:Number;// = 1
public var val2:Number;// = 1
public var mainVal:Number;// = 1
public var mouseDownVal:Boolean;// = false
private var _big:Boolean;// = false
public var _state:Boolean;// = false
var reloadVal:Boolean;// = true
private var gunBullets_ar:Array;
function Guns(){
mainClass = (root as MovieClip);
maxBullets = gunBullets;
perviousBullets = gunBullets;
gunBullets_ar = new Array(30, 50, 40, 30, 100);
super();
}
public function startGun(){
this.reload_mc.gotoAndStop(1);
this.visible = true;
_state = true;
Mouse.hide();
gunBullets = gunBullets_ar[(mainClass.game_mc.guntype - 1)];
maxBullets = gunBullets;
val = 1;
val2 = 1;
mainVal = 1;
mouseDownVal = false;
trace((mainClass.game_mc.guntype + " : mainClass.game_mc.guntype"));
this.gun_mc.gotoAndStop(mainClass.game_mc.guntype);
this.addEventListener(Event.ENTER_FRAME, doit);
stage.addEventListener(MouseEvent.MOUSE_DOWN, clickDown);
stage.addEventListener(MouseEvent.MOUSE_UP, clickUp);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.addEventListener(Event.DEACTIVATE, clearKeys);
}
public function keyPressed(_arg1:KeyboardEvent):void{
var _local2:MovieClip;
if (mainClass.game_mc.gameState != "pause"){
if (_arg1.keyCode == Keyboard.SPACE){
if (gunBullets < maxBullets){
gunBullets = 0;
mainVal = 2;
trace((reloadVal + " : reloadVal"));
if (!reloadVal){
reloadVal = true;
_local2 = (this.getChildByName("reload_mc") as MovieClip);
_local2.gotoAndPlay(24);
};
};
};
};
}
public function clearKeys(_arg1:Event):void{
mouseDownVal = false;
}
public function stopGun(){
var _local1:MovieClip = (this.getChildByName("gunSound_mc") as MovieClip);
if (_local1 != null){
_local1.gotoAndStop(1);
};
_state = false;
Mouse.show();
val = 1;
val2 = 1;
mainVal = 1;
this.removeEventListener(Event.ENTER_FRAME, doit);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, clickDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, clickUp);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.removeEventListener(Event.DEACTIVATE, clearKeys);
this.gun_mc.gotoAndStop(1);
this.gun_mc.gotoAndStop(1);
this.visible = false;
}
public function doit(_arg1:Event):void{
var _local2:MovieClip;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:MovieClip;
var _local11:MovieClip;
var _local12:MovieClip;
if (mainClass.game_mc.gameState != "pause"){
shoot = false;
per = ((gunBullets / maxBullets) * 100);
_local2 = (_arg1.target.getChildByName("bar_mc") as MovieClip);
_local2.gotoAndStop(Math.floor(((_local2.totalFrames * per) / 100)));
_local3 = 1;
_local4 = ((_local3 / 90) * -200);
_local5 = ((_local3 / 90) * -(650));
cur_mc.x = this.mouseX;
cur_mc.y = this.mouseY;
cur_mc.mouseEnabled = false;
cur_mc.mouseChildren = false;
_local6 = Math.floor(((_arg1.target.mouseY / stage.stageHeight) * Math.abs((200 - _arg1.target.mouseY))));
_local7 = Math.floor((_arg1.target.mouseX - 150));
_local8 = Math.floor((((_arg1.target.mouseX / stage.stageWidth) * 20) - 5));
if (_arg1.target.gun_mc != null){
if (_arg1.target.gun_mc.gun_mc != null){
if (_arg1.target.gun_mc.gun_mc.gun_mc != null){
_local10 = (_arg1.target.gun_mc.gun_mc.gun_mc as MovieClip);
};
};
};
_local9 = (-(((Math.atan2((stage.stageWidth - stage.mouseX), (stage.stageHeight - stage.mouseY)) / Math.PI) * 180)) + 60);
if (_local10 != null){
if (this.mouseY <= 280){
_arg1.target.gun_mc.y = (((this.mouseY / 4) + 50) + _local4);
} else {
_arg1.target.gun_mc.y = (((this.mouseY / 4) + 50) + _local4);
};
_arg1.target.gun_mc.x = ((((_local10.mouseX / 3) + 350) + _local5) - 50);
if (_local9 <= 40){
_local10.rotation = _local9;
};
};
if (((_arg1.target.gun_mc.hasOwnProperty("gun_mc")) && (!((_arg1.target.gun_mc.gun_mc == null))))){
if (_arg1.target.gun_mc.gun_mc.framesLoaded == _arg1.target.gun_mc.gun_mc.totalFrames){
if (mainVal == 1){
if (_arg1.target.gun_mc.gun_mc.hasOwnProperty("gun_mc")){
if (_arg1.target.gun_mc.gun_mc.gun_mc != null){
if (_arg1.target.gun_mc.gun_mc.gun_mc.framesLoaded == _arg1.target.gun_mc.gun_mc.gun_mc.totalFrames){
_arg1.target.gun_mc.gun_mc.gun_mc.gotoAndStop(val);
val++;
if (val > _arg1.target.gun_mc.gun_mc.gun_mc.totalFrames){
gunBullets--;
shoot = true;
val = 1;
};
};
};
};
} else {
if (_arg1.target.gun_mc.gun_mc.hasOwnProperty("gunr_mc")){
if (_arg1.target.gun_mc.gun_mc.gunr_mc != null){
if (_arg1.target.gun_mc.gun_mc.gunr_mc.framesLoaded == _arg1.target.gun_mc.gun_mc.gunr_mc.totalFrames){
val2++;
_arg1.target.gun_mc.gun_mc.gunr_mc.gotoAndStop(val2);
if (val2 > _arg1.target.gun_mc.gun_mc.gunr_mc.totalFrames){
gunBullets = maxBullets;
mainVal = 1;
val2 = 1;
};
};
};
};
};
};
if (((mouseDownVal) && (!((gunBullets == 0))))){
if (mainVal == 1){
if (_big){
_big = false;
cur_mc.scaleX = (cur_mc.scaleY = 0.7);
} else {
_big = true;
cur_mc.scaleX = (cur_mc.scaleY = 1);
};
} else {
cur_mc.scaleX = (cur_mc.scaleY = 1);
cur_mc.gotoAndStop(1);
};
} else {
val = 1;
cur_mc.gotoAndStop(1);
cur_mc.scaleX = (cur_mc.scaleY = 1);
};
if ((((gunBullets <= 0)) && (reloadVal))){
if (mainVal == 1){
reloadVal = false;
gunBullets = 0;
_local12 = (this.getChildByName("reload_mc") as MovieClip);
_local12.play();
};
};
_arg1.target.gun_mc.gun_mc.gotoAndStop(mainVal);
_arg1.target.t_txt.text = ((gunBullets + "/") + maxBullets);
_local11 = (this.getChildByName("gunSound_mc") as MovieClip);
if (((!((_local11 == null))) && (shoot))){
if (mainClass.game_mc.guntype == 3){
_local11.gotoAndStop(4);
} else {
if (mainClass.game_mc.guntype == 4){
_local11.gotoAndStop(5);
} else {
_local11.gotoAndStop(2);
};
};
} else {
if (((!((_local11 == null))) && ((mainVal == 2)))){
_local11.gotoAndStop(3);
} else {
if ((((((mainVal == 1)) && (!(mouseDownVal)))) || ((gunBullets == 0)))){
_local11.gotoAndStop(1);
};
};
};
};
};
}
function clickDown(_arg1:MouseEvent):void{
perviousBullets = gunBullets;
mouseDownVal = true;
if (mainVal == 1){
};
}
function clickUp(_arg1:MouseEvent):void{
if ((((perviousBullets == gunBullets)) && ((gunBullets > 0)))){
gunBullets--;
shoot = true;
};
mouseDownVal = false;
}
}
}//package
Section 86
//Guns_Demo (Guns_Demo)
package {
import flash.events.*;
import flash.display.*;
import flash.ui.*;
class Guns_Demo extends MovieClip {
public var gunSound_mc:MovieClip;
public var cur_mc:MovieClip;
public var gun_mc:MovieClip;
private var per:Number;// = 100
public var mainClass:MovieClip;
public var gunBullets:Number;// = 30
public var maxBullets:Number;
public var shoot:Boolean;// = false
public var perviousBullets:Number;
public var val:Number;// = 1
public var val2:Number;// = 1
public var mainVal:Number;// = 1
public var mouseDownVal:Boolean;// = false
private var _big:Boolean;// = false
public var _state;// = false
private var gunBullets_ar:Array;
function Guns_Demo(){
mainClass = (root as MovieClip);
maxBullets = gunBullets;
perviousBullets = gunBullets;
gunBullets_ar = new Array(30, 50, 40, 30, 100);
super();
startGun();
}
public function startGun(){
_state = true;
this.visible = true;
Mouse.hide();
gunBullets = 30;
maxBullets = gunBullets;
val = 1;
val2 = 1;
mainVal = 1;
mouseDownVal = false;
this.addEventListener(Event.ENTER_FRAME, doit);
stage.addEventListener(MouseEvent.MOUSE_DOWN, clickDown);
stage.addEventListener(MouseEvent.MOUSE_UP, clickUp);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.addEventListener(Event.DEACTIVATE, clearKeys);
}
public function keyPressed(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.SPACE){
if (gunBullets < maxBullets){
gunBullets = 0;
mainVal = 2;
};
};
}
public function clearKeys(_arg1:Event):void{
mouseDownVal = false;
}
public function stopGun(){
_state = false;
var _local1:MovieClip = (this.getChildByName("gunSound_mc") as MovieClip);
if (_local1 != null){
_local1.gotoAndStop(1);
};
Mouse.show();
val = 1;
val2 = 1;
mainVal = 1;
this.removeEventListener(Event.ENTER_FRAME, doit);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, clickDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, clickUp);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.removeEventListener(Event.DEACTIVATE, clearKeys);
this.gun_mc.gotoAndStop(1);
this.gun_mc.gotoAndStop(1);
this.gun_mc.gun_mc.gun_mc.gotoAndStop(1);
this.visible = false;
}
public function doit(_arg1:Event):void{
var _local10:MovieClip;
shoot = false;
per = ((gunBullets / maxBullets) * 100);
var _local2:Number = 1;
var _local3:Number = ((_local2 / 90) * -200);
var _local4:Number = ((_local2 / 90) * -(650));
cur_mc.x = this.mouseX;
cur_mc.y = this.mouseY;
cur_mc.mouseEnabled = false;
cur_mc.mouseChildren = false;
var _local5:Number = Math.floor(((_arg1.target.mouseY / stage.stageHeight) * Math.abs((200 - _arg1.target.mouseY))));
var _local6:Number = Math.floor((_arg1.target.mouseX - 150));
var _local7:Number = Math.floor((((_arg1.target.mouseX / stage.stageWidth) * 20) - 5));
var _local8:MovieClip = (_arg1.target.gun_mc.gun_mc.gun_mc as MovieClip);
var _local9:Number = (-(((Math.atan2((stage.stageWidth - stage.mouseX), (stage.stageHeight - stage.mouseY)) / Math.PI) * 180)) + 60);
if (_local8 != null){
if (this.mouseY <= 280){
_arg1.target.gun_mc.y = (((this.mouseY / 4) + 50) + _local3);
} else {
_arg1.target.gun_mc.y = (((this.mouseY / 4) + 50) + _local3);
};
_arg1.target.gun_mc.x = ((((_local8.mouseX / 3) + 300) + _local4) - 50);
if (_local9 <= 40){
_local8.rotation = _local9;
};
};
if (((_arg1.target.gun_mc.hasOwnProperty("gun_mc")) && (!((_arg1.target.gun_mc.gun_mc == null))))){
if (_arg1.target.gun_mc.gun_mc.framesLoaded == _arg1.target.gun_mc.gun_mc.totalFrames){
if (mainVal == 1){
if (_arg1.target.gun_mc.gun_mc.hasOwnProperty("gun_mc")){
if (_arg1.target.gun_mc.gun_mc.gun_mc != null){
if (_arg1.target.gun_mc.gun_mc.gun_mc.framesLoaded == _arg1.target.gun_mc.gun_mc.gun_mc.totalFrames){
_arg1.target.gun_mc.gun_mc.gun_mc.gotoAndStop(val);
val++;
if (val > _arg1.target.gun_mc.gun_mc.gun_mc.totalFrames){
gunBullets--;
shoot = true;
val = 1;
};
};
};
};
} else {
if (_arg1.target.gun_mc.gun_mc.hasOwnProperty("gunr_mc")){
if (_arg1.target.gun_mc.gun_mc.gunr_mc != null){
if (_arg1.target.gun_mc.gun_mc.gunr_mc.framesLoaded == _arg1.target.gun_mc.gun_mc.gunr_mc.totalFrames){
val2++;
_arg1.target.gun_mc.gun_mc.gunr_mc.gotoAndStop(val2);
if (val2 > _arg1.target.gun_mc.gun_mc.gunr_mc.totalFrames){
gunBullets = maxBullets;
mainVal = 1;
val2 = 1;
};
};
};
};
};
};
if (((mouseDownVal) && (!((gunBullets == 0))))){
if (mainVal == 1){
if (_big){
_big = false;
cur_mc.scaleX = (cur_mc.scaleY = 0.7);
} else {
_big = true;
cur_mc.scaleX = (cur_mc.scaleY = 1);
};
} else {
cur_mc.scaleX = (cur_mc.scaleY = 1);
cur_mc.gotoAndStop(1);
};
} else {
val = 1;
cur_mc.gotoAndStop(1);
cur_mc.scaleX = (cur_mc.scaleY = 1);
};
if (gunBullets <= 0){
gunBullets = 0;
};
_arg1.target.gun_mc.gun_mc.gotoAndStop(mainVal);
_local10 = (this.getChildByName("gunSound_mc") as MovieClip);
if (((!((_local10 == null))) && (shoot))){
_local10.gotoAndStop(2);
} else {
if (((!((_local10 == null))) && ((mainVal == 2)))){
_local10.gotoAndStop(3);
} else {
if ((((((mainVal == 1)) && (!(mouseDownVal)))) || ((gunBullets == 0)))){
_local10.gotoAndStop(1);
};
};
};
};
}
function clickDown(_arg1:MouseEvent):void{
perviousBullets = gunBullets;
mouseDownVal = true;
}
function clickUp(_arg1:MouseEvent):void{
if (perviousBullets == gunBullets){
gunBullets--;
shoot = true;
};
mouseDownVal = false;
}
}
}//package
Section 87
//Ingame (Ingame)
package {
import assets.*;
public dynamic class Ingame extends CustomSound {
}
}//package
Section 88
//lclip1_l_mc (lclip1_l_mc)
package {
public dynamic class lclip1_l_mc extends Normal_l {
}
}//package
Section 89
//lclip1_mc (lclip1_mc)
package {
public dynamic class lclip1_mc extends Normal {
}
}//package
Section 90
//lclip2_l_mc (lclip2_l_mc)
package {
public dynamic class lclip2_l_mc extends Normal_l {
}
}//package
Section 91
//lclip2_mc (lclip2_mc)
package {
public dynamic class lclip2_mc extends Normal {
}
}//package
Section 92
//lclip3_l_mc (lclip3_l_mc)
package {
public dynamic class lclip3_l_mc extends Normal_l {
}
}//package
Section 93
//lclip3_mc (lclip3_mc)
package {
public dynamic class lclip3_mc extends Normal {
}
}//package
Section 94
//lclip4_mc (lclip4_mc)
package {
public dynamic class lclip4_mc extends OilTanker {
}
}//package
Section 95
//Level_Lose (Level_Lose)
package {
import assets.*;
public dynamic class Level_Lose extends CustomSound {
}
}//package
Section 96
//Level_Win (Level_Win)
package {
import assets.*;
public dynamic class Level_Win extends CustomSound {
}
}//package
Section 97
//main_gun_demo (main_gun_demo)
package {
public dynamic class main_gun_demo extends Guns_Demo {
public function main_gun_demo(){
addFrameScript(0, frame1);
}
function frame1(){
this.parent.x = 0;
this.parent.y = 0;
}
}
}//package
Section 98
//Me (Me)
package {
public dynamic class Me extends Clip {
}
}//package
Section 99
//mountain1 (mountain1)
package {
import flash.display.*;
public dynamic class mountain1 extends MovieClip {
}
}//package
Section 100
//mountain2 (mountain2)
package {
import flash.display.*;
public dynamic class mountain2 extends MovieClip {
}
}//package
Section 101
//mountain3 (mountain3)
package {
import flash.display.*;
public dynamic class mountain3 extends MovieClip {
}
}//package
Section 102
//mountain4 (mountain4)
package {
import flash.display.*;
public dynamic class mountain4 extends MovieClip {
}
}//package
Section 103
//mountain5 (mountain5)
package {
import flash.display.*;
public dynamic class mountain5 extends MovieClip {
}
}//package
Section 104
//mountain6 (mountain6)
package {
import flash.display.*;
public dynamic class mountain6 extends MovieClip {
}
}//package
Section 105
//Normal (Normal)
package {
import flash.events.*;
import flash.display.*;
class Normal extends MovieClip {
public var holder_mc:MovieClip;
public var _in_area:Boolean;
var numDoors:Number;
var color:String;
public var bar:bar_mc;
public var press:Boolean;
public var per:Number;
public var reduceVal:Number;
public var _type:Number;
public var shootVal:Number;
function Normal(){
_in_area = false;
reduceVal = 1;
_type = 0;
shootVal = 0.5;
per = 100;
this.mouseChildren = false;
this.press = false;
this.addEventListener(Event.ENTER_FRAME, doit);
this.addEventListener(Event.REMOVED_FROM_STAGE, removeS);
}
public function removeS(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removeS);
this.removeEventListener(Event.ENTER_FRAME, doit);
}
public function doit(_arg1:Event):void{
var _local2:*;
if (_arg1.target.press){
per = (per - reduceVal);
if (per < 0){
(per == 0);
this.removeEventListener(Event.ENTER_FRAME, doit);
_local2 = (this.root as MovieClip);
_local2.game_mc.doitl(this);
};
};
}
}
}//package
Section 106
//Normal_l (Normal_l)
package {
import flash.events.*;
import flash.display.*;
class Normal_l extends MovieClip {
public var holder_mc:MovieClip;
public var _in_area:Boolean;
var numDoors:Number;
var color:String;
public var bar:bar_mc;
public var press:Boolean;
public var per:Number;
public var reduceVal:Number;
public var _type:Number;
public var shootVal:Number;
function Normal_l(){
_in_area = false;
reduceVal = 1;
_type = 0;
shootVal = 0.5;
per = 100;
this.mouseChildren = false;
this.press = false;
this.addEventListener(Event.ENTER_FRAME, doit);
this.addEventListener(Event.REMOVED_FROM_STAGE, removeS);
}
public function removeS(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removeS);
this.removeEventListener(Event.ENTER_FRAME, doit);
}
public function doit(_arg1:Event):void{
var _local2:*;
if (_arg1.target.press){
per = (per - reduceVal);
if (per < 0){
(per == 0);
this.removeEventListener(Event.ENTER_FRAME, doit);
_local2 = (this.root as MovieClip);
_local2.game_mc.doitl_l(this);
};
};
}
}
}//package
Section 107
//OilTanker (OilTanker)
package {
import flash.events.*;
import flash.display.*;
class OilTanker extends MovieClip {
public var holder_mc:MovieClip;
var numDoors:Number;
var color:String;
public var bar:bar_mc;
public var press:Boolean;
public var per:Number;
public var reduceVal:Number;
public var _type:Number;
public var shootVal:Number;
function OilTanker(){
reduceVal = 10;
_type = 0;
shootVal = 0.5;
per = 100;
bar = new bar_mc();
bar.name = "bar_mc";
var _local1:MovieClip = (this.getChildByName("holder_mc") as MovieClip);
bar.x = _local1.x;
bar.y = _local1.y;
this.addChild(bar);
this.mouseChildren = false;
this.press = false;
this.addEventListener(Event.ENTER_FRAME, doit);
this.addEventListener(Event.REMOVED_FROM_STAGE, removeS);
}
public function removeS(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removeS);
this.removeEventListener(Event.ENTER_FRAME, doit);
}
public function doit(_arg1:Event):void{
var _local3:*;
var _local2:MovieClip = (_arg1.target.getChildByName("bar_mc") as MovieClip);
_local2.gotoAndStop(Math.floor(((_local2.totalFrames * per) / 100)));
if (_arg1.target.press){
per = (per - reduceVal);
if (per < 0){
(per == 0);
this.removeEventListener(Event.ENTER_FRAME, doit);
_local3 = (this.root as MovieClip);
_local3.game_mc.OilTanker_blast(this);
};
};
}
}
}//package
Section 108
//reload (reload)
package {
import assets.*;
public dynamic class reload extends CustomSound {
}
}//package
Section 109
//ScreenShake (ScreenShake)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class ScreenShake {
private static const FRAME_RATE:int = 25;
private static var timer:Timer;
private static var image:DisplayObject;
private static var originalX:int;
private static var originalY:int;
private static var intensity:int;
private static var intensityOffset:int;
public static function go(_arg1:DisplayObject, _arg2:Number=10, _arg3:Number=1):void{
if (timer){
timer.stop();
};
image = _arg1;
originalX = image.x;
originalY = image.y;
intensity = _arg2;
intensityOffset = (intensity / 2);
var _local4:int = int((1000 / FRAME_RATE));
var _local5:int = int(((_arg3 * 1000) / _local4));
timer = new Timer(_local4, _local5);
timer.addEventListener(TimerEvent.TIMER, quake);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, resetImage);
timer.start();
}
public static function temp():void{
}
private static function quake(_arg1:TimerEvent):void{
var _local2:int = ((originalX + (Math.random() * intensity)) - intensityOffset);
var _local3:int = ((originalY + (Math.random() * intensity)) - intensityOffset);
image.x = _local2;
image.y = _local3;
}
private static function resetImage(_arg1:TimerEvent=null):void{
image.x = 0;
image.y = 0;
cleanup();
}
private static function cleanup():void{
timer = null;
image = null;
}
}
}//package
Section 110
//Selection_s (Selection_s)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import spilgames.api.*;
public class Selection_s extends MovieClip {
public var clipb4_mc:MovieClip;
public var clipe3_mc:MovieClip;
public var clipb5_mc:MovieClip;
public var clipe1_mc:MovieClip;
public var score_txt:TextField;
public var clipe4_mc:MovieClip;
public var money_txt:TextField;
public var clipe5_mc:MovieClip;
public var mc2_mc:MovieClip;
public var mc3_mc:MovieClip;
public var vanh_Click_mc:MovieClip;
public var clips2_mc:MovieClip;
public var mc1_mc:MovieClip;
public var mc6_mc:MovieClip;
public var clipb2_mc:MovieClip;
public var clipb3_mc:MovieClip;
public var clips1_mc:MovieClip;
public var mc4_mc:MovieClip;
public var mc5_mc:MovieClip;
public var clipb1_mc:MovieClip;
public var clipe2_mc:MovieClip;
public var vanh_mc:MovieClip;
public var mainClass:MovieClip;
public var score:Number;// = 0
public var currentgun:int;// = 1
public var costArray:Array;
public function Selection_s(){
mainClass = (root as MovieClip);
costArray = new Array(0, 1000, 3000, 5000, 10000, 3000, 5000);
super();
init();
}
public function init(){
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:MovieClip;
var _local6:MovieClip;
var _local7:MovieClip;
var _local8:int;
var _local9:*;
var _local10:String;
var _local11:MovieClip;
var _local12:MovieClip;
mainClass = mainClass.game_mc;
vanh_mc.gotoAndStop(Math.round(mainClass.van_health));
vanh_Click_mc.addEventListener(MouseEvent.CLICK, inc_health);
trace((mainClass + " : mainClass"));
money_txt.text = String(mainClass.money);
score_txt.text = String(mainClass.score);
ScoreService.submitScore(mainClass.score);
var _local1:Number = 1;
while (_local1 <= 5) {
_local2 = (("clipb" + _local1) + "_mc");
_local3 = (("clipe" + _local1) + "_mc");
_local4 = (("clipe" + mainClass.guntype) + "_mc");
_local5 = (this.getChildByName(_local4) as MovieClip);
_local6 = (this.getChildByName(_local2) as MovieClip);
_local7 = (this.getChildByName(_local3) as MovieClip);
_local6.id = _local1;
_local7.id = _local1;
_local6.buy = false;
_local8 = (_local1 - 1);
if (mainClass.curbArray[_local8] == 0){
_local6.gotoAndStop(1);
} else {
_local6.buy = true;
_local6.gotoAndStop(2);
_local6.visible = false;
};
_local9 = (this.getChildByName((("clipe" + currentgun) + "_mc")) as MovieClip);
_local9.gotoAndStop(2);
_local7.gotoAndStop(1);
_local10 = (("clipe" + currentgun) + "_mc");
_local11 = (this.getChildByName(_local10) as MovieClip);
_local12 = (this.getChildByName((("clipb" + currentgun) + "_mc")) as MovieClip);
_local11.gotoAndStop(2);
_local12.buy = true;
_local12.gotoAndStop(2);
_local7.addEventListener(MouseEvent.CLICK, click_fun);
_local6.addEventListener(MouseEvent.CLICK, clickb_fun);
_local5.gotoAndStop(2);
if (mainClass.guntype != 1){
clipe1_mc.gotoAndStop(1);
};
_local1++;
};
if (mainClass.curbArray[6] == 0){
clips1_mc.gotoAndStop(1);
clips1_mc.buy = false;
} else {
clips1_mc.buy = true;
clips1_mc.gotoAndStop(2);
clips1_mc.visible = false;
};
if (mainClass.curbArray[7] == 0){
clips2_mc.gotoAndStop(1);
clips2_mc.buy = false;
} else {
clips2_mc.buy = true;
clips2_mc.gotoAndStop(2);
clips2_mc.visible = false;
};
clips1_mc.cost = 3000;
clips2_mc.cost = 5000;
clips1_mc.addEventListener(MouseEvent.CLICK, clips_mc_fun);
clips2_mc.addEventListener(MouseEvent.CLICK, clips_mc_fun);
startGlow();
}
public function inc_health(_arg1:MouseEvent):void{
if ((((500 <= mainClass.money)) && ((mainClass.van_health <= 100)))){
mainClass.money = (mainClass.money - 500);
mainClass.van_health = (mainClass.van_health + 10);
money_txt.text = String(mainClass.money);
vanh_mc.gotoAndStop(Math.round(mainClass.van_health));
};
}
public function click_fun(_arg1:MouseEvent):void{
var _local3:Number;
var _local4:MovieClip;
var _local5:MovieClip;
var _local2:MovieClip = _arg1.target.parent.getChildByName((("clipb" + _arg1.target.id) + "_mc"));
if (_local2.buy){
_local3 = 1;
while (_local3 <= 5) {
_local5 = _arg1.target.parent.getChildByName((("clipe" + _local3) + "_mc"));
_local5.gotoAndStop(1);
_local3++;
};
_local4 = _arg1.target.parent.getChildByName((("clipe" + _arg1.target.id) + "_mc"));
_local4.gotoAndStop(2);
currentgun = _arg1.target.id;
mainClass.guntype = currentgun;
};
}
public function clickb_fun(_arg1:MouseEvent):void{
var _local3:MovieClip;
var _local4:Number;
var _local5:MovieClip;
trace("GUN LIYA");
var _local2:int = (_arg1.target.id - 1);
if ((((costArray[_local2] <= mainClass.money)) && (!(_arg1.target.buy)))){
mainClass.money = (mainClass.money - costArray[_local2]);
money_txt.text = String(mainClass.money);
_arg1.target.gotoAndStop(2);
_arg1.target.buy = true;
mainClass.curbArray[_local2] = 1;
_local3 = _arg1.target.parent.getChildByName((("clipe" + _arg1.target.id) + "_mc"));
_local4 = 1;
while (_local4 <= 5) {
_local5 = _arg1.target.parent.getChildByName((("clipe" + _local4) + "_mc"));
_local5.gotoAndStop(1);
_local4++;
};
_local3.gotoAndStop(2);
startGlow();
currentgun = _local3.id;
mainClass.guntype = currentgun;
(_arg1.target as MovieClip).visible = false;
};
}
public function clips_mc_fun(_arg1:MouseEvent):void{
if ((((_arg1.target.cost <= mainClass.money)) && (!(_arg1.target.buy)))){
if (_arg1.target.cost == 3000){
mainClass.curbArray[6] = 1;
} else {
mainClass.curbArray[7] = 1;
};
trace("AWARD3*********************************");
if (GameClass.award3Status == true){
GameClass.award3Status = false;
AwardsService.submitAward("award3");
};
mainClass.money = (mainClass.money - _arg1.target.cost);
_arg1.target.buy = true;
money_txt.text = String(mainClass.money);
_arg1.target.gotoAndStop(2);
(_arg1.target as MovieClip).visible = false;
};
startGlow();
}
private function startGlow(){
var _local4:Number;
var _local5:MovieClip;
var _local6:Number;
var _local7:MovieClip;
trace(("Fun startGlow Call : " + mainClass.money));
var _local1:Array = new Array();
var _local2:Number = 0;
while (_local2 <= 3) {
_local4 = (_local2 + 2);
_local5 = (this.getChildByName((("clipb" + _local4) + "_mc")) as MovieClip);
if (_local5 != null){
trace((_local5.name + " : clip"));
_local1.push(_local5);
};
_local2++;
};
_local1.push(clips1_mc);
_local1.push(clips2_mc);
var _local3:Number = 0;
while (_local3 <= 5) {
_local6 = (_local3 + 1);
_local7 = (this.getChildByName((("mc" + _local6) + "_mc")) as MovieClip);
if (!(_local1[_local3] as MovieClip).buy){
if (_local7 != null){
trace((_local7.name + " notbuy mc"));
_local7.alpha = 0.9;
};
trace(("Buy : " + (_local1[_local3] as MovieClip).name));
if (costArray[_local6] <= mainClass.money){
trace(((("Can Buy : " + mainClass.money) + " : ") + costArray[_local6]));
(_local1[_local3] as MovieClip).gotoAndStop(2);
} else {
(_local1[_local3] as MovieClip).gotoAndStop(1);
};
} else {
if (_local7 != null){
trace((_local7.name + " buy mc"));
_local7.alpha = 0;
};
};
_local3++;
};
}
}
}//package
Section 111
//shoot (shoot)
package {
import assets.*;
public dynamic class shoot extends CustomSound {
}
}//package
Section 112
//Title (Title)
package {
import assets.*;
public dynamic class Title extends CustomSound {
}
}//package