Section 1
//PM_PRNG (de.polygonal.math.PM_PRNG)
package de.polygonal.math {
public class PM_PRNG {
public static var seed:uint = now.getTime();
public static var now:Date = new Date();
public function PM_PRNG(){
var _local1:Date = new Date();
}
public static function nextDoubleRange(_arg1:Number, _arg2:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * nextDouble())));
}
public static function nextDouble():Number{
return ((gen() / 2147483647));
}
private static function gen():uint{
return ((seed = ((seed * 16807) % 2147483647)));
}
public static function nextIntRange(_arg1:Number, _arg2:Number):uint{
_arg1 = (_arg1 - 0.4999);
_arg2 = (_arg2 + 0.4999);
return (Math.round((_arg1 + ((_arg2 - _arg1) * nextDouble()))));
}
public static function nextInt():uint{
return (gen());
}
}
}//package de.polygonal.math
Section 2
//Log (Playtomic.Log)
package Playtomic {
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
public final class Log {
private static const PingR:Timer = new Timer(30000);
private static const PingF:Timer = new Timer(60000);
private static var LevelAverages:Array = new Array();
private static var Customs:Array = new Array();
public static var Cookie:SharedObject;
public static var GUID:String = "";
public static var SWFID:int = 0;
private static var LevelRangeds:Array = new Array();
private static var Plays:int = 0;
public static var Enabled:Boolean = false;
private static var Pings:int = 0;
private static var FrozenQueue:Array = new Array();
public static var SourceUrl:String;
private static var HighestGoal:int = 0;
private static var FirstPing:Boolean = true;
private static var Frozen:Boolean = false;
public static var BaseUrl:String;
public static var Request:LogRequest;
public static var Queue:Boolean = true;
private static var LevelCounters:Array = new Array();
public static function Link(_arg1:String, _arg2:String, _arg3:String, _arg4:int, _arg5:int, _arg6:int):void{
if (!Enabled){
return;
};
Send(((((((((((("l/" + Clean(_arg2)) + "/") + Clean(_arg3)) + "/") + Clean(_arg1)) + "/") + _arg4) + "/") + _arg5) + "/") + _arg6));
}
public static function LevelAverageMetric(_arg1:String, _arg2, _arg3:int, _arg4:Boolean=false):void{
if (!Enabled){
return;
};
if (_arg4){
if (LevelAverages.indexOf(_arg1) > -1){
return;
};
LevelAverages.push(_arg1);
};
Send(((((("la/" + Clean(_arg1)) + "/") + Clean(_arg2)) + "/") + _arg3));
}
public static function IncreaseViews():void{
var _local1:int = GetCookie("views");
_local1++;
SaveCookie("views", _local1);
}
private static function Send(_arg1:String, _arg2:Boolean=false):void{
if (Frozen){
FrozenQueue.push(_arg1);
return;
};
Request.Queue(_arg1);
if (((((Request.Ready) || (_arg2))) || (!(Queue)))){
Request.Send();
Request = LogRequest.Create();
};
}
public static function CustomMetric(_arg1:String, _arg2:String=null, _arg3:Boolean=false):void{
if (!Enabled){
return;
};
if (_arg2 == null){
_arg2 = "";
};
if (_arg3){
if (Customs.indexOf(_arg1) > -1){
return;
};
Customs.push(_arg1);
};
Send(((("c/" + Clean(_arg1)) + "/") + Clean(_arg2)));
}
private static function Clean(_arg1:String):String{
while (_arg1.indexOf("/") > -1) {
_arg1 = _arg1.replace("/", "\\");
};
while (_arg1.indexOf("~") > -1) {
_arg1 = _arg1.replace("~", "-");
};
return (escape(_arg1));
}
public static function UnFreeze():void{
Frozen = false;
Request.MassQueue(FrozenQueue);
}
private static function GetCookie(_arg1:String):int{
if (Cookie.data[_arg1] == undefined){
return (0);
};
return (int(Cookie.data[_arg1]));
}
public static function View(_arg1:int=0, _arg2:String="", _arg3:String=""):void{
if (SWFID > 0){
return;
};
SWFID = _arg1;
GUID = _arg2;
Enabled = true;
if ((((SWFID == 0)) || ((GUID == "")))){
Enabled = false;
return;
};
if (((((!((_arg3.indexOf("http://") == 0))) && (!((Security.sandboxType == "localWithNetwork"))))) && (!((Security.sandboxType == "localTrusted"))))){
Enabled = false;
return;
};
SourceUrl = GetUrl(_arg3);
if ((((((SourceUrl == null)) || ((SourceUrl == "")))) || ((SourceUrl.indexOf("https://") == 0)))){
Enabled = false;
return;
};
Security.allowDomain((("http://g" + Log.GUID) + ".api.playtomic.com/"));
Security.allowInsecureDomain((("http://g" + Log.GUID) + ".api.playtomic.com/"));
Security.loadPolicyFile((("http://g" + Log.GUID) + ".api.playtomic.com/crossdomain.xml"));
Request = LogRequest.Create();
Cookie = SharedObject.getLocal("playtomic");
var _local4:int = GetCookie("views");
Send(("v/" + (_local4 + 1)), true);
PingF.addEventListener(TimerEvent.TIMER, PingServer);
PingF.start();
}
public static function Freeze():void{
Frozen = true;
}
public static function LevelCounterMetric(_arg1:String, _arg2, _arg3:Boolean=false):void{
if (!Enabled){
return;
};
if (_arg3){
if (LevelCounters.indexOf(_arg1) > -1){
return;
};
LevelCounters.push(_arg1);
};
Send(((("lc/" + Clean(_arg1)) + "/") + Clean(_arg2)));
}
public static function Play():void{
if (!Enabled){
return;
};
LevelCounters = new Array();
LevelAverages = new Array();
LevelRangeds = new Array();
Send(("p/" + (Plays + 1)), true);
}
private static function GetUrl(_arg1:String):String{
var url:String;
var defaulturl = _arg1;
if (ExternalInterface.available){
try {
url = String(ExternalInterface.call("window.location.href.toString"));
} catch(s:Error) {
url = defaulturl;
};
} else {
if ((((defaulturl.indexOf("http://") == 0)) || ((defaulturl.indexOf("https://") == 0)))){
url = defaulturl;
};
};
if ((((((url == null)) || ((url == "")))) || ((url == "null")))){
if ((((Security.sandboxType == "localWithNetwork")) || ((Security.sandboxType == "localTrusted")))){
url = "http://local-testing/";
} else {
url = null;
};
};
return (escape(url));
}
public static function LevelRangedMetric(_arg1:String, _arg2, _arg3:int, _arg4:Boolean=false):void{
if (!Enabled){
return;
};
if (_arg4){
if (LevelRangeds.indexOf(_arg1) > -1){
return;
};
LevelRangeds.push(_arg1);
};
Send(((((("lr/" + Clean(_arg1)) + "/") + Clean(_arg2)) + "/") + _arg3));
}
private static function SaveCookie(_arg1:String, _arg2:int):void{
var _local3:SharedObject = SharedObject.getLocal("swfstats");
_local3.data[_arg1] = _arg2.toString();
_local3.flush();
}
public static function ForceSend():void{
if (!Enabled){
return;
};
Request.Send();
Request = LogRequest.Create();
if (FrozenQueue.length > 0){
Request.MassQueue(FrozenQueue);
};
}
private static function PingServer(... _args):void{
if (!Enabled){
return;
};
Pings++;
Send(((("t/" + (FirstPing) ? "y" : "n") + "/") + Pings), true);
if (FirstPing){
PingF.stop();
PingR.addEventListener(TimerEvent.TIMER, PingServer);
PingR.start();
FirstPing = false;
};
}
public static function IncreasePlays():void{
Plays++;
}
}
}//package Playtomic
Section 3
//LogRequest (Playtomic.LogRequest)
package Playtomic {
import flash.events.*;
import flash.net.*;
public final class LogRequest {
public var Ready:Boolean;// = false
private var Data:String;// = ""
private var Target:URLRequest;
private var Sender:URLLoader;
private var BaseUrl:String;
private static var Pool:Array = new Array();
private static var Failed:int = 0;
public function LogRequest(){
this.Sender = new URLLoader();
this.Sender.addEventListener(Event.COMPLETE, this.Complete, false, 1, false);
this.Sender.addEventListener(IOErrorEvent.IO_ERROR, this.IOErrorHandler, false, 0, true);
this.Sender.addEventListener(HTTPStatusEvent.HTTP_STATUS, this.StatusChange, false, 0, true);
this.Sender.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.SecurityErrorHandler, false, 0, true);
this.Target = new URLRequest();
this.BaseUrl = ((("http://g" + Log.GUID) + ".api.playtomic.com/tracker/q.aspx?swfid=") + Log.SWFID);
}
private function Complete(_arg1:Event=null):void{
if ((((this.Data.indexOf("v/") == 0)) || ((this.Data.indexOf("~v/") > -1)))){
Log.IncreaseViews();
};
if ((((this.Data.indexOf("p/") == 0)) || ((this.Data.indexOf("~p/") > -1)))){
Log.IncreasePlays();
};
Pool.push(this);
}
public function Send():void{
this.Target.url = (((((((this.BaseUrl + "&q=") + this.Data) + "&url=") + Log.SourceUrl) + "&") + Math.random()) + "z");
this.Sender.load(this.Target);
}
private function SecurityErrorHandler(_arg1:SecurityErrorEvent):void{
}
private function IOErrorHandler(_arg1:IOErrorEvent):void{
Failed++;
}
public function Queue(_arg1:String):void{
if (Failed > 3){
return;
};
this.Data = (this.Data + (((this.Data == "")) ? "" : "~" + _arg1));
if (this.Data.length > 300){
this.Ready = true;
};
}
private function StatusChange(_arg1:HTTPStatusEvent):void{
}
public function MassQueue(_arg1:Array):void{
var _local3:LogRequest;
if (Failed > 3){
return;
};
var _local2:int = (_arg1.length - 1);
while (_local2 > -1) {
this.Data = (this.Data + (((this.Data == "")) ? "" : "~" + _arg1[_local2]));
_arg1.splice(_local2, 1);
if (this.Data.length > 300){
_local3 = Create();
_local3.MassQueue(_arg1);
this.Ready = true;
this.Send();
return;
};
_local2--;
};
Log.Request = this;
}
public static function Create():LogRequest{
var _local1:LogRequest = ((Pool.length > 0)) ? (Pool.pop() as LogRequest) : new (LogRequest);
_local1.Data = "";
_local1.Ready = false;
return (_local1);
}
}
}//package Playtomic
Section 4
//BG_GAME_ada_binatang_50 (skeleton_fla.BG_GAME_ada_binatang_50)
package skeleton_fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class BG_GAME_ada_binatang_50 extends MovieClip {
public var b10:MovieClip;
public var b12:MovieClip;
public var b14:MovieClip;
public var b16:MovieClip;
public var b17:MovieClip;
public var b18:MovieClip;
public var b19:MovieClip;
public var b1:MovieClip;
public var b3:MovieClip;
public var b5:MovieClip;
public var b7:MovieClip;
public var b8:MovieClip;
public var b2:MovieClip;
public var b4:MovieClip;
public var b6:MovieClip;
public var b13:MovieClip;
public var b21:MovieClip;
public var b23:MovieClip;
public var b25:MovieClip;
public var b26:MovieClip;
public var b27:MovieClip;
public var b28:MovieClip;
public var b29:MovieClip;
public var b24:MovieClip;
public var b22:MovieClip;
public var b15:MovieClip;
public var b9:MovieClip;
public var b11:MovieClip;
public var b30:MovieClip;
public var b35:MovieClip;
public var b36:MovieClip;
public var b37:MovieClip;
public var b38:MovieClip;
public var b39:MovieClip;
public var b33:MovieClip;
public var b31:MovieClip;
public var b20:MovieClip;
public var b34:MovieClip;
public var b40:MovieClip;
public var b41:MovieClip;
public var b42:MovieClip;
public var b43:MovieClip;
public var b44:MovieClip;
public var b45:MovieClip;
public var b46:MovieClip;
public var b47:MovieClip;
public var b48:MovieClip;
public var b49:MovieClip;
public var i:int;
public var b32:MovieClip;
public var b50:MovieClip;
public var b52:MovieClip;
public var b53:MovieClip;
public var b54:MovieClip;
public var b55:MovieClip;
public var b56:MovieClip;
public var b57:MovieClip;
public var b51:MovieClip;
public var b59:MovieClip;
public var b58:MovieClip;
public var temp_bg:MovieClip;
public var b60:MovieClip;
public var b61:MovieClip;
public var b62:MovieClip;
public var b63:MovieClip;
public var b64:MovieClip;
public var b65:MovieClip;
public var b66:MovieClip;
public var b67:MovieClip;
public var b68:MovieClip;
public var b69:MovieClip;
public function BG_GAME_ada_binatang_50(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame1(){
i = Data.game[(Main.GetInstance().level - 1)].mulai;
while (i <= Data.game[(Main.GetInstance().level - 1)].akhir) {
this[("b" + i)].gotoAndStop(1);
this[("b" + i)].sinar.gotoAndStop(1);
this[("b" + i)].sinar.visible = false;
this[("b" + i)].sinar.mouseEnabled = false;
this[("b" + i)].sinar.mouseChildren = false;
i++;
};
}
function frame3(){
i = Data.game[(Main.GetInstance().level - 1)].mulai;
while (i <= Data.game[(Main.GetInstance().level - 1)].akhir) {
this[("b" + i)].gotoAndStop(1);
this[("b" + i)].sinar.gotoAndStop(1);
this[("b" + i)].sinar.visible = false;
this[("b" + i)].sinar.mouseEnabled = false;
this[("b" + i)].sinar.mouseChildren = false;
i++;
};
}
function frame6(){
i = Data.game[(Main.GetInstance().level - 1)].mulai;
while (i <= Data.game[(Main.GetInstance().level - 1)].akhir) {
this[("b" + i)].gotoAndStop(1);
this[("b" + i)].sinar.gotoAndStop(1);
this[("b" + i)].sinar.visible = false;
this[("b" + i)].sinar.mouseEnabled = false;
this[("b" + i)].sinar.mouseChildren = false;
i++;
};
}
function frame7(){
i = Data.game[(Main.GetInstance().level - 1)].mulai;
while (i <= Data.game[(Main.GetInstance().level - 1)].akhir) {
this[("b" + i)].gotoAndStop(1);
this[("b" + i)].sinar.gotoAndStop(1);
this[("b" + i)].sinar.visible = false;
this[("b" + i)].sinar.mouseEnabled = false;
this[("b" + i)].sinar.mouseChildren = false;
i++;
};
}
function frame8(){
i = Data.game[(Main.GetInstance().level - 1)].mulai;
while (i <= Data.game[(Main.GetInstance().level - 1)].akhir) {
this[("b" + i)].gotoAndStop(1);
this[("b" + i)].sinar.gotoAndStop(1);
this[("b" + i)].sinar.visible = false;
this[("b" + i)].sinar.mouseEnabled = false;
this[("b" + i)].sinar.mouseChildren = false;
i++;
};
}
function frame2(){
i = Data.game[(Main.GetInstance().level - 1)].mulai;
while (i <= Data.game[(Main.GetInstance().level - 1)].akhir) {
this[("b" + i)].gotoAndStop(1);
this[("b" + i)].sinar.gotoAndStop(1);
this[("b" + i)].sinar.visible = false;
this[("b" + i)].sinar.mouseEnabled = false;
this[("b" + i)].sinar.mouseChildren = false;
i++;
};
}
function frame4(){
i = Data.game[(Main.GetInstance().level - 1)].mulai;
while (i <= Data.game[(Main.GetInstance().level - 1)].akhir) {
this[("b" + i)].gotoAndStop(1);
this[("b" + i)].sinar.gotoAndStop(1);
this[("b" + i)].sinar.visible = false;
this[("b" + i)].sinar.mouseEnabled = false;
this[("b" + i)].sinar.mouseChildren = false;
i++;
};
}
function frame5(){
i = Data.game[(Main.GetInstance().level - 1)].mulai;
while (i <= Data.game[(Main.GetInstance().level - 1)].akhir) {
this[("b" + i)].gotoAndStop(1);
this[("b" + i)].sinar.gotoAndStop(1);
this[("b" + i)].sinar.visible = false;
this[("b" + i)].sinar.mouseEnabled = false;
this[("b" + i)].sinar.mouseChildren = false;
i++;
};
}
}
}//package skeleton_fla
Section 5
//flag_icon_173 (skeleton_fla.flag_icon_173)
package skeleton_fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class flag_icon_173 extends MovieClip {
public function flag_icon_173(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package skeleton_fla
Section 6
//logoclickable_144 (skeleton_fla.logoclickable_144)
package skeleton_fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import Playtomic.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class logoclickable_144 extends MovieClip {
public var gameName:String;
public function logoclickable_144(){
addFrameScript(0, frame1);
}
public function OnClick(_arg1:MouseEvent){
Log.CustomMetric("Logo", "Links", true);
Log.ForceSend();
Global.openWindow("http://www.gamesforgirlsclub.com?eprj=pet_detective");
}
function frame1(){
gameName = "game_name_here";
this.buttonMode = true;
this.useHandCursor = true;
this.addEventListener(MouseEvent.CLICK, OnClick);
}
}
}//package skeleton_fla
Section 7
//logopreloaderNONMOCHI_1 (skeleton_fla.logopreloaderNONMOCHI_1)
package skeleton_fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import Playtomic.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class logopreloaderNONMOCHI_1 extends MovieClip {
public var loadingTime:int;
public var ct:int;
public var gameName:String;
public function logopreloaderNONMOCHI_1(){
addFrameScript(0, frame1, 69, frame70);
}
function frame70(){
addEventListener(Event.ENTER_FRAME, loading);
ct = 0;
loadingTime = 90;
stop();
}
public function OnClick(_arg1:MouseEvent){
Log.CustomMetric("Logo", "Links", true);
Log.ForceSend();
Global.openWindow("http://www.gamesforgirlsclub.com?eprj=pet_detective");
}
function frame1(){
gameName = "game_name_here";
this.buttonMode = true;
this.useHandCursor = true;
this.addEventListener(MouseEvent.CLICK, OnClick);
}
public function loading(_arg1:Event){
loadingTime++;
var _local2:* = parent.stage.loaderInfo.bytesTotal;
var _local3:* = parent.stage.loaderInfo.bytesLoaded;
var _local4:* = Math.round(((_local3 * 100) / _local2));
var _local5:Number = (_local3 / _local2);
if (_local3 >= _local2){
ct = 1;
};
if (ct >= 1){
trace("100%");
this.parent.gotoAndStop(16);
removeEventListener(Event.ENTER_FRAME, loading);
};
}
}
}//package skeleton_fla
Section 8
//MusicBtn_139 (skeleton_fla.MusicBtn_139)
package skeleton_fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class MusicBtn_139 extends MovieClip {
public function MusicBtn_139(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package skeleton_fla
Section 9
//PAWPRINT_136 (skeleton_fla.PAWPRINT_136)
package skeleton_fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class PAWPRINT_136 extends MovieClip {
public function PAWPRINT_136(){
addFrameScript(55, frame56);
}
function frame56(){
gotoAndPlay("looping");
}
}
}//package skeleton_fla
Section 10
//PAWPRINT_168 (skeleton_fla.PAWPRINT_168)
package skeleton_fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class PAWPRINT_168 extends MovieClip {
public function PAWPRINT_168(){
addFrameScript(87, frame88);
}
function frame88(){
gotoAndPlay("looping");
}
}
}//package skeleton_fla
Section 11
//QualityBtn_140 (skeleton_fla.QualityBtn_140)
package skeleton_fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class QualityBtn_140 extends MovieClip {
public function QualityBtn_140(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package skeleton_fla
Section 12
//SFXBtn_141 (skeleton_fla.SFXBtn_141)
package skeleton_fla {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class SFXBtn_141 extends MovieClip {
public function SFXBtn_141(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package skeleton_fla
Section 13
//Brand (spill.localisation.Brand)
package spill.localisation {
import flash.xml.*;
public class Brand {
public var domain:String;
public var emailPage:String;
public var name:String;
public var site_id:uint;
public var isExternal:Boolean;// = false
public var id:Number;
public var hostingDomain:String;// = ""
public var preferedLanguage:String;// = ""
public var moreLink:String;// = ""
public var hasSendToFriendLink:Boolean;// = true
public var emailLink:String;// = "game"
public var portalGroup:uint;
public var useGoogleAnalitics:Boolean;// = true
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");
private function get utm_campaign():String{
if (isExternal){
return (("utm_campaign=" + hostingDomain));
};
return ("");
}
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 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);
}
private function get utm_source():String{
return (("utm_source=brandedgames_" + (isExternal) ? "external" : "internal"));
}
public function getMoreGamesLink(_arg1:String, _arg2:Boolean, _arg3:String="", _arg4:String=""):String{
var _local5:String = ("http://" + domain);
_local5 = (_local5 + ("/" + moreLink));
if (useGoogleAnalitics){
_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 get backgroundColor():uint{
return (PortalGroup.backgroundColors[portalGroup]);
}
private function get utm_term():String{
return ("utm_term=");
}
public function importXML(_arg1:XMLNode):void{
}
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 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 14
//BrandingLogo (spill.localisation.BrandingLogo)
package spill.localisation {
import flash.display.*;
import flash.events.*;
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 brandingChanged(_arg1:Event=null):void{
if (SpilGame.currentBranding){
gotoAndStop(SpilGame.currentBranding.domain);
};
}
function frame1(){
stop();
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("brandingChanged", brandingChanged);
}
}
}//package spill.localisation
Section 15
//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 getBrandByID(_arg1:Number):Brand{
return (brands_by_id[_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);
}
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 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 = 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 exportXML():XML{
var _local2:Brand;
var _local1:XML = <portals/>
;
for each (_local2 in brands_by_domain) {
_local1.appendChild(_local2.exportXML());
};
return (_local1);
}
public static function getBrandByDomain(_arg1:String):Brand{
return (brands_by_domain[_arg1]);
}
public static function hasDomain(_arg1:String):Boolean{
return (!((brands_by_domain[_arg1] == null)));
}
}
}//package spill.localisation
Section 16
//Language (spill.localisation.Language)
package spill.localisation {
import flash.xml.*;
public class Language {
public var portal_groups:Array;
public var references:Array;
public var name:String;
public var embedInputFonts:Boolean;// = true
public var id:uint;
public var forceFont:String;// = null
public var textLanguage:String;
public var bwcId:int;
public var embedFonts:Boolean;// = true
public var displayName:String;// = ""
public var dname:String;
public function Language(_arg1:String, _arg2:String=null){
references = [];
super();
name = _arg1;
dname = _arg2;
portal_groups = new Array();
}
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);
}
public function get p_teen():String{
return (portal_groups[PortalGroup.YOUNG_ADULTS]);
}
public function set p_hyves(_arg1:String):void{
portal_groups[PortalGroup.HYVES] = _arg1;
}
public function set p_teen(_arg1:String):void{
portal_groups[PortalGroup.YOUNG_ADULTS] = _arg1;
}
public function get p_tween():String{
return (portal_groups[PortalGroup.TEENS]);
}
public function get p_family():String{
return (portal_groups[PortalGroup.FAMILY]);
}
public function get p_girl():String{
trace("Language", portal_groups[PortalGroup.GIRL]);
return (portal_groups[PortalGroup.GIRL]);
}
public function get p_hyves():String{
return (portal_groups[PortalGroup.HYVES]);
}
public function set p_girl(_arg1:String):void{
portal_groups[PortalGroup.GIRL] = _arg1;
}
public function set p_zapapa(_arg1:String):void{
portal_groups[PortalGroup.ZAPAPA] = _arg1;
}
public function get displayAcronim():String{
return ((dname) ? dname : name);
}
public function set p_family(_arg1:String):void{
portal_groups[PortalGroup.FAMILY] = _arg1;
}
public function set p_tween(_arg1:String):void{
portal_groups[PortalGroup.TEENS] = _arg1;
}
public function get p_zapapa():String{
return (portal_groups[PortalGroup.ZAPAPA]);
}
}
}//package spill.localisation
Section 17
//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_tween = "www.gioco.it";
_local1.p_girl = "www.girlsgogames.it";
_local1.p_teen = "www.a10.com";
_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");
}
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);
}
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 getLanguage(_arg1:String):Language{
return (languages[_arg1]);
}
private static function addLanguage(_arg1:Language):void{
languages[_arg1.name] = _arg1;
}
private static function addReference(_arg1:Language, _arg2:String):void{
languages[_arg2] = _arg1;
_arg1.references.push(_arg2);
}
public static function getLanguageByOldID(_arg1:int):Language{
var _local2:Language;
for each (_local2 in languages) {
if (_local2.bwcId == _arg1){
return (_local2);
};
};
return (null);
}
}
}//package spill.localisation
Section 18
//LanguageSelectBox (spill.localisation.LanguageSelectBox)
package spill.localisation {
import flash.display.*;
import flash.text.*;
import flash.events.*;
public class LanguageSelectBox extends MovieClip {
private var flag:MovieClip;
private var languageName_text:TextField;
private var popup:MovieClip;
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();
}
private function added(_arg1:Event=null):void{
trace("addedselebnox");
SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true);
}
private function mouseOut(_arg1:MouseEvent):void{
popup.visible = false;
}
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);
};
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("languageChanged", 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 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;
};
}
}
}//package spill.localisation
Section 19
//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 20
//LanguageSelectPopup_mc (spill.localisation.LanguageSelectPopup_mc)
package spill.localisation {
import flash.display.*;
public dynamic class LanguageSelectPopup_mc extends MovieClip {
public var l_cn:MovieClip;
public var l_br:MovieClip;
public var l_se:MovieClip;
public var l_id:MovieClip;
public var l_es_ar:MovieClip;
public var l_es_mx:MovieClip;
public var l_in:MovieClip;
public var l_en_uk:MovieClip;
public var l_en_us:MovieClip;
public var l_es:MovieClip;
public var l_ar:MovieClip;
public var l_it:MovieClip;
public var l_pl:MovieClip;
public var l_nl:MovieClip;
public var l_de:MovieClip;
public var l_ru:MovieClip;
public var l_pt:MovieClip;
public var l_jp:MovieClip;
public var l_fr:MovieClip;
}
}//package spill.localisation
Section 21
//LocalizedTextField (spill.localisation.LocalizedTextField)
package spill.localisation {
import flash.events.*;
public class LocalizedTextField extends TextFieldFit {
private var regex:RegExp;
private var originalText:String;
public function LocalizedTextField(){
regex = /{([^{}]*)}/g;
super();
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
added();
}
private function added(_arg1:Event=null):void{
SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true);
text = originalText;
}
private function replaceFn():String{
var _local2:String = SpilGame.getString(arguments[1]);
if (((!(_local2)) || ((_local2 == "")))){
return ((("{" + arguments[1]) + "}"));
};
return (_local2);
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("languageChanged", languageChanged);
}
override public function set text(_arg1:String):void{
originalText = _arg1;
if ((_arg1 is String)){
super.text = _arg1.replace(regex, replaceFn);
} else {
super.text = "";
};
trace(super.text);
}
private function languageChanged(_arg1:Event):void{
text = originalText;
updateProperties();
}
}
}//package spill.localisation
Section 22
//PortalGroup (spill.localisation.PortalGroup)
package spill.localisation {
import flash.xml.*;
public class PortalGroup {
public static const YOUNG_ADULTS:uint = 3;
public static const FAMILY:uint = 0;
public static const channelNames:Array = ["family", "tween", "girl", "teen", "zapapa", "hyves"];
public static const ZAPAPA:uint = 4;
public static const HYVES:uint = 5;
public static const TEENS:uint = 1;
public static const GIRL:uint = 2;
public static const backgroundColors:Array = [0xFFFFFF, 0xFFFFFF, 16742331, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF];
public static const NONE:uint = 6;
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 23
//spil_internal (spill.localisation.spil_internal)
package spill.localisation {
public namespace spil_internal = "spill.localisation";
}//package spill.localisation
Section 24
//SpilGame (spill.localisation.SpilGame)
package spill.localisation {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import flash.external.*;
public class SpilGame {
private static const cookieName:String = "spilgames_language_v100";
private static const cookiePath:String = "/";
private static const cookieLanguageVar:String = "savedLang";
public static const LANGUAGE_CHANGED:String = "languageChanged";
public static const BRANDING_CHANGED:String = "brandingChanged";
private static var strings:Object = new Object();
public static var currentBranding:Brand;
private static var contexMenuItem:ContextMenuItem;
spil_internal static var gameName:String;
spil_internal static var debugHostDomain:String = "";
private static var localDomains:Object = new Object();
spil_internal static var emailPage:String;
private static var channelLock:Boolean = false;
spil_internal static var debugEmbedDomain:String = "";
private static var eventDispatcher:EventDispatcher;
private static var _init:Boolean = false;
public static var currentLanguage:Language;
spil_internal static var portalGroup:uint;
private static var stage:Sprite;
public static function getSpilCompanyLink():String{
var _local1 = "http://www.gameportal.net/";
_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 getPromotionLink(_arg1:String="feature_promotion"):String{
var _local2:String = (embedDomain) ? embedDomain : hostingDomain;
return (currentBranding.getPromotionLink(gameName, emailPage, isExternal, _local2, _arg1));
}
public static function traceAllBrands():void{
trace(outputAllBrands());
}
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 ("");
}
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 get isExternal():Boolean{
return (((((!(Brandings.hasDomain(embedDomain))) && (!(localDomains[embedDomain])))) && (!(isStagingDomain))));
}
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 replaceFn():String{
var _local2:String = SpilGame.getString(arguments[1]);
if (((!(_local2)) || ((_local2 == "")))){
return ((("{" + arguments[1]) + "}"));
};
return (_local2);
}
spil_internal static function get hostingDomain():String{
var _local1:LocalConnection;
if (debugHostDomain != ""){
return (debugHostDomain);
};
_local1 = new LocalConnection();
return (_local1.domain);
}
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));
}
private static function contexMenuClicked(_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest(getMoreGamesLink("Contex_Menu")));
}
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);
};
}
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()] = "";
};
};
};
}
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));
}
public static function getSendToFriendLink():String{
return (currentBranding.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain));
}
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 get systemLanguage():Language{
return (Languages.getLanguage(Capabilities.language));
}
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 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();
};
};
}
spil_internal static function dispatchEvent(_arg1:Event):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.dispatchEvent(_arg1);
}
public 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);
}
public static function exportXML():XML{
var _local1:XML = <spil_games/>
;
_local1.appendChild(Brandings.exportXML());
_local1.appendChild(Languages.exportXML());
_local1.appendChild(PortalGroup.exportXML());
return (_local1);
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
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 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 getMoreGamesLink(_arg1:String=""):String{
var _local2:String = (embedDomain) ? embedDomain : hostingDomain;
return (currentBranding.getMoreGamesLink(gameName, isExternal, _local2, _arg1));
}
public static function get isStagingDomain():Boolean{
var _local1:String = ("http://" + embedDomain);
return ((_local1.indexOf("http://stg.") >= 0));
}
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));
}
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 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);
}
}
}//package spill.localisation
Section 25
//SpilGamesLink (spill.localisation.SpilGamesLink)
package spill.localisation {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class SpilGamesLink extends SimpleButton {
public function SpilGamesLink(){
addEventListener(MouseEvent.CLICK, buttonClicked);
}
private function buttonClicked(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(SpilGame.getSpilCompanyLink()), "_blank");
}
}
}//package spill.localisation
Section 26
//TextFieldFit (spill.localisation.TextFieldFit)
package spill.localisation {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
public class TextFieldFit extends MovieClip {
protected var _glowQuality:Number;// = 1
protected var _gridFitType:String;// = "pixel"
protected var _text:String;// = "default"
private var debugBounding:Sprite;
protected var _disableWordwrap:Boolean;// = false
protected var _textSize:Number;// = 12
protected var _multiline:Boolean;// = false
protected var _font:String;// = ""
protected var _embedFonts:Boolean;// = true
protected var _underline:Boolean;// = false
protected var _vAlign:String;// = "top"
protected var _italic:Boolean;// = false
protected var _useGlowFilter:Boolean;// = false
protected var _glowColor:uint;// = 0
protected var _bold:Boolean;// = false
private var h:Number;
protected var _antiAliasType:String;// = "advanced"
private var sizeChanged:Boolean;// = true
private var w:Number;
private var embeddedFonts:Array;
protected var _hAlign:String;// = "left"
protected var _textColor:uint;// = 0
protected var _glowStrength:Number;// = 5
protected var _glowBlur:Number;// = 3
protected var _selectable:Boolean;// = false
private var format:TextFormat;
private var field:TextField;
private var valid:Boolean;// = true
private static const gutter:Number = 2;
spil_internal static var embedFonts:Boolean = true;
spil_internal static var forceAAType:String = null;
spil_internal static var forceFont: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();
}
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;
};
};
};
};
}
public function set hAlign(_arg1:String):void{
_hAlign = _arg1;
invalidate();
}
public function set bold(_arg1:Boolean):void{
_bold = _arg1;
invalidate();
}
private function init(_arg1:Event=null):void{
removeEventListener(Event.RENDER, init);
updateProperties();
layoutText();
}
private function validate(_arg1:Event=null):void{
updateProperties();
layoutText();
removeEventListener(Event.ENTER_FRAME, validate);
valid = true;
}
public function set glowBlur(_arg1:Number):void{
_glowBlur = _arg1;
invalidate();
}
public function get vAlign():String{
return (_vAlign);
}
public function get italic():Boolean{
return (_italic);
}
public function get textColor():uint{
return (_textColor);
}
private function invalidate():void{
if (valid){
addEventListener(Event.ENTER_FRAME, validate);
if (stage){
stage.invalidate();
};
valid = false;
};
}
public function get text():String{
return (_text);
}
public function get useGlowFilter():Boolean{
return (_useGlowFilter);
}
public function get selectable():Boolean{
return (_selectable);
}
public function set text(_arg1:String):void{
_text = _arg1;
invalidate();
}
public function set embedFonts(_arg1:Boolean):void{
_embedFonts = _arg1;
invalidate();
}
public function set vAlign(_arg1:String):void{
_vAlign = _arg1;
invalidate();
}
public function set italic(_arg1:Boolean):void{
_italic = _arg1;
invalidate();
}
public function get font():String{
return (_font);
}
public function set multiline(_arg1:Boolean):void{
_multiline = _arg1;
invalidate();
}
public function get disableWordwrap():Boolean{
return (_disableWordwrap);
}
public function set textColor(_arg1:uint):void{
_textColor = _arg1;
invalidate();
}
public function get antiAliasType():String{
return (_antiAliasType);
}
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);
};
};
};
}
public function set glowQuality(_arg1:Number):void{
_glowQuality = _arg1;
invalidate();
}
public function get hAlign():String{
return (_hAlign);
}
public function setSize(_arg1:Number, _arg2:Number):void{
w = _arg1;
h = _arg2;
scaleX = (scaleY = 1);
field.width = w;
field.height = h;
invalidate();
}
public function get bold():Boolean{
return (_bold);
}
public function set gridFitType(_arg1:String):void{
_gridFitType = _arg1;
invalidate();
}
public function set underline(_arg1:Boolean):void{
_underline = _arg1;
invalidate();
}
public function get glowBlur():Number{
return (_glowBlur);
}
public function set useGlowFilter(_arg1:Boolean):void{
_useGlowFilter = _arg1;
invalidate();
}
public function set textSize(_arg1:Number):void{
_textSize = _arg1;
sizeChanged = true;
invalidate();
}
public function set font(_arg1:String):void{
_font = _arg1;
invalidate();
}
public function set selectable(_arg1:Boolean):void{
_selectable = _arg1;
invalidate();
}
public function get multiline():Boolean{
return (_multiline);
}
public function get embedFonts():Boolean{
return (_embedFonts);
}
public function set glowColor(_arg1:uint):void{
_glowColor = _arg1;
invalidate();
}
public function set disableWordwrap(_arg1:Boolean):void{
_disableWordwrap = _arg1;
invalidate();
}
public function get glowQuality():Number{
return (_glowQuality);
}
public function get gridFitType():String{
return (_gridFitType);
}
public function get underline():Boolean{
return (_underline);
}
public function get textSize():Number{
return (_textSize);
}
public function get textField():TextField{
return (field);
}
public function get glowColor():uint{
return (_glowColor);
}
public function set antiAliasType(_arg1:String):void{
_antiAliasType = _arg1;
invalidate();
}
public function set glowStrength(_arg1:Number):void{
_glowStrength = _arg1;
invalidate();
}
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 = [];
};
}
private function doesTextFit():Boolean{
if (((((field.textHeight + (gutter * 2)) > h)) || (((((field.textWidth + (gutter * 2)) > w)) && (((!(field.multiline)) || (alwaysCheckWidth))))))){
return (false);
};
return (true);
}
public function get glowStrength():Number{
return (_glowStrength);
}
}
}//package spill.localisation
Section 27
//CBannedWin (CBannedWin)
package {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class CBannedWin extends MovieClip {
public var mBtn:SimpleButton;
public function CBannedWin(){
addFrameScript(0, frame1);
}
public function GotoSapi(_arg1:MouseEvent){
var _local2:URLRequest = new URLRequest("http://www.lazybanana.com");
navigateToURL(_local2);
}
function frame1(){
mBtn.addEventListener(MouseEvent.MOUSE_DOWN, GotoSapi);
}
}
}//package
Section 28
//CBaseMovieClip (CBaseMovieClip)
package {
import flash.display.*;
import flash.events.*;
public class CBaseMovieClip extends MovieClip {
public var mEventType:String;
public function CBaseMovieClip(_arg1:String){
mEventType = _arg1;
}
public function AddDispatcher():void{
Main.GetInstance().addEventListener(mEventType, Update, false, 0, true);
}
public function Update(_arg1:Event){
}
public function RemoveDispatcher(){
Main.GetInstance().removeEventListener(mEventType, Update);
}
}
}//package
Section 29
//CBenar (CBenar)
package {
import flash.media.*;
public dynamic class CBenar extends Sound {
}
}//package
Section 30
//CComic (CComic)
package {
import flash.display.*;
import flash.events.*;
import Playtomic.*;
public class CComic extends CBaseMovieClip {
public var timer:int;
public var start_b:MovieClip;
public var bg_mc:MovieClip;
public var story:MovieClip;
public var more_b:MovieClip;
public var nomer:MovieClip;
public function CComic(){
super("update");
bg_mc.mouseEnabled = true;
bg_mc.alpha = 1;
start_b.gotoAndStop(1);
start_b.mouseChildren = false;
start_b.mouseEnabled = true;
start_b.useHandCursor = true;
start_b.buttonMode = true;
start_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
start_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
start_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
start_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
more_b.gotoAndStop(1);
more_b.mouseChildren = false;
more_b.mouseEnabled = true;
more_b.useHandCursor = true;
more_b.buttonMode = true;
more_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
timer = 20;
story.gotoAndStop(Main.GetInstance().level);
nomer.gotoAndStop(Main.GetInstance().level);
}
private function onMouseTekan(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(3);
}
private function onMouseOut(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(1);
}
override public function Update(_arg1:Event){
if (timer > 0){
timer--;
bg_mc.alpha = (bg_mc.alpha - (1 / 20));
if (timer == 0){
bg_mc.alpha = 0;
bg_mc.mouseEnabled = false;
};
} else {
if (timer < 0){
timer++;
bg_mc.alpha = (bg_mc.alpha + (1 / 20));
if (timer == 0){
bg_mc.alpha = 1;
Main.GetInstance().KillWindow("Comic");
Main.GetInstance().InitGame();
};
};
};
}
private function onMouseDown(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(2);
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
if (_arg1.currentTarget.name == "start_b"){
timer = -20;
bg_mc.mouseEnabled = true;
} else {
if (_arg1.currentTarget.name == "more_b"){
Log.CustomMetric("More Games", "Links", true);
Log.ForceSend();
Global.openWindow("http://www.gamesforgirlsclub.com/flash-online-games/hidden-object?eprj=pet_detective");
};
};
}
private function onMouseOver(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(2);
}
}
}//package
Section 31
//CCredit (CCredit)
package {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class CCredit extends MovieClip {
public var mFilter:Array;
public var mClose:MovieClip;
public var mTitle:MovieClip;
public var mLogo:MovieClip;
public function CCredit(){
addFrameScript(0, frame1);
}
public function onMouseUp(_arg1:MouseEvent){
if ((((_arg1.currentTarget.name == "mTitle")) || ((_arg1.currentTarget.name == "mLogo")))){
Global.openWindow();
};
if (_arg1.currentTarget.name == "mClose"){
parent.removeChild(this);
};
}
function frame1(){
if (!mTitle.hasEventListener(MouseEvent.MOUSE_UP)){
mTitle.addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true);
mTitle.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
mTitle.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
mTitle.mouseChildren = false;
mTitle.buttonMode = true;
mTitle.useHandCursor = true;
mLogo.addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true);
mLogo.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
mLogo.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
mLogo.mouseChildren = false;
mLogo.buttonMode = true;
mLogo.useHandCursor = true;
mClose.addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true);
mClose.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
mClose.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
mClose.mouseChildren = false;
mClose.buttonMode = true;
mClose.useHandCursor = true;
};
}
public function onMouseOut(_arg1:MouseEvent){
if (_arg1.currentTarget.name == "mClose"){
_arg1.currentTarget.filters = mFilter;
return;
};
_arg1.currentTarget.filters = [];
}
public function onMouseOver(_arg1:MouseEvent){
var _local2:GlowFilter = new GlowFilter(0x9900, 1, 5, 5, 3);
if (_arg1.currentTarget.name == "mClose"){
mFilter = _arg1.currentTarget.filters.slice(0, 1);
_arg1.currentTarget.filters = mFilter.concat([_local2]);
return;
};
_arg1.currentTarget.filters = [_local2];
}
}
}//package
Section 32
//CGame (CGame)
package {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import Playtomic.*;
import flash.filters.*;
public class CGame extends CBaseMovieClip {
public var menit:int;
public var idx_puz:int;
public var next_b:MovieClip;
public var footer:MovieClip;
public var temp_name:String;
public var iframe:int;
public var akhir:int;
public var hint_b:MovieClip;
public var level_txt:TextField;
public var next_level:MovieClip;
public var sound_b:MovieClip;
public var timer_game:int;
public var hint_txt:TextField;
public var p1:MovieClip;
public var p3:MovieClip;
public var p4:MovieClip;
public var p5:MovieClip;
public var gameover:int;
public var p2:MovieClip;
public var timer:int;
public var bg_mc:MovieClip;
public var prev_b:MovieClip;
public var pause_b:MovieClip;
public var awal:int;
public var i:int;
public var CG:CGame1;
public var banyak:int;
public var detik:int;
public var pause:Boolean;
public var timer_txt:TextField;
private static var CGameGlobal:CGame;
public function CGame(){
addFrameScript(0, frame1);
super("update");
CGameGlobal = this;
Log.LevelCounterMetric("Start", Main.GetInstance().level);
Log.ForceSend();
gotoAndStop(Main.GetInstance().level);
init_button();
init_game();
}
public function cetak_level():void{
level_txt.text = ("0" + Main.GetInstance().level);
}
private function SPMouseDown(_arg1:Event):void{
if (_arg1.currentTarget.name == "sound_b"){
if (Main.GetInstance().sound_hanny == 0){
Main.GetInstance().sound_hanny = 1;
} else {
Main.GetInstance().sound_hanny = 0;
};
sound_b.gotoAndStop((Main.GetInstance().sound_hanny + 1));
Main.GetInstance().mOptionBar.ToggleMusic();
Main.GetInstance().mOptionBar.ToggleSFX();
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
};
if ((((pause == false)) && ((gameover == 0)))){
if (_arg1.currentTarget.name == "pause_b"){
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
_arg1.currentTarget.gotoAndStop(2);
pause = true;
Main.GetInstance().InitPause();
} else {
if (_arg1.currentTarget.name == "more_b"){
};
};
};
}
private function set_timer_game():void{
timer_game++;
if (timer_game == 40){
timer_game = 0;
detik--;
cetak_timer();
};
}
private function GameMouseUp(_arg1:MouseEvent):void{
if ((((pause == false)) && ((gameover == 0)))){
};
}
public function remove_children_game():void{
CG.remove_this();
}
function frame1(){
hint_txt.text = Data.game[(Main.GetInstance().level - 1)].jum_hint;
i = 1;
while (i <= 5) {
awal = Data.game[(Main.GetInstance().level - 1)].mulai;
akhir = Data.game[(Main.GetInstance().level - 1)].akhir;
banyak = ((akhir - awal) + 1);
iframe = ((i + awal) - 1);
if (i <= banyak){
this[("p" + i)].visible = true;
} else {
this[("p" + i)].visible = false;
};
this[("p" + i)].found.visible = false;
this[("p" + i)].found.gotoAndStop(iframe);
this[("p" + i)].missing.visible = true;
this[("p" + i)].missing.gotoAndStop(iframe);
i++;
};
}
public function cetak_timer():void{
if (detik < 0){
if (menit > 0){
detik = 59;
menit--;
} else {
detik = 0;
};
};
var _local1 = "";
if (menit > 9){
_local1 = (_local1 + menit);
} else {
if (menit > 0){
_local1 = (_local1 + ("0" + menit));
} else {
_local1 = (_local1 + "00");
};
};
_local1 = (_local1 + ":");
if (detik > 9){
_local1 = (_local1 + detik);
} else {
if (detik > 0){
_local1 = (_local1 + ("0" + detik));
} else {
_local1 = (_local1 + "00");
};
};
timer_txt.text = _local1;
if ((((menit <= 0)) && ((detik <= 0)))){
detik = 0;
menit = 0;
set_game_over(-1);
};
}
private function onMouseDown(_arg1:MouseEvent):void{
var _local3:int;
var _local4:int;
_arg1.currentTarget.gotoAndStop(2);
var _local2:String = _arg1.currentTarget.name;
if ((((pause == false)) && ((gameover == 0)))){
if (_local2 == "hint_b"){
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
CG.show_hint();
} else {
if (_local2 == "prev_b"){
if (idx_puz > Data.game[(Main.GetInstance().level - 1)].mulai){
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
idx_puz--;
_local3 = 1;
while (_local3 <= 5) {
_local4 = ((idx_puz + _local3) - 1);
if (CG.Af[CG.get_pos_idx_Af(_local4)] == null){
this[("p" + _local3)].found.visible = false;
this[("p" + _local3)].missing.visible = true;
} else {
this[("p" + _local3)].found.visible = true;
this[("p" + _local3)].missing.visible = false;
};
this[("p" + _local3)].found.gotoAndStop(_local4);
this[("p" + _local3)].missing.gotoAndStop(_local4);
_local3++;
};
};
} else {
if (_local2 == "next_b"){
if (idx_puz < (Data.game[(Main.GetInstance().level - 1)].akhir - 4)){
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
idx_puz++;
_local3 = 1;
while (_local3 <= 5) {
_local4 = ((idx_puz + _local3) - 1);
if (CG.Af[CG.get_pos_idx_Af(_local4)] == null){
this[("p" + _local3)].found.visible = false;
this[("p" + _local3)].missing.visible = true;
} else {
this[("p" + _local3)].found.visible = true;
this[("p" + _local3)].missing.visible = false;
};
this[("p" + _local3)].found.gotoAndStop(_local4);
this[("p" + _local3)].missing.gotoAndStop(_local4);
_local3++;
};
};
};
};
};
} else {
if (gameover != 0){
if (_local2 == "next_level_b"){
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
timer = 20;
};
};
};
}
public function kurang_timer(_arg1:int):void{
var _local2 = 1;
while (_local2 <= _arg1) {
detik--;
cetak_timer();
_local2++;
};
}
public function init_game():void{
temp_name = "";
timer = 20;
gameover = 0;
pause = true;
timer_game = 0;
menit = (Data.game[(Main.GetInstance().level - 1)].timer / 60);
detik = (Data.game[(Main.GetInstance().level - 1)].timer - (60 * menit));
cetak_timer();
cetak_level();
idx_puz = Data.game[(Main.GetInstance().level - 1)].mulai;
}
public function init_button():void{
bg_mc.mouseEnabled = true;
bg_mc.alpha = 1;
footer.mouseEnabled = false;
footer.mouseChildren = false;
next_level.mouseEnabled = false;
next_level.visible = false;
next_level.next_level_b.gotoAndStop(1);
next_level.next_level_b.mouseEnabled = false;
next_level.next_level_b.mouseChildren = false;
next_level.next_level_b.useHandCursor = true;
next_level.next_level_b.buttonMode = true;
next_level.next_level_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
next_level.next_level_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
next_level.next_level_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
next_level.next_level_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
next_b.gotoAndStop(1);
next_b.mouseChildren = false;
next_b.useHandCursor = true;
next_b.buttonMode = true;
next_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
next_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
next_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
next_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
prev_b.gotoAndStop(1);
prev_b.mouseChildren = false;
prev_b.useHandCursor = true;
prev_b.buttonMode = true;
prev_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
prev_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
prev_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
prev_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
hint_txt.mouseEnabled = false;
hint_b.gotoAndStop(1);
hint_b.mouseEnabled = true;
hint_b.mouseChildren = false;
hint_b.useHandCursor = true;
hint_b.buttonMode = true;
hint_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
hint_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
hint_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
hint_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
pause_b.gotoAndStop(1);
pause_b.mouseEnabled = true;
pause_b.mouseChildren = false;
pause_b.useHandCursor = true;
pause_b.buttonMode = true;
pause_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
pause_b.addEventListener(MouseEvent.MOUSE_UP, SPMouseDown, false, 0, true);
pause_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
pause_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
sound_b.gotoAndStop((Main.GetInstance().sound_hanny + 1));
sound_b.mouseEnabled = true;
sound_b.mouseChildren = false;
sound_b.useHandCursor = true;
sound_b.buttonMode = true;
sound_b.addEventListener(MouseEvent.MOUSE_UP, SPMouseDown, false, 0, true);
sound_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
sound_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
}
private function onMouseOut(_arg1:Event):void{
if (_arg1.currentTarget.name == "sound_b"){
_arg1.currentTarget.filters = [];
} else {
_arg1.currentTarget.gotoAndStop(1);
};
}
override public function Update(_arg1:Event){
if ((((gameover == 0)) && ((pause == false)))){
set_timer_game();
} else {
if (pause == true){
if (timer > 0){
timer--;
bg_mc.alpha = (bg_mc.alpha - (1 / 20));
if (timer == 0){
bg_mc.alpha = 0;
bg_mc.mouseEnabled = false;
pause = false;
CG.init();
CG.cetak_jum_hint();
CG.cetak_jum_foot();
};
};
} else {
if (gameover != 0){
if (timer > 0){
timer--;
if (gameover == 1){
if (timer <= 20){
bg_mc.alpha = (bg_mc.alpha + (1 / 20));
if (timer == 0){
bg_mc.alpha = 1;
remove_children_game();
Main.GetInstance().KillWindow("Game");
Log.LevelCounterMetric("Finish", Main.GetInstance().level);
Log.ForceSend();
if (Main.GetInstance().level < Data.game.length){
Main.GetInstance().level++;
Main.GetInstance().InitComic();
} else {
Main.GetInstance().InitTamat();
};
};
};
} else {
if (gameover == -1){
bg_mc.alpha = (bg_mc.alpha + (1 / 20));
if (timer == 0){
bg_mc.alpha = 1;
Main.GetInstance().InitGame_Over();
};
};
};
} else {
if (timer < 0){
timer++;
if (timer == 0){
if (gameover == 1){
next_level.mouseEnabled = true;
next_level.visible = true;
next_level.next_level_b.mouseEnabled = true;
} else {
if (gameover == -1){
timer = 20;
};
};
};
};
};
};
};
};
}
private function onMouseTekan(_arg1:Event):void{
_arg1.currentTarget.gotoAndStop(3);
}
private function onMouseOver(_arg1:Event):void{
if (_arg1.currentTarget.name == "sound_b"){
_arg1.currentTarget.filters = [new GlowFilter(0xFFFF00, (blurX = 10), (blurY = 10))];
} else {
_arg1.currentTarget.gotoAndStop(2);
};
}
public function set_game_over(_arg1:int){
gameover = _arg1;
if (_arg1 == -1){
timer = 40;
} else {
timer = -40;
};
}
public static function GetInstance():CGame{
return (CGameGlobal);
}
}
}//package
Section 33
//CGame_Over (CGame_Over)
package {
import flash.display.*;
import flash.events.*;
public class CGame_Over extends CBaseMovieClip {
public var menu_b:MovieClip;
public var play_again_b:MovieClip;
public var bg_mc:MovieClip;
public var more_b:MovieClip;
public function CGame_Over(){
super("update");
play_again_b.gotoAndStop(1);
play_again_b.mouseEnabled = true;
play_again_b.mouseChildren = false;
play_again_b.useHandCursor = true;
play_again_b.buttonMode = true;
play_again_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
play_again_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
play_again_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
play_again_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
menu_b.gotoAndStop(1);
menu_b.mouseEnabled = true;
menu_b.mouseChildren = false;
menu_b.useHandCursor = true;
menu_b.buttonMode = true;
menu_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
menu_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
menu_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
menu_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
more_b.gotoAndStop(1);
more_b.mouseEnabled = true;
more_b.mouseChildren = false;
more_b.useHandCursor = true;
more_b.buttonMode = true;
more_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
}
private function onMouseTekan(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(3);
}
private function onMouseOut(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(1);
}
private function onMouseDown(_arg1:Event):void{
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
_arg1.currentTarget.gotoAndStop(2);
if (_arg1.currentTarget.name == "play_again_b"){
CGame.GetInstance().remove_children_game();
Main.GetInstance().KillWindow("Game");
Main.GetInstance().KillWindow("Game_Over");
Main.GetInstance().InitGame();
} else {
if (_arg1.currentTarget.name == "menu_b"){
CGame.GetInstance().remove_children_game();
Main.GetInstance().KillWindow("Game");
Main.GetInstance().KillWindow("Game_Over");
Main.GetInstance().InitMainMenu();
} else {
if (_arg1.currentTarget.name == "more_b"){
};
};
};
}
private function onMouseOver(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(2);
}
}
}//package
Section 34
//CGame1 (CGame1)
package {
import flash.display.*;
import flash.events.*;
import de.polygonal.math.*;
public class CGame1 extends CBaseMovieClip {
public var jum_get_f:int;
public var senter:MovieClip;
public var bg1:MovieClip;
public var glow:MovieClip;
public var Af1:Array;
public var bg2:MovieClip;
public var Af:Array;
public var jum_hint:int;
public var timer:int;
public var jum_f:int;
public var i:int;
public var randoman:int;
public function CGame1(){
Af = new Array();
Af1 = new Array();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
super("update");
gotoAndStop(Main.GetInstance().level);
}
public function init_game():void{
AddDispatcher();
while (Af.length > 0) {
Af.splice(0, 1);
};
while (Af1.length > 0) {
Af1.splice(0, 1);
};
var _local1:int;
while (_local1 <= jum_f) {
Af.push(null);
Af1.push(((Data.game[(Main.GetInstance().level - 1)].mulai + _local1) - 1));
_local1++;
};
jum_get_f = 0;
randoman = 0;
jum_hint = Data.game[(Main.GetInstance().level - 1)].jum_hint;
}
private function splice_Af1(_arg1:int):void{
var _local2:int;
var _local3 = 1;
while ((((_local3 <= (Af1.length - 1))) && ((_local2 == 0)))) {
if (Af1[_local3] == _arg1){
_local2 = _local3;
};
_local3++;
};
Af1.splice(_local2, 1);
}
function frame6(){
i = 1;
while (i <= 2) {
this[("bg" + i)].gotoAndStop(Main.GetInstance().level);
i++;
};
glow.mouseEnabled = false;
glow.mouseChildren = false;
senter.mouseEnabled = false;
senter.mouseChildren = false;
if (Data.game[(Main.GetInstance().level - 1)].senter == 1){
senter.visible = true;
glow.visible = true;
} else {
senter.visible = false;
glow.visible = false;
};
}
public function cetak_jum_hint():void{
CGame.GetInstance().hint_txt.text = jum_hint;
}
private function onMouseDown(_arg1:MouseEvent):void{
var _local2:String;
var _local3:int;
var _local4:int;
var _local5:int;
if ((((CGame.GetInstance().pause == false)) && ((CGame.GetInstance().gameover == 0)))){
_local2 = _arg1.currentTarget.name;
if (_local2.substr(0, 1) == "b"){
_local3 = _local2.substr(1, (_local2.length - 1));
_local4 = get_pos_idx_Af(_local3);
if (Af[_local4] == null){
Main.GetInstance().mOptionBar.PlaySFX("CPop");
Af[_local4] = 1;
splice_Af1(_local3);
_local5 = 1;
while (_local5 <= 2) {
if (this[("bg" + _local5)][("b" + _local3)] != null){
this[("bg" + _local5)][("b" + _local3)].mouseEnabled = false;
this[("bg" + _local5)][("b" + _local3)].gotoAndStop(2);
};
_local5++;
};
_local5 = 1;
while (_local5 <= 5) {
if (_local3 == ((CGame.GetInstance().idx_puz + _local5) - 1)){
CGame.GetInstance()[("p" + _local5)].found.visible = true;
CGame.GetInstance()[("p" + _local5)].missing.visible = false;
};
_local5++;
};
jum_get_f++;
if (jum_get_f >= jum_f){
CGame.GetInstance().set_game_over(1);
};
};
} else {
CGame.GetInstance().kurang_timer(10);
};
};
}
public function init(){
init_button();
init_game();
}
public function get_pos_idx_Af(_arg1:int):int{
var _local2:int;
_local2 = ((_arg1 - Data.game[(Main.GetInstance().level - 1)].mulai) + 1);
return (_local2);
}
private function init_button():void{
var _local1:int = Data.game[(Main.GetInstance().level - 1)].mulai;
var _local2:int = Data.game[(Main.GetInstance().level - 1)].akhir;
jum_f = ((_local2 - _local1) + 1);
var _local3:int = _local1;
while (_local3 <= _local2) {
if (bg2[("b" + _local3)] != null){
bg2[("b" + _local3)].gotoAndStop(1);
bg2[("b" + _local3)].mouseEnabled = true;
bg2[("b" + _local3)].mouseChildren = false;
bg2[("b" + _local3)].addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
};
_local3++;
};
bg2.temp_bg.mouseEnabled = true;
bg2.temp_bg.mouseChildren = false;
bg2.temp_bg.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
_local3 = _local1;
while (_local3 <= _local2) {
if (bg1[("b" + _local3)] != null){
bg1[("b" + _local3)].gotoAndStop(1);
};
_local3++;
};
bg1.mouseChildren = false;
bg1.mouseEnabled = false;
glow.mouseEnabled = false;
glow.mouseChildren = false;
senter.mouseEnabled = false;
senter.mouseChildren = false;
if (Data.game[(Main.GetInstance().level - 1)].senter == 1){
senter.visible = true;
glow.visible = true;
} else {
senter.visible = false;
glow.visible = false;
};
addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true);
}
function frame2(){
i = 1;
while (i <= 2) {
this[("bg" + i)].gotoAndStop(Main.GetInstance().level);
i++;
};
glow.mouseEnabled = false;
glow.mouseChildren = false;
senter.mouseEnabled = false;
senter.mouseChildren = false;
if (Data.game[(Main.GetInstance().level - 1)].senter == 1){
senter.visible = true;
glow.visible = true;
} else {
senter.visible = false;
glow.visible = false;
};
}
function frame3(){
i = 1;
while (i <= 2) {
this[("bg" + i)].gotoAndStop(Main.GetInstance().level);
i++;
};
glow.mouseEnabled = false;
glow.mouseChildren = false;
senter.mouseEnabled = false;
senter.mouseChildren = false;
if (Data.game[(Main.GetInstance().level - 1)].senter == 1){
senter.visible = true;
glow.visible = true;
} else {
senter.visible = false;
glow.visible = false;
};
}
function frame5(){
i = 1;
while (i <= 2) {
this[("bg" + i)].gotoAndStop(Main.GetInstance().level);
i++;
};
glow.mouseEnabled = false;
glow.mouseChildren = false;
senter.mouseEnabled = false;
senter.mouseChildren = false;
if (Data.game[(Main.GetInstance().level - 1)].senter == 1){
senter.visible = true;
glow.visible = true;
} else {
senter.visible = false;
glow.visible = false;
};
}
function frame7(){
i = 1;
while (i <= 2) {
this[("bg" + i)].gotoAndStop(Main.GetInstance().level);
i++;
};
glow.mouseEnabled = false;
glow.mouseChildren = false;
senter.mouseEnabled = false;
senter.mouseChildren = false;
if (Data.game[(Main.GetInstance().level - 1)].senter == 1){
senter.visible = true;
glow.visible = true;
} else {
senter.visible = false;
glow.visible = false;
};
}
public function show_hint(){
var _local1:int;
if (randoman == 0){
if (jum_hint > 0){
randoman = PM_PRNG.nextIntRange(1, (Af1.length - 1));
if (((!((this["bg1"][("b" + Af1[randoman])] == null))) && (!((this["bg2"][("b" + Af1[randoman])] == null))))){
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
jum_hint--;
cetak_jum_hint();
_local1 = 1;
while (_local1 <= 2) {
this[("bg" + _local1)][("b" + Af1[randoman])].sinar.gotoAndPlay(1);
this[("bg" + _local1)][("b" + Af1[randoman])].sinar.visible = true;
_local1++;
};
timer = 0;
CGame.GetInstance().pause = true;
};
};
};
}
public function cetak_jum_foot():void{
}
function frame4(){
i = 1;
while (i <= 2) {
this[("bg" + i)].gotoAndStop(Main.GetInstance().level);
i++;
};
glow.mouseEnabled = false;
glow.mouseChildren = false;
senter.mouseEnabled = false;
senter.mouseChildren = false;
if (Data.game[(Main.GetInstance().level - 1)].senter == 1){
senter.visible = true;
glow.visible = true;
} else {
senter.visible = false;
glow.visible = false;
};
}
override public function Update(_arg1:Event){
var _local2:int;
if (randoman > 0){
timer++;
if (timer == 20){
_local2 = 1;
while (_local2 <= 2) {
this[("bg" + _local2)][("b" + Af1[randoman])].sinar.gotoAndStop(1);
this[("bg" + _local2)][("b" + Af1[randoman])].sinar.visible = false;
_local2++;
};
randoman = 0;
CGame.GetInstance().pause = false;
};
};
}
public function remove_this(){
RemoveDispatcher();
}
function frame8(){
i = 1;
while (i <= 2) {
this[("bg" + i)].gotoAndStop(Main.GetInstance().level);
i++;
};
glow.mouseEnabled = false;
glow.mouseChildren = false;
senter.mouseEnabled = false;
senter.mouseChildren = false;
if (Data.game[(Main.GetInstance().level - 1)].senter == 1){
senter.visible = true;
glow.visible = true;
} else {
senter.visible = false;
glow.visible = false;
};
}
function frame1(){
i = 1;
while (i <= 2) {
this[("bg" + i)].gotoAndStop(Main.GetInstance().level);
i++;
};
glow.mouseEnabled = false;
glow.mouseChildren = false;
senter.mouseEnabled = false;
senter.mouseChildren = false;
if (Data.game[(Main.GetInstance().level - 1)].senter == 1){
senter.visible = true;
glow.visible = true;
} else {
senter.visible = false;
glow.visible = false;
};
}
private function onMouseMove(_arg1:MouseEvent):void{
if ((((CGame.GetInstance().pause == false)) && ((CGame.GetInstance().gameover == 0)))){
if (Data.game[(Main.GetInstance().level - 1)].senter == 1){
glow.x = mouseX;
glow.y = mouseY;
senter.x = mouseX;
senter.y = mouseY;
};
};
}
}
}//package
Section 35
//CMain_Sound (CMain_Sound)
package {
import flash.media.*;
public dynamic class CMain_Sound extends Sound {
}
}//package
Section 36
//CMainMenu (CMainMenu)
package {
import flash.display.*;
import flash.events.*;
import Playtomic.*;
public class CMainMenu extends CBaseMovieClip {
public var bg_mc:MovieClip;
public var start_b:MovieClip;
public var more_b:MovieClip;
public function CMainMenu(){
super("update");
bg_mc.alpha = 0;
bg_mc.mouseEnabled = false;
bg_mc.mouseChildren = false;
start_b.gotoAndStop(1);
start_b.mouseChildren = false;
start_b.mouseEnabled = true;
start_b.useHandCursor = true;
start_b.buttonMode = true;
start_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
start_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
start_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
start_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
more_b.gotoAndStop(1);
more_b.mouseChildren = false;
more_b.mouseEnabled = true;
more_b.useHandCursor = true;
more_b.buttonMode = true;
more_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
timer = 0;
Main.GetInstance().set_default_awal_game();
}
private function onMouseTekan(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(3);
}
private function onMouseOver(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(2);
}
override public function Update(_arg1:Event){
if (timer > 0){
timer--;
bg_mc.alpha = (bg_mc.alpha + (1 / 20));
if (timer == 0){
bg_mc.alpha = 1;
Main.GetInstance().KillWindow("MainMenu");
Main.GetInstance().InitComic();
Log.Play();
Log.CustomMetric("Start", "Game");
Log.ForceSend();
};
};
}
private function onMouseDown(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(2);
if (_arg1.currentTarget.name == "start_b"){
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
bg_mc.mouseEnabled = true;
timer = 20;
} else {
if (_arg1.currentTarget.name == "more_b"){
Log.CustomMetric("More Games", "Links", true);
Log.ForceSend();
Global.openWindow("http://www.gamesforgirlsclub.com/flash-online-games/hidden-object?eprj=pet_detective");
};
};
}
private function onMouseOut(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(1);
}
}
}//package
Section 37
//COptionBar (COptionBar)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class COptionBar extends MovieClip {
public var mMusic:MovieClip;
private var mSfxChannel:Array;
public var mQuality:MovieClip;
public var mSFX:MovieClip;
private var mBgm:Sound;
public var mPopUp:MovieClip;
private var mBgmFlag:Boolean;
private var mBgmChannel:SoundChannel;
private var mSfxFlag:Boolean;// = true
private var mBgmVol:Number;// = 1
public static var Global:COptionBar;
public function COptionBar(_arg1:int=0, _arg2:int=0, _arg3:String=null, _arg4:Number=0.5){
var _local5:Class;
super();
Global = this;
mBgmVol = _arg4;
this.x = _arg1;
this.y = _arg2;
if (_arg3){
_local5 = (getDefinitionByName(_arg3) as Class);
if (_local5){
mBgm = new (_local5);
};
};
mPopUp.mouseEnabled = false;
mMusic.buttonMode = true;
mMusic.useHandCursor = true;
mSFX.buttonMode = true;
mSFX.useHandCursor = true;
mQuality.buttonMode = true;
mQuality.useHandCursor = true;
mMusic.addEventListener(MouseEvent.MOUSE_OVER, MusicOver, false, 0, true);
mMusic.addEventListener(MouseEvent.MOUSE_OUT, MusicOut, false, 0, true);
mMusic.addEventListener(MouseEvent.MOUSE_UP, ToggleMusic, false, 0, true);
mSFX.addEventListener(MouseEvent.MOUSE_OVER, SFXOver, false, 0, true);
mSFX.addEventListener(MouseEvent.MOUSE_OUT, SFXOut, false, 0, true);
mSFX.addEventListener(MouseEvent.MOUSE_UP, ToggleSFX, false, 0, true);
mQuality.addEventListener(MouseEvent.MOUSE_OVER, QualityOver, false, 0, true);
mQuality.addEventListener(MouseEvent.MOUSE_OUT, QualityOut, false, 0, true);
mQuality.addEventListener(MouseEvent.MOUSE_UP, ToggleQuality, false, 0, true);
if (((mBgm) && (!((Main.GetInstance().mState == Main.STATE_PRELOADER))))){
StartBGM();
};
mSfxChannel = new Array();
MusicOut(null);
SFXOut(null);
trace("init option bar");
}
public function StopSFX(_arg1:int){
mSfxChannel[_arg1].stop();
}
private function MusicOut(_arg1:MouseEvent):void{
if (!mBgmFlag){
mMusic.gotoAndStop(2);
} else {
mMusic.gotoAndStop(1);
};
HidePopUp();
}
private function HidePopUp(){
mPopUp.alpha = 0;
}
public function PlaySFX(_arg1:String, _arg2:Number=1):int{
if (!mSfxFlag){
return;
};
var _local3:Class = (getDefinitionByName(_arg1) as Class);
var _local4:Sound = new (_local3);
var _local5:SoundTransform = new SoundTransform(_arg2, 0);
var _local6:SoundChannel = _local4.play(0, 1, _local5);
mSfxChannel.push(_local6);
return ((mSfxChannel.length - 1));
}
private function QualityOver(_arg1:MouseEvent):void{
mQuality.gotoAndStop(2);
ShowPopUp((("Quality: " + Main.GetInstance().stage.quality) + " (B)"));
}
private function SFXOver(_arg1:MouseEvent):void{
if (!mSfxFlag){
mSFX.gotoAndStop(4);
} else {
mSFX.gotoAndStop(3);
};
ShowPopUp("Toggle SFX (N)");
}
public function ToggleMusic(_arg1:MouseEvent=null):void{
if (Main.GetInstance().mState == Main.STATE_PRELOADER){
return;
};
trace("toggle Music");
if (((mBgmFlag) && (mBgmChannel))){
mBgmFlag = false;
mBgmChannel.stop();
} else {
StartBGM();
};
if (_arg1 != null){
MusicOver(null);
} else {
MusicOut(null);
};
}
public function ChangeBGMVol(_arg1:Number){
mBgmVol = _arg1;
mBgmChannel.soundTransform = new SoundTransform(mBgmVol, 0);
}
private function StartBGM(){
trace(("start bgm : " + mBgm));
if (!mBgm){
return;
};
mBgmFlag = true;
var _local1:SoundTransform = new SoundTransform(mBgmVol, 0);
mBgmChannel = mBgm.play(0, 999, _local1);
MusicOut(null);
}
private function SFXOut(_arg1:MouseEvent):void{
if (!mSfxFlag){
mSFX.gotoAndStop(2);
} else {
mSFX.gotoAndStop(1);
};
HidePopUp();
}
private function ShowPopUp(_arg1:String){
if ((this.y - 50) <= 0){
mPopUp.y = 40;
} else {
mPopUp.y = -30;
};
mPopUp.alpha = 1;
mPopUp.mText.text = _arg1;
}
public function ToggleSFX(_arg1:MouseEvent=null):void{
var _local2:int;
if (Main.GetInstance().mState == Main.STATE_PRELOADER){
return;
};
if (mSfxFlag){
mSfxFlag = false;
if (mSfxChannel){
_local2 = 0;
while (_local2 < mSfxChannel.length) {
mSfxChannel[_local2].stop();
_local2++;
};
};
} else {
mSfxFlag = true;
};
if (_arg1 != null){
SFXOver(null);
} else {
SFXOut(null);
};
}
public function ToggleQuality(_arg1:MouseEvent=null):void{
switch (Main.GetInstance().stage.quality){
case "LOW":
Main.GetInstance().stage.quality = StageQuality.MEDIUM;
break;
case "MEDIUM":
Main.GetInstance().stage.quality = StageQuality.HIGH;
break;
case "HIGH":
Main.GetInstance().stage.quality = StageQuality.BEST;
break;
case "BEST":
Main.GetInstance().stage.quality = StageQuality.LOW;
break;
};
ShowPopUp((("Quality: " + Main.GetInstance().stage.quality) + " (B)"));
}
private function QualityOut(_arg1:MouseEvent):void{
mQuality.gotoAndStop(1);
HidePopUp();
}
private function MusicOver(_arg1:MouseEvent):void{
if (!mBgmFlag){
mMusic.gotoAndStop(4);
} else {
mMusic.gotoAndStop(3);
};
ShowPopUp("Toggle Music (M)");
}
public function ChangeBGM(_arg1:String=null){
var _local2:Class;
if (!_arg1){
return;
};
if (_arg1){
_local2 = (getDefinitionByName(_arg1) as Class);
mBgm = new (_local2);
};
if (((mBgmFlag) && (mBgmChannel))){
mBgmChannel.stop();
};
trace(("bgm flag : " + mBgmFlag));
if (mBgmFlag){
StartBGM();
};
}
}
}//package
Section 38
//CPause (CPause)
package {
import flash.display.*;
import flash.events.*;
public class CPause extends CBaseMovieClip {
public var resume_b:MovieClip;
public var menu_b:MovieClip;
public function CPause(){
super("update");
resume_b.gotoAndStop(1);
resume_b.mouseEnabled = true;
resume_b.mouseChildren = false;
resume_b.useHandCursor = true;
resume_b.buttonMode = true;
resume_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
resume_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
resume_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
resume_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
menu_b.gotoAndStop(1);
menu_b.mouseEnabled = true;
menu_b.mouseChildren = false;
menu_b.useHandCursor = true;
menu_b.buttonMode = true;
menu_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
menu_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
menu_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
menu_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
}
private function onMouseTekan(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(3);
}
private function onMouseDown(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(2);
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
if (_arg1.currentTarget.name == "resume_b"){
CGame.GetInstance().pause = false;
Main.GetInstance().KillWindow("Pause");
} else {
if (_arg1.currentTarget.name == "menu_b"){
Main.GetInstance().KillWindow("Pause");
CGame.GetInstance().remove_children_game();
Main.GetInstance().KillWindow("Game");
Main.GetInstance().InitMainMenu();
};
};
}
override public function Update(_arg1:Event){
}
private function onMouseOver(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(2);
}
private function onMouseOut(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(1);
}
}
}//package
Section 39
//CPop (CPop)
package {
import flash.media.*;
public dynamic class CPop extends Sound {
}
}//package
Section 40
//CTamat (CTamat)
package {
import flash.display.*;
import flash.events.*;
import Playtomic.*;
public class CTamat extends CBaseMovieClip {
public var menu_b:MovieClip;
public var timer:int;
var hanny:String;
public var binatang:MovieClip;
public var bg_mc:MovieClip;
public var more_b:MovieClip;
public function CTamat(){
super("update");
Log.CustomMetric("Finish", "Game");
Log.ForceSend();
binatang.alpha = 0;
menu_b.alpha = 0;
menu_b.gotoAndStop(1);
menu_b.mouseEnabled = false;
menu_b.mouseChildren = false;
menu_b.useHandCursor = true;
menu_b.buttonMode = true;
menu_b.addEventListener(MouseEvent.MOUSE_UP, onMouseDown, false, 0, true);
menu_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseTekan, false, 0, true);
menu_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
menu_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
more_b.visible = false;
more_b.alpha = 0;
more_b.gotoAndStop(1);
more_b.mouseEnabled = false;
more_b.mouseChildren = false;
more_b.useHandCursor = true;
more_b.buttonMode = true;
more_b.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
more_b.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
hanny = "";
bg_mc.mouseEnabled = true;
bg_mc.alpha = 1;
timer = -20;
}
private function onMouseTekan(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(3);
}
private function onMouseDown(_arg1:MouseEvent):void{
if (timer == 0){
_arg1.currentTarget.gotoAndStop(2);
Main.GetInstance().mOptionBar.PlaySFX("CTombol");
hanny = _arg1.currentTarget.name;
if (_arg1.currentTarget.name == "play_again_b"){
timer = 20;
bg_mc.mouseEnabled = true;
} else {
if (_arg1.currentTarget.name == "menu_b"){
timer = 20;
bg_mc.mouseEnabled = true;
} else {
if (_arg1.currentTarget.name == "logo_b"){
Log.CustomMetric("Logo", "Links", true);
Log.ForceSend();
Global.openWindow("http://www.gamesforgirlsclub.com/?utm_source=game&utm_medium=online&utm_campaign=pet_detective");
};
};
};
};
}
override public function Update(_arg1:Event){
if (timer > 0){
if (hanny == ""){
timer--;
if (timer <= 20){
more_b.alpha = (more_b.alpha + (1 / 20));
menu_b.alpha = (menu_b.alpha + (1 / 20));
binatang.alpha = (binatang.alpha - (1 / 20));
if (timer == 0){
menu_b.mouseEnabled = true;
menu_b.alpha = 1;
};
} else {
if ((((timer <= 120)) && ((timer >= 100)))){
binatang.alpha = (binatang.alpha + (1 / 20));
if (timer == 100){
binatang.alpha = 1;
};
};
};
} else {
timer--;
bg_mc.alpha = (bg_mc.alpha + (1 / 20));
if (timer == 0){
bg_mc.alpha = 1;
Main.GetInstance().KillWindow("Tamat");
if (hanny == "play_again_b"){
Main.GetInstance().set_default_awal_game();
Main.GetInstance().InitGame();
} else {
if (hanny == "menu_b"){
Main.GetInstance().InitMainMenu();
} else {
if (hanny == "more_b"){
Global.openWindow("http://www.dressuppink.com/index.php?action=branded");
};
};
};
};
};
} else {
if (timer < 0){
timer++;
bg_mc.alpha = (bg_mc.alpha - (1 / 20));
if (timer == 0){
timer = 150;
bg_mc.alpha = 0;
bg_mc.mouseEnabled = false;
};
};
};
}
private function onMouseOut(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(1);
}
private function onMouseOver(_arg1:MouseEvent):void{
_arg1.currentTarget.gotoAndStop(2);
}
}
}//package
Section 41
//CTombol (CTombol)
package {
import flash.media.*;
public dynamic class CTombol extends Sound {
}
}//package
Section 42
//Data (Data)
package {
public class Data {
public static var game = [{mulai:1, akhir:3, timer:600, jum_hint:1, senter:0}, {mulai:4, akhir:8, timer:600, jum_hint:2, senter:0}, {mulai:9, akhir:15, timer:600, jum_hint:5, senter:0}, {mulai:16, akhir:22, timer:600, jum_hint:5, senter:1}, {mulai:23, akhir:32, timer:600, jum_hint:5, senter:0}, {mulai:33, akhir:42, timer:600, jum_hint:5, senter:1}, {mulai:43, akhir:54, timer:600, jum_hint:5, senter:0}, {mulai:55, akhir:69, timer:600, jum_hint:5, senter:1}];
}
}//package
Section 43
//FPS (FPS)
package {
import flash.xml.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class FPS extends MovieClip {
public var secondTime:Number;
public var prevSecondTime:Number;
public var frames:Number;
public var prevFrameTime:Number;
public var frameTime:Number;
public var iBar:MovieClip;
public var time:Number;
public var fps:String;
public var tf:TextField;
public function FPS(){
addFrameScript(0, frame1, 1, frame2);
}
function frame2(){
stop();
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
function frame1(){
prevFrameTime = getTimer();
prevSecondTime = getTimer();
frames = 0;
fps = "...";
}
public function onEnterFrame(_arg1:Event):void{
time = getTimer();
frameTime = (time - prevFrameTime);
secondTime = (time - prevSecondTime);
if (secondTime >= 1000){
fps = frames.toString();
frames = 0;
prevSecondTime = time;
} else {
frames++;
};
prevFrameTime = time;
tf.text = (((((fps + " FPS / ") + frameTime) + " MS") + " - Memory : ") + System.totalMemory);
iBar.scaleX = (iBar.scaleX - ((iBar.scaleX - (frameTime / 10)) / 5));
}
}
}//package
Section 44
//Global (Global)
package {
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.utils.*;
import flash.external.*;
public class Global {
protected static const WINDOW_OPEN_FUNCTION:String = "window.open";
public static var STAGE_HEIGHT = 450;
public static var STAGE_WIDTH = 600;
public static function getIsoPoint(_arg1:Point):Point{
return (new Point((_arg1.x - _arg1.y), ((_arg1.x + _arg1.y) / 2)));
}
public static function AngleOfTwoLines(_arg1:Object, _arg2:Object):Number{
var _local3:Number = _arg1.x1;
var _local4:Number = _arg1.y1;
var _local5:Number = _arg1.x2;
var _local6:Number = _arg1.y2;
var _local7:Number = _arg2.x1;
var _local8:Number = _arg2.y1;
var _local9:Number = _arg2.x2;
var _local10:Number = _arg2.y2;
var _local11:Number = Global.Slope(_local3, _local4, _local5, _local6);
var _local12:Number = Global.Slope(_local7, _local8, _local9, _local10);
return (Math.atan(((_local12 - _local11) / (1 + (_local11 * _local12)))));
}
public static function htmlColorToAS(_arg1:String):uint{
var _local2 = "0x";
var _local3 = 1;
while (_local3 < _arg1.length) {
_local2 = _local2.concat(_arg1.charAt(_local3));
_local3++;
};
return (uint(_local2));
}
public static function Slope(_arg1, _arg2, _arg3, _arg4):Number{
var _local5:Number = (_arg1 - _arg3);
var _local6:Number = (_arg2 - _arg4);
return ((_local6 / _local5));
}
public static function duplicateMovieClip(_arg1:MovieClip):MovieClip{
var _local4:Rectangle;
var _local2:Class = Object(_arg1).constructor;
var _local3:MovieClip = new (_local2);
_local3.transform = _arg1.transform;
_local3.filters = _arg1.filters;
_local3.cacheAsBitmap = _arg1.cacheAsBitmap;
_local3.opaqueBackground = _arg1.opaqueBackground;
if (_arg1.scale9Grid){
_local4 = _arg1.scale9Grid;
_local3.scale9Grid = _local4;
};
return (_local3);
}
public static function AngleOfTwoDots(_arg1, _arg2, _arg3, _arg4):Number{
var _local5:Number = (_arg1 - _arg3);
var _local6:Number = (_arg2 - _arg4);
return (Math.atan2(_local6, _local5));
}
public static function DegToRad(_arg1:Number):Number{
return (((_arg1 / 180) * Math.PI));
}
public static function Distance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (Math.sqrt((Math.pow((_arg3 - _arg1), 2) + Math.pow((_arg4 - _arg2), 2))));
}
public static function RadToDeg(_arg1:Number):Number{
return (((_arg1 * 180) / Math.PI));
}
public static function pythagoras(_arg1:Number, _arg2:Number):Number{
return (Math.sqrt((Math.pow(_arg1, 2) + Math.pow(_arg2, 2))));
}
public static function openWindow(_arg1:String="http://www.lazybanana.com", _arg2:String="_blank", _arg3:String=""):String{
var _loc_4:URLRequest;
var _loc_5:String;
var opened:Boolean;
var msg:String;
var url = _arg1;
var target = _arg2;
var param3 = _arg3;
var ok:Boolean;
opened = false;
_loc_4 = new URLRequest(url);
msg = "Start the openWindow func ...\n";
if (!ExternalInterface.available){
try {
opened = false;
navigateToURL(_loc_4, target);
msg = (msg + "flag a - 1");
} catch(err:SecurityError) {
navigateToURL(_loc_4, "_blank");
opened = true;
msg = (msg + "flag a - 2");
} finally {
opened = true;
};
msg = (msg + "external interface not available\n");
} else {
try {
_loc_5 = String(ExternalInterface.call("function() {return navigator.userAgent;}")).toLowerCase();
msg = (msg + "Trying extenal interface sandbox security\n");
msg = (msg + "flag b - 1");
opened = false;
} catch(err:SecurityError) {
msg = (msg + (err.message + "\n"));
ok = false;
try {
opened = false;
navigateToURL(_loc_4, target);
msg = (msg + "flag b - 2");
} catch(err:SecurityError) {
opened = true;
msg = (msg + "flag b - 3");
navigateToURL(_loc_4, "_blank");
} finally {
opened = true;
};
} catch(err:Error) {
} finally {
opened = false;
};
if (((ok) && (!(opened)))){
msg = (msg + "External interface available, continuing ...\n");
if (((!((_loc_5.indexOf("firefox") == -1))) || (((!((_loc_5.indexOf("msie") == -1))) && ((uint(_loc_5.substr((_loc_5.indexOf("msie") + 5), 3)) >= 7)))))){
try {
ExternalInterface.call("window.open", _loc_4.url, target);
opened = false;
msg = (msg + "flag c - 1");
msg = (msg + "Trying window.open JS ...\n");
} catch(err:SecurityError) {
msg = (msg + (err.message + "\n"));
trace(("e : " + err.message));
if (!opened){
try {
opened = false;
navigateToURL(_loc_4, target);
msg = (msg + "flag d - 1");
} catch(err:SecurityError) {
opened = true;
navigateToURL(_loc_4, "_blank");
msg = (msg + "flag d - 2");
} finally {
opened = true;
};
};
} catch(err:Error) {
msg = (msg + (err.message + "\n"));
if (!opened){
try {
opened = false;
navigateToURL(_loc_4, target);
msg = (msg + "flag e - 1");
} catch(err:SecurityError) {
opened = true;
navigateToURL(_loc_4, "_blank");
msg = (msg + "flag e - 2");
} finally {
opened = true;
};
};
} finally {
opened = true;
};
} else {
if (!opened){
msg = (msg + "Open with navigateToURL\n");
try {
opened = false;
navigateToURL(_loc_4, target);
msg = (msg + "flag f - 1");
} catch(err:SecurityError) {
navigateToURL(_loc_4, "_blank");
msg = (msg + "flag f - 2");
} finally {
opened = true;
};
};
};
};
};
return (msg);
}
public static function getMoneyString(_arg1:int):String{
var _local2 = "";
var _local3:String = _arg1;
var _local4:int;
var _local5:int = (_local3.length - 1);
while (_local5 >= 0) {
_local4++;
_local2 = (_local3.charAt(_local5) + _local2);
if ((_local4 % 3) == 0){
_local2 = ("," + _local2);
};
_local5--;
};
if (_local2.charAt(0) == ","){
return (_local2.substr(1, (_local2.length - 1)));
};
return (_local2);
}
public static function getFormatedString(_arg1:String, _arg2:Array, _arg3:String="%"):String{
var _local4:String;
for (_local4 in _arg2) {
_arg1 = _arg1.replace((_arg3 + _local4), _arg2[_local4]);
trace(_local4, _arg2[_local4]);
};
return (_arg1);
}
public static function clone(_arg1:Object){
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
return (_local2.readObject());
}
}
}//package
Section 45
//Main (Main)
package {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import Playtomic.*;
import flash.net.*;
import flash.media.*;
import flash.ui.*;
import flash.utils.*;
import flash.system.*;
public dynamic class Main extends MovieClip {
private var mContextMenu:ContextMenu;
public var level:int;
private var mPause:CPause;
public var mPreloader:MovieClip;
public var mBgmStartFlag:Boolean;// = false
private var mBgm:SoundChannel;
public var mState:int;
public var lbar:MovieClip;
public var mBgmFlag:Boolean;// = true
private var mGame_Over:CGame_Over;
public var mFPSBar:MovieClip;
private var mMainMenu:CMainMenu;
private var mSfx:SoundChannel;
public var lpc:TextField;
public var mSfxFlag:Boolean;// = true
private var mTamat:CTamat;
private var mComic:CComic;
public var sound_hanny:int;
public var mOptionBar:COptionBar;
public var mBannedWin:CBannedWin;
private var mGame:CGame;
protected static const WINDOW_OPEN_FUNCTION:String = "window.open";
public static var STATE_GAME = 1;
public static var MainGlobal:Main;
public static var STATE_PRELOADER = 0;
public static var STATE_MAIN_MENU = 2;
public static var STATE_PAUSED = 3;
public function Main(){
mState = STATE_PRELOADER;
super();
addFrameScript(0, frame1, 1, frame2, 15, frame16);
set_default_awal_game();
sound_hanny = 1;
trace("init main 1");
MainGlobal = this;
mState = STATE_MAIN_MENU;
Global.STAGE_HEIGHT = stage.stageHeight;
Global.STAGE_WIDTH = stage.stageWidth;
stage.addEventListener(FocusEvent.FOCUS_IN, OnKeyFocusChange, false, 0, true);
stage.addEventListener(Event.ADDED, OnAddedToStage, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp, false, 0, true);
stage.showDefaultContextMenu = false;
stage.quality = StageQuality.BEST;
}
private function isDomainNOTAllowed(_arg1:Array):Boolean{
var _local4:Number;
var _local2:LocalConnection = new LocalConnection();
var _local3:String = _local2.domain;
trace(("Domain : " + _local3));
_local4 = 0;
while (_local4 < _arg1.length) {
if (_local3 == _arg1[_local4]){
return (true);
};
_local4++;
};
_local4 = 0;
while (_local4 < _arg1.length) {
if (_local3.substr(-((_arg1[_local4].length + 1))) == ("." + _arg1[_local4])){
return (true);
};
_local4++;
};
return (false);
}
function frame1(){
Log.View(1711, "09819bf742ad446f", root.loaderInfo.loaderURL);
Log.CustomMetric("Init", "Load");
Log.ForceSend();
stop();
}
private function RunStateGame(){
this.dispatchEvent(new Event("update"));
}
public function InitComic(){
ShowWindow("Comic");
mComic.AddDispatcher();
mState = STATE_GAME;
}
public function KillWindow(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=true){
var _local5:XML;
var _local6:String;
var _local4:String = ("m" + _arg1);
if (this[_local4]){
if (((this[_local4].parent) && (_arg3))){
this[_local4].parent.removeChild(this[_local4]);
};
if (_arg2){
_local5 = describeType(this[_local4]);
_local6 = _local5.method.@name.toXMLString();
if (_local6.indexOf("RemoveDispatcher") > -1){
this[_local4].RemoveDispatcher();
};
};
this[_local4] = null;
};
if (this[_local4] != null){
trace((("WARNING ### " + _arg1) + "Not null after Kill process"));
};
}
private function menuSelectHandler(_arg1:ContextMenuEvent){
}
public function InitMainMenu(){
ShowWindow("MainMenu");
mMainMenu.AddDispatcher();
mState = STATE_GAME;
}
public function InitTamat(){
ShowWindow("Tamat");
mTamat.AddDispatcher();
mState = STATE_GAME;
}
private function OnKeyFocusChange(_arg1:FocusEvent):void{
stage.focus = this.stage;
}
public function InitPause(){
ShowWindow("Pause");
}
private function isDomainAllowed(_arg1:Array):Boolean{
var _local4:Number;
var _local2:LocalConnection = new LocalConnection();
var _local3:String = _local2.domain;
trace(("Domain : " + _local3));
_local4 = 0;
while (_local4 < _arg1.length) {
if (_local3 == _arg1[_local4]){
return (true);
};
_local4++;
};
_local4 = 0;
while (_local4 < _arg1.length) {
if (_local3.substr(-((_arg1[_local4].length + 1))) == ("." + _arg1[_local4])){
return (true);
};
_local4++;
};
return (false);
}
public function onKeyUp(_arg1:KeyboardEvent){
if (mState != STATE_PRELOADER){
switch (_arg1.keyCode){
case 77:
if (mOptionBar){
mOptionBar.ToggleMusic();
};
break;
case 66:
if (mOptionBar){
mOptionBar.ToggleQuality();
};
break;
case 78:
if (mOptionBar){
mOptionBar.ToggleSFX();
};
break;
};
};
}
private function OnAddedToStage(_arg1:Event):void{
if (mOptionBar){
mOptionBar.parent.setChildIndex(mOptionBar, (mOptionBar.parent.numChildren - 1));
};
if (mFPSBar){
mFPSBar.parent.setChildIndex(mFPSBar, (mFPSBar.parent.numChildren - 1));
};
}
public function InitGame(){
ShowWindow("Game");
mGame.AddDispatcher();
mState = STATE_GAME;
}
private function InitOnce(){
InitMainMenu();
mOptionBar = new COptionBar(0, 0, "CMain_Sound", 1);
stage.addChild(mOptionBar);
mFPSBar = new FPS();
stage.addChild(mFPSBar);
mFPSBar.visible = false;
mOptionBar.visible = false;
if (this.hasEventListener(Event.ENTER_FRAME)){
this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
};
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame, false, 0, true);
}
function frame16(){
InitOnce();
Log.CustomMetric("Loaded", "Load");
Log.ForceSend();
}
public function CheckDomain(){
var _local3:*;
var _local1:Array = new Array("localhost");
var _local2:Array = new Array("ActiveX", "PlugIn", "StandAlone", "External");
if (!isDomainAllowed(_local1)){
trace("BANNED DOMAIN !!!");
if (_local3){
if (_local3.parent){
_local3.parent.removeChild(_local3);
};
_local3 = null;
};
_local3 = new CBannedWin();
this.stage.addChild(_local3);
} else {
trace("Allowed DOMAIN !!!");
};
}
public function OnEnterFrame(_arg1:Event){
switch (mState){
case STATE_GAME:
RunStateGame();
break;
case STATE_PAUSED:
this.dispatchEvent(new Event("pause"));
break;
default:
break;
};
}
function frame2(){
gotoAndStop(16);
}
public function ToggleQuality():void{
switch (stage.quality){
case "LOW":
stage.quality = StageQuality.MEDIUM;
break;
case "MEDIUM":
stage.quality = StageQuality.HIGH;
break;
case "HIGH":
stage.quality = StageQuality.BEST;
break;
case "BEST":
stage.quality = StageQuality.LOW;
break;
default:
break;
};
}
public function ShowWindow(_arg1:String){
var _local2:String = ("C" + _arg1);
var _local3:String = ("m" + _arg1);
var _local4:Class = (getDefinitionByName(_local2) as Class);
if (_local4){
KillWindow(_local3);
this[_local3] = new (_local4);
this.stage.addChild(this[_local3]);
};
}
public function InitGame_Over(){
ShowWindow("Game_Over");
mGame_Over.AddDispatcher();
mState = STATE_GAME;
}
public function set_default_awal_game(){
level = 1;
}
private function isPlayerAllowed(_arg1:Array):Boolean{
var _local2:String = Capabilities.playerType;
trace(("PlayerType : " + _local2));
var _local3:Number = 0;
while (_local3 < _arg1.length) {
if (_local2 == _arg1[_local3]){
return (true);
};
_local3++;
};
return (false);
}
public static function GetInstance():Main{
return (MainGlobal);
}
}
}//package