Section 1
//Timeline_21 (charactor_fla.Timeline_21)
package charactor_fla {
import flash.display.*;
public dynamic class Timeline_21 extends MovieClip {
public function Timeline_21(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package charactor_fla
Section 2
//Timeline_26 (charactor_fla.Timeline_26)
package charactor_fla {
import flash.display.*;
public dynamic class Timeline_26 extends MovieClip {
public function Timeline_26(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package charactor_fla
Section 3
//Timeline_28 (charactor_fla.Timeline_28)
package charactor_fla {
import flash.display.*;
public dynamic class Timeline_28 extends MovieClip {
public function Timeline_28(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package charactor_fla
Section 4
//Timeline_30 (charactor_fla.Timeline_30)
package charactor_fla {
import flash.display.*;
public dynamic class Timeline_30 extends MovieClip {
public function Timeline_30(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package charactor_fla
Section 5
//Timeline_32 (charactor_fla.Timeline_32)
package charactor_fla {
import flash.display.*;
public dynamic class Timeline_32 extends MovieClip {
public function Timeline_32(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package charactor_fla
Section 6
//Timeline_34 (charactor_fla.Timeline_34)
package charactor_fla {
import flash.display.*;
public dynamic class Timeline_34 extends MovieClip {
public function Timeline_34(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package charactor_fla
Section 7
//Timeline_37 (charactor_fla.Timeline_37)
package charactor_fla {
import flash.display.*;
public dynamic class Timeline_37 extends MovieClip {
public function Timeline_37(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package charactor_fla
Section 8
//CampaignInfo (com.google.analytics.campaign.CampaignInfo)
package com.google.analytics.campaign {
import com.google.analytics.utils.*;
public class CampaignInfo {
private var _new:Boolean;
private var _empty:Boolean;
public function CampaignInfo(_arg1:Boolean=true, _arg2:Boolean=false){
_empty = _arg1;
_new = _arg2;
}
public function isEmpty():Boolean{
return (_empty);
}
public function toURLString():String{
var _local1:Variables;
_local1 = toVariables();
return (_local1.toString());
}
public function toVariables():Variables{
var _local1:Variables;
_local1 = new Variables();
_local1.URIencode = true;
if (((!(isEmpty())) && (isNew()))){
_local1.utmcn = utmcn;
};
if (((!(isEmpty())) && (!(isNew())))){
_local1.utmcr = utmcr;
};
return (_local1);
}
public function isNew():Boolean{
return (_new);
}
public function get utmcn():String{
return ("1");
}
public function get utmcr():String{
return ("1");
}
}
}//package com.google.analytics.campaign
Section 9
//CampaignKey (com.google.analytics.campaign.CampaignKey)
package com.google.analytics.campaign {
public class CampaignKey {
public var UCMD:String;// = "utm_medium"
public var UCID:String;// = "utm_id"
public var UCTR:String;// = "utm_term"
public var UCSR:String;// = "utm_source"
public var UCNO:String;// = "utm_nooverride"
public var UCCN:String;// = "utm_campaign"
public var UGCLID:String;// = "gclid"
public var UCCT:String;// = "utm_content"
public function CampaignKey(){
super();
}
}
}//package com.google.analytics.campaign
Section 10
//CampaignManager (com.google.analytics.campaign.CampaignManager)
package com.google.analytics.campaign {
import com.google.analytics.core.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import com.google.analytics.utils.*;
public class CampaignManager {
private var _config:Configuration;
private var _domainHash:Number;
private var _debug:DebugConfiguration;
private var _timeStamp:Number;
private var _referrer:String;
private var _buffer:Buffer;
public static const trackingDelimiter:String = "|";
public function CampaignManager(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Buffer, _arg4:Number, _arg5:String, _arg6:Number){
_config = _arg1;
_debug = _arg2;
_buffer = _arg3;
_domainHash = _arg4;
_referrer = _arg5;
_timeStamp = _arg6;
}
public function hasNoOverride(_arg1:String):Boolean{
var _local2:CampaignKey;
var _local3:Variables;
var _local4:String;
_local2 = _config.campaignKey;
if (_arg1 == ""){
return (false);
};
_local3 = new Variables(_arg1);
_local4 = "";
if (_local3.hasOwnProperty(_local2.UCNO)){
_local4 = _local3[_local2.UCNO];
switch (_local4){
case "1":
return (true);
case "":
case "0":
default:
return (false);
};
};
return (false);
}
public function getCampaignInformation(_arg1:String, _arg2:Boolean):CampaignInfo{
var _local3:CampaignInfo;
var _local4:CampaignTracker;
var _local5:Boolean;
var _local6:Boolean;
var _local7:int;
var _local8:CampaignTracker;
var _local9:int;
_local3 = new CampaignInfo();
_local5 = false;
_local6 = false;
_local7 = 0;
if (((_config.allowLinker) && (_buffer.isGenuine()))){
if (!_buffer.hasUTMZ()){
return (_local3);
};
};
_local4 = getTrackerFromSearchString(_arg1);
if (isValid(_local4)){
_local6 = hasNoOverride(_arg1);
if (((_local6) && (!(_buffer.hasUTMZ())))){
return (_local3);
};
};
if (!isValid(_local4)){
_local4 = getOrganicCampaign();
if (((!(_buffer.hasUTMZ())) && (isIgnoredKeyword(_local4)))){
return (_local3);
};
};
if (((!(isValid(_local4))) && (_arg2))){
_local4 = getReferrerCampaign();
if (((!(_buffer.hasUTMZ())) && (isIgnoredReferral(_local4)))){
return (_local3);
};
};
if (!isValid(_local4)){
if (((!(_buffer.hasUTMZ())) && (_arg2))){
_local4 = getDirectCampaign();
};
};
if (!isValid(_local4)){
return (_local3);
};
if (((_buffer.hasUTMZ()) && (!(_buffer.utmz.isEmpty())))){
_local8 = new CampaignTracker();
_local8.fromTrackerString(_buffer.utmz.campaignTracking);
_local5 = (_local8.toTrackerString() == _local4.toTrackerString());
_local7 = _buffer.utmz.responseCount;
};
if (((!(_local5)) || (_arg2))){
_local9 = _buffer.utma.sessionCount;
_local7++;
if (_local9 == 0){
_local9 = 1;
};
_buffer.utmz.domainHash = _domainHash;
_buffer.utmz.campaignCreation = _timeStamp;
_buffer.utmz.campaignSessions = _local9;
_buffer.utmz.responseCount = _local7;
_buffer.utmz.campaignTracking = _local4.toTrackerString();
_debug.info(_buffer.utmz.toString(), VisualDebugMode.geek);
_local3 = new CampaignInfo(false, true);
} else {
_local3 = new CampaignInfo(false, false);
};
return (_local3);
}
public function isValid(_arg1:CampaignTracker):Boolean{
if (((_arg1) && (_arg1.isValid()))){
return (true);
};
return (false);
}
public function getTrackerFromSearchString(_arg1:String):CampaignTracker{
var _local2:CampaignTracker;
var _local3:CampaignTracker;
var _local4:CampaignKey;
var _local5:Variables;
_local2 = getOrganicCampaign();
_local3 = new CampaignTracker();
_local4 = _config.campaignKey;
if (_arg1 == ""){
return (_local3);
};
_local5 = new Variables(_arg1);
if (_local5.hasOwnProperty(_local4.UCID)){
_local3.id = _local5[_local4.UCID];
};
if (_local5.hasOwnProperty(_local4.UCSR)){
_local3.source = _local5[_local4.UCSR];
};
if (_local5.hasOwnProperty(_local4.UGCLID)){
_local3.clickId = _local5[_local4.UGCLID];
};
if (_local5.hasOwnProperty(_local4.UCCN)){
_local3.name = _local5[_local4.UCCN];
} else {
_local3.name = "(not set)";
};
if (_local5.hasOwnProperty(_local4.UCMD)){
_local3.medium = _local5[_local4.UCMD];
} else {
_local3.medium = "(not set)";
};
if (_local5.hasOwnProperty(_local4.UCTR)){
_local3.term = _local5[_local4.UCTR];
} else {
if (((_local2) && (!((_local2.term == ""))))){
_local3.term = _local2.term;
};
};
if (_local5.hasOwnProperty(_local4.UCCT)){
_local3.content = _local5[_local4.UCCT];
};
return (_local3);
}
public function getOrganicCampaign():CampaignTracker{
var _local1:CampaignTracker;
var _local2:URL;
var _local3:String;
var _local4:Array;
var _local5:OrganicReferrer;
var _local6:String;
if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){
return (_local1);
};
_local2 = new URL(_referrer);
_local3 = "";
if (_local2.hostName != ""){
if (_local2.hostName.indexOf(".") > -1){
_local4 = _local2.hostName.split(".");
switch (_local4.length){
case 2:
_local3 = _local4[0];
break;
case 3:
_local3 = _local4[1];
break;
};
};
};
if (_config.organic.match(_local3)){
_local5 = _config.organic.getReferrerByName(_local3);
_local6 = _config.organic.getKeywordValue(_local5, _local2.search);
_local1 = new CampaignTracker();
_local1.source = _local5.engine;
_local1.name = "(organic)";
_local1.medium = "organic";
_local1.term = _local6;
};
return (_local1);
}
public function isIgnoredReferral(_arg1:CampaignTracker):Boolean{
if (((_arg1) && ((_arg1.medium == "referral")))){
return (_config.organic.isIgnoredReferral(_arg1.source));
};
return (false);
}
public function getDirectCampaign():CampaignTracker{
var _local1:CampaignTracker;
_local1 = new CampaignTracker();
_local1.source = "(direct)";
_local1.name = "(direct)";
_local1.medium = "(none)";
return (_local1);
}
public function isIgnoredKeyword(_arg1:CampaignTracker):Boolean{
if (((_arg1) && ((_arg1.medium == "organic")))){
return (_config.organic.isIgnoredKeyword(_arg1.term));
};
return (false);
}
public function getReferrerCampaign():CampaignTracker{
var _local1:CampaignTracker;
var _local2:URL;
var _local3:String;
var _local4:String;
if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){
return (_local1);
};
_local2 = new URL(_referrer);
_local3 = _local2.hostName;
_local4 = _local2.path;
if (_local3.indexOf("www.") == 0){
_local3 = _local3.substr(4);
};
_local1 = new CampaignTracker();
_local1.source = _local3;
_local1.name = "(referral)";
_local1.medium = "referral";
_local1.content = _local4;
return (_local1);
}
public static function isInvalidReferrer(_arg1:String):Boolean{
var _local2:URL;
if ((((((_arg1 == "")) || ((_arg1 == "-")))) || ((_arg1 == "0")))){
return (true);
};
if (_arg1.indexOf("://") > -1){
_local2 = new URL(_arg1);
if ((((_local2.protocol == Protocols.file)) || ((_local2.protocol == Protocols.none)))){
return (true);
};
};
return (false);
}
public static function isFromGoogleCSE(_arg1:String, _arg2:Configuration):Boolean{
var _local3:URL;
_local3 = new URL(_arg1);
if (_local3.hostName.indexOf(_arg2.google) > -1){
if (_local3.search.indexOf((_arg2.googleSearchParam + "=")) > -1){
if (_local3.path == ("/" + _arg2.googleCsePath)){
return (true);
};
};
};
return (false);
}
}
}//package com.google.analytics.campaign
Section 11
//CampaignTracker (com.google.analytics.campaign.CampaignTracker)
package com.google.analytics.campaign {
import com.google.analytics.utils.*;
public class CampaignTracker {
public var content:String;
public var source:String;
public var clickId:String;
public var name:String;
public var term:String;
public var medium:String;
public var id:String;
public function CampaignTracker(id:String="", source:String="", clickId:String="", name:String="", medium:String="", term:String="", content:String=""){
super();
this.id = id;
this.source = source;
this.clickId = clickId;
this.name = name;
this.medium = medium;
this.term = term;
this.content = content;
}
public function isValid():Boolean{
if (((((!((id == ""))) || (!((source == ""))))) || (!((clickId == ""))))){
return (true);
};
return (false);
}
public function toTrackerString():String{
var data:Array = [];
_addIfNotEmpty(data, "utmcsr=", source);
_addIfNotEmpty(data, "utmccn=", name);
_addIfNotEmpty(data, "utmcmd=", medium);
_addIfNotEmpty(data, "utmctr=", term);
_addIfNotEmpty(data, "utmcct=", content);
_addIfNotEmpty(data, "utmcid=", id);
_addIfNotEmpty(data, "utmgclid=", clickId);
return (data.join(CampaignManager.trackingDelimiter));
}
private function _addIfNotEmpty(arr:Array, field:String, value:String):void{
if (value != ""){
value = value.split("+").join("%20");
value = value.split(" ").join("%20");
arr.push((field + value));
};
}
public function fromTrackerString(tracker:String):void{
var data:String = tracker.split(CampaignManager.trackingDelimiter).join("&");
var vars:Variables = new Variables(data);
if (vars.hasOwnProperty("utmcid")){
this.id = vars["utmcid"];
};
if (vars.hasOwnProperty("utmcsr")){
this.source = vars["utmcsr"];
};
if (vars.hasOwnProperty("utmccn")){
this.name = vars["utmccn"];
};
if (vars.hasOwnProperty("utmcmd")){
this.medium = vars["utmcmd"];
};
if (vars.hasOwnProperty("utmctr")){
this.term = vars["utmctr"];
};
if (vars.hasOwnProperty("utmcct")){
this.content = vars["utmcct"];
};
if (vars.hasOwnProperty("utmgclid")){
this.clickId = vars["utmgclid"];
};
}
}
}//package com.google.analytics.campaign
Section 12
//BrowserInfo (com.google.analytics.core.BrowserInfo)
package com.google.analytics.core {
import com.google.analytics.v4.*;
import com.google.analytics.utils.*;
public class BrowserInfo {
private var _config:Configuration;
private var _info:Environment;
public function BrowserInfo(_arg1:Configuration, _arg2:Environment){
_config = _arg1;
_info = _arg2;
}
public function get utmul():String{
return (_info.language.toLowerCase());
}
public function get utmje():String{
return ("0");
}
public function toURLString():String{
var _local1:Variables;
_local1 = toVariables();
return (_local1.toString());
}
public function get utmsr():String{
return (((_info.screenWidth + "x") + _info.screenHeight));
}
public function get utmcs():String{
return (_info.languageEncoding);
}
public function get utmfl():String{
var _local1:Version;
if (_config.detectFlash){
_local1 = _info.flashVersion;
return (((((_local1.major + ".") + _local1.minor) + " r") + _local1.build));
};
return ("-");
}
public function toVariables():Variables{
var _local1:Variables;
_local1 = new Variables();
_local1.URIencode = true;
_local1.utmcs = utmcs;
_local1.utmsr = utmsr;
_local1.utmsc = utmsc;
_local1.utmul = utmul;
_local1.utmje = utmje;
_local1.utmfl = utmfl;
return (_local1);
}
public function get utmsc():String{
return ((_info.screenColorDepth + "-bit"));
}
}
}//package com.google.analytics.core
Section 13
//Buffer (com.google.analytics.core.Buffer)
package com.google.analytics.core {
import flash.events.*;
import flash.net.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import com.google.analytics.data.*;
public dynamic class Buffer {
private var _SO:SharedObject;
private var _OBJ:Object;
private var _utma:UTMA;
private var _utmb:UTMB;
private var _utmc:UTMC;
private var _debug:DebugConfiguration;
private var _utmk:UTMK;
private var _config:Configuration;
private var _utmv:UTMV;
private var _utmz:UTMZ;
private var _volatile:Boolean;
public function Buffer(config:Configuration, debug:DebugConfiguration, volatile:Boolean=false, data:Object=null){
var saveSO:Boolean;
var prop:String;
super();
_config = config;
_debug = debug;
UTMB.defaultTimespan = _config.sessionTimeout;
UTMZ.defaultTimespan = _config.conversionTimeout;
if (!volatile){
_SO = SharedObject.getLocal(_config.cookieName, _config.cookiePath);
saveSO = false;
if (_SO.data.utma){
if (!hasUTMA()){
_createUMTA();
};
_utma.fromSharedObject(_SO.data.utma);
if (_debug.verbose){
_debug.info(("found: " + _utma.toString(true)), VisualDebugMode.geek);
};
if (_utma.isExpired()){
if (_debug.verbose){
_debug.warning("UTMA has expired", VisualDebugMode.advanced);
};
_clearUTMA();
saveSO = true;
};
};
if (_SO.data.utmb){
if (!hasUTMB()){
_createUMTB();
};
_utmb.fromSharedObject(_SO.data.utmb);
if (_debug.verbose){
_debug.info(("found: " + _utmb.toString(true)), VisualDebugMode.geek);
};
if (_utmb.isExpired()){
if (_debug.verbose){
_debug.warning("UTMB has expired", VisualDebugMode.advanced);
};
_clearUTMB();
saveSO = true;
};
};
if (_SO.data.utmc){
delete _SO.data.utmc;
saveSO = true;
};
if (_SO.data.utmk){
if (!hasUTMK()){
_createUMTK();
};
_utmk.fromSharedObject(_SO.data.utmk);
if (_debug.verbose){
_debug.info(("found: " + _utmk.toString()), VisualDebugMode.geek);
};
};
if (_SO.data.utmv){
if (!hasUTMV()){
_createUMTV();
};
_utmv.fromSharedObject(_SO.data.utmv);
if (_debug.verbose){
_debug.info(("found: " + _utmv.toString(true)), VisualDebugMode.geek);
};
if (_utmv.isExpired()){
if (_debug.verbose){
_debug.warning("UTMV has expired", VisualDebugMode.advanced);
};
_clearUTMV();
saveSO = true;
};
};
if (_SO.data.utmz){
if (!hasUTMZ()){
_createUMTZ();
};
_utmz.fromSharedObject(_SO.data.utmz);
if (_debug.verbose){
_debug.info(("found: " + _utmz.toString(true)), VisualDebugMode.geek);
};
if (_utmz.isExpired()){
if (_debug.verbose){
_debug.warning("UTMZ has expired", VisualDebugMode.advanced);
};
_clearUTMZ();
saveSO = true;
};
};
if (saveSO){
save();
};
} else {
_OBJ = new Object();
if (data){
for (prop in data) {
_OBJ[prop] = data[prop];
};
};
};
_volatile = volatile;
}
public function clearCookies():void{
utma.reset();
utmb.reset();
utmc.reset();
utmz.reset();
utmv.reset();
utmk.reset();
}
public function save():void{
var flushStatus:String;
if (!isVolatile()){
flushStatus = null;
flushStatus = _SO.flush();
//unresolved jump
var _slot1 = e;
_debug.warning("Error...Could not write SharedObject to disk");
switch (flushStatus){
case SharedObjectFlushStatus.PENDING:
_debug.info("Requesting permission to save object...");
_SO.addEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus);
break;
case SharedObjectFlushStatus.FLUSHED:
_debug.info("Value flushed to disk.");
break;
};
};
}
public function get utmv():UTMV{
if (!hasUTMV()){
_createUMTV();
};
return (_utmv);
}
public function get utmz():UTMZ{
if (!hasUTMZ()){
_createUMTZ();
};
return (_utmz);
}
public function hasUTMA():Boolean{
if (_utma){
return (true);
};
return (false);
}
public function hasUTMB():Boolean{
if (_utmb){
return (true);
};
return (false);
}
public function hasUTMC():Boolean{
if (_utmc){
return (true);
};
return (false);
}
public function isGenuine():Boolean{
if (!hasUTMK()){
return (true);
};
return ((utmk.hash == generateCookiesHash()));
}
public function resetCurrentSession():void{
_clearUTMB();
_clearUTMC();
save();
}
public function hasUTMK():Boolean{
if (_utmk){
return (true);
};
return (false);
}
public function generateCookiesHash():Number{
var value:String = "";
value = (value + utma.valueOf());
value = (value + utmb.valueOf());
value = (value + utmc.valueOf());
value = (value + utmz.valueOf());
value = (value + utmv.valueOf());
return (Utils.generateHash(value));
}
private function _createUMTB():void{
_utmb = new UTMB();
_utmb.proxy = this;
}
private function _createUMTC():void{
_utmc = new UTMC();
}
private function _createUMTA():void{
_utma = new UTMA();
_utma.proxy = this;
}
public function hasUTMV():Boolean{
if (_utmv){
return (true);
};
return (false);
}
private function _createUMTK():void{
_utmk = new UTMK();
_utmk.proxy = this;
}
public function hasUTMZ():Boolean{
if (_utmz){
return (true);
};
return (false);
}
private function _createUMTV():void{
_utmv = new UTMV();
_utmv.proxy = this;
}
private function _onFlushStatus(event:NetStatusEvent):void{
_debug.info("User closed permission dialog...");
switch (event.info.code){
case "SharedObject.Flush.Success":
_debug.info("User granted permission -- value saved.");
break;
case "SharedObject.Flush.Failed":
_debug.info("User denied permission -- value not saved.");
break;
};
_SO.removeEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus);
}
private function _createUMTZ():void{
_utmz = new UTMZ();
_utmz.proxy = this;
}
public function updateUTMA(timestamp:Number):void{
if (_debug.verbose){
_debug.info((("updateUTMA( " + timestamp) + " )"), VisualDebugMode.advanced);
};
if (!utma.isEmpty()){
if (isNaN(utma.sessionCount)){
utma.sessionCount = 1;
} else {
utma.sessionCount = (utma.sessionCount + 1);
};
utma.lastTime = utma.currentTime;
utma.currentTime = timestamp;
};
}
private function _clearUTMA():void{
_utma = null;
if (!isVolatile()){
_SO.data.utma = null;
delete _SO.data.utma;
};
}
private function _clearUTMC():void{
_utmc = null;
}
private function _clearUTMB():void{
_utmb = null;
if (!isVolatile()){
_SO.data.utmb = null;
delete _SO.data.utmb;
};
}
public function update(name:String, value):void{
if (isVolatile()){
_OBJ[name] = value;
} else {
_SO.data[name] = value;
};
}
private function _clearUTMZ():void{
_utmz = null;
if (!isVolatile()){
_SO.data.utmz = null;
delete _SO.data.utmz;
};
}
private function _clearUTMV():void{
_utmv = null;
if (!isVolatile()){
_SO.data.utmv = null;
delete _SO.data.utmv;
};
}
public function isVolatile():Boolean{
return (_volatile);
}
public function get utma():UTMA{
if (!hasUTMA()){
_createUMTA();
};
return (_utma);
}
public function get utmb():UTMB{
if (!hasUTMB()){
_createUMTB();
};
return (_utmb);
}
public function get utmc():UTMC{
if (!hasUTMC()){
_createUMTC();
};
return (_utmc);
}
public function get utmk():UTMK{
if (!hasUTMK()){
_createUMTK();
};
return (_utmk);
}
}
}//package com.google.analytics.core
Section 14
//DocumentInfo (com.google.analytics.core.DocumentInfo)
package com.google.analytics.core {
import com.google.analytics.v4.*;
import com.google.analytics.external.*;
import com.google.analytics.utils.*;
public class DocumentInfo {
private var _config:Configuration;
private var _utmr:String;
private var _adSense:AdSenseGlobals;
private var _info:Environment;
private var _pageURL:String;
public function DocumentInfo(_arg1:Configuration, _arg2:Environment, _arg3:String, _arg4:String=null, _arg5:AdSenseGlobals=null){
_config = _arg1;
_info = _arg2;
_utmr = _arg3;
_pageURL = _arg4;
_adSense = _arg5;
}
public function get utmr():String{
if (!_utmr){
return ("-");
};
return (_utmr);
}
public function toURLString():String{
var _local1:Variables;
_local1 = toVariables();
return (_local1.toString());
}
private function _renderPageURL(_arg1:String=""):String{
var _local2:String;
var _local3:String;
_local2 = _info.locationPath;
_local3 = _info.locationSearch;
if (((!(_arg1)) || ((_arg1 == "")))){
_arg1 = (_local2 + unescape(_local3));
};
return (_arg1);
}
public function get utmp():String{
return (_renderPageURL(_pageURL));
}
private function _generateHitId():Number{
var _local1:Number;
if (((_adSense.hid) && (!((_adSense.hid == ""))))){
_local1 = Number(_adSense.hid);
} else {
_local1 = Math.round((Math.random() * 2147483647));
_adSense.hid = String(_local1);
};
return (_local1);
}
public function get utmhid():String{
return (String(_generateHitId()));
}
public function toVariables():Variables{
var _local1:Variables;
_local1 = new Variables();
_local1.URIencode = true;
if (((_config.detectTitle) && (!((utmdt == ""))))){
_local1.utmdt = utmdt;
};
_local1.utmhid = utmhid;
_local1.utmr = utmr;
_local1.utmp = utmp;
return (_local1);
}
public function get utmdt():String{
return (_info.documentTitle);
}
}
}//package com.google.analytics.core
Section 15
//Domain (com.google.analytics.core.Domain)
package com.google.analytics.core {
import com.google.analytics.debug.*;
public class Domain {
private var _mode:DomainNameMode;
private var _debug:DebugConfiguration;
private var _name:String;
public function Domain(mode:DomainNameMode=null, name:String="", debug:DebugConfiguration=null){
super();
_debug = debug;
if (mode == null){
mode = DomainNameMode.auto;
};
_mode = mode;
if (mode == DomainNameMode.custom){
this.name = name;
} else {
_name = name;
};
}
public function get mode():DomainNameMode{
return (_mode);
}
public function set mode(value:DomainNameMode):void{
_mode = value;
if (_mode == DomainNameMode.none){
_name = "";
};
}
public function get name():String{
return (_name);
}
public function set name(value:String):void{
if (((!((value.charAt(0) == "."))) && (_debug))){
_debug.warning(("missing leading period \".\", cookie will only be accessible on " + value), VisualDebugMode.geek);
};
_name = value;
}
}
}//package com.google.analytics.core
Section 16
//DomainNameMode (com.google.analytics.core.DomainNameMode)
package com.google.analytics.core {
public class DomainNameMode {
private var _value:int;
private var _name:String;
public static const custom:DomainNameMode = new DomainNameMode(2, "custom");
;
public static const none:DomainNameMode = new DomainNameMode(0, "none");
;
public static const auto:DomainNameMode = new DomainNameMode(1, "auto");
;
public function DomainNameMode(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.core
Section 17
//EventInfo (com.google.analytics.core.EventInfo)
package com.google.analytics.core {
import com.google.analytics.utils.*;
import com.google.analytics.data.*;
public class EventInfo {
private var _isEventHit:Boolean;
private var _ext10:X10;
private var _x10:X10;
public function EventInfo(_arg1:Boolean, _arg2:X10, _arg3:X10=null){
_isEventHit = _arg1;
_x10 = _arg2;
_ext10 = _arg3;
}
public function toURLString():String{
var _local1:Variables;
_local1 = toVariables();
return (_local1.toString());
}
public function get utmt():String{
return ("event");
}
public function get utme():String{
return (_x10.renderMergedUrlString(_ext10));
}
public function toVariables():Variables{
var _local1:Variables;
_local1 = new Variables();
_local1.URIencode = true;
if (_isEventHit){
_local1.utmt = utmt;
};
_local1.utme = utme;
return (_local1);
}
}
}//package com.google.analytics.core
Section 18
//EventTracker (com.google.analytics.core.EventTracker)
package com.google.analytics.core {
import com.google.analytics.v4.*;
public class EventTracker {
private var _parent:GoogleAnalyticsAPI;
public var name:String;
public function EventTracker(_arg1:String, _arg2:GoogleAnalyticsAPI){
this.name = _arg1;
_parent = _arg2;
}
public function trackEvent(_arg1:String, _arg2:String=null, _arg3:Number=NaN):Boolean{
return (_parent.trackEvent(name, _arg1, _arg2, _arg3));
}
}
}//package com.google.analytics.core
Section 19
//ga_internal (com.google.analytics.core.ga_internal)
package com.google.analytics.core {
public namespace ga_internal;
}//package com.google.analytics.core
Section 20
//GIFRequest (com.google.analytics.core.GIFRequest)
package com.google.analytics.core {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import com.google.analytics.utils.*;
import flash.system.*;
public class GIFRequest {
private var _info:Environment;
private var _count:int;
private var _utmac:String;
private var _alertcount:int;
private var _debug:DebugConfiguration;
private var _lastRequest:URLRequest;
private var _buffer:Buffer;
private var _config:Configuration;
private var _requests:Array;
public function GIFRequest(config:Configuration, debug:DebugConfiguration, buffer:Buffer, info:Environment){
super();
_config = config;
_debug = debug;
_buffer = buffer;
_info = info;
_count = 0;
_alertcount = 0;
_requests = [];
}
public function get utmn():String{
return ((Utils.generate32bitRandom() as String));
}
public function onIOError(event:IOErrorEvent):void{
var url:String = _lastRequest.url;
var id:String = String((_requests.length - 1));
var msg = (("Gif Request #" + id) + " failed");
if (_debug.GIFRequests){
if (!_debug.verbose){
if (url.indexOf("?") > -1){
url = url.split("?")[0];
};
url = _shortenURL(url);
};
if (int(_debug.mode) > int(VisualDebugMode.basic)){
msg = (msg + ((" \"" + url) + "\" does not exists or is unreachable"));
};
_debug.failure(msg);
} else {
_debug.warning(msg);
};
_removeListeners(event.target);
}
public function send(account:String, variables:Variables=null, force:Boolean=false, rateLimit:Boolean=false):void{
var localPath:String;
var localImage:URLRequest;
var remoteImage:URLRequest;
_utmac = account;
if (!variables){
variables = new Variables();
};
variables.URIencode = false;
variables.pre = ["utmwv", "utmn", "utmhn", "utmt", "utme", "utmcs", "utmsr", "utmsc", "utmul", "utmje", "utmfl", "utmdt", "utmhid", "utmr", "utmp"];
variables.post = ["utmcc"];
if (_debug.verbose){
_debug.info(((("tracking: " + _buffer.utmb.trackCount) + "/") + _config.trackingLimitPerSession), VisualDebugMode.geek);
};
if ((((_buffer.utmb.trackCount < _config.trackingLimitPerSession)) || (force))){
if (rateLimit){
updateToken();
};
if (((((force) || (!(rateLimit)))) || ((_buffer.utmb.token >= 1)))){
if (((!(force)) && (rateLimit))){
_buffer.utmb.token = (_buffer.utmb.token - 1);
};
_buffer.utmb.trackCount = (_buffer.utmb.trackCount + 1);
if (_debug.verbose){
_debug.info(_buffer.utmb.toString(), VisualDebugMode.geek);
};
variables.utmwv = utmwv;
variables.utmn = Utils.generate32bitRandom();
if (_info.domainName != ""){
variables.utmhn = _info.domainName;
};
if (_config.sampleRate < 1){
variables.utmsp = (_config.sampleRate * 100);
};
if ((((_config.serverMode == ServerOperationMode.local)) || ((_config.serverMode == ServerOperationMode.both)))){
localPath = _info.locationSWFPath;
if (localPath.lastIndexOf("/") > 0){
localPath = localPath.substring(0, localPath.lastIndexOf("/"));
};
localImage = new URLRequest();
if (_config.localGIFpath.indexOf("http") == 0){
localImage.url = _config.localGIFpath;
} else {
localImage.url = (localPath + _config.localGIFpath);
};
localImage.url = (localImage.url + ("?" + variables.toString()));
if (((_debug.active) && (_debug.GIFRequests))){
_debugSend(localImage);
} else {
sendRequest(localImage);
};
};
if ((((_config.serverMode == ServerOperationMode.remote)) || ((_config.serverMode == ServerOperationMode.both)))){
remoteImage = new URLRequest();
if (_info.protocol == Protocols.HTTPS){
remoteImage.url = _config.secureRemoteGIFpath;
} else {
if (_info.protocol == Protocols.HTTP){
remoteImage.url = _config.remoteGIFpath;
} else {
remoteImage.url = _config.remoteGIFpath;
};
};
variables.utmac = utmac;
variables.utmcc = encodeURIComponent(utmcc);
remoteImage.url = (remoteImage.url + ("?" + variables.toString()));
if (((_debug.active) && (_debug.GIFRequests))){
_debugSend(remoteImage);
} else {
sendRequest(remoteImage);
};
};
};
};
}
public function onSecurityError(event:SecurityErrorEvent):void{
if (_debug.GIFRequests){
_debug.failure(event.text);
};
}
public function get utmsp():String{
return (((_config.sampleRate * 100) as String));
}
public function get utmcc():String{
var cookies:Array = [];
if (_buffer.hasUTMA()){
cookies.push((_buffer.utma.toURLString() + ";"));
};
if (_buffer.hasUTMZ()){
cookies.push((_buffer.utmz.toURLString() + ";"));
};
if (_buffer.hasUTMV()){
cookies.push((_buffer.utmv.toURLString() + ";"));
};
return (cookies.join("+"));
}
public function get utmac():String{
return (_utmac);
}
public function get utmwv():String{
return (_config.version);
}
public function sendRequest(request:URLRequest):void{
var request = request;
var loader:Loader = new Loader();
loader.name = String(_count++);
var context:LoaderContext = new LoaderContext(false);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
_lastRequest = request;
_requests[loader.name] = new RequestObject(request);
loader.load(request, context);
//unresolved jump
var _slot1 = e;
_debug.failure("\"Loader.load()\" could not instanciate Gif Request");
}
private function _removeListeners(target:Object):void{
target.removeEventListener(IOErrorEvent.IO_ERROR, onIOError);
target.removeEventListener(Event.COMPLETE, onComplete);
}
public function updateToken():void{
var tokenDelta:Number;
var timestamp:Number = new Date().getTime();
tokenDelta = ((timestamp - _buffer.utmb.lastTime) * (_config.tokenRate / 1000));
if (_debug.verbose){
_debug.info(("tokenDelta: " + tokenDelta), VisualDebugMode.geek);
};
if (tokenDelta >= 1){
_buffer.utmb.token = Math.min(Math.floor((_buffer.utmb.token + tokenDelta)), _config.bucketCapacity);
_buffer.utmb.lastTime = timestamp;
if (_debug.verbose){
_debug.info(_buffer.utmb.toString(), VisualDebugMode.geek);
};
};
}
public function get utmhn():String{
return (_info.domainName);
}
private function _shortenURL(url:String):String{
var paths:Array;
if (url.length > 60){
paths = url.split("/");
while (url.length > 60) {
paths.shift();
url = ("../" + paths.join("/"));
};
};
return (url);
}
private function _debugSend(request:URLRequest):void{
var _local3:String;
var data:String = "";
switch (_debug.mode){
case VisualDebugMode.geek:
data = ((("Gif Request #" + _alertcount) + ":\n") + request.url);
break;
case VisualDebugMode.advanced:
_local3 = request.url;
if (_local3.indexOf("?") > -1){
_local3 = _local3.split("?")[0];
};
_local3 = _shortenURL(_local3);
data = (((("Send Gif Request #" + _alertcount) + ":\n") + _local3) + " ?");
break;
case VisualDebugMode.basic:
default:
data = (((("Send " + _config.serverMode.toString()) + " Gif Request #") + _alertcount) + " ?");
};
_debug.alertGifRequest(data, request, this);
_alertcount++;
}
public function onComplete(event:Event):void{
var id:String = event.target.loader.name;
_requests[id].complete();
var msg = (("Gif Request #" + id) + " sent");
var url:String = _requests[id].request.url;
if (_debug.GIFRequests){
if (!_debug.verbose){
if (url.indexOf("?") > -1){
url = url.split("?")[0];
};
url = _shortenURL(url);
};
if (int(_debug.mode) > int(VisualDebugMode.basic)){
msg = (msg + ((" to \"" + url) + "\""));
};
_debug.success(msg);
} else {
_debug.info(msg);
};
_removeListeners(event.target);
}
}
}//package com.google.analytics.core
Section 21
//IdleTimer (com.google.analytics.core.IdleTimer)
package com.google.analytics.core {
import flash.display.*;
import flash.events.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import flash.utils.*;
public class IdleTimer {
private var _loop:Timer;
private var _stage:Stage;
private var _lastMove:int;
private var _debug:DebugConfiguration;
private var _session:Timer;
private var _inactivity:Number;
private var _buffer:Buffer;
public function IdleTimer(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:DisplayObject, _arg4:Buffer){
var _local5:Number;
var _local6:Number;
var _local7:Number;
super();
_local5 = _arg1.idleLoop;
_local6 = _arg1.idleTimeout;
_local7 = _arg1.sessionTimeout;
_loop = new Timer((_local5 * 1000));
_session = new Timer((_local7 * 1000), 1);
_debug = _arg2;
_stage = _arg3.stage;
_buffer = _arg4;
_lastMove = getTimer();
_inactivity = (_local6 * 1000);
_loop.addEventListener(TimerEvent.TIMER, checkForIdle);
_session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession);
_stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
_debug.info(((((("delay: " + _local5) + "sec , inactivity: ") + _local6) + "sec, sessionTimeout: ") + _local7), VisualDebugMode.geek);
_loop.start();
}
private function onMouseMove(_arg1:MouseEvent):void{
_lastMove = getTimer();
if (_session.running){
_debug.info("session timer reset", VisualDebugMode.geek);
_session.reset();
};
}
public function endSession(_arg1:TimerEvent):void{
_session.removeEventListener(TimerEvent.TIMER_COMPLETE, endSession);
_debug.info("session timer end session", VisualDebugMode.geek);
_session.reset();
_buffer.resetCurrentSession();
_debug.info(_buffer.utmb.toString(), VisualDebugMode.geek);
_debug.info(_buffer.utmc.toString(), VisualDebugMode.geek);
_session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession);
}
public function checkForIdle(_arg1:TimerEvent):void{
var _local2:int;
_local2 = getTimer();
if ((_local2 - _lastMove) >= _inactivity){
if (!_session.running){
_debug.info("session timer start", VisualDebugMode.geek);
_session.start();
};
};
}
}
}//package com.google.analytics.core
Section 22
//Organic (com.google.analytics.core.Organic)
package com.google.analytics.core {
import com.google.analytics.utils.*;
public class Organic {
private var _sourcesCache:Array;
private var _sourcesEngine:Array;
private var _ignoredKeywords:Array;
private var _ignoredReferralsCache:Object;
private var _ignoredReferrals:Array;
private var _ignoredKeywordsCache:Object;
private var _sources:Array;
public static var throwErrors:Boolean = false;
public function Organic(){
_sources = [];
_sourcesCache = [];
_sourcesEngine = [];
_ignoredReferrals = [];
_ignoredReferralsCache = {};
_ignoredKeywords = [];
_ignoredKeywordsCache = {};
}
public function getKeywordValue(_arg1:OrganicReferrer, _arg2:String):String{
var _local3:String;
_local3 = _arg1.keyword;
return (getKeywordValueFromPath(_local3, _arg2));
}
public function isIgnoredKeyword(_arg1:String):Boolean{
if (_ignoredKeywordsCache.hasOwnProperty(_arg1)){
return (true);
};
return (false);
}
public function isIgnoredReferral(_arg1:String):Boolean{
if (_ignoredReferralsCache.hasOwnProperty(_arg1)){
return (true);
};
return (false);
}
public function clear():void{
clearEngines();
clearIgnoredReferrals();
clearIgnoredKeywords();
}
public function get ignoredKeywordsCount():int{
return (_ignoredKeywords.length);
}
public function match(_arg1:String):Boolean{
if (_arg1 == ""){
return (false);
};
_arg1 = _arg1.toLowerCase();
if (_sourcesEngine[_arg1] != undefined){
return (true);
};
return (false);
}
public function get count():int{
return (_sources.length);
}
public function addSource(_arg1:String, _arg2:String):void{
var _local3:OrganicReferrer;
_local3 = new OrganicReferrer(_arg1, _arg2);
if (_sourcesCache[_local3.toString()] == undefined){
_sources.push(_local3);
_sourcesCache[_local3.toString()] = (_sources.length - 1);
if (_sourcesEngine[_local3.engine] == undefined){
_sourcesEngine[_local3.engine] = [(_sources.length - 1)];
} else {
_sourcesEngine[_local3.engine].push((_sources.length - 1));
};
} else {
if (throwErrors){
throw (new Error((_local3.toString() + " already exists, we don't add it.")));
};
};
}
public function clearIgnoredKeywords():void{
_ignoredKeywords = [];
_ignoredKeywordsCache = {};
}
public function clearEngines():void{
_sources = [];
_sourcesCache = [];
_sourcesEngine = [];
}
public function get ignoredReferralsCount():int{
return (_ignoredReferrals.length);
}
public function addIgnoredReferral(_arg1:String):void{
if (_ignoredReferralsCache[_arg1] == undefined){
_ignoredReferrals.push(_arg1);
_ignoredReferralsCache[_arg1] = (_ignoredReferrals.length - 1);
} else {
if (throwErrors){
throw (new Error((("\"" + _arg1) + "\" already exists, we don't add it.")));
};
};
}
public function clearIgnoredReferrals():void{
_ignoredReferrals = [];
_ignoredReferralsCache = {};
}
public function getReferrerByName(_arg1:String):OrganicReferrer{
var _local2:int;
if (match(_arg1)){
_local2 = _sourcesEngine[_arg1][0];
return (_sources[_local2]);
};
return (null);
}
public function addIgnoredKeyword(_arg1:String):void{
if (_ignoredKeywordsCache[_arg1] == undefined){
_ignoredKeywords.push(_arg1);
_ignoredKeywordsCache[_arg1] = (_ignoredKeywords.length - 1);
} else {
if (throwErrors){
throw (new Error((("\"" + _arg1) + "\" already exists, we don't add it.")));
};
};
}
public function get sources():Array{
return (_sources);
}
public static function getKeywordValueFromPath(_arg1:String, _arg2:String):String{
var _local3:String;
var _local4:Variables;
if (_arg2.indexOf((_arg1 + "=")) > -1){
if (_arg2.charAt(0) == "?"){
_arg2 = _arg2.substr(1);
};
_arg2 = _arg2.split("+").join("%20");
_local4 = new Variables(_arg2);
_local3 = _local4[_arg1];
};
return (_local3);
}
}
}//package com.google.analytics.core
Section 23
//OrganicReferrer (com.google.analytics.core.OrganicReferrer)
package com.google.analytics.core {
public class OrganicReferrer {
private var _engine:String;
private var _keyword:String;
public function OrganicReferrer(_arg1:String, _arg2:String){
this.engine = _arg1;
this.keyword = _arg2;
}
public function set engine(_arg1:String):void{
_engine = _arg1.toLowerCase();
}
public function get keyword():String{
return (_keyword);
}
public function toString():String{
return (((engine + "?") + keyword));
}
public function get engine():String{
return (_engine);
}
public function set keyword(_arg1:String):void{
_keyword = _arg1.toLowerCase();
}
}
}//package com.google.analytics.core
Section 24
//RequestObject (com.google.analytics.core.RequestObject)
package com.google.analytics.core {
import flash.net.*;
import flash.utils.*;
public class RequestObject {
public var start:int;
public var request:URLRequest;
public var end:int;
public function RequestObject(_arg1:URLRequest){
start = getTimer();
this.request = _arg1;
}
public function toString():String{
var _local1:Array;
_local1 = [];
_local1.push((("duration: " + duration) + "ms"));
_local1.push(("url: " + request.url));
return ((("{ " + _local1.join(", ")) + " }"));
}
public function get duration():int{
if (!hasCompleted()){
return (0);
};
return ((end - start));
}
public function hasCompleted():Boolean{
return ((end > 0));
}
public function complete():void{
end = getTimer();
}
}
}//package com.google.analytics.core
Section 25
//ServerOperationMode (com.google.analytics.core.ServerOperationMode)
package com.google.analytics.core {
public class ServerOperationMode {
private var _value:int;
private var _name:String;
public static const both:ServerOperationMode = new ServerOperationMode(2, "both");
;
public static const remote:ServerOperationMode = new ServerOperationMode(1, "remote");
;
public static const local:ServerOperationMode = new ServerOperationMode(0, "local");
;
public function ServerOperationMode(value:int=0, name:String=""){
super();
_value = value;
_name = name;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.core
Section 26
//TrackerCache (com.google.analytics.core.TrackerCache)
package com.google.analytics.core {
import com.google.analytics.v4.*;
import flash.errors.*;
public class TrackerCache implements GoogleAnalyticsAPI {
public var tracker:GoogleAnalyticsAPI;
private var _ar:Array;
public static var CACHE_THROW_ERROR:Boolean;
public function TrackerCache(tracker:GoogleAnalyticsAPI=null){
super();
this.tracker = tracker;
_ar = [];
}
public function size():uint{
return (_ar.length);
}
public function flush():void{
var o:Object;
var name:String;
var args:Array;
var l:int;
var i:int;
if (tracker == null){
return;
};
if (size() > 0){
l = _ar.length;
while (i < l) {
o = _ar.shift();
name = (o.name as String);
args = (o.args as Array);
if (((!((name == null))) && ((name in tracker)))){
(tracker[name] as Function).apply(tracker, args);
};
i++;
};
};
}
public function enqueue(name:String, ... _args):Boolean{
if (name == null){
return (false);
};
_ar.push({name:name, args:_args});
return (true);
}
public function link(targetUrl:String, useHash:Boolean=false):void{
enqueue("link", targetUrl, useHash);
}
public function addOrganic(newOrganicEngine:String, newOrganicKeyword:String):void{
enqueue("addOrganic", newOrganicEngine, newOrganicKeyword);
}
public function setAllowLinker(enable:Boolean):void{
enqueue("setAllowLinker", enable);
}
public function trackEvent(category:String, action:String, label:String=null, value:Number=NaN):Boolean{
enqueue("trackEvent", category, action, label, value);
return (true);
}
public function getClientInfo():Boolean{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getClientInfo' method for the moment."));
};
return (false);
}
public function trackTrans():void{
enqueue("trackTrans");
}
public function trackPageview(pageURL:String=""):void{
enqueue("trackPageview", pageURL);
}
public function setClientInfo(enable:Boolean):void{
enqueue("setClientInfo", enable);
}
public function linkByPost(formObject:Object, useHash:Boolean=false):void{
enqueue("linkByPost", formObject, useHash);
}
public function setCookieTimeout(newDefaultTimeout:int):void{
enqueue("setCookieTimeout", newDefaultTimeout);
}
public function isEmpty():Boolean{
return ((_ar.length == 0));
}
public function getDetectTitle():Boolean{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectTitle' method for the moment."));
};
return (false);
}
public function resetSession():void{
enqueue("resetSession");
}
public function setDetectFlash(enable:Boolean):void{
enqueue("setDetectFlash", enable);
}
public function clear():void{
_ar = [];
}
public function setCampNameKey(newCampNameKey:String):void{
enqueue("setCampNameKey", newCampNameKey);
}
public function addItem(item:String, sku:String, name:String, category:String, price:Number, quantity:int):void{
enqueue("addItem", item, sku, name, category, price, quantity);
}
public function createEventTracker(objName:String):EventTracker{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'createEventTracker' method for the moment."));
};
return (null);
}
public function setVar(newVal:String):void{
enqueue("setVar", newVal);
}
public function clearIgnoredOrganic():void{
enqueue("clearIgnoredOrganic");
}
public function setDomainName(newDomainName:String):void{
enqueue("setDomainName", newDomainName);
}
public function setCampSourceKey(newCampSrcKey:String):void{
enqueue("setCampSourceKey", newCampSrcKey);
}
public function addTrans(orderId:String, affiliation:String, total:Number, tax:Number, shipping:Number, city:String, state:String, country:String):Object{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'addTrans' method for the moment."));
};
return (null);
}
public function setCampContentKey(newCampContentKey:String):void{
enqueue("setCampContentKey", newCampContentKey);
}
public function setLocalServerMode():void{
enqueue("setLocalServerMode");
}
public function getLocalGifPath():String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getLocalGifPath' method for the moment."));
};
return ("");
}
public function setAllowAnchor(enable:Boolean):void{
enqueue("setAllowAnchor", enable);
}
public function clearIgnoredRef():void{
enqueue("clearIgnoredRef");
}
public function setLocalGifPath(newLocalGifPath:String):void{
enqueue("setLocalGifPath", newLocalGifPath);
}
public function getVersion():String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getVersion' method for the moment."));
};
return ("");
}
public function setCookiePath(newCookiePath:String):void{
enqueue("setCookiePath", newCookiePath);
}
public function setSampleRate(newRate:Number):void{
enqueue("setSampleRate", newRate);
}
public function setDetectTitle(enable:Boolean):void{
enqueue("setDetectTitle", enable);
}
public function setAllowHash(enable:Boolean):void{
enqueue("setAllowHash", enable);
}
public function addIgnoredOrganic(newIgnoredOrganicKeyword:String):void{
enqueue("addIgnoredOrganic", newIgnoredOrganicKeyword);
}
public function setCampNOKey(newCampNOKey:String):void{
enqueue("setCampNOKey", newCampNOKey);
}
public function getServiceMode():ServerOperationMode{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getServiceMode' method for the moment."));
};
return (null);
}
public function setLocalRemoteServerMode():void{
enqueue("setLocalRemoteServerMode");
}
public function cookiePathCopy(newPath:String):void{
enqueue("cookiePathCopy", newPath);
}
public function getDetectFlash():Boolean{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectFlash' method for the moment."));
};
return (false);
}
public function setCampaignTrack(enable:Boolean):void{
enqueue("setCampaignTrack", enable);
}
public function clearOrganic():void{
enqueue("clearOrganic");
}
public function setCampTermKey(newCampTermKey:String):void{
enqueue("setCampTermKey", newCampTermKey);
}
public function addIgnoredRef(newIgnoredReferrer:String):void{
enqueue("addIgnoredRef", newIgnoredReferrer);
}
public function setCampMediumKey(newCampMedKey:String):void{
enqueue("setCampMediumKey", newCampMedKey);
}
public function setSessionTimeout(newTimeout:int):void{
enqueue("setSessionTimeout", newTimeout);
}
public function setRemoteServerMode():void{
enqueue("setRemoteServerMode");
}
public function element(){
return (_ar[0]);
}
public function getAccount():String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getAccount' method for the moment."));
};
return ("");
}
}
}//package com.google.analytics.core
Section 27
//TrackerMode (com.google.analytics.core.TrackerMode)
package com.google.analytics.core {
public class TrackerMode {
public static const BRIDGE:String = "Bridge";
public static const AS3:String = "AS3";
}
}//package com.google.analytics.core
Section 28
//Utils (com.google.analytics.core.Utils)
package com.google.analytics.core {
public class Utils {
public static function trim(_arg1:String, _arg2:Boolean=false):String{
var _local3:Array;
var _local4:String;
var _local5:int;
var _local6:int;
var _local7:int;
if (_arg1 == ""){
return ("");
};
_local3 = [" ", "\n", "\r", "\t"];
_local4 = _arg1;
if (_arg2){
_local5 = 0;
while ((((_local5 < _local3.length)) && ((_local4.indexOf(_local3[_local5]) > -1)))) {
_local4 = _local4.split(_local3[_local5]).join("");
_local5++;
};
} else {
_local6 = 0;
while ((((_local6 < _local4.length)) && ((_local3.indexOf(_local4.charAt(_local6)) > -1)))) {
_local6++;
};
_local4 = _local4.substr(_local6);
_local7 = (_local4.length - 1);
while ((((_local7 >= 0)) && ((_local3.indexOf(_local4.charAt(_local7)) > -1)))) {
_local7--;
};
_local4 = _local4.substring(0, (_local7 + 1));
};
return (_local4);
}
public static function generateHash(_arg1:String):int{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = 1;
_local3 = 0;
if (((!((_arg1 == null))) && (!((_arg1 == ""))))){
_local2 = 0;
_local4 = (_arg1.length - 1);
while (_local4 >= 0) {
_local5 = _arg1.charCodeAt(_local4);
_local2 = ((((_local2 << 6) & 268435455) + _local5) + (_local5 << 14));
_local3 = (_local2 & 266338304);
if (_local3 != 0){
_local2 = (_local2 ^ (_local3 >> 21));
};
_local4--;
};
};
return (_local2);
}
public static function generate32bitRandom():int{
return (Math.round((Math.random() * 2147483647)));
}
public static function validateAccount(_arg1:String):Boolean{
var _local2:RegExp;
_local2 = /^UA-[0-9]*-[0-9]*$/;
return (_local2.test(_arg1));
}
}
}//package com.google.analytics.core
Section 29
//Cookie (com.google.analytics.data.Cookie)
package com.google.analytics.data {
public interface Cookie {
function fromSharedObject(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/data;Cookie.as:Object):void;
function toURLString():String;
function get creation():Date;
function toSharedObject():Object;
function isExpired():Boolean;
function set creation(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/data;Cookie.as:Date):void;
function set expiration(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/data;Cookie.as:Date):void;
function get expiration():Date;
}
}//package com.google.analytics.data
Section 30
//UTMA (com.google.analytics.data.UTMA)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMA extends UTMCookie {
private var _sessionId:Number;
private var _domainHash:Number;
private var _firstTime:Number;
private var _currentTime:Number;
private var _lastTime:Number;
private var _sessionCount:Number;
public function UTMA(domainHash:Number=NaN, sessionId:Number=NaN, firstTime:Number=NaN, lastTime:Number=NaN, currentTime:Number=NaN, sessionCount:Number=NaN){
super("utma", "__utma", ["domainHash", "sessionId", "firstTime", "lastTime", "currentTime", "sessionCount"], (Timespan.twoyears * 1000));
this.domainHash = domainHash;
this.sessionId = sessionId;
this.firstTime = firstTime;
this.lastTime = lastTime;
this.currentTime = currentTime;
this.sessionCount = sessionCount;
}
public function get lastTime():Number{
return (_lastTime);
}
public function set lastTime(value:Number):void{
_lastTime = value;
update();
}
public function set currentTime(value:Number):void{
_currentTime = value;
update();
}
public function get sessionId():Number{
return (_sessionId);
}
public function get sessionCount():Number{
return (_sessionCount);
}
public function get firstTime():Number{
return (_firstTime);
}
public function get currentTime():Number{
return (_currentTime);
}
public function set domainHash(value:Number):void{
_domainHash = value;
update();
}
public function set sessionId(value:Number):void{
_sessionId = value;
update();
}
public function set sessionCount(value:Number):void{
_sessionCount = value;
update();
}
public function get domainHash():Number{
return (_domainHash);
}
public function set firstTime(value:Number):void{
_firstTime = value;
update();
}
}
}//package com.google.analytics.data
Section 31
//UTMB (com.google.analytics.data.UTMB)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMB extends UTMCookie {
private var _trackCount:Number;
private var _lastTime:Number;
private var _domainHash:Number;
private var _token:Number;
public static var defaultTimespan:Number = Timespan.thirtyminutes;
public function UTMB(domainHash:Number=NaN, trackCount:Number=NaN, token:Number=NaN, lastTime:Number=NaN){
super("utmb", "__utmb", ["domainHash", "trackCount", "token", "lastTime"], (defaultTimespan * 1000));
this.domainHash = domainHash;
this.trackCount = trackCount;
this.token = token;
this.lastTime = lastTime;
}
public function set token(value:Number):void{
_token = value;
update();
}
public function set trackCount(value:Number):void{
_trackCount = value;
update();
}
public function get lastTime():Number{
return (_lastTime);
}
public function set domainHash(value:Number):void{
_domainHash = value;
update();
}
public function set lastTime(value:Number):void{
_lastTime = value;
update();
}
public function get domainHash():Number{
return (_domainHash);
}
public function get token():Number{
return (_token);
}
public function get trackCount():Number{
return (_trackCount);
}
}
}//package com.google.analytics.data
Section 32
//UTMC (com.google.analytics.data.UTMC)
package com.google.analytics.data {
public class UTMC extends UTMCookie {
private var _domainHash:Number;
public function UTMC(_arg1:Number=NaN){
super("utmc", "__utmc", ["domainHash"]);
this.domainHash = _arg1;
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
public function get domainHash():Number{
return (_domainHash);
}
}
}//package com.google.analytics.data
Section 33
//UTMCookie (com.google.analytics.data.UTMCookie)
package com.google.analytics.data {
import com.google.analytics.core.*;
public class UTMCookie implements Cookie {
protected var inURL:String;
protected var name:String;
private var _creation:Date;
private var _expiration:Date;
public var proxy:Buffer;
private var _timespan:Number;
protected var fields:Array;
public function UTMCookie(_arg1:String, _arg2:String, _arg3:Array, _arg4:Number=0){
this.name = _arg1;
this.inURL = _arg2;
this.fields = _arg3;
_timestamp(_arg4);
}
public function isEmpty():Boolean{
var _local1:int;
var _local2:String;
var _local3:int;
_local1 = 0;
_local3 = 0;
while (_local3 < fields.length) {
_local2 = fields[_local3];
if ((((this[_local2] is Number)) && (isNaN(this[_local2])))){
_local1++;
} else {
if ((((this[_local2] is String)) && ((this[_local2] == "")))){
_local1++;
};
};
_local3++;
};
if (_local1 == fields.length){
return (true);
};
return (false);
}
protected function update():void{
resetTimestamp();
if (proxy){
proxy.update(name, toSharedObject());
};
}
public function fromSharedObject(_arg1:Object):void{
var _local2:String;
var _local3:int;
var _local4:int;
_local3 = fields.length;
_local4 = 0;
while (_local4 < _local3) {
_local2 = fields[_local4];
if (_arg1[_local2]){
this[_local2] = _arg1[_local2];
};
_local4++;
};
if (_arg1.creation){
this.creation = _arg1.creation;
};
if (_arg1.expiration){
this.expiration = _arg1.expiration;
};
}
private function _timestamp(_arg1:Number):void{
creation = new Date();
_timespan = _arg1;
if (_arg1 > 0){
expiration = new Date((creation.valueOf() + _arg1));
};
}
public function isExpired():Boolean{
var _local1:Date;
var _local2:Number;
_local1 = new Date();
_local2 = (expiration.valueOf() - _local1.valueOf());
if (_local2 <= 0){
return (true);
};
return (false);
}
public function set expiration(_arg1:Date):void{
_expiration = _arg1;
}
public function get creation():Date{
return (_creation);
}
public function reset():void{
var _local1:String;
var _local2:int;
_local2 = 0;
while (_local2 < fields.length) {
_local1 = fields[_local2];
if ((this[_local1] is Number)){
this[_local1] = NaN;
} else {
if ((this[_local1] is String)){
this[_local1] = "";
};
};
_local2++;
};
resetTimestamp();
update();
}
public function valueOf():String{
var _local1:Array;
var _local2:String;
var _local3:*;
var _local4:int;
_local1 = [];
_local4 = 0;
while (_local4 < fields.length) {
_local2 = fields[_local4];
_local3 = this[_local2];
if ((_local3 is String)){
if (_local3 == ""){
_local3 = "-";
_local1.push(_local3);
} else {
_local1.push(_local3);
};
} else {
if ((_local3 is Number)){
if (_local3 == 0){
_local1.push(_local3);
} else {
if (isNaN(_local3)){
_local3 = "-";
_local1.push(_local3);
} else {
_local1.push(_local3);
};
};
};
};
_local4++;
};
return (("" + _local1.join(".")));
}
public function resetTimestamp(_arg1:Number=NaN):void{
if (!isNaN(_arg1)){
_timespan = _arg1;
};
_creation = null;
_expiration = null;
_timestamp(_timespan);
}
public function get expiration():Date{
if (_expiration){
return (_expiration);
};
return (new Date((new Date().valueOf() + 1000)));
}
public function toURLString():String{
return (((inURL + "=") + valueOf()));
}
public function toSharedObject():Object{
var _local1:Object;
var _local2:String;
var _local3:*;
var _local4:int;
_local1 = {};
_local4 = 0;
for (;_local4 < fields.length;_local4++) {
_local2 = fields[_local4];
_local3 = this[_local2];
if ((_local3 is String)){
_local1[_local2] = _local3;
} else {
if (_local3 == 0){
_local1[_local2] = _local3;
} else {
if (isNaN(_local3)){
continue;
} else {
_local1[_local2] = _local3;
};
};
};
};
_local1.creation = creation;
_local1.expiration = expiration;
return (_local1);
}
public function toString(_arg1:Boolean=false):String{
var _local2:Array;
var _local3:String;
var _local4:*;
var _local5:int;
var _local6:int;
var _local7:String;
_local2 = [];
_local5 = fields.length;
_local6 = 0;
for (;_local6 < _local5;_local6++) {
_local3 = fields[_local6];
_local4 = this[_local3];
if ((_local4 is String)){
_local2.push((((_local3 + ": \"") + _local4) + "\""));
} else {
if (_local4 == 0){
_local2.push(((_local3 + ": ") + _local4));
} else {
if (isNaN(_local4)){
continue;
} else {
_local2.push(((_local3 + ": ") + _local4));
};
};
};
};
_local7 = (((name.toUpperCase() + " {") + _local2.join(", ")) + "}");
if (_arg1){
_local7 = (_local7 + (((" creation:" + creation) + ", expiration:") + expiration));
};
return (_local7);
}
public function set creation(_arg1:Date):void{
_creation = _arg1;
}
}
}//package com.google.analytics.data
Section 34
//UTMK (com.google.analytics.data.UTMK)
package com.google.analytics.data {
public class UTMK extends UTMCookie {
private var _hash:Number;
public function UTMK(hash:Number=NaN){
super("utmk", "__utmk", ["hash"]);
this.hash = hash;
}
public function set hash(value:Number):void{
_hash = value;
update();
}
public function get hash():Number{
return (_hash);
}
}
}//package com.google.analytics.data
Section 35
//UTMV (com.google.analytics.data.UTMV)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMV extends UTMCookie {
private var _domainHash:Number;
private var _value:String;
public function UTMV(domainHash:Number=NaN, value:String=""){
super("utmv", "__utmv", ["domainHash", "value"], (Timespan.twoyears * 1000));
this.domainHash = domainHash;
this.value = value;
}
override public function toURLString():String{
return (((inURL + "=") + encodeURI(valueOf())));
}
public function get value():String{
return (_value);
}
public function get domainHash():Number{
return (_domainHash);
}
public function set domainHash(value:Number):void{
_domainHash = value;
update();
}
public function set value(value:String):void{
_value = value;
update();
}
}
}//package com.google.analytics.data
Section 36
//UTMZ (com.google.analytics.data.UTMZ)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMZ extends UTMCookie {
private var _campaignTracking:String;
private var _campaignCreation:Number;
private var _responseCount:Number;
private var _domainHash:Number;
private var _campaignSessions:Number;
public static var defaultTimespan:Number = Timespan.sixmonths;
public function UTMZ(domainHash:Number=NaN, campaignCreation:Number=NaN, campaignSessions:Number=NaN, responseCount:Number=NaN, campaignTracking:String=""){
super("utmz", "__utmz", ["domainHash", "campaignCreation", "campaignSessions", "responseCount", "campaignTracking"], (defaultTimespan * 1000));
this.domainHash = domainHash;
this.campaignCreation = campaignCreation;
this.campaignSessions = campaignSessions;
this.responseCount = responseCount;
this.campaignTracking = campaignTracking;
}
public function set responseCount(value:Number):void{
_responseCount = value;
update();
}
public function set domainHash(value:Number):void{
_domainHash = value;
update();
}
public function set campaignCreation(value:Number):void{
_campaignCreation = value;
update();
}
public function get campaignTracking():String{
return (_campaignTracking);
}
public function get campaignSessions():Number{
return (_campaignSessions);
}
public function get domainHash():Number{
return (_domainHash);
}
public function get responseCount():Number{
return (_responseCount);
}
public function get campaignCreation():Number{
return (_campaignCreation);
}
public function set campaignSessions(value:Number):void{
_campaignSessions = value;
update();
}
public function set campaignTracking(value:String):void{
_campaignTracking = value;
update();
}
}
}//package com.google.analytics.data
Section 37
//X10 (com.google.analytics.data.X10)
package com.google.analytics.data {
public class X10 {
private var _delimEnd:String;// = ")"
private var _delimSet:String;// = "*"
private var _escapeChar:String;// = "'"
private var _delimBegin:String;// = "("
private var _delimNumValue:String;// = "!"
private var _key:String;// = "k"
private var _set:Array;
private var _projectData:Object;
private var _hasData:int;
private var _escapeCharMap:Object;
private var _minimum:int;
private var _value:String;// = "v"
public function X10(){
_key = "k";
_value = "v";
_set = [_key, _value];
_delimBegin = "(";
_delimEnd = ")";
_delimSet = "*";
_delimNumValue = "!";
_escapeChar = "'";
super();
_projectData = {};
_escapeCharMap = {};
_escapeCharMap[_escapeChar] = "'0";
_escapeCharMap[_delimEnd] = "'1";
_escapeCharMap[_delimSet] = "'2";
_escapeCharMap[_delimNumValue] = "'3";
_minimum = 1;
}
private function _clearInternal(_arg1:Number, _arg2:String):void{
var _local3:Boolean;
var _local4:int;
var _local5:int;
if (((hasProject(_arg1)) && (!((_projectData[_arg1][_arg2] == undefined))))){
_projectData[_arg1][_arg2] = undefined;
_local3 = true;
_local5 = _set.length;
_local4 = 0;
while (_local4 < _local5) {
if (_projectData[_arg1][_set[_local4]] != undefined){
_local3 = false;
break;
};
_local4++;
};
if (_local3){
_projectData[_arg1] = undefined;
_hasData = (_hasData - 1);
};
};
}
public function hasData():Boolean{
return ((_hasData > 0));
}
private function _setInternal(_arg1:Number, _arg2:String, _arg3:Number, _arg4:String):void{
if (!hasProject(_arg1)){
_projectData[_arg1] = {};
};
if (_projectData[_arg1][_arg2] == undefined){
_projectData[_arg1][_arg2] = [];
};
_projectData[_arg1][_arg2][_arg3] = _arg4;
_hasData = (_hasData + 1);
}
public function hasProject(_arg1:Number):Boolean{
return (_projectData[_arg1]);
}
public function clearKey(_arg1:Number):void{
_clearInternal(_arg1, _key);
}
private function _renderDataType(_arg1:Array):String{
var _local2:Array;
var _local3:String;
var _local4:int;
_local2 = [];
_local4 = 0;
while (_local4 < _arg1.length) {
if (_arg1[_local4] != undefined){
_local3 = "";
if (((!((_local4 == _minimum))) && ((_arg1[(_local4 - 1)] == undefined)))){
_local3 = (_local3 + _local4.toString());
_local3 = (_local3 + _delimNumValue);
};
_local3 = (_local3 + _escapeExtensibleValue(_arg1[_local4]));
_local2.push(_local3);
};
_local4++;
};
return (((_delimBegin + _local2.join(_delimSet)) + _delimEnd));
}
public function getKey(_arg1:Number, _arg2:Number):String{
return ((_getInternal(_arg1, _key, _arg2) as String));
}
public function clearValue(_arg1:Number):void{
_clearInternal(_arg1, _value);
}
public function renderMergedUrlString(_arg1:X10=null):String{
var _local2:Array;
var _local3:String;
if (!_arg1){
return (renderUrlString());
};
_local2 = [_arg1.renderUrlString()];
for (_local3 in _projectData) {
if (((hasProject(Number(_local3))) && (!(_arg1.hasProject(Number(_local3)))))){
_local2.push((_local3 + _renderProject(_projectData[_local3])));
};
};
return (_local2.join(""));
}
public function setValue(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
if (((((!((Math.round(_arg3) == _arg3))) || (isNaN(_arg3)))) || ((_arg3 == Infinity)))){
return (false);
};
_setInternal(_arg1, _value, _arg2, _arg3.toString());
return (true);
}
public function renderUrlString():String{
var _local1:Array;
var _local2:String;
_local1 = [];
for (_local2 in _projectData) {
if (hasProject(Number(_local2))){
_local1.push((_local2 + _renderProject(_projectData[_local2])));
};
};
return (_local1.join(""));
}
private function _getInternal(_arg1:Number, _arg2:String, _arg3:Number):Object{
if (((hasProject(_arg1)) && (!((_projectData[_arg1][_arg2] == undefined))))){
return (_projectData[_arg1][_arg2][_arg3]);
};
return (undefined);
}
public function setKey(_arg1:Number, _arg2:Number, _arg3:String):Boolean{
_setInternal(_arg1, _key, _arg2, _arg3);
return (true);
}
public function getValue(_arg1:Number, _arg2:Number){
var _local3:*;
_local3 = _getInternal(_arg1, _value, _arg2);
if (_local3 == null){
return (null);
};
return (Number(_local3));
}
private function _renderProject(_arg1:Object):String{
var _local2:String;
var _local3:Boolean;
var _local4:int;
var _local5:Array;
var _local6:int;
_local2 = "";
_local3 = false;
_local6 = _set.length;
_local4 = 0;
while (_local4 < _local6) {
_local5 = _arg1[_set[_local4]];
if (_local5){
if (_local3){
_local2 = (_local2 + _set[_local4]);
};
_local2 = (_local2 + _renderDataType(_local5));
_local3 = false;
} else {
_local3 = true;
};
_local4++;
};
return (_local2);
}
private function _escapeExtensibleValue(_arg1:String):String{
var _local2:String;
var _local3:int;
var _local4:String;
var _local5:String;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1.charAt(_local3);
_local5 = _escapeCharMap[_local4];
if (_local5){
_local2 = (_local2 + _local5);
} else {
_local2 = (_local2 + _local4);
};
_local3++;
};
return (_local2);
}
}
}//package com.google.analytics.data
Section 38
//_Style (com.google.analytics.debug._Style)
package com.google.analytics.debug {
import flash.net.*;
import flash.text.*;
public class _Style {
public var borderColor:uint;
public var backgroundColor:uint;
private var _sheet:StyleSheet;
public var roundedCorner:uint;
public var alertColor:uint;
public var infoColor:uint;
public var successColor:uint;
private var _loader:URLLoader;
public var failureColor:uint;
private var _defaultSheet:String;
public var warningColor:uint;
public function _Style(){
_sheet = new StyleSheet();
_loader = new URLLoader();
_init();
}
private function _parseSheet(_arg1:String):void{
_sheet.parseCSS(_arg1);
}
public function get sheet():StyleSheet{
return (_sheet);
}
private function _init():void{
_defaultSheet = "";
_defaultSheet = (_defaultSheet + "a{text-decoration: underline;}\n");
_defaultSheet = (_defaultSheet + ".uiLabel{color: #000000;font-family: Arial;font-size: 12;margin-left: 2;margin-right: 2;}\n");
_defaultSheet = (_defaultSheet + ".uiWarning{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiAlert{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiInfo{color: #000000;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiSuccess{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiFailure{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiAlertAction{color: #ffffff;text-align: center;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiAlertTitle{color: #ffffff;font-family: Arial;font-size: 16;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + "\n");
roundedCorner = 6;
backgroundColor = 0xCCCCCC;
borderColor = 0x555555;
infoColor = 16777113;
alertColor = 0xFFCC00;
warningColor = 0xCC0000;
successColor = 0xFF00;
failureColor = 0xFF0000;
_parseSheet(_defaultSheet);
}
}
}//package com.google.analytics.debug
Section 39
//Alert (com.google.analytics.debug.Alert)
package com.google.analytics.debug {
import flash.events.*;
public class Alert extends Label {
public var actionOnNextLine:Boolean;// = true
public var autoClose:Boolean;// = true
private var _actions:Array;
public function Alert(_arg1:String, _arg2:Array, _arg3:String="uiAlert", _arg4:uint=0, _arg5:Align=null, _arg6:Boolean=false, _arg7:Boolean=true){
var _local8:int;
autoClose = true;
actionOnNextLine = true;
if (_arg4 == 0){
_arg4 = Style.alertColor;
};
if (_arg5 == null){
_arg5 = Align.center;
};
super(_arg1, _arg3, _arg4, _arg5, _arg6);
this.selectable = true;
super.mouseChildren = true;
this.buttonMode = true;
this.mouseEnabled = true;
this.useHandCursor = true;
this.actionOnNextLine = _arg7;
_actions = [];
_local8 = 0;
while (_local8 < _arg2.length) {
_arg2[_local8].container = this;
_actions.push(_arg2[_local8]);
_local8++;
};
}
protected function getAction(_arg1:String):AlertAction{
var _local2:int;
_local2 = 0;
while (_local2 < _actions.length) {
if (_arg1 == _actions[_local2].activator){
return (_actions[_local2]);
};
_local2++;
};
return (null);
}
override protected function layout():void{
super.layout();
_defineActions();
}
protected function spaces(_arg1:int):String{
var _local2:String;
var _local3:String;
var _local4:int;
_local2 = "";
_local3 = " ";
_local4 = 0;
while (_local4 < (_arg1 + 1)) {
_local2 = (_local2 + _local3);
_local4++;
};
return (_local2);
}
override public function onLink(_arg1:TextEvent):void{
var _local2:AlertAction;
if (isValidAction(_arg1.text)){
_local2 = getAction(_arg1.text);
if (_local2){
_local2.execute();
};
};
if (autoClose){
close();
};
}
protected function isValidAction(_arg1:String):Boolean{
var _local2:int;
_local2 = 0;
while (_local2 < _actions.length) {
if (_arg1 == _actions[_local2].activator){
return (true);
};
_local2++;
};
return (false);
}
private function _defineActions():void{
var _local1:String;
var _local2:Array;
var _local3:AlertAction;
var _local4:int;
_local1 = "";
if (actionOnNextLine){
_local1 = (_local1 + "\n");
} else {
_local1 = (_local1 + " |");
};
_local1 = (_local1 + " ");
_local2 = [];
_local4 = 0;
while (_local4 < _actions.length) {
_local3 = _actions[_local4];
_local2.push((((("<a href=\"event:" + _local3.activator) + "\">") + _local3.name) + "</a>"));
_local4++;
};
_local1 = (_local1 + _local2.join(" | "));
appendText(_local1, "uiAlertAction");
}
public function close():void{
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.google.analytics.debug
Section 40
//AlertAction (com.google.analytics.debug.AlertAction)
package com.google.analytics.debug {
public class AlertAction {
public var container:Alert;
private var _callback;
public var name:String;
public var activator:String;
public function AlertAction(_arg1:String, _arg2:String, _arg3){
this.name = _arg1;
this.activator = _arg2;
_callback = _arg3;
}
public function execute():void{
if (_callback){
if ((_callback is Function)){
(_callback as Function)();
} else {
if ((_callback is String)){
var _local1 = container;
_local1[_callback]();
};
};
};
}
}
}//package com.google.analytics.debug
Section 41
//Align (com.google.analytics.debug.Align)
package com.google.analytics.debug {
public class Align {
private var _value:int;
private var _name:String;
public static const bottomRight:Align = new Align(18, "bottomRight");
;
public static const right:Align = new Align(16, "right");
;
public static const left:Align = new Align(32, "left");
;
public static const topRight:Align = new Align(17, "topRight");
;
public static const bottom:Align = new Align(2, "bottom");
;
public static const bottomLeft:Align = new Align(34, "bottomLeft");
;
public static const topLeft:Align = new Align(33, "topLeft");
;
public static const center:Align = new Align(0x0100, "center");
;
public static const none:Align = new Align(0, "none");
;
public static const top:Align = new Align(1, "top");
;
public function Align(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.debug
Section 42
//Background (com.google.analytics.debug.Background)
package com.google.analytics.debug {
import flash.display.*;
public class Background {
public static function drawRounded(_arg1, _arg2:Graphics, _arg3:uint=0, _arg4:uint=0):void{
var _local5:uint;
var _local6:uint;
var _local7:uint;
_local7 = Style.roundedCorner;
if ((((_arg3 > 0)) && ((_arg4 > 0)))){
_local5 = _arg3;
_local6 = _arg4;
} else {
_local5 = _arg1.width;
_local6 = _arg1.height;
};
if (((_arg1.stickToEdge) && (!((_arg1.alignement == Align.none))))){
switch (_arg1.alignement){
case Align.top:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, _local7, _local7);
break;
case Align.topLeft:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, 0, _local7);
break;
case Align.topRight:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, _local7, 0);
break;
case Align.bottom:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, _local7, 0, 0);
break;
case Align.bottomLeft:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, _local7, 0, 0);
break;
case Align.bottomRight:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, 0, 0, 0);
break;
case Align.left:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, _local7, 0, _local7);
break;
case Align.right:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, 0, _local7, 0);
break;
case Align.center:
_arg2.drawRoundRect(0, 0, _local5, _local6, _local7, _local7);
break;
};
} else {
_arg2.drawRoundRect(0, 0, _local5, _local6, _local7, _local7);
};
}
}
}//package com.google.analytics.debug
Section 43
//Debug (com.google.analytics.debug.Debug)
package com.google.analytics.debug {
import flash.events.*;
import flash.ui.*;
public class Debug extends Label {
private var _lines:Array;
private var _preferredForcedWidth:uint;// = 540
private var _linediff:int;// = 0
public var maxLines:uint;// = 16
public static var count:uint = 0;
public function Debug(color:uint=0, alignement:Align=null, stickToEdge:Boolean=false){
if (alignement == null){
alignement = Align.bottom;
};
super("", "uiLabel", color, alignement, stickToEdge);
this.name = ("Debug" + count++);
_lines = [];
selectable = true;
addEventListener(KeyboardEvent.KEY_DOWN, onKey);
}
public function writeBold(message:String):void{
write(message, true);
}
private function _getLinesToDisplay(direction:int=0):Array{
var lines:Array;
var start:uint;
var end:uint;
if ((_lines.length - 1) > maxLines){
if ((_linediff <= 0)){
_linediff = (_linediff + direction);
} else {
if ((((_linediff > 0)) && ((direction < 0)))){
_linediff = (_linediff + direction);
};
};
start = ((_lines.length - maxLines) + _linediff);
end = (start + maxLines);
lines = _lines.slice(start, end);
} else {
lines = _lines;
};
return (lines);
}
private function onKey(event:KeyboardEvent=null):void{
var lines:Array;
switch (event.keyCode){
case Keyboard.DOWN:
lines = _getLinesToDisplay(1);
break;
case Keyboard.UP:
lines = _getLinesToDisplay(-1);
break;
default:
lines = null;
};
if (lines == null){
return;
};
text = lines.join("\n");
}
override public function get forcedWidth():uint{
if (this.parent){
if (UISprite(this.parent).forcedWidth > _preferredForcedWidth){
return (_preferredForcedWidth);
};
return (UISprite(this.parent).forcedWidth);
} else {
};
return (!NULL!);
}
public function write(message:String, bold:Boolean=false):void{
var inputLines:Array;
if (message.indexOf("") > -1){
inputLines = message.split("\n");
} else {
inputLines = [message];
};
var pre:String = "";
var post:String = "";
if (bold){
pre = "<b>";
post = "</b>";
};
var i:int;
while (i < inputLines.length) {
_lines.push(((pre + inputLines[i]) + post));
i++;
};
var lines:Array = _getLinesToDisplay();
text = lines.join("\n");
}
public function close():void{
dispose();
}
override protected function dispose():void{
removeEventListener(KeyboardEvent.KEY_DOWN, onKey);
super.dispose();
}
}
}//package com.google.analytics.debug
Section 44
//DebugConfiguration (com.google.analytics.debug.DebugConfiguration)
package com.google.analytics.debug {
import flash.net.*;
import com.google.analytics.core.*;
import flash.utils.*;
import flash.ui.*;
public class DebugConfiguration {
public var showHideKey:Number;
private var _mode:VisualDebugMode;
private var _verbose:Boolean;// = false
public var destroyKey:Number;
public var GIFRequests:Boolean;// = false
public var showInfos:Boolean;// = true
public var infoTimeout:Number;// = 1000
public var minimizedOnStart:Boolean;// = false
private var _active:Boolean;// = false
public var traceOutput:Boolean;// = false
public var layout:ILayout;
public var warningTimeout:Number;// = 1500
public var javascript:Boolean;// = false
public var showWarnings:Boolean;// = true
private var _visualInitialized:Boolean;// = false
public function DebugConfiguration(){
_mode = VisualDebugMode.basic;
showHideKey = Keyboard.SPACE;
destroyKey = Keyboard.BACKSPACE;
super();
}
public function get verbose():Boolean{
return (_verbose);
}
public function set verbose(value:Boolean):void{
_verbose = value;
}
public function set mode(value):void{
if ((value is String)){
switch (value){
case "geek":
value = VisualDebugMode.geek;
break;
case "advanced":
value = VisualDebugMode.advanced;
break;
case "basic":
default:
value = VisualDebugMode.basic;
};
};
_mode = value;
}
public function success(message:String):void{
if (layout){
layout.createSuccessAlert(message);
};
if (traceOutput){
trace((("[+] " + message) + " !!"));
};
}
public function get active():Boolean{
return (_active);
}
private function _initializeVisual():void{
if (layout){
layout.init();
_visualInitialized = true;
};
}
private function _destroyVisual():void{
if (((layout) && (_visualInitialized))){
layout.destroy();
};
}
public function warning(message:String, mode:VisualDebugMode=null):void{
if (_filter(mode)){
return;
};
if (((layout) && (showWarnings))){
layout.createWarning(message);
};
if (traceOutput){
trace((("## " + message) + " ##"));
};
}
private function _filter(mode:VisualDebugMode=null):Boolean{
return (((mode) && ((int(mode) >= int(this.mode)))));
}
public function failure(message:String):void{
if (layout){
layout.createFailureAlert(message);
};
if (traceOutput){
trace((("[-] " + message) + " !!"));
};
}
public function get mode(){
return (_mode);
}
public function set active(value:Boolean):void{
_active = value;
if (_active){
_initializeVisual();
} else {
_destroyVisual();
};
}
protected function trace(message:String):void{
var msgs:Array;
var j:int;
var messages:Array = [];
var pre0:String = "";
var pre1:String = "";
if (this.mode == VisualDebugMode.geek){
pre0 = (getTimer() + " - ");
pre1 = (new Array(pre0.length).join(" ") + " ");
};
if (message.indexOf("\n") > -1){
msgs = message.split("\n");
j = 0;
while (j < msgs.length) {
if (msgs[j] == ""){
} else {
if (j == 0){
messages.push((pre0 + msgs[j]));
} else {
messages.push((pre1 + msgs[j]));
};
};
j++;
};
} else {
messages.push((pre0 + message));
};
var len:int = messages.length;
var i:int;
while (i < len) {
trace(messages[i]);
i++;
};
}
public function alert(message:String):void{
if (layout){
layout.createAlert(message);
};
if (traceOutput){
trace((("!! " + message) + " !!"));
};
}
public function info(message:String, mode:VisualDebugMode=null):void{
if (_filter(mode)){
return;
};
if (((layout) && (showInfos))){
layout.createInfo(message);
};
if (traceOutput){
trace(message);
};
}
public function alertGifRequest(message:String, request:URLRequest, ref:GIFRequest):void{
if (layout){
layout.createGIFRequestAlert(message, request, ref);
};
if (traceOutput){
trace(((">> " + message) + " <<"));
};
}
}
}//package com.google.analytics.debug
Section 45
//FailureAlert (com.google.analytics.debug.FailureAlert)
package com.google.analytics.debug {
public class FailureAlert extends Alert {
public function FailureAlert(_arg1:DebugConfiguration, _arg2:String, _arg3:Array){
var _local4:Align;
var _local5:Boolean;
var _local6:Boolean;
_local4 = Align.bottomLeft;
_local5 = true;
_local6 = false;
if (_arg1.verbose){
_arg2 = ((("<u><span class=\"uiAlertTitle\">Failure</span>" + spaces(18)) + "</u>\n\n") + _arg2);
_local4 = Align.center;
_local5 = false;
_local6 = true;
};
super(_arg2, _arg3, "uiFailure", Style.failureColor, _local4, _local5, _local6);
}
}
}//package com.google.analytics.debug
Section 46
//GIFRequestAlert (com.google.analytics.debug.GIFRequestAlert)
package com.google.analytics.debug {
public class GIFRequestAlert extends Alert {
public function GIFRequestAlert(_arg1:String, _arg2:Array){
super(_arg1, _arg2);
}
}
}//package com.google.analytics.debug
Section 47
//ILayout (com.google.analytics.debug.ILayout)
package com.google.analytics.debug {
import flash.display.*;
import flash.net.*;
import com.google.analytics.core.*;
public interface ILayout {
function createWarning(_arg1:String):void;
function addToStage(_arg1:DisplayObject):void;
function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void;
function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void;
function createInfo(_arg1:String):void;
function createFailureAlert(_arg1:String):void;
function addToPanel(_arg1:String, _arg2:DisplayObject):void;
function init():void;
function createSuccessAlert(_arg1:String):void;
function createVisualDebug():void;
function createAlert(_arg1:String):void;
function destroy():void;
function bringToFront(_arg1:DisplayObject):void;
function isAvailable():Boolean;
}
}//package com.google.analytics.debug
Section 48
//Info (com.google.analytics.debug.Info)
package com.google.analytics.debug {
import flash.events.*;
import flash.utils.*;
public class Info extends Label {
private var _timer:Timer;
public function Info(_arg1:String="", _arg2:uint=3000){
super(_arg1, "uiInfo", Style.infoColor, Align.top, true);
if (_arg2 > 0){
_timer = new Timer(_arg2, 1);
_timer.start();
_timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true);
};
}
public function onComplete(_arg1:TimerEvent):void{
close();
}
override public function onLink(_arg1:TextEvent):void{
switch (_arg1.text){
case "hide":
close();
break;
};
}
public function close():void{
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.google.analytics.debug
Section 49
//Label (com.google.analytics.debug.Label)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class Label extends UISprite {
private var _color:uint;
private var _background:Shape;
private var _textField:TextField;
public var stickToEdge:Boolean;
private var _text:String;
protected var selectable:Boolean;
private var _tag:String;
public static var count:uint = 0;
public function Label(text:String="", tag:String="uiLabel", color:uint=0, alignement:Align=null, stickToEdge:Boolean=false){
super();
this.name = ("Label" + count++);
selectable = false;
_background = new Shape();
_textField = new TextField();
_text = text;
_tag = tag;
if (alignement == null){
alignement = Align.none;
};
this.alignement = alignement;
this.stickToEdge = stickToEdge;
if (color == 0){
color = Style.backgroundColor;
};
_color = color;
_textField.addEventListener(TextEvent.LINK, onLink);
}
public function get tag():String{
return (_tag);
}
private function _draw():void{
var g:Graphics = _background.graphics;
g.clear();
g.beginFill(_color);
var W:uint = _textField.width;
var H:uint = _textField.height;
if (forcedWidth > 0){
W = forcedWidth;
};
Background.drawRounded(this, g, W, H);
g.endFill();
}
public function get text():String{
return (_textField.text);
}
public function appendText(value:String, newtag:String=""):void{
if (value == ""){
return;
};
if (newtag == ""){
newtag = tag;
};
_textField.htmlText = (_textField.htmlText + (((("<span class=\"" + newtag) + "\">") + value) + "</span>"));
_text = (_text + value);
_draw();
resize();
}
public function set text(value:String):void{
if (value == ""){
value = _text;
};
_textField.htmlText = (((("<span class=\"" + tag) + "\">") + value) + "</span>");
_text = value;
_draw();
resize();
}
override protected function layout():void{
_textField.type = TextFieldType.DYNAMIC;
_textField.autoSize = TextFieldAutoSize.LEFT;
_textField.background = false;
_textField.selectable = selectable;
_textField.multiline = true;
_textField.styleSheet = Style.sheet;
this.text = _text;
addChild(_background);
addChild(_textField);
}
public function set tag(value:String):void{
_tag = value;
text = "";
}
public function onLink(event:TextEvent):void{
}
override protected function dispose():void{
_textField.removeEventListener(TextEvent.LINK, onLink);
super.dispose();
}
}
}//package com.google.analytics.debug
Section 50
//Layout (com.google.analytics.debug.Layout)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.google.analytics.core.*;
import com.google.analytics.*;
public class Layout implements ILayout {
private var _display:DisplayObject;
private var _infoQueue:Array;
private var _maxCharPerLine:int;// = 85
private var _hasInfo:Boolean;
private var _warningQueue:Array;
private var _hasDebug:Boolean;
private var _hasWarning:Boolean;
private var _mainPanel:Panel;
private var _GRAlertQueue:Array;
private var _debug:DebugConfiguration;
public var visualDebug:Debug;
private var _hasGRAlert:Boolean;
public function Layout(debug:DebugConfiguration, display:DisplayObject){
super();
_display = display;
_debug = debug;
_hasWarning = false;
_hasInfo = false;
_hasDebug = false;
_hasGRAlert = false;
_warningQueue = [];
_infoQueue = [];
_GRAlertQueue = [];
}
private function onKey(event:KeyboardEvent=null):void{
switch (event.keyCode){
case _debug.showHideKey:
_mainPanel.visible = !(_mainPanel.visible);
break;
case _debug.destroyKey:
destroy();
break;
};
}
public function createWarning(message:String):void{
if (((_hasWarning) || (!(isAvailable())))){
_warningQueue.push(message);
return;
};
message = _filterMaxChars(message);
_hasWarning = true;
var w:Warning = new Warning(message, _debug.warningTimeout);
addToPanel("analytics", w);
w.addEventListener(Event.REMOVED_FROM_STAGE, _clearWarning, false, 0, true);
if (_hasDebug){
visualDebug.writeBold(message);
};
}
public function bringToFront(visual:DisplayObject):void{
_display.stage.setChildIndex(visual, (_display.stage.numChildren - 1));
}
public function createFailureAlert(message:String):void{
var actionClose:AlertAction;
if (_debug.verbose){
message = _filterMaxChars(message);
actionClose = new AlertAction("Close", "close", "close");
} else {
actionClose = new AlertAction("X", "close", "close");
};
var fa:Alert = new FailureAlert(_debug, message, [actionClose]);
addToPanel("analytics", fa);
if (_hasDebug){
if (_debug.verbose){
message = message.split("\n").join("");
message = _filterMaxChars(message, 66);
};
visualDebug.writeBold(message);
};
}
public function init():void{
var spaces = 10;
var W:uint = (_display.stage.stageWidth - (spaces * 2));
var H:uint = (_display.stage.stageHeight - (spaces * 2));
var mp:Panel = new Panel("analytics", W, H);
mp.alignement = Align.top;
mp.stickToEdge = false;
mp.title = ("Google Analytics v" + GATracker.version);
_mainPanel = mp;
addToStage(mp);
bringToFront(mp);
if (_debug.minimizedOnStart){
_mainPanel.onToggle();
};
createVisualDebug();
_display.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey, false, 0, true);
}
public function addToPanel(name:String, visual:DisplayObject):void{
var panel:Panel;
var d:DisplayObject = _display.stage.getChildByName(name);
if (d){
panel = (d as Panel);
panel.addData(visual);
} else {
trace((("panel \"" + name) + "\" not found"));
};
}
private function _clearInfo(event:Event):void{
_hasInfo = false;
if (_infoQueue.length > 0){
createInfo(_infoQueue.shift());
};
}
private function _filterMaxChars(message:String, maxCharPerLine:int=0):String{
var line:String;
var CRLF:String = "\n";
var output:Array = [];
var lines:Array = message.split(CRLF);
if (maxCharPerLine == 0){
maxCharPerLine = _maxCharPerLine;
};
var i:int;
while (i < lines.length) {
line = lines[i];
while (line.length > maxCharPerLine) {
output.push(line.substr(0, maxCharPerLine));
line = line.substring(maxCharPerLine);
};
output.push(line);
i++;
};
return (output.join(CRLF));
}
private function _clearGRAlert(event:Event):void{
_hasGRAlert = false;
if (_GRAlertQueue.length > 0){
createGIFRequestAlert.apply(this, _GRAlertQueue.shift());
};
}
public function createSuccessAlert(message:String):void{
var actionClose:AlertAction;
if (_debug.verbose){
message = _filterMaxChars(message);
actionClose = new AlertAction("Close", "close", "close");
} else {
actionClose = new AlertAction("X", "close", "close");
};
var sa:Alert = new SuccessAlert(_debug, message, [actionClose]);
addToPanel("analytics", sa);
if (_hasDebug){
if (_debug.verbose){
message = message.split("\n").join("");
message = _filterMaxChars(message, 66);
};
visualDebug.writeBold(message);
};
}
public function isAvailable():Boolean{
return (!((_display.stage == null)));
}
public function createAlert(message:String):void{
message = _filterMaxChars(message);
var a:Alert = new Alert(message, [new AlertAction("Close", "close", "close")]);
addToPanel("analytics", a);
if (_hasDebug){
visualDebug.writeBold(message);
};
}
public function createInfo(message:String):void{
if (((_hasInfo) || (!(isAvailable())))){
_infoQueue.push(message);
return;
};
message = _filterMaxChars(message);
_hasInfo = true;
var i:Info = new Info(message, _debug.infoTimeout);
addToPanel("analytics", i);
i.addEventListener(Event.REMOVED_FROM_STAGE, _clearInfo, false, 0, true);
if (_hasDebug){
visualDebug.write(message);
};
}
public function createGIFRequestAlert(message:String, request:URLRequest, ref:GIFRequest):void{
var message = message;
var request = request;
var ref = ref;
if (_hasGRAlert){
_GRAlertQueue.push([message, request, ref]);
return;
};
_hasGRAlert = true;
var f:Function = function ():void{
ref.sendRequest(request);
};
message = _filterMaxChars(message);
var gra:GIFRequestAlert = new GIFRequestAlert(message, [new AlertAction("OK", "ok", f), new AlertAction("Cancel", "cancel", "close")]);
addToPanel("analytics", gra);
gra.addEventListener(Event.REMOVED_FROM_STAGE, _clearGRAlert, false, 0, true);
if (_hasDebug){
if (_debug.verbose){
message = message.split("\n").join("");
message = _filterMaxChars(message, 66);
};
visualDebug.write(message);
};
}
public function createVisualDebug():void{
if (!visualDebug){
visualDebug = new Debug();
visualDebug.alignement = Align.bottom;
visualDebug.stickToEdge = true;
addToPanel("analytics", visualDebug);
_hasDebug = true;
};
}
public function addToStage(visual:DisplayObject):void{
_display.stage.addChild(visual);
}
private function _clearWarning(event:Event):void{
_hasWarning = false;
if (_warningQueue.length > 0){
createWarning(_warningQueue.shift());
};
}
public function createPanel(name:String, width:uint, height:uint):void{
var p:Panel = new Panel(name, width, height);
p.alignement = Align.center;
p.stickToEdge = false;
addToStage(p);
bringToFront(p);
}
public function destroy():void{
_mainPanel.close();
_debug.layout = null;
}
}
}//package com.google.analytics.debug
Section 51
//Margin (com.google.analytics.debug.Margin)
package com.google.analytics.debug {
public class Margin {
public var bottom:int;
public var top:int;
public var right:int;
public var left:int;
public function Margin(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0){
this.top = _arg1;
this.bottom = _arg2;
this.left = _arg3;
this.right = _arg4;
}
}
}//package com.google.analytics.debug
Section 52
//Panel (com.google.analytics.debug.Panel)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
public class Panel extends UISprite {
private var _savedH:uint;
private var _data:UISprite;
private var _mask:Sprite;
private var _background:Shape;
private var _savedW:uint;
private var _stickToEdge:Boolean;
private var _border:Shape;
private var _borderColor:uint;
protected var baseAlpha:Number;
private var _backgroundColor:uint;
private var _title:Label;
private var _colapsed:Boolean;
private var _name:String;
public function Panel(name:String, width:uint, height:uint, backgroundColor:uint=0, borderColor:uint=0, baseAlpha:Number=0.3, alignement:Align=null, stickToEdge:Boolean=false){
super();
_name = name;
this.name = name;
this.mouseEnabled = false;
_colapsed = false;
forcedWidth = width;
forcedHeight = height;
this.baseAlpha = baseAlpha;
_background = new Shape();
_data = new UISprite();
_data.forcedWidth = width;
_data.forcedHeight = height;
_data.mouseEnabled = false;
_title = new Label(name, "uiLabel", 0xFFFFFF, Align.topLeft, stickToEdge);
_title.buttonMode = true;
_title.margin.top = 0.6;
_title.margin.left = 0.6;
_title.addEventListener(MouseEvent.CLICK, onToggle);
_title.mouseChildren = false;
_border = new Shape();
_mask = new Sprite();
_mask.useHandCursor = false;
_mask.mouseEnabled = false;
_mask.mouseChildren = false;
if (alignement == null){
alignement = Align.none;
};
this.alignement = alignement;
this.stickToEdge = stickToEdge;
if (backgroundColor == 0){
backgroundColor = Style.backgroundColor;
};
_backgroundColor = backgroundColor;
if (borderColor == 0){
borderColor = Style.borderColor;
};
_borderColor = borderColor;
}
public function get stickToEdge():Boolean{
return (_stickToEdge);
}
public function onToggle(event:MouseEvent=null):void{
if (_colapsed){
_data.visible = true;
} else {
_data.visible = false;
};
_colapsed = !(_colapsed);
_update();
resize();
}
public function set stickToEdge(value:Boolean):void{
_stickToEdge = value;
_title.stickToEdge = value;
}
override protected function dispose():void{
_title.removeEventListener(MouseEvent.CLICK, onToggle);
super.dispose();
}
private function _draw():void{
var W:uint;
var H:uint;
if (((_savedW) && (_savedH))){
forcedWidth = _savedW;
forcedHeight = _savedH;
};
if (!_colapsed){
W = forcedWidth;
H = forcedHeight;
} else {
W = _title.width;
H = _title.height;
_savedW = forcedWidth;
_savedH = forcedHeight;
forcedWidth = W;
forcedHeight = H;
};
var g0:Graphics = _background.graphics;
g0.clear();
g0.beginFill(_backgroundColor);
Background.drawRounded(this, g0, W, H);
g0.endFill();
var g01:Graphics = _data.graphics;
g01.clear();
g01.beginFill(_backgroundColor, 0);
Background.drawRounded(this, g01, W, H);
g01.endFill();
var g1:Graphics = _border.graphics;
g1.clear();
g1.lineStyle(0.1, _borderColor);
Background.drawRounded(this, g1, W, H);
g1.endFill();
var g2:Graphics = _mask.graphics;
g2.clear();
g2.beginFill(_backgroundColor);
Background.drawRounded(this, g2, (W + 1), (H + 1));
g2.endFill();
}
public function get title():String{
return (_title.text);
}
private function _update():void{
_draw();
if (baseAlpha < 1){
_background.alpha = baseAlpha;
_border.alpha = baseAlpha;
};
}
public function addData(child:DisplayObject):void{
_data.addChild(child);
}
override protected function layout():void{
_update();
addChild(_background);
addChild(_data);
addChild(_title);
addChild(_border);
addChild(_mask);
mask = _mask;
}
public function set title(value:String):void{
_title.text = value;
}
public function close():void{
dispose();
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.google.analytics.debug
Section 53
//Style (com.google.analytics.debug.Style)
package com.google.analytics.debug {
public const Style:_Style = new _Style();
}//package com.google.analytics.debug
Section 54
//SuccessAlert (com.google.analytics.debug.SuccessAlert)
package com.google.analytics.debug {
public class SuccessAlert extends Alert {
public function SuccessAlert(_arg1:DebugConfiguration, _arg2:String, _arg3:Array){
var _local4:Align;
var _local5:Boolean;
var _local6:Boolean;
_local4 = Align.bottomLeft;
_local5 = true;
_local6 = false;
if (_arg1.verbose){
_arg2 = ((("<u><span class=\"uiAlertTitle\">Success</span>" + spaces(18)) + "</u>\n\n") + _arg2);
_local4 = Align.center;
_local5 = false;
_local6 = true;
};
super(_arg2, _arg3, "uiSuccess", Style.successColor, _local4, _local5, _local6);
}
}
}//package com.google.analytics.debug
Section 55
//UISprite (com.google.analytics.debug.UISprite)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
public class UISprite extends Sprite {
private var _forcedHeight:uint;
protected var listenResize:Boolean;
public var alignement:Align;
private var _forcedWidth:uint;
public var margin:Margin;
protected var alignTarget:DisplayObject;
public function UISprite(_arg1:DisplayObject=null){
listenResize = false;
alignement = Align.none;
this.alignTarget = _arg1;
margin = new Margin();
addEventListener(Event.ADDED_TO_STAGE, _onAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage);
}
protected function dispose():void{
var _local1:DisplayObject;
var _local2:int;
_local2 = 0;
while (_local2 < numChildren) {
_local1 = getChildAt(_local2);
if (_local1){
removeChild(_local1);
};
_local2++;
};
}
protected function layout():void{
}
public function get forcedHeight():uint{
if (_forcedHeight){
return (_forcedHeight);
};
return (height);
}
public function alignTo(_arg1:Align, _arg2:DisplayObject=null):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:UISprite;
if (_arg2 == null){
if ((parent is Stage)){
_arg2 = this.stage;
} else {
_arg2 = parent;
};
};
if (_arg2 == this.stage){
if (this.stage == null){
return;
};
_local3 = this.stage.stageHeight;
_local4 = this.stage.stageWidth;
_local5 = 0;
_local6 = 0;
} else {
_local7 = (_arg2 as UISprite);
if (_local7.forcedHeight){
_local3 = _local7.forcedHeight;
} else {
_local3 = _local7.height;
};
if (_local7.forcedWidth){
_local4 = _local7.forcedWidth;
} else {
_local4 = _local7.width;
};
_local5 = 0;
_local6 = 0;
};
switch (_arg1){
case Align.top:
x = ((_local4 / 2) - (forcedWidth / 2));
y = (_local6 + margin.top);
break;
case Align.bottom:
x = ((_local4 / 2) - (forcedWidth / 2));
y = (((_local6 + _local3) - forcedHeight) - margin.bottom);
break;
case Align.left:
x = (_local5 + margin.left);
y = ((_local3 / 2) - (forcedHeight / 2));
break;
case Align.right:
x = (((_local5 + _local4) - forcedWidth) - margin.right);
y = ((_local3 / 2) - (forcedHeight / 2));
break;
case Align.center:
x = ((_local4 / 2) - (forcedWidth / 2));
y = ((_local3 / 2) - (forcedHeight / 2));
break;
case Align.topLeft:
x = (_local5 + margin.left);
y = (_local6 + margin.top);
break;
case Align.topRight:
x = (((_local5 + _local4) - forcedWidth) - margin.right);
y = (_local6 + margin.top);
break;
case Align.bottomLeft:
x = (_local5 + margin.left);
y = (((_local6 + _local3) - forcedHeight) - margin.bottom);
break;
case Align.bottomRight:
x = (((_local5 + _local4) - forcedWidth) - margin.right);
y = (((_local6 + _local3) - forcedHeight) - margin.bottom);
break;
};
if (((!(listenResize)) && (!((_arg1 == Align.none))))){
_arg2.addEventListener(Event.RESIZE, onResize, false, 0, true);
listenResize = true;
};
this.alignement = _arg1;
this.alignTarget = _arg2;
}
public function get forcedWidth():uint{
if (_forcedWidth){
return (_forcedWidth);
};
return (width);
}
protected function onResize(_arg1:Event):void{
resize();
}
private function _onRemovedFromStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, _onAddedToStage);
removeEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage);
dispose();
}
public function resize():void{
if (alignement != Align.none){
alignTo(alignement, alignTarget);
};
}
private function _onAddedToStage(_arg1:Event):void{
layout();
resize();
}
public function set forcedHeight(_arg1:uint):void{
_forcedHeight = _arg1;
}
public function set forcedWidth(_arg1:uint):void{
_forcedWidth = _arg1;
}
}
}//package com.google.analytics.debug
Section 56
//Warning (com.google.analytics.debug.Warning)
package com.google.analytics.debug {
import flash.events.*;
import flash.utils.*;
public class Warning extends Label {
private var _timer:Timer;
public function Warning(_arg1:String="", _arg2:uint=3000){
super(_arg1, "uiWarning", Style.warningColor, Align.top, false);
margin.top = 32;
if (_arg2 > 0){
_timer = new Timer(_arg2, 1);
_timer.start();
_timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true);
};
}
public function onComplete(_arg1:TimerEvent):void{
close();
}
override public function onLink(_arg1:TextEvent):void{
switch (_arg1.text){
case "hide":
close();
break;
};
}
public function close():void{
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.google.analytics.debug
Section 57
//VisualDebugMode (com.google.analytics.debug.VisualDebugMode)
package com.google.analytics.debug {
public class VisualDebugMode {
private var _value:int;
private var _name:String;
public static const advanced:VisualDebugMode = new VisualDebugMode(1, "advanced");
;
public static const geek:VisualDebugMode = new VisualDebugMode(2, "geek");
;
public static const basic:VisualDebugMode = new VisualDebugMode(0, "basic");
;
public function VisualDebugMode(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.debug
Section 58
//AnalyticsEvent (com.google.analytics.events.AnalyticsEvent)
package com.google.analytics.events {
import flash.events.*;
import com.google.analytics.*;
public class AnalyticsEvent extends Event {
public var tracker:AnalyticsTracker;
public static const READY:String = "ready";
public function AnalyticsEvent(_arg1:String, _arg2:AnalyticsTracker, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.tracker = _arg2;
}
override public function clone():Event{
return (new AnalyticsEvent(type, tracker, bubbles, cancelable));
}
}
}//package com.google.analytics.events
Section 59
//AdSenseGlobals (com.google.analytics.external.AdSenseGlobals)
package com.google.analytics.external {
import com.google.analytics.debug.*;
public class AdSenseGlobals extends JavascriptProxy {
private var _gaGlobalVerified:Boolean;// = false
public static var gaGlobal_js:XML = <script>
<![CDATA[
function()
{
try
{
gaGlobal
}
catch(e)
{
gaGlobal = {} ;
}
}
]]>
</script>
;
public function AdSenseGlobals(_arg1:DebugConfiguration){
_gaGlobalVerified = false;
super(_arg1);
}
public function set vid(_arg1:String):void{
if (!isAvailable()){
return;
};
_verify();
setProperty("gaGlobal.vid", _arg1);
}
public function get hid():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.hid"));
}
public function get dh():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.dh"));
}
public function get gaGlobal():Object{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal"));
}
public function set hid(_arg1:String):void{
if (!isAvailable()){
return;
};
_verify();
setProperty("gaGlobal.hid", _arg1);
}
public function get sid():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.sid"));
}
private function _verify():void{
if (!_gaGlobalVerified){
executeBlock(gaGlobal_js);
_gaGlobalVerified = true;
};
}
public function get vid():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.vid"));
}
public function set sid(_arg1:String):void{
if (!isAvailable()){
return;
};
_verify();
setProperty("gaGlobal.sid", _arg1);
}
}
}//package com.google.analytics.external
Section 60
//HTMLDOM (com.google.analytics.external.HTMLDOM)
package com.google.analytics.external {
import com.google.analytics.debug.*;
public class HTMLDOM extends JavascriptProxy {
private var _referrer:String;
private var _protocol:String;
private var _host:String;
private var _location:String;
private var _pathname:String;
private var _title:String;
private var _characterSet:String;
private var _search:String;
private var _language:String;
private var _colorDepth:String;
public static var cache_properties_js:XML = <script>
<![CDATA[
function()
{
var obj = {};
obj.host = document.location.host;
obj.language = navigator.language ? navigator.language : navigator.browserLanguage;
obj.characterSet = document.characterSet ? document.characterSet : document.charset;
obj.colorDepth = window.screen.colorDepth;
obj.location = document.location.toString();
obj.pathname = document.location.pathname;
obj.protocol = document.location.protocol;
obj.search = document.location.search;
obj.referrer = document.referrer;
obj.title = document.title;
return obj;
}
]]>
</script>
;
public function HTMLDOM(_arg1:DebugConfiguration){
super(_arg1);
}
public function get search():String{
if (_search){
return (_search);
};
if (!isAvailable()){
return (null);
};
_search = getProperty("document.location.search");
return (_search);
}
public function get location():String{
if (_location){
return (_location);
};
if (!isAvailable()){
return (null);
};
_location = getPropertyString("document.location");
return (_location);
}
public function get pathname():String{
if (_pathname){
return (_pathname);
};
if (!isAvailable()){
return (null);
};
_pathname = getProperty("document.location.pathname");
return (_pathname);
}
public function get referrer():String{
if (_referrer){
return (_referrer);
};
if (!isAvailable()){
return (null);
};
_referrer = getProperty("document.referrer");
return (_referrer);
}
public function get protocol():String{
if (_protocol){
return (_protocol);
};
if (!isAvailable()){
return (null);
};
_protocol = getProperty("document.location.protocol");
return (_protocol);
}
public function cacheProperties():void{
var _local1:Object;
if (!isAvailable()){
return;
};
_local1 = call(cache_properties_js);
if (_local1){
_host = _local1.host;
_language = _local1.language;
_characterSet = _local1.characterSet;
_colorDepth = _local1.colorDepth;
_location = _local1.location;
_pathname = _local1.pathname;
_protocol = _local1.protocol;
_search = _local1.search;
_referrer = _local1.referrer;
_title = _local1.title;
};
}
public function get colorDepth():String{
if (_colorDepth){
return (_colorDepth);
};
if (!isAvailable()){
return (null);
};
_colorDepth = getProperty("window.screen.colorDepth");
return (_colorDepth);
}
public function get title():String{
if (_title){
return (_title);
};
if (!isAvailable()){
return (null);
};
_title = getProperty("document.title");
return (_title);
}
public function get host():String{
if (_host){
return (_host);
};
if (!isAvailable()){
return (null);
};
_host = getProperty("document.location.host");
return (_host);
}
public function get characterSet():String{
var _local1:String;
if (_characterSet){
return (_characterSet);
};
if (!isAvailable()){
return (null);
};
_local1 = getProperty("document.characterSet");
if (_local1 == null){
_local1 = getProperty("document.charset");
};
_characterSet = _local1;
return (_characterSet);
}
public function get language():String{
var _local1:String;
if (_language){
return (_language);
};
if (!isAvailable()){
return (null);
};
_local1 = getProperty("navigator.language");
if (_local1 == null){
_local1 = getProperty("navigator.browserLanguage");
};
_language = _local1;
return (_language);
}
}
}//package com.google.analytics.external
Section 61
//JavascriptProxy (com.google.analytics.external.JavascriptProxy)
package com.google.analytics.external {
import com.google.analytics.debug.*;
import flash.external.*;
import flash.system.*;
public class JavascriptProxy {
private var _notAvailableWarning:Boolean;// = true
private var _debug:DebugConfiguration;
public static var setProperty_js:XML = <script>
<![CDATA[
function( path , value )
{
var paths;
var prop;
if( path.indexOf(".") > 0 )
{
paths = path.split(".");
prop = paths.pop() ;
}
else
{
paths = [];
prop = path;
}
var target = window ;
var len = paths.length ;
for( var i = 0 ; i < len ; i++ )
{
target = target[ paths[i] ] ;
}
target[ prop ] = value ;
}
]]>
</script>
;
public static var hasProperty_js:XML = <script>
<![CDATA[
function( path )
{
var paths;
if( path.indexOf(".") > 0 )
{
paths = path.split(".");
}
else
{
paths = [path];
}
var target = window ;
var len = paths.length ;
for( var i = 0 ; i < len ; i++ )
{
target = target[ paths[i] ] ;
}
if( target )
{
return true;
}
else
{
return false;
}
}
]]>
</script>
;
public static var setPropertyRef_js:XML = <script>
<![CDATA[
function( path , target )
{
var paths;
var prop;
if( path.indexOf(".") > 0 )
{
paths = path.split(".");
prop = paths.pop() ;
}
else
{
paths = [];
prop = path;
}
alert( "paths:"+paths.length+", prop:"+prop );
var targets;
var name;
if( target.indexOf(".") > 0 )
{
targets = target.split(".");
name = targets.pop();
}
else
{
targets = [];
name = target;
}
alert( "targets:"+targets.length+", name:"+name );
var root = window;
var len = paths.length;
for( var i = 0 ; i < len ; i++ )
{
root = root[ paths[i] ] ;
}
var ref = window;
var depth = targets.length;
for( var j = 0 ; j < depth ; j++ )
{
ref = ref[ targets[j] ] ;
}
root[ prop ] = ref[name] ;
}
]]>
</script>
;
public function JavascriptProxy(_arg1:DebugConfiguration){
_notAvailableWarning = true;
super();
_debug = _arg1;
}
public function getProperty(_arg1:String){
return (call((_arg1 + ".valueOf")));
}
public function hasProperty(_arg1:String):Boolean{
return (call(hasProperty_js, _arg1));
}
public function setProperty(_arg1:String, _arg2):void{
call(setProperty_js, _arg1, _arg2);
}
public function executeBlock(_arg1:String):void{
var data = _arg1;
if (isAvailable()){
try {
ExternalInterface.call(data);
} catch(e:SecurityError) {
if (_debug.javascript){
_debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML.");
};
} catch(e:Error) {
if (_debug.javascript){
_debug.warning(("ExternalInterface failed to make the call\nreason: " + e.message));
};
};
};
}
public function getPropertyString(_arg1:String):String{
return (call((_arg1 + ".toString")));
}
public function setPropertyByReference(_arg1:String, _arg2:String):void{
call(setPropertyRef_js, _arg1, _arg2);
}
public function call(_arg1:String, ... _args){
var output:String;
var functionName = _arg1;
var args = _args;
if (isAvailable()){
try {
if (((_debug.javascript) && (_debug.verbose))){
output = "";
output = ("Flash->JS: " + functionName);
output = (output + "( ");
if (args.length > 0){
output = (output + args.join(","));
};
output = (output + " )");
_debug.info(output);
};
args.unshift(functionName);
return (ExternalInterface.call.apply(ExternalInterface, args));
} catch(e:SecurityError) {
if (_debug.javascript){
_debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML.");
};
} catch(e:Error) {
if (_debug.javascript){
_debug.warning(("ExternalInterface failed to make the call\nreason: " + e.message));
};
};
};
return (null);
}
public function isAvailable():Boolean{
var _local1:Boolean;
_local1 = ExternalInterface.available;
if (((_local1) && ((Capabilities.playerType == "External")))){
_local1 = false;
};
if (((((!(_local1)) && (_debug.javascript))) && (_notAvailableWarning))){
_debug.warning("ExternalInterface is not available.");
_notAvailableWarning = false;
};
return (_local1);
}
}
}//package com.google.analytics.external
Section 62
//Environment (com.google.analytics.utils.Environment)
package com.google.analytics.utils {
import com.google.analytics.core.*;
import com.google.analytics.debug.*;
import com.google.analytics.external.*;
import flash.system.*;
public class Environment {
private var _dom:HTMLDOM;
private var _appName:String;
private var _debug:DebugConfiguration;
private var _appVersion:Version;
private var _url:String;
private var _protocol:Protocols;
private var _userAgent:UserAgent;
public function Environment(_arg1:String="", _arg2:String="", _arg3:String="", _arg4:DebugConfiguration=null, _arg5:HTMLDOM=null){
var _local6:Version;
super();
if (_arg2 == ""){
if (isAIR()){
_arg2 = "AIR";
} else {
_arg2 = "Flash";
};
};
if (_arg3 == ""){
_local6 = flashVersion;
} else {
_local6 = Version.fromString(_arg3);
};
_url = _arg1;
_appName = _arg2;
_appVersion = _local6;
_debug = _arg4;
_dom = _arg5;
}
public function isAIR():Boolean{
return ((((playerType == "Desktop")) && ((Security.sandboxType.toString() == "application"))));
}
public function get playerType():String{
return (Capabilities.playerType);
}
public function get locationSearch():String{
var _local1:String;
_local1 = _dom.search;
if (_local1){
return (_local1);
};
return ("");
}
public function get protocol():Protocols{
if (!_protocol){
_findProtocol();
};
return (_protocol);
}
public function get flashVersion():Version{
var _local1:Version;
_local1 = Version.fromString(Capabilities.version.split(" ")[1], ",");
return (_local1);
}
public function get screenWidth():Number{
return (Capabilities.screenResolutionX);
}
public function get languageEncoding():String{
var _local1:String;
if (System.useCodePage){
_local1 = _dom.characterSet;
if (_local1){
return (_local1);
};
return ("-");
};
return ("UTF-8");
}
public function get appName():String{
return (_appName);
}
public function get screenColorDepth():String{
var _local1:String;
var _local2:String;
switch (Capabilities.screenColor){
case "bw":
_local1 = "1";
break;
case "gray":
_local1 = "2";
break;
case "color":
default:
_local1 = "24";
};
_local2 = _dom.colorDepth;
if (_local2){
_local1 = _local2;
};
return (_local1);
}
private function _findProtocol():void{
var _local1:Protocols;
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:String;
_local1 = Protocols.none;
if (_url != ""){
_local4 = _url.toLowerCase();
_local5 = _local4.substr(0, 5);
switch (_local5){
case "file:":
_local1 = Protocols.file;
break;
case "http:":
_local1 = Protocols.HTTP;
break;
case "https":
if (_local4.charAt(5) == ":"){
_local1 = Protocols.HTTPS;
};
break;
default:
_protocol = Protocols.none;
};
};
_local2 = _dom.protocol;
_local3 = (_local1.toString() + ":").toLowerCase();
if (((((_local2) && (!((_local2 == _local3))))) && (_debug))){
_debug.warning(((("Protocol mismatch: SWF=" + _local3) + ", DOM=") + _local2));
};
_protocol = _local1;
}
public function get locationSWFPath():String{
return (_url);
}
public function get platform():String{
var _local1:String;
_local1 = Capabilities.manufacturer;
return (_local1.split("Adobe ")[1]);
}
public function get operatingSystem():String{
return (Capabilities.os);
}
public function set appName(_arg1:String):void{
_appName = _arg1;
userAgent.applicationProduct = _arg1;
}
public function get userAgent():UserAgent{
if (!_userAgent){
_userAgent = new UserAgent(this, appName, appVersion.toString(4));
};
return (_userAgent);
}
ga_internal function set url(_arg1:String):void{
_url = _arg1;
}
public function get referrer():String{
var _local1:String;
_local1 = _dom.referrer;
if (_local1){
return (_local1);
};
if (protocol == Protocols.file){
return ("localhost");
};
return ("");
}
public function isInHTML():Boolean{
return ((Capabilities.playerType == "PlugIn"));
}
public function get language():String{
var _local1:String;
var _local2:String;
_local1 = _dom.language;
_local2 = Capabilities.language;
if (_local1){
if ((((_local1.length > _local2.length)) && ((_local1.substr(0, _local2.length) == _local2)))){
_local2 = _local1;
};
};
return (_local2);
}
public function get domainName():String{
var _local1:String;
var _local2:String;
var _local3:int;
if ((((protocol == Protocols.HTTP)) || ((protocol == Protocols.HTTPS)))){
_local1 = _url.toLowerCase();
if (protocol == Protocols.HTTP){
_local2 = _local1.split("http://").join("");
} else {
if (protocol == Protocols.HTTPS){
_local2 = _local1.split("https://").join("");
};
};
_local3 = _local2.indexOf("/");
if (_local3 > -1){
_local2 = _local2.substring(0, _local3);
};
return (_local2);
};
if (protocol == Protocols.file){
return ("localhost");
};
return ("");
}
public function set userAgent(_arg1:UserAgent):void{
_userAgent = _arg1;
}
public function set appVersion(_arg1:Version):void{
_appVersion = _arg1;
userAgent.applicationVersion = _arg1.toString(4);
}
public function get screenHeight():Number{
return (Capabilities.screenResolutionY);
}
public function get locationPath():String{
var _local1:String;
_local1 = _dom.pathname;
if (_local1){
return (_local1);
};
return ("");
}
public function get documentTitle():String{
var _local1:String;
_local1 = _dom.title;
if (_local1){
return (_local1);
};
return ("");
}
public function get appVersion():Version{
return (_appVersion);
}
}
}//package com.google.analytics.utils
Section 63
//Protocols (com.google.analytics.utils.Protocols)
package com.google.analytics.utils {
public class Protocols {
private var _value:int;
private var _name:String;
public static const none:Protocols = new Protocols(0, "none");
;
public static const HTTPS:Protocols = new Protocols(3, "HTTPS");
;
public static const file:Protocols = new Protocols(1, "file");
;
public static const HTTP:Protocols = new Protocols(2, "HTTP");
;
public function Protocols(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.utils
Section 64
//Timespan (com.google.analytics.utils.Timespan)
package com.google.analytics.utils {
public class Timespan {
public static var sixmonths:Number = 15768000;
public static var twoyears:Number = 63072000;
public static var thirtyminutes:Number = 1800;
public function Timespan(){
super();
}
}
}//package com.google.analytics.utils
Section 65
//URL (com.google.analytics.utils.URL)
package com.google.analytics.utils {
public class URL {
private var _url:String;
public function URL(url:String=""){
super();
_url = url.toLowerCase();
}
public function get domain():String{
var parts:Array;
if (((!((hostName == ""))) && ((hostName.indexOf(".") > -1)))){
parts = hostName.split(".");
switch (parts.length){
case 2:
return (hostName);
case 3:
if (parts[1] == "co"){
return (hostName);
};
parts.shift();
return (parts.join("."));
case 4:
parts.shift();
return (parts.join("."));
};
};
return ("");
}
public function get path():String{
var _path:String = _url;
if (_path.indexOf("://") > -1){
_path = _path.split("://")[1];
};
if (_path.indexOf(hostName) == 0){
_path = _path.substr(hostName.length);
};
if (_path.indexOf("?") > -1){
_path = _path.split("?")[0];
};
if (_path.charAt(0) != "/"){
_path = ("/" + _path);
};
return (_path);
}
public function get protocol():Protocols{
var proto:String = _url.split("://")[0];
switch (proto){
case "file":
return (Protocols.file);
case "http":
return (Protocols.HTTP);
case "https":
return (Protocols.HTTPS);
default:
return (Protocols.none);
};
}
public function get hostName():String{
var hostname:String = _url;
if (hostname.indexOf("://") > -1){
hostname = hostname.split("://")[1];
};
if (hostname.indexOf("/") > -1){
hostname = hostname.split("/")[0];
};
if (hostname.indexOf("?") > -1){
hostname = hostname.split("?")[0];
};
if ((((protocol == Protocols.file)) || ((protocol == Protocols.none)))){
return ("");
};
return (hostname);
}
public function get subDomain():String{
if (((!((domain == ""))) && (!((domain == hostName))))){
return (hostName.split(("." + domain)).join(""));
};
return ("");
}
public function get search():String{
var _search:String = _url;
if (_search.indexOf("://") > -1){
_search = _search.split("://")[1];
};
if (_search.indexOf(hostName) == 0){
_search = _search.substr(hostName.length);
};
if (_search.indexOf("?") > -1){
_search = _search.split("?")[1];
} else {
_search = "";
};
return (_search);
}
}
}//package com.google.analytics.utils
Section 66
//UserAgent (com.google.analytics.utils.UserAgent)
package com.google.analytics.utils {
import com.google.analytics.core.*;
import flash.system.*;
public class UserAgent {
private var _version:Version;
private var _localInfo:Environment;
private var _applicationProduct:String;
public static var minimal:Boolean = false;
public function UserAgent(_arg1:Environment, _arg2:String="", _arg3:String=""){
_localInfo = _arg1;
applicationProduct = _arg2;
_version = Version.fromString(_arg3);
}
public function get tamarinProductToken():String{
if (UserAgent.minimal){
return ("");
};
if (System.vmVersion){
return (("Tamarin/" + Utils.trim(System.vmVersion, true)));
};
return ("");
}
public function set applicationProduct(_arg1:String):void{
_applicationProduct = _arg1;
}
public function get applicationVersion():String{
return (_version.toString(2));
}
public function get applicationProductToken():String{
var _local1:String;
_local1 = applicationProduct;
if (applicationVersion != ""){
_local1 = (_local1 + ("/" + applicationVersion));
};
return (_local1);
}
public function get vendorProductToken():String{
var _local1:String;
_local1 = "";
if (_localInfo.isAIR()){
_local1 = (_local1 + "AIR");
} else {
_local1 = (_local1 + "FlashPlayer");
};
_local1 = (_local1 + "/");
_local1 = (_local1 + _version.toString(3));
return (_local1);
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + applicationProductToken);
if (applicationComment != ""){
_local1 = (_local1 + (" " + applicationComment));
};
if (tamarinProductToken != ""){
_local1 = (_local1 + (" " + tamarinProductToken));
};
if (vendorProductToken != ""){
_local1 = (_local1 + (" " + vendorProductToken));
};
return (_local1);
}
public function get applicationComment():String{
var _local1:Array;
_local1 = [];
_local1.push(_localInfo.platform);
_local1.push(_localInfo.playerType);
if (!UserAgent.minimal){
_local1.push(_localInfo.operatingSystem);
_local1.push(_localInfo.language);
};
if (Capabilities.isDebugger){
_local1.push("DEBUG");
};
if (_local1.length > 0){
return ((("(" + _local1.join("; ")) + ")"));
};
return ("");
}
public function set applicationVersion(_arg1:String):void{
_version = Version.fromString(_arg1);
}
public function get applicationProduct():String{
return (_applicationProduct);
}
}
}//package com.google.analytics.utils
Section 67
//Variables (com.google.analytics.utils.Variables)
package com.google.analytics.utils {
import flash.net.*;
public dynamic class Variables {
public var post:Array;
public var URIencode:Boolean;
public var pre:Array;
public var sort:Boolean;// = true
public function Variables(source:String=null, pre:Array=null, post:Array=null){
pre = [];
post = [];
super();
if (source){
decode(source);
};
if (pre){
this.pre = pre;
};
if (post){
this.post = post;
};
}
private function _join(vars:Variables):void{
var prop:String;
if (!vars){
return;
};
for (prop in vars) {
this[prop] = vars[prop];
};
}
public function join(... _args):void{
var l:int = _args.length;
var i:int;
while (i < l) {
if (!(_args[i] is Variables)){
} else {
_join(_args[i]);
};
i++;
};
}
public function toString():String{
var value:String;
var p:String;
var component:String;
var i:int;
var j:int;
var priority:String;
var last:String;
var data:Array = [];
for (p in this) {
value = this[p];
if (URIencode){
value = encodeURI(value);
};
data.push(((p + "=") + value));
};
if (sort){
data.sort();
};
if (pre.length > 0){
pre.reverse();
i = 0;
while (i < pre.length) {
priority = pre[i];
j = 0;
while (j < data.length) {
component = data[j];
if (component.indexOf(priority) == 0){
data.unshift(data.splice(j, 1)[0]);
};
j++;
};
i++;
};
pre.reverse();
};
if (post.length > 0){
i = 0;
while (i < post.length) {
last = post[i];
j = 0;
while (j < data.length) {
component = data[j];
if (component.indexOf(last) == 0){
data.push(data.splice(j, 1)[0]);
};
j++;
};
i++;
};
};
return (data.join("&"));
}
public function decode(source:String):void{
var data:Array;
var prop:String;
var name:String;
var value:String;
var tmp:Array;
if (source == ""){
return;
};
if (source.indexOf("&") > -1){
data = source.split("&");
} else {
data = [source];
};
var i:int;
while (i < data.length) {
prop = data[i];
if (prop.indexOf("=") > -1){
tmp = prop.split("=");
name = tmp[0];
value = decodeURI(tmp[1]);
this[name] = value;
};
i++;
};
}
public function toURLVariables():URLVariables{
var p:String;
var urlvars:URLVariables = new URLVariables();
for (p in this) {
urlvars[p] = this[p];
};
return (urlvars);
}
}
}//package com.google.analytics.utils
Section 68
//Version (com.google.analytics.utils.Version)
package com.google.analytics.utils {
public class Version {
private var _maxBuild:uint;// = 0xFF
private var _maxMinor:uint;// = 15
private var _maxMajor:uint;// = 15
private var _revision:uint;
private var _separator:String;// = "."
private var _maxRevision:uint;// = 0xFFFF
private var _build:uint;
private var _minor:uint;
private var _major:uint;
public function Version(_arg1:uint=0, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0){
var _local5:Version;
_maxMajor = 15;
_maxMinor = 15;
_maxBuild = 0xFF;
_maxRevision = 0xFFFF;
_separator = ".";
super();
if ((((((((_arg1 > _maxMajor)) && ((_arg2 == 0)))) && ((_arg3 == 0)))) && ((_arg4 == 0)))){
_local5 = Version.fromNumber(_arg1);
_arg1 = _local5.major;
_arg2 = _local5.minor;
_arg3 = _local5.build;
_arg4 = _local5.revision;
};
this.major = _arg1;
this.minor = _arg2;
this.build = _arg3;
this.revision = _arg4;
}
public function toString(_arg1:int=0):String{
var _local2:Array;
if ((((_arg1 <= 0)) || ((_arg1 > 4)))){
_arg1 = getFields();
};
switch (_arg1){
case 1:
_local2 = [major];
break;
case 2:
_local2 = [major, minor];
break;
case 3:
_local2 = [major, minor, build];
break;
case 4:
default:
_local2 = [major, minor, build, revision];
};
return (_local2.join(_separator));
}
public function get revision():uint{
return (_revision);
}
public function set build(_arg1:uint):void{
_build = Math.min(_arg1, _maxBuild);
}
public function set minor(_arg1:uint):void{
_minor = Math.min(_arg1, _maxMinor);
}
public function get build():uint{
return (_build);
}
public function set major(_arg1:uint):void{
_major = Math.min(_arg1, _maxMajor);
}
public function get minor():uint{
return (_minor);
}
public function valueOf():uint{
return (((((major << 28) | (minor << 24)) | (build << 16)) | revision));
}
public function get major():uint{
return (_major);
}
public function set revision(_arg1:uint):void{
_revision = Math.min(_arg1, _maxRevision);
}
private function getFields():int{
var _local1:int;
_local1 = 4;
if (revision == 0){
_local1--;
};
if ((((_local1 == 3)) && ((build == 0)))){
_local1--;
};
if ((((_local1 == 2)) && ((minor == 0)))){
_local1--;
};
return (_local1);
}
public function equals(_arg1):Boolean{
if (!(_arg1 is Version)){
return (false);
};
if ((((((((_arg1.major == major)) && ((_arg1.minor == minor)))) && ((_arg1.build == build)))) && ((_arg1.revision == revision)))){
return (true);
};
return (false);
}
public static function fromString(_arg1:String="", _arg2:String="."):Version{
var _local3:Version;
var _local4:Array;
_local3 = new (Version);
if ((((_arg1 == "")) || ((_arg1 == null)))){
return (_local3);
};
if (_arg1.indexOf(_arg2) > -1){
_local4 = _arg1.split(_arg2);
_local3.major = parseInt(_local4[0]);
_local3.minor = parseInt(_local4[1]);
_local3.build = parseInt(_local4[2]);
_local3.revision = parseInt(_local4[3]);
} else {
_local3.major = parseInt(_arg1);
};
return (_local3);
}
public static function fromNumber(_arg1:Number=0):Version{
var _local2:Version;
_local2 = new (Version);
if (((((((((((isNaN(_arg1)) || ((_arg1 == 0)))) || ((_arg1 < 0)))) || ((_arg1 == Number.MAX_VALUE)))) || ((_arg1 == Number.POSITIVE_INFINITY)))) || ((_arg1 == Number.NEGATIVE_INFINITY)))){
return (_local2);
};
_local2.major = (_arg1 >>> 28);
_local2.minor = ((_arg1 & 251658240) >>> 24);
_local2.build = ((_arg1 & 0xFF0000) >>> 16);
_local2.revision = (_arg1 & 0xFFFF);
return (_local2);
}
}
}//package com.google.analytics.utils
Section 69
//Bridge (com.google.analytics.v4.Bridge)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
import com.google.analytics.debug.*;
import com.google.analytics.external.*;
public class Bridge implements GoogleAnalyticsAPI {
private var _debug:DebugConfiguration;
private var _proxy:JavascriptProxy;
private var _jsContainer:String;// = "_GATracker"
private var _hasGATracker:Boolean;// = false
private var _account:String;
private static var _linkTrackingObject_js:XML = <script>
<![CDATA[
function( container , target )
{
var targets ;
var name ;
if( target.indexOf(".") > 0 )
{
targets = target.split(".");
name = targets.pop();
}
else
{
targets = [];
name = target;
}
var ref = window;
var depth = targets.length;
for( var j = 0 ; j < depth ; j++ )
{
ref = ref[ targets[j] ] ;
}
window[container][target] = ref[name] ;
}
]]>
</script>
;
private static var _createTrackingObject_js:XML = <script>
<![CDATA[
function( acct )
{
_GATracker[acct] = _gat._getTracker(acct);
}
]]>
</script>
;
private static var _injectTrackingObject_js:XML = <script>
<![CDATA[
function()
{
try
{
_GATracker
}
catch(e)
{
_GATracker = {};
}
}
]]>
</script>
;
private static var _checkGAJS_js:XML = <script>
<![CDATA[
function()
{
if( _gat && _gat._getTracker )
{
return true;
}
return false;
}
]]>
</script>
;
private static var _checkValidTrackingObject_js:XML = <script>
<![CDATA[
function(acct)
{
if( _GATracker[acct] && (_GATracker[acct]._getAccount) )
{
return true ;
}
else
{
return false;
}
}
]]>
</script>
;
public function Bridge(account:String, debug:DebugConfiguration, jsproxy:JavascriptProxy){
var msg0:String;
var msg1:String;
var msg2:String;
super();
_account = account;
_debug = debug;
_proxy = jsproxy;
if (!_checkGAJS()){
msg0 = "";
msg0 = (msg0 + "ga.js not found, be sure to check if\n");
msg0 = (msg0 + "<script src=\"http://www.google-analytics.com/ga.js\"></script>\n");
msg0 = (msg0 + "is included in the HTML.");
_debug.warning(msg0);
throw (new Error(msg0));
};
if (!_hasGATracker){
if (((_debug.javascript) && (_debug.verbose))){
msg1 = "";
msg1 = (msg1 + "The Google Analytics tracking code was not found on the container page\n");
msg1 = (msg1 + "we create it");
_debug.info(msg1, VisualDebugMode.advanced);
};
_injectTrackingObject();
};
if (Utils.validateAccount(account)){
_createTrackingObject(account);
} else {
if (_checkTrackingObject(account)){
_linkTrackingObject(account);
} else {
msg2 = "";
msg2 = (msg2 + (("JS Object \"" + account) + "\" doesn't exist in DOM\n"));
msg2 = (msg2 + "Bridge object not created.");
_debug.warning(msg2);
throw (new Error(msg2));
};
};
}
public function link(targetUrl:String, useHash:Boolean=false):void{
_debug.info((((("link( " + targetUrl) + ", ") + useHash) + " )"));
_call("_link", targetUrl, useHash);
}
public function addOrganic(newOrganicEngine:String, newOrganicKeyword:String):void{
_debug.info((("addOrganic( " + [newOrganicEngine, newOrganicKeyword].join(", ")) + " )"));
_call("_addOrganic", newOrganicEngine);
}
public function setAllowLinker(enable:Boolean):void{
_debug.info((("setAllowLinker( " + enable) + " )"));
_call("_setAllowLinker", enable);
}
private function _linkTrackingObject(path:String):void{
_proxy.call(_linkTrackingObject_js, _jsContainer, path);
}
public function trackEvent(category:String, action:String, label:String=null, value:Number=NaN):Boolean{
var param = 2;
if (((label) && (!((label == ""))))){
param = 3;
};
if ((((param == 3)) && (!(isNaN(value))))){
param = 4;
};
switch (param){
case 4:
_debug.info((("trackEvent( " + [category, action, label, value].join(", ")) + " )"));
return (_call("_trackEvent", category, action, label, value));
case 3:
_debug.info((("trackEvent( " + [category, action, label].join(", ")) + " )"));
return (_call("_trackEvent", category, action, label));
case 2:
default:
_debug.info((("trackEvent( " + [category, action].join(", ")) + " )"));
return (_call("_trackEvent", category, action));
};
}
public function setClientInfo(enable:Boolean):void{
_debug.info((("setClientInfo( " + enable) + " )"));
_call("_setClientInfo", enable);
}
public function trackTrans():void{
_debug.info("trackTrans()");
_call("_trackTrans");
}
public function setCookieTimeout(newDefaultTimeout:int):void{
_debug.info((("setCookieTimeout( " + newDefaultTimeout) + " )"));
_call("_setCookieTimeout", newDefaultTimeout);
}
public function trackPageview(pageURL:String=""):void{
_debug.info((("trackPageview( " + pageURL) + " )"));
_call("_trackPageview", pageURL);
}
public function getClientInfo():Boolean{
_debug.info("getClientInfo()");
return (_call("_getClientInfo"));
}
private function _checkValidTrackingObject(account:String):Boolean{
return (_proxy.call(_checkValidTrackingObject_js, account));
}
private function _checkGAJS():Boolean{
return (_proxy.call(_checkGAJS_js));
}
public function linkByPost(formObject:Object, useHash:Boolean=false):void{
_debug.warning((((("linkByPost( " + formObject) + ", ") + useHash) + " ) not implemented"));
}
private function _call(functionName:String, ... _args){
_args.unshift(((((("window." + _jsContainer) + "[\"") + _account) + "\"].") + functionName));
return (_proxy.call.apply(_proxy, _args));
}
public function hasGAJS():Boolean{
return (_checkGAJS());
}
private function _checkTrackingObject(account:String):Boolean{
var hasObj:Boolean = _proxy.hasProperty(account);
var isTracker:Boolean = _proxy.hasProperty((account + "._getAccount"));
return (((hasObj) && (isTracker)));
}
public function resetSession():void{
_debug.warning("resetSession() not implemented");
}
public function getDetectTitle():Boolean{
_debug.info("getDetectTitle()");
return (_call("_getDetectTitle"));
}
public function setCampNameKey(newCampNameKey:String):void{
_debug.info((("setCampNameKey( " + newCampNameKey) + " )"));
_call("_setCampNameKey", newCampNameKey);
}
public function setDetectFlash(enable:Boolean):void{
_debug.info((("setDetectFlash( " + enable) + " )"));
_call("_setDetectFlash", enable);
}
public function createEventTracker(objName:String):EventTracker{
_debug.info((("createEventTracker( " + objName) + " )"));
return (new EventTracker(objName, this));
}
public function addItem(item:String, sku:String, name:String, category:String, price:Number, quantity:int):void{
_debug.info((("addItem( " + [item, sku, name, category, price, quantity].join(", ")) + " )"));
_call("_addItem", item, sku, name, category, price, quantity);
}
public function clearIgnoredOrganic():void{
_debug.info("clearIgnoredOrganic()");
_call("_clearIgnoreOrganic");
}
public function setVar(newVal:String):void{
_debug.info((("setVar( " + newVal) + " )"));
_call("_setVar", newVal);
}
public function setDomainName(newDomainName:String):void{
_debug.info((("setDomainName( " + newDomainName) + " )"));
_call("_setDomainName", newDomainName);
}
public function hasTrackingAccount(account:String):Boolean{
if (Utils.validateAccount(account)){
return (_checkValidTrackingObject(account));
};
return (_checkTrackingObject(account));
}
public function setCampSourceKey(newCampSrcKey:String):void{
_debug.info((("setCampSourceKey( " + newCampSrcKey) + " )"));
_call("_setCampSourceKey", newCampSrcKey);
}
public function addTrans(orderId:String, affiliation:String, total:Number, tax:Number, shipping:Number, city:String, state:String, country:String):Object{
_debug.info((("addTrans( " + [orderId, affiliation, total, tax, shipping, city, state, country].join(", ")) + " )"));
_call("_addTrans", orderId, affiliation, total, tax, shipping, city, state, country);
return (null);
}
public function setCampContentKey(newCampContentKey:String):void{
_debug.info((("setCampContentKey( " + newCampContentKey) + " )"));
_call("_setCampContentKey", newCampContentKey);
}
public function setLocalServerMode():void{
_debug.info("setLocalServerMode()");
_call("_setLocalServerMode");
}
public function getLocalGifPath():String{
_debug.info("getLocalGifPath()");
return (_call("_getLocalGifPath"));
}
public function clearIgnoredRef():void{
_debug.info("clearIgnoredRef()");
_call("_clearIgnoreRef");
}
public function setAllowAnchor(enable:Boolean):void{
_debug.info((("setAllowAnchor( " + enable) + " )"));
_call("_setAllowAnchor", enable);
}
public function setLocalGifPath(newLocalGifPath:String):void{
_debug.info((("setLocalGifPath( " + newLocalGifPath) + " )"));
_call("_setLocalGifPath", newLocalGifPath);
}
public function getVersion():String{
_debug.info("getVersion()");
return (_call("_getVersion"));
}
private function _injectTrackingObject():void{
_proxy.executeBlock(_injectTrackingObject_js);
_hasGATracker = true;
}
public function setCookiePath(newCookiePath:String):void{
_debug.info((("setCookiePath( " + newCookiePath) + " )"));
_call("_setCookiePath", newCookiePath);
}
public function setSampleRate(newRate:Number):void{
_debug.info((("setSampleRate( " + newRate) + " )"));
_call("_setSampleRate", newRate);
}
public function setAllowHash(enable:Boolean):void{
_debug.info((("setAllowHash( " + enable) + " )"));
_call("_setAllowHash", enable);
}
public function addIgnoredOrganic(newIgnoredOrganicKeyword:String):void{
_debug.info((("addIgnoredOrganic( " + newIgnoredOrganicKeyword) + " )"));
_call("_addIgnoredOrganic", newIgnoredOrganicKeyword);
}
public function setCampNOKey(newCampNOKey:String):void{
_debug.info((("setCampNOKey( " + newCampNOKey) + " )"));
_call("_setCampNOKey", newCampNOKey);
}
public function cookiePathCopy(newPath:String):void{
_debug.info((("cookiePathCopy( " + newPath) + " )"));
_call("_cookiePathCopy", newPath);
}
public function setLocalRemoteServerMode():void{
_debug.info("setLocalRemoteServerMode()");
_call("_setLocalRemoteServerMode");
}
public function getServiceMode():ServerOperationMode{
_debug.info("getServiceMode()");
return (_call("_getServiceMode"));
}
public function setDetectTitle(enable:Boolean):void{
_debug.info((("setDetectTitle( " + enable) + " )"));
_call("_setDetectTitle", enable);
}
private function _createTrackingObject(account:String):void{
_proxy.call(_createTrackingObject_js, account);
}
public function setCampaignTrack(enable:Boolean):void{
_debug.info((("setCampaignTrack( " + enable) + " )"));
_call("_setCampaignTrack", enable);
}
public function clearOrganic():void{
_debug.info("clearOrganic()");
_call("_clearOrganic");
}
public function setCampTermKey(newCampTermKey:String):void{
_debug.info((("setCampTermKey( " + newCampTermKey) + " )"));
_call("_setCampTermKey", newCampTermKey);
}
public function getDetectFlash():Boolean{
_debug.info("getDetectFlash()");
return (_call("_getDetectFlash"));
}
public function setCampMediumKey(newCampMedKey:String):void{
_debug.info((("setCampMediumKey( " + newCampMedKey) + " )"));
_call("_setCampMediumKey", newCampMedKey);
}
public function addIgnoredRef(newIgnoredReferrer:String):void{
_debug.info((("addIgnoredRef( " + newIgnoredReferrer) + " )"));
_call("_addIgnoredRef", newIgnoredReferrer);
}
public function setSessionTimeout(newTimeout:int):void{
_debug.info((("setSessionTimeout( " + newTimeout) + " )"));
_call("_setSessionTimeout", newTimeout);
}
public function setRemoteServerMode():void{
_debug.info("setRemoteServerMode()");
_call("_setRemoteServerMode");
}
public function getAccount():String{
_debug.info("getAccount()");
return (_call("_getAccount"));
}
}
}//package com.google.analytics.v4
Section 70
//Configuration (com.google.analytics.v4.Configuration)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
import com.google.analytics.debug.*;
import com.google.analytics.utils.*;
import com.google.analytics.campaign.*;
public class Configuration {
public var serverMode:ServerOperationMode;
public var detectFlash:Boolean;// = true
public var allowLocalTracking:Boolean;// = true
public var secureRemoteGIFpath:String;// = "https://ssl.google-analytics.com/__utm.gif"
public var hasSiteOverlay:Boolean;// = false
private var _version:String;// = "4.3as"
public var allowDomainHash:Boolean;// = true
public var detectClientInfo:Boolean;// = true
public var idleLoop:Number;// = 30
public var isTrackOutboundSubdomains:Boolean;// = false
public var cookiePath:String;// = "/"
public var transactionFieldDelim:String;// = "|"
private var _organic:Organic;
private var _cookieName:String;// = "analytics"
public var campaignKey:CampaignKey;
public var google:String;// = "google"
public var googleCsePath:String;// = "cse"
public var bucketCapacity:Number;// = 10
private var _sampleRate:Number;// = 1
public var remoteGIFpath:String;// = "http://www.google-analytics.com/__utm.gif"
public var googleSearchParam:String;// = "q"
public var allowLinker:Boolean;// = false
public var maxOutboundLinkExamined:Number;// = 1000
private var _debug:DebugConfiguration;
private var _trackingLimitPerSession:int;// = 500
private var _domain:Domain;
public var allowAnchor:Boolean;// = false
public var tokenCliff:int;// = 10
public var sessionTimeout:Number;
public var idleTimeout:Number;// = 60
public var campaignTracking:Boolean;// = true
public var domainName:String;// = ""
public var detectTitle:Boolean;// = true
public var tokenRate:Number;// = 0.2
public var conversionTimeout:Number;
public var localGIFpath:String;// = "/__utm.gif"
public function Configuration(_arg1:DebugConfiguration=null){
_version = "4.3as";
_sampleRate = 1;
_trackingLimitPerSession = 500;
_organic = new Organic();
googleCsePath = "cse";
googleSearchParam = "q";
google = "google";
_cookieName = "analytics";
allowDomainHash = true;
allowAnchor = false;
allowLinker = false;
hasSiteOverlay = false;
tokenRate = 0.2;
conversionTimeout = Timespan.sixmonths;
sessionTimeout = Timespan.thirtyminutes;
idleLoop = 30;
idleTimeout = 60;
maxOutboundLinkExamined = 1000;
tokenCliff = 10;
bucketCapacity = 10;
detectClientInfo = true;
detectFlash = true;
detectTitle = true;
campaignKey = new CampaignKey();
campaignTracking = true;
isTrackOutboundSubdomains = false;
serverMode = ServerOperationMode.remote;
localGIFpath = "/__utm.gif";
remoteGIFpath = "http://www.google-analytics.com/__utm.gif";
secureRemoteGIFpath = "https://ssl.google-analytics.com/__utm.gif";
cookiePath = "/";
transactionFieldDelim = "|";
domainName = "";
allowLocalTracking = true;
super();
_debug = _arg1;
_domain = new Domain(DomainNameMode.auto, "", _debug);
serverMode = ServerOperationMode.remote;
_initOrganicSources();
}
public function get organic():Organic{
return (_organic);
}
public function get trackingLimitPerSession():int{
return (_trackingLimitPerSession);
}
private function _initOrganicSources():void{
addOrganicSource(google, googleSearchParam);
addOrganicSource("yahoo", "p");
addOrganicSource("msn", "q");
addOrganicSource("aol", "query");
addOrganicSource("aol", "encquery");
addOrganicSource("lycos", "query");
addOrganicSource("ask", "q");
addOrganicSource("altavista", "q");
addOrganicSource("netscape", "query");
addOrganicSource("cnn", "query");
addOrganicSource("looksmart", "qt");
addOrganicSource("about", "terms");
addOrganicSource("mamma", "query");
addOrganicSource("alltheweb", "q");
addOrganicSource("gigablast", "q");
addOrganicSource("voila", "rdata");
addOrganicSource("virgilio", "qs");
addOrganicSource("live", "q");
addOrganicSource("baidu", "wd");
addOrganicSource("alice", "qs");
addOrganicSource("yandex", "text");
addOrganicSource("najdi", "q");
addOrganicSource("aol", "q");
addOrganicSource("club-internet", "q");
addOrganicSource("mama", "query");
addOrganicSource("seznam", "q");
addOrganicSource("search", "q");
addOrganicSource("wp", "szukaj");
addOrganicSource("onet", "qt");
addOrganicSource("netsprint", "q");
addOrganicSource("google.interia", "q");
addOrganicSource("szukacz", "q");
addOrganicSource("yam", "k");
addOrganicSource("pchome", "q");
addOrganicSource("kvasir", "searchExpr");
addOrganicSource("sesam", "q");
addOrganicSource("ozu", "q");
addOrganicSource("terra", "query");
addOrganicSource("nostrum", "query");
addOrganicSource("mynet", "q");
addOrganicSource("ekolay", "q");
addOrganicSource("search.ilse", "search_for");
}
public function get sampleRate():Number{
return (_sampleRate);
}
public function get cookieName():String{
return (_cookieName);
}
public function addOrganicSource(_arg1:String, _arg2:String):void{
var engine = _arg1;
var keyword = _arg2;
try {
_organic.addSource(engine, keyword);
} catch(e:Error) {
if (((_debug) && (_debug.active))){
_debug.warning(e.message);
};
};
}
public function get domain():Domain{
return (_domain);
}
public function set sampleRate(_arg1:Number):void{
if (_arg1 <= 0){
_arg1 = 0.1;
};
if (_arg1 > 1){
_arg1 = 1;
};
_arg1 = Number(_arg1.toFixed(2));
_sampleRate = _arg1;
}
public function get version():String{
return (_version);
}
}
}//package com.google.analytics.v4
Section 71
//GoogleAnalyticsAPI (com.google.analytics.v4.GoogleAnalyticsAPI)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
public interface GoogleAnalyticsAPI {
function setCampSourceKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function getServiceMode():ServerOperationMode;
function resetSession():void;
function setLocalServerMode():void;
function setCampContentKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function addOrganic(_arg1:String, _arg2:String):void;
function setDetectFlash(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void;
function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object;
function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean;
function setCampTermKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function setCampNameKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function addIgnoredOrganic(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void;
function setAllowLinker(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void;
function getClientInfo():Boolean;
function getDetectFlash():Boolean;
function setCampaignTrack(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void;
function createEventTracker(void:String):EventTracker;
function setCookieTimeout(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:int):void;
function setAllowAnchor(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void;
function trackTrans():void;
function clearOrganic():void;
function trackPageview(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String=""):void;
function setLocalGifPath(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function getVersion():String;
function getLocalGifPath():String;
function setVar(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function clearIgnoredOrganic():void;
function setCampMediumKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function addIgnoredRef(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function setClientInfo(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void;
function setCookiePath(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function setSampleRate(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Number):void;
function setSessionTimeout(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:int):void;
function setRemoteServerMode():void;
function clearIgnoredRef():void;
function setDomainName(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function setDetectTitle(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void;
function setAllowHash(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void;
function getAccount():String;
function linkByPost(_arg1:Object, _arg2:Boolean=false):void;
function link(_arg1:String, _arg2:Boolean=false):void;
function setCampNOKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function setLocalRemoteServerMode():void;
function cookiePathCopy(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void;
function getDetectTitle():Boolean;
}
}//package com.google.analytics.v4
Section 72
//Tracker (com.google.analytics.v4.Tracker)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
import com.google.analytics.debug.*;
import com.google.analytics.external.*;
import com.google.analytics.utils.*;
import com.google.analytics.data.*;
import com.google.analytics.campaign.*;
public class Tracker implements GoogleAnalyticsAPI {
private const EVENT_TRACKER_LABEL_KEY_NUM:int = 3;
private const EVENT_TRACKER_VALUE_VALUE_NUM:int = 1;
private const EVENT_TRACKER_PROJECT_ID:int = 5;
private const EVENT_TRACKER_OBJECT_NAME_KEY_NUM:int = 1;
private const EVENT_TRACKER_TYPE_KEY_NUM:int = 2;
private var _adSense:AdSenseGlobals;
private var _eventTracker:X10;
private var _noSessionInformation:Boolean;// = false
private var _browserInfo:BrowserInfo;
private var _debug:DebugConfiguration;
private var _isNewVisitor:Boolean;// = false
private var _buffer:Buffer;
private var _config:Configuration;
private var _x10Module:X10;
private var _campaign:CampaignManager;
private var _formatedReferrer:String;
private var _timeStamp:Number;
private var _info:Environment;
private var _domainHash:Number;
private var _campaignInfo:CampaignInfo;
private var _gifRequest:GIFRequest;
private var _hasInitData:Boolean;// = false
private var _account:String;
public function Tracker(account:String, config:Configuration, debug:DebugConfiguration, info:Environment, buffer:Buffer, gifRequest:GIFRequest, adSense:AdSenseGlobals){
var msg:String;
super();
_account = account;
_config = config;
_debug = debug;
_info = info;
_buffer = buffer;
_gifRequest = gifRequest;
_adSense = adSense;
if (!Utils.validateAccount(account)){
msg = (("Account \"" + account) + "\" is not valid.");
_debug.warning(msg);
throw (new Error(msg));
};
_initData();
}
private function _doTracking():Boolean{
if (((((!((_info.protocol == Protocols.file))) && (!((_info.protocol == Protocols.none))))) && (_isNotGoogleSearch()))){
return (true);
};
if (_config.allowLocalTracking){
return (true);
};
return (false);
}
public function addOrganic(newOrganicEngine:String, newOrganicKeyword:String):void{
_debug.info((("addOrganic( " + [newOrganicEngine, newOrganicKeyword].join(", ")) + " )"));
_config.organic.addSource(newOrganicEngine, newOrganicKeyword);
}
public function setAllowLinker(enable:Boolean):void{
_config.allowLinker = enable;
_debug.info((("setAllowLinker( " + _config.allowLinker) + " )"));
}
public function trackEvent(category:String, action:String, label:String=null, value:Number=NaN):Boolean{
var success:Boolean;
var params = 2;
if (((!((category == ""))) && (!((action == ""))))){
_eventTracker.clearKey(EVENT_TRACKER_PROJECT_ID);
_eventTracker.clearValue(EVENT_TRACKER_PROJECT_ID);
success = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_OBJECT_NAME_KEY_NUM, category);
success = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_TYPE_KEY_NUM, action);
if (((label) && (!((label == ""))))){
success = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_LABEL_KEY_NUM, label);
params = 3;
if (!isNaN(value)){
success = _eventTracker.setValue(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_VALUE_VALUE_NUM, value);
params = 4;
};
};
if (success){
_debug.info(((("valid event tracking call\ncategory: " + category) + "\naction: ") + action), VisualDebugMode.geek);
_sendXEvent(_eventTracker);
};
} else {
_debug.warning(((("event tracking call is not valid, failed!\ncategory: " + category) + "\naction: ") + action), VisualDebugMode.geek);
success = false;
};
switch (params){
case 4:
_debug.info((("trackEvent( " + [category, action, label, value].join(", ")) + " )"));
break;
case 3:
_debug.info((("trackEvent( " + [category, action, label].join(", ")) + " )"));
break;
case 2:
default:
_debug.info((("trackEvent( " + [category, action].join(", ")) + " )"));
};
return (success);
}
public function trackPageview(pageURL:String=""):void{
_debug.info((("trackPageview( " + pageURL) + " )"));
if (_doTracking()){
_initData();
_trackMetrics(pageURL);
_noSessionInformation = false;
} else {
_debug.warning((("trackPageview( " + pageURL) + " ) failed"));
};
}
public function setCookieTimeout(newDefaultTimeout:int):void{
_config.conversionTimeout = newDefaultTimeout;
_debug.info((("setCookieTimeout( " + _config.conversionTimeout) + " )"));
}
public function trackTrans():void{
_debug.warning("trackTrans() not implemented");
}
public function setClientInfo(enable:Boolean):void{
_config.detectClientInfo = enable;
_debug.info((("setClientInfo( " + _config.detectClientInfo) + " )"));
}
public function linkByPost(formObject:Object, useHash:Boolean=false):void{
_debug.warning((("linkByPost( " + [formObject, useHash].join(", ")) + " ) not implemented"));
}
private function _initData():void{
var data0:String;
var data:String;
if (!_hasInitData){
_updateDomainName();
_domainHash = _getDomainHash();
_timeStamp = Math.round((new Date().getTime() / 1000));
if (_debug.verbose){
data0 = "";
data0 = (data0 + "_initData 0");
data0 = (data0 + ("\ndomain name: " + _config.domainName));
data0 = (data0 + ("\ndomain hash: " + _domainHash));
data0 = (data0 + (((("\ntimestamp: " + _timeStamp) + " (") + new Date((_timeStamp * 1000))) + ")"));
_debug.info(data0, VisualDebugMode.geek);
};
};
if (_doTracking()){
_handleCookie();
};
if (!_hasInitData){
if (_doTracking()){
_formatedReferrer = _formatReferrer();
_browserInfo = new BrowserInfo(_config, _info);
_debug.info(("browserInfo: " + _browserInfo.toURLString()), VisualDebugMode.advanced);
if (_config.campaignTracking){
_campaign = new CampaignManager(_config, _debug, _buffer, _domainHash, _formatedReferrer, _timeStamp);
_campaignInfo = _campaign.getCampaignInformation(_info.locationSearch, _noSessionInformation);
_debug.info(("campaignInfo: " + _campaignInfo.toURLString()), VisualDebugMode.advanced);
};
};
_x10Module = new X10();
_eventTracker = new X10();
_hasInitData = true;
};
if (_config.hasSiteOverlay){
_debug.warning("Site Overlay is not supported");
};
if (_debug.verbose){
data = "";
data = (data + "_initData (misc)");
data = (data + ("\nflash version: " + _info.flashVersion.toString(4)));
data = (data + ("\nprotocol: " + _info.protocol));
data = (data + (("\ndefault domain name (auto): \"" + _info.domainName) + "\""));
data = (data + ("\nlanguage: " + _info.language));
data = (data + ("\ndomain hash: " + _getDomainHash()));
data = (data + ("\nuser-agent: " + _info.userAgent));
_debug.info(data, VisualDebugMode.geek);
};
}
public function getDetectTitle():Boolean{
_debug.info("getDetectTitle()");
return (_config.detectTitle);
}
public function resetSession():void{
_debug.info("resetSession()");
_buffer.resetCurrentSession();
}
public function getClientInfo():Boolean{
_debug.info("getClientInfo()");
return (_config.detectClientInfo);
}
private function _sendXEvent(opt_xObj:X10=null):void{
var searchVariables:Variables;
var eventInfo:EventInfo;
var eventvars:Variables;
var generalvars:Variables;
_initData();
if (_takeSample()){
searchVariables = new Variables();
searchVariables.URIencode = true;
eventInfo = new EventInfo(true, _x10Module, opt_xObj);
eventvars = eventInfo.toVariables();
generalvars = _renderMetricsSearchVariables();
searchVariables.join(eventvars, generalvars);
_gifRequest.send(_account, searchVariables, false, true);
};
}
public function setDetectFlash(enable:Boolean):void{
_config.detectFlash = enable;
_debug.info((("setDetectFlash( " + _config.detectFlash) + " )"));
}
public function setCampNameKey(newCampNameKey:String):void{
_config.campaignKey.UCCN = newCampNameKey;
var msg = (("setCampNameKey( " + _config.campaignKey.UCCN) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((msg + " [UCCN]"));
} else {
_debug.info(msg);
};
}
private function _formatReferrer():String{
var domainName:String;
var ref:URL;
var dom:URL;
var referrer:String = _info.referrer;
if ((((referrer == "")) || ((referrer == "localhost")))){
referrer = "-";
} else {
domainName = _info.domainName;
ref = new URL(referrer);
dom = new URL(("http://" + domainName));
if (ref.hostName == domainName){
return ("-");
};
if (dom.domain == ref.domain){
if (dom.subDomain != ref.subDomain){
referrer = "0";
};
};
if ((((referrer.charAt(0) == "[")) && (referrer.charAt((referrer.length - 1))))){
referrer = "-";
};
};
_debug.info(("formated referrer: " + referrer), VisualDebugMode.advanced);
return (referrer);
}
private function _visitCode():Number{
if (_debug.verbose){
_debug.info(("visitCode: " + _buffer.utma.sessionId), VisualDebugMode.geek);
};
return (_buffer.utma.sessionId);
}
public function createEventTracker(objName:String):EventTracker{
_debug.info((("createEventTracker( " + objName) + " )"));
return (new EventTracker(objName, this));
}
public function addItem(item:String, sku:String, name:String, category:String, price:Number, quantity:int):void{
_debug.warning((("addItem( " + [item, sku, name, category, price, quantity].join(", ")) + " ) not implemented"));
}
public function clearIgnoredOrganic():void{
_debug.info("clearIgnoredOrganic()");
_config.organic.clearIgnoredKeywords();
}
public function setVar(newVal:String):void{
var variables:Variables;
if (((!((newVal == ""))) && (_isNotGoogleSearch()))){
_initData();
_buffer.utmv.domainHash = _domainHash;
_buffer.utmv.value = newVal;
if (_debug.verbose){
_debug.info(_buffer.utmv.toString(), VisualDebugMode.geek);
};
_debug.info((("setVar( " + newVal) + " )"));
if (_takeSample()){
variables = new Variables();
variables.utmt = "var";
_gifRequest.send(_account, variables);
};
} else {
_debug.warning((("setVar \"" + newVal) + "\" is ignored"));
};
}
public function setDomainName(newDomainName:String):void{
if (newDomainName == "auto"){
_config.domain.mode = DomainNameMode.auto;
} else {
if (newDomainName == "none"){
_config.domain.mode = DomainNameMode.none;
} else {
_config.domain.mode = DomainNameMode.custom;
_config.domain.name = newDomainName;
};
};
_updateDomainName();
_debug.info((("setDomainName( " + _config.domainName) + " )"));
}
private function _updateDomainName():void{
var domainName:String;
if (_config.domain.mode == DomainNameMode.auto){
domainName = _info.domainName;
if (domainName.substring(0, 4) == "www."){
domainName = domainName.substring(4);
};
_config.domain.name = domainName;
};
_config.domainName = _config.domain.name.toLowerCase();
_debug.info(("domain name: " + _config.domainName), VisualDebugMode.advanced);
}
public function addTrans(orderId:String, affiliation:String, total:Number, tax:Number, shipping:Number, city:String, state:String, country:String):Object{
_debug.warning((("addTrans( " + [orderId, affiliation, total, tax, shipping, city, state, country].join(", ")) + " ) not implemented"));
return (null);
}
private function _renderMetricsSearchVariables(pageURL:String=""):Variables{
var campvars:Variables;
var variables:Variables = new Variables();
variables.URIencode = true;
var docInfo:DocumentInfo = new DocumentInfo(_config, _info, _formatedReferrer, pageURL, _adSense);
_debug.info(("docInfo: " + docInfo.toURLString()), VisualDebugMode.geek);
if (_config.campaignTracking){
campvars = _campaignInfo.toVariables();
};
var browservars:Variables = _browserInfo.toVariables();
variables.join(docInfo.toVariables(), browservars, campvars);
return (variables);
}
public function setCampContentKey(newCampContentKey:String):void{
_config.campaignKey.UCCT = newCampContentKey;
var msg = (("setCampContentKey( " + _config.campaignKey.UCCT) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((msg + " [UCCT]"));
} else {
_debug.info(msg);
};
}
private function _handleCookie():void{
var data0:String;
var data1:String;
var vid:Array;
var data2:String;
if (_config.allowLinker){
};
if (((_buffer.hasUTMA()) && (!(_buffer.utma.isEmpty())))){
if (((!(_buffer.hasUTMB())) || (!(_buffer.hasUTMC())))){
_buffer.updateUTMA(_timeStamp);
_noSessionInformation = true;
};
if (_debug.verbose){
_debug.info(("from cookie " + _buffer.utma.toString()), VisualDebugMode.geek);
};
} else {
_debug.info("create a new utma", VisualDebugMode.advanced);
_buffer.utma.domainHash = _domainHash;
_buffer.utma.sessionId = _getUniqueSessionId();
_buffer.utma.firstTime = _timeStamp;
_buffer.utma.lastTime = _timeStamp;
_buffer.utma.currentTime = _timeStamp;
_buffer.utma.sessionCount = 1;
if (_debug.verbose){
_debug.info(_buffer.utma.toString(), VisualDebugMode.geek);
};
_noSessionInformation = true;
_isNewVisitor = true;
};
if (((_adSense.gaGlobal) && ((_adSense.dh == String(_domainHash))))){
if (_adSense.sid){
_buffer.utma.currentTime = Number(_adSense.sid);
if (_debug.verbose){
data0 = "";
data0 = (data0 + "AdSense sid found\n");
data0 = (data0 + (((("Override currentTime(" + _buffer.utma.currentTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")"));
_debug.info(data0, VisualDebugMode.geek);
};
};
if (_isNewVisitor){
if (_adSense.sid){
_buffer.utma.lastTime = Number(_adSense.sid);
if (_debug.verbose){
data1 = "";
data1 = (data1 + "AdSense sid found (new visitor)\n");
data1 = (data1 + (((("Override lastTime(" + _buffer.utma.lastTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")"));
_debug.info(data1, VisualDebugMode.geek);
};
};
if (_adSense.vid){
vid = _adSense.vid.split(".");
_buffer.utma.sessionId = Number(vid[0]);
_buffer.utma.firstTime = Number(vid[1]);
if (_debug.verbose){
data2 = "";
data2 = (data2 + "AdSense vid found (new visitor)\n");
data2 = (data2 + (((("Override sessionId(" + _buffer.utma.sessionId) + ") from AdSense vid(") + Number(vid[0])) + ")\n"));
data2 = (data2 + (((("Override firstTime(" + _buffer.utma.firstTime) + ") from AdSense vid(") + Number(vid[1])) + ")"));
_debug.info(data2, VisualDebugMode.geek);
};
};
if (_debug.verbose){
_debug.info(("AdSense modified : " + _buffer.utma.toString()), VisualDebugMode.geek);
};
};
};
_buffer.utmb.domainHash = _domainHash;
if (isNaN(_buffer.utmb.trackCount)){
_buffer.utmb.trackCount = 0;
};
if (isNaN(_buffer.utmb.token)){
_buffer.utmb.token = _config.tokenCliff;
};
if (isNaN(_buffer.utmb.lastTime)){
_buffer.utmb.lastTime = _buffer.utma.currentTime;
};
_buffer.utmc.domainHash = _domainHash;
if (_debug.verbose){
_debug.info(_buffer.utmb.toString(), VisualDebugMode.advanced);
_debug.info(_buffer.utmc.toString(), VisualDebugMode.advanced);
};
}
public function setLocalServerMode():void{
_config.serverMode = ServerOperationMode.local;
_debug.info("setLocalServerMode()");
}
public function clearIgnoredRef():void{
_debug.info("clearIgnoredRef()");
_config.organic.clearIgnoredReferrals();
}
public function setCampSourceKey(newCampSrcKey:String):void{
_config.campaignKey.UCSR = newCampSrcKey;
var msg = (("setCampSourceKey( " + _config.campaignKey.UCSR) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((msg + " [UCSR]"));
} else {
_debug.info(msg);
};
}
public function getLocalGifPath():String{
_debug.info("getLocalGifPath()");
return (_config.localGIFpath);
}
public function setLocalGifPath(newLocalGifPath:String):void{
_config.localGIFpath = newLocalGifPath;
_debug.info((("setLocalGifPath( " + _config.localGIFpath) + " )"));
}
public function getVersion():String{
_debug.info("getVersion()");
return (_config.version);
}
public function setAllowAnchor(enable:Boolean):void{
_config.allowAnchor = enable;
_debug.info((("setAllowAnchor( " + _config.allowAnchor) + " )"));
}
private function _isNotGoogleSearch():Boolean{
var domainName:String = _config.domainName;
var g0 = (domainName.indexOf("www.google.") < 0);
var g1 = (domainName.indexOf(".google.") < 0);
var g2 = (domainName.indexOf("google.") < 0);
var g4 = (domainName.indexOf("google.org") > -1);
return (((((((((g0) || (g1))) || (g2))) || (!((_config.cookiePath == "/"))))) || (g4)));
}
public function setSampleRate(newRate:Number):void{
if (newRate < 0){
_debug.warning("sample rate can not be negative, ignoring value.");
} else {
_config.sampleRate = newRate;
};
_debug.info((("setSampleRate( " + _config.sampleRate) + " )"));
}
private function _takeSample():Boolean{
if (_debug.verbose){
_debug.info((((("takeSample: (" + (_visitCode() % 10000)) + ") < (") + (_config.sampleRate * 10000)) + ")"), VisualDebugMode.geek);
};
return (((_visitCode() % 10000) < (_config.sampleRate * 10000)));
}
public function setCookiePath(newCookiePath:String):void{
_config.cookiePath = newCookiePath;
_debug.info((("setCookiePath( " + _config.cookiePath) + " )"));
}
public function setAllowHash(enable:Boolean):void{
_config.allowDomainHash = enable;
_debug.info((("setAllowHash( " + _config.allowDomainHash) + " )"));
}
private function _generateUserDataHash():Number{
var hash:String = "";
hash = (hash + _info.appName);
hash = (hash + _info.appVersion);
hash = (hash + _info.language);
hash = (hash + _info.platform);
hash = (hash + _info.userAgent.toString());
hash = (hash + (((_info.screenWidth + "x") + _info.screenHeight) + _info.screenColorDepth));
hash = (hash + _info.referrer);
return (Utils.generateHash(hash));
}
public function setCampNOKey(newCampNOKey:String):void{
_config.campaignKey.UCNO = newCampNOKey;
var msg = (("setCampNOKey( " + _config.campaignKey.UCNO) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((msg + " [UCNO]"));
} else {
_debug.info(msg);
};
}
public function addIgnoredOrganic(newIgnoredOrganicKeyword:String):void{
_debug.info((("addIgnoredOrganic( " + newIgnoredOrganicKeyword) + " )"));
_config.organic.addIgnoredKeyword(newIgnoredOrganicKeyword);
}
public function setLocalRemoteServerMode():void{
_config.serverMode = ServerOperationMode.both;
_debug.info("setLocalRemoteServerMode()");
}
public function cookiePathCopy(newPath:String):void{
_debug.warning((("cookiePathCopy( " + newPath) + " ) not implemented"));
}
public function setDetectTitle(enable:Boolean):void{
_config.detectTitle = enable;
_debug.info((("setDetectTitle( " + _config.detectTitle) + " )"));
}
public function setCampTermKey(newCampTermKey:String):void{
_config.campaignKey.UCTR = newCampTermKey;
var msg = (("setCampTermKey( " + _config.campaignKey.UCTR) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((msg + " [UCTR]"));
} else {
_debug.info(msg);
};
}
public function getServiceMode():ServerOperationMode{
_debug.info("getServiceMode()");
return (_config.serverMode);
}
private function _trackMetrics(pageURL:String=""):void{
var searchVariables:Variables;
var x10vars:Variables;
var generalvars:Variables;
var eventInfo:EventInfo;
if (_takeSample()){
searchVariables = new Variables();
searchVariables.URIencode = true;
if (((_x10Module) && (_x10Module.hasData()))){
eventInfo = new EventInfo(false, _x10Module);
x10vars = eventInfo.toVariables();
};
generalvars = _renderMetricsSearchVariables(pageURL);
searchVariables.join(x10vars, generalvars);
_gifRequest.send(_account, searchVariables);
};
}
public function setCampaignTrack(enable:Boolean):void{
_config.campaignTracking = enable;
_debug.info((("setCampaignTrack( " + _config.campaignTracking) + " )"));
}
public function addIgnoredRef(newIgnoredReferrer:String):void{
_debug.info((("addIgnoredRef( " + newIgnoredReferrer) + " )"));
_config.organic.addIgnoredReferral(newIgnoredReferrer);
}
public function clearOrganic():void{
_debug.info("clearOrganic()");
_config.organic.clearEngines();
}
public function getDetectFlash():Boolean{
_debug.info("getDetectFlash()");
return (_config.detectFlash);
}
public function setCampMediumKey(newCampMedKey:String):void{
_config.campaignKey.UCMD = newCampMedKey;
var msg = (("setCampMediumKey( " + _config.campaignKey.UCMD) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((msg + " [UCMD]"));
} else {
_debug.info(msg);
};
}
private function _getUniqueSessionId():Number{
var sessionID:Number = ((Utils.generate32bitRandom() ^ _generateUserDataHash()) * 2147483647);
_debug.info(("Session ID: " + sessionID), VisualDebugMode.geek);
return (sessionID);
}
private function _getDomainHash():Number{
if (((((!(_config.domainName)) || ((_config.domainName == "")))) || ((_config.domain.mode == DomainNameMode.none)))){
_config.domainName = "";
return (1);
};
_updateDomainName();
if (_config.allowDomainHash){
return (Utils.generateHash(_config.domainName));
};
return (1);
}
public function setSessionTimeout(newTimeout:int):void{
_config.sessionTimeout = newTimeout;
_debug.info((("setSessionTimeout( " + _config.sessionTimeout) + " )"));
}
public function getAccount():String{
_debug.info("getAccount()");
return (_account);
}
public function link(targetUrl:String, useHash:Boolean=false):void{
_debug.warning((("link( " + [targetUrl, useHash].join(", ")) + " ) not implemented"));
}
public function setRemoteServerMode():void{
_config.serverMode = ServerOperationMode.remote;
_debug.info("setRemoteServerMode()");
}
}
}//package com.google.analytics.v4
Section 73
//AnalyticsTracker (com.google.analytics.AnalyticsTracker)
package com.google.analytics {
import flash.events.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
public interface AnalyticsTracker extends GoogleAnalyticsAPI, IEventDispatcher {
function set config(_arg1:Configuration):void;
function isReady():Boolean;
function get mode():String;
function set debug(_arg1:DebugConfiguration):void;
function get account():String;
function set mode(_arg1:String):void;
function get config():Configuration;
function get debug():DebugConfiguration;
function set account(_arg1:String):void;
function get visualDebug():Boolean;
function set visualDebug(_arg1:Boolean):void;
}
}//package com.google.analytics
Section 74
//API (com.google.analytics.API)
package com.google.analytics {
import com.google.analytics.utils.*;
public class API {
public static var version:Version = new Version();
public function API(){
super();
}
version.major = 1;
version.minor = 0;
version.build = 1;
version.revision = "$Rev: 319 $ ".split(" ")[1];
}
}//package com.google.analytics
Section 75
//GATracker (com.google.analytics.GATracker)
package com.google.analytics {
import flash.display.*;
import flash.events.*;
import com.google.analytics.core.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import com.google.analytics.external.*;
import com.google.analytics.utils.*;
import com.google.analytics.events.*;
public class GATracker implements AnalyticsTracker {
private var _adSense:AdSenseGlobals;
private var _env:Environment;
private var _visualDebug:Boolean;
private var _idleTimer:IdleTimer;
private var _debug:DebugConfiguration;
private var _buffer:Buffer;
private var _config:Configuration;
private var _mode:String;
private var _display:DisplayObject;
private var _jsproxy:JavascriptProxy;
private var _dom:HTMLDOM;
private var _eventDispatcher:EventDispatcher;
private var _ready:Boolean;// = false
private var _gifRequest:GIFRequest;
private var _account:String;
private var _tracker:GoogleAnalyticsAPI;
public static var version:Version = API.version;
public static var autobuild:Boolean = true;
public function GATracker(_arg1:DisplayObject, _arg2:String, _arg3:String="AS3", _arg4:Boolean=false, _arg5:Configuration=null, _arg6:DebugConfiguration=null){
_ready = false;
super();
_display = _arg1;
_eventDispatcher = new EventDispatcher(this);
_tracker = new TrackerCache();
this.account = _arg2;
this.mode = _arg3;
this.visualDebug = _arg4;
if (!_arg6){
this.debug = new DebugConfiguration();
};
if (!_arg5){
this.config = new Configuration(_arg6);
};
if (autobuild){
_factory();
};
}
public function link(_arg1:String, _arg2:Boolean=false):void{
_tracker.link(_arg1, _arg2);
}
public function addOrganic(_arg1:String, _arg2:String):void{
_tracker.addOrganic(_arg1, _arg2);
}
public function setAllowLinker(_arg1:Boolean):void{
_tracker.setAllowLinker(_arg1);
}
public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{
return (_tracker.trackEvent(_arg1, _arg2, _arg3, _arg4));
}
public function setCookieTimeout(_arg1:int):void{
_tracker.setCookieTimeout(_arg1);
}
public function trackTrans():void{
_tracker.trackTrans();
}
public function trackPageview(_arg1:String=""):void{
_tracker.trackPageview(_arg1);
}
public function getClientInfo():Boolean{
return (_tracker.getClientInfo());
}
public function setClientInfo(_arg1:Boolean):void{
_tracker.setClientInfo(_arg1);
}
public function get account():String{
return (_account);
}
public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{
_tracker.linkByPost(_arg1, _arg2);
}
public function getDetectTitle():Boolean{
return (_tracker.getDetectTitle());
}
public function dispatchEvent(_arg1:Event):Boolean{
return (_eventDispatcher.dispatchEvent(_arg1));
}
public function get config():Configuration{
return (_config);
}
public function set mode(_arg1:String):void{
_mode = _arg1;
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public function setDetectFlash(_arg1:Boolean):void{
_tracker.setDetectFlash(_arg1);
}
public function resetSession():void{
_tracker.resetSession();
}
public function setCampNameKey(_arg1:String):void{
_tracker.setCampNameKey(_arg1);
}
public function get debug():DebugConfiguration{
return (_debug);
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{
_tracker.addItem(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
private function _bridgeFactory():GoogleAnalyticsAPI{
debug.info(((("GATracker (Bridge) v" + version) + "\naccount: ") + account));
return (new Bridge(account, _debug, _jsproxy));
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
_eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function clearIgnoredOrganic():void{
_tracker.clearIgnoredOrganic();
}
public function set account(_arg1:String):void{
_account = _arg1;
}
public function setVar(_arg1:String):void{
_tracker.setVar(_arg1);
}
public function build():void{
if (!isReady()){
_factory();
};
}
public function setDomainName(_arg1:String):void{
_tracker.setDomainName(_arg1);
}
public function createEventTracker(_arg1:String):EventTracker{
return (_tracker.createEventTracker(_arg1));
}
public function set config(_arg1:Configuration):void{
_config = _arg1;
}
public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object{
return (_tracker.addTrans(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8));
}
public function setCampSourceKey(_arg1:String):void{
_tracker.setCampSourceKey(_arg1);
}
public function setCampContentKey(_arg1:String):void{
_tracker.setCampContentKey(_arg1);
}
public function willTrigger(_arg1:String):Boolean{
return (_eventDispatcher.willTrigger(_arg1));
}
public function setLocalServerMode():void{
_tracker.setLocalServerMode();
}
public function isReady():Boolean{
return (_ready);
}
public function getLocalGifPath():String{
return (_tracker.getLocalGifPath());
}
public function setAllowAnchor(_arg1:Boolean):void{
_tracker.setAllowAnchor(_arg1);
}
public function clearIgnoredRef():void{
_tracker.clearIgnoredRef();
}
public function get mode():String{
return (_mode);
}
public function set debug(_arg1:DebugConfiguration):void{
_debug = _arg1;
}
public function setLocalGifPath(_arg1:String):void{
_tracker.setLocalGifPath(_arg1);
}
public function getVersion():String{
return (_tracker.getVersion());
}
public function setSampleRate(_arg1:Number):void{
_tracker.setSampleRate(_arg1);
}
public function setCookiePath(_arg1:String):void{
_tracker.setCookiePath(_arg1);
}
public function setAllowHash(_arg1:Boolean):void{
_tracker.setAllowHash(_arg1);
}
public function setCampNOKey(_arg1:String):void{
_tracker.setCampNOKey(_arg1);
}
public function addIgnoredOrganic(_arg1:String):void{
_tracker.addIgnoredOrganic(_arg1);
}
public function setLocalRemoteServerMode():void{
_tracker.setLocalRemoteServerMode();
}
public function cookiePathCopy(_arg1:String):void{
_tracker.cookiePathCopy(_arg1);
}
private function _factory():void{
var _local1:GoogleAnalyticsAPI;
var _local2:TrackerCache;
_jsproxy = new JavascriptProxy(debug);
if (visualDebug){
debug.layout = new Layout(debug, _display);
debug.active = visualDebug;
};
_local2 = (_tracker as TrackerCache);
switch (mode){
case TrackerMode.BRIDGE:
_local1 = _bridgeFactory();
break;
case TrackerMode.AS3:
default:
_local1 = _trackerFactory();
};
if (!_local2.isEmpty()){
_local2.tracker = _local1;
_local2.flush();
};
_tracker = _local1;
_ready = true;
dispatchEvent(new AnalyticsEvent(AnalyticsEvent.READY, this));
}
public function setCampTermKey(_arg1:String):void{
_tracker.setCampTermKey(_arg1);
}
private function _trackerFactory():GoogleAnalyticsAPI{
debug.info(((("GATracker (AS3) v" + version) + "\naccount: ") + account));
_adSense = new AdSenseGlobals(debug);
_dom = new HTMLDOM(debug);
_dom.cacheProperties();
_env = new Environment("", "", "", debug, _dom);
_buffer = new Buffer(config, debug, false);
_gifRequest = new GIFRequest(config, debug, _buffer, _env);
_idleTimer = new IdleTimer(config, debug, _display, _buffer);
_env.url = _display.stage.loaderInfo.url;
return (new Tracker(account, config, debug, _env, _buffer, _gifRequest, _adSense));
}
public function setDetectTitle(_arg1:Boolean):void{
_tracker.setDetectTitle(_arg1);
}
public function getServiceMode():ServerOperationMode{
return (_tracker.getServiceMode());
}
public function clearOrganic():void{
_tracker.clearOrganic();
}
public function setCampaignTrack(_arg1:Boolean):void{
_tracker.setCampaignTrack(_arg1);
}
public function addIgnoredRef(_arg1:String):void{
_tracker.addIgnoredRef(_arg1);
}
public function set visualDebug(_arg1:Boolean):void{
_visualDebug = _arg1;
}
public function setCampMediumKey(_arg1:String):void{
_tracker.setCampMediumKey(_arg1);
}
public function setSessionTimeout(_arg1:int):void{
_tracker.setSessionTimeout(_arg1);
}
public function getDetectFlash():Boolean{
return (_tracker.getDetectFlash());
}
public function get visualDebug():Boolean{
return (_visualDebug);
}
public function getAccount():String{
return (_tracker.getAccount());
}
public function hasEventListener(_arg1:String):Boolean{
return (_eventDispatcher.hasEventListener(_arg1));
}
public function setRemoteServerMode():void{
_tracker.setRemoteServerMode();
}
}
var _local1:* = ServerOperationMode;
return (_local1);
}//package com.google.analytics
Section 76
//AwardsService (com.spilgames.api.AwardsService)
package com.spilgames.api {
public class AwardsService {
public function AwardsService(){
super();
}
public static function submitAward(awardTag:String, callback:Function=null):int{
return (SpilGamesServices.getInstance().send("Awards", "submitAward", callback, {tag:awardTag, userName:User.getUserName(), userHash:User.getUserHash()}));
}
public static function isAvailable():Boolean{
return (SpilGamesServices.getInstance().isServiceAvailable("Awards"));
}
}
}//package com.spilgames.api
Section 77
//ScoreService (com.spilgames.api.ScoreService)
package com.spilgames.api {
public class ScoreService {
public function ScoreService(){
super();
}
public static function submitScore(score:int, callback:Function=null):int{
return (SpilGamesServices.getInstance().send("Score", "submitScore", callback, {score:score, userName:User.getUserName(), userHash:User.getUserHash()}));
}
public static function isAvailable():Boolean{
return (SpilGamesServices.getInstance().isServiceAvailable("Score"));
}
}
}//package com.spilgames.api
Section 78
//SpilGamesServices (com.spilgames.api.SpilGamesServices)
package com.spilgames.api {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class SpilGamesServices extends MovieClip {
private const DEFAULT_CONNECTION_LOCATION:String = "http://www8.agame.com/games/flash/services/ServicesConnection.swf";
private var _connected:Boolean;// = false
private var _connecting:Boolean;// = false
private var _loader:Loader;
private var _servicesConnection;// = null
private var _alwaysInFront:Boolean;// = false
public static const INVALID_ID:int = -1;
public static const CONFIGURATION_FAILED:String = "configurationFailure";
public static const INVALID_DOMAIN:String = "invalidDomain";
private static var _instance:SpilGamesServices = null;
public function SpilGamesServices(access:Private=null){
super();
if (!access){
throw (new Error("Cannot instantiate this class, use SpilGamesServices.getInstance"));
};
}
private function handleRemovedFromStage(e:Event):void{
trace("WARNING: please do not remove SpilGamesServices from the stage");
}
private function handleLoadComplete(e:Event):void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_servicesConnection = LoaderInfo(e.target).content;
_servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.addEventListener("serviceError", handleServiceError);
addChild(_servicesConnection);
}
public function send(serviceID:String, functionName:String, callback:Function, args:Object=null):int{
if (isReady()){
return (_servicesConnection.send(serviceID, functionName, callback, args));
};
return (INVALID_ID);
}
private function handleServicesFailed(e:ErrorEvent):void{
_servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.addEventListener("serviceError", handleServiceError);
_connecting = false;
if (hasEventListener("servicesFailed")){
dispatchEvent(new ErrorEvent("servicesFailed", false, false, e.text));
};
}
public function get version():String{
return ("1.1");
}
public function isReady():Boolean{
return (((!((_servicesConnection == null))) && (_servicesConnection.isReady())));
}
private function handleIOError(e:IOErrorEvent):void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_connecting = false;
if (hasEventListener(e.type)){
dispatchEvent(e);
};
}
private function handleServiceError(e:Event):void{
var message:String;
if (hasEventListener("serviceError")){
message = "";
if ((e is ErrorEvent)){
message = ErrorEvent(e).text;
} else {
message = e.toString();
};
dispatchEvent(new ErrorEvent("serviceError", false, false, message));
};
}
public function disconnect():void{
if (_servicesConnection){
_servicesConnection.removeEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.removeEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.removeEventListener("serviceError", handleServiceError);
if (_connected){
_servicesConnection.disconnect();
};
removeChild(_servicesConnection);
};
_servicesConnection = null;
if (_loader){
try {
_loader.close();
//unresolved jump
var _slot1 = e;
} finally {
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
};
_loader = null;
};
removeEventListener(Event.ENTER_FRAME, bringToFront);
removeEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
if (parent){
parent.removeChild(this);
};
_connected = (_connecting = false);
}
private function handleServicesReady(e:Event):void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_connected = true;
_connecting = false;
dispatchEvent(new Event("servicesReady"));
}
public function get connection(){
return (_servicesConnection);
}
public function getSiteID():int{
if (_servicesConnection != null){
return (_servicesConnection.getSiteID());
};
return (INVALID_ID);
}
public function isServiceAvailable(serviceID:String):Boolean{
return (((isReady()) && (_servicesConnection.isServiceAvailable(serviceID))));
}
public function getChannelID():int{
if (_servicesConnection != null){
return (_servicesConnection.getChannelID());
};
return (INVALID_ID);
}
public function set alwaysInFront(value:Boolean):void{
if (_alwaysInFront != value){
_alwaysInFront = value;
if (_alwaysInFront){
addEventListener(Event.ENTER_FRAME, bringToFront);
} else {
removeEventListener(Event.ENTER_FRAME, bringToFront);
};
};
}
public function getItemID():int{
if (_servicesConnection != null){
return (_servicesConnection.getItemID());
};
return (INVALID_ID);
}
public function allowDomain(domain:String):void{
Security.allowDomain("*");
Security.allowInsecureDomain("*");
}
public function connect(clip:DisplayObjectContainer, ... _args):void{
var request:URLRequest;
var connectionLocation:String;
var urlVariables:URLVariables;
var date:Date;
if (((!(_connecting)) && (!(_connected)))){
if (!clip.stage){
throw (new Error("The given clip must be present in the display list (added to stage)"));
};
_connecting = true;
clip.stage.addChild(this);
addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
if (((root.loaderInfo.parameters["servicesLoc"]) && ((root.loaderInfo.parameters["servicesLoc"].length > 0)))){
connectionLocation = root.loaderInfo.parameters["servicesLoc"];
request = new URLRequest(connectionLocation);
} else {
connectionLocation = DEFAULT_CONNECTION_LOCATION;
urlVariables = new URLVariables();
date = new Date();
urlVariables.nocache = ((((date.fullYear * 12) + (date.month + 1)) * 31) + date.day);
request = new URLRequest(connectionLocation);
request.data = urlVariables;
};
allowDomain(connectionLocation);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_loader.load(request);
};
}
public function get alwaysInFront():Boolean{
return (_alwaysInFront);
}
public function get connecting():Boolean{
return (_connecting);
}
public function isDomainAllowed():Boolean{
return (((!((_servicesConnection == null))) && (_servicesConnection.isDomainValid())));
}
public function bringToFront(e:Event=null):void{
var e = e;
if (parent){
parent.setChildIndex(this, (parent.numChildren - 1));
//unresolved jump
var _slot1 = e;
removeEventListener(Event.ENTER_FRAME, bringToFront);
};
}
public static function getInstance():SpilGamesServices{
if (!_instance){
_instance = new SpilGamesServices(new Private());
};
return (_instance);
}
}
}//package com.spilgames.api
class Private {
private function Private(){
super();
}
}
Section 79
//User (com.spilgames.api.User)
package com.spilgames.api {
import flash.display.*;
public class User {
public function User(){
super();
}
public static function getUserName():String{
var connection:* = SpilGamesServices.getInstance().connection;
if (connection != null){
return (connection.getUserName());
};
return ("");
}
public static function isGuest():Boolean{
var root:DisplayObject;
var vars:Object;
var connection:* = SpilGamesServices.getInstance().connection;
if (connection != null){
return (connection.isGuest());
};
root = SpilGamesServices.getInstance().root;
if (root.loaderInfo != null){
vars = root.loaderInfo.parameters;
return (((((((!(vars.username)) || ((vars.username == "")))) || (!(vars.hash)))) || ((vars.hash == ""))));
};
return (false);
}
public static function getUserHash():String{
var connection:* = SpilGamesServices.getInstance().connection;
if (connection != null){
return (connection.getUserHash());
};
return ("");
}
}
}//package com.spilgames.api
Section 80
//LivePreviewParent (fl.livepreview.LivePreviewParent)
package fl.livepreview {
import flash.display.*;
import flash.utils.*;
import flash.external.*;
public class LivePreviewParent extends MovieClip {
public var myInstance:DisplayObject;
public function LivePreviewParent(){
super();
try {
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
this.myInstance = getChildAt(0);
this.onResize(stage.width, stage.height);
if (ExternalInterface.available){
ExternalInterface.addCallback("onResize", this.onResize);
ExternalInterface.addCallback("onUpdate", this.onUpdate);
};
} catch(e) {
};
}
public function onUpdate(... _args):void{
var name:String;
var value:*;
var updateArray = _args;
var i:int;
while ((i + 1) < updateArray.length) {
try {
name = String(updateArray[i]);
value = updateArray[(i + 1)];
if ((((typeof(value) == "object")) && (value.__treatAsCollectionSpecialSauce__))){
this.updateCollection(value, name);
} else {
this.myInstance[name] = value;
};
} catch(e:Error) {
};
i = (i + 2);
};
}
public function onResize(_arg1:Number, _arg2:Number):void{
var width = _arg1;
var height = _arg2;
var setSizeFn:Function;
try {
setSizeFn = this.myInstance["setSize"];
} catch(e:Error) {
setSizeFn = null;
};
if (setSizeFn != null){
setSizeFn(width, height);
} else {
this.myInstance.width = width;
this.myInstance.height = height;
};
}
private function updateCollection(_arg1:Object, _arg2:String):void{
var _local7:Object;
var _local8:Object;
var _local9:*;
var _local3:Class = Class(getDefinitionByName(_arg1.collectionClass));
var _local4:Class = Class(getDefinitionByName(_arg1.collectionItemClass));
var _local5:Object = new (_local3);
var _local6:int;
while (_local6 < _arg1.collectionArray.length) {
_local7 = new (_local4);
_local8 = _arg1.collectionArray[_local6];
for (_local9 in _local8) {
_local7[_local9] = _local8[_local9];
};
_local5.addItem(_local7);
_local6++;
};
this.myInstance[_arg2] = (_local5 as _local3);
}
}
}//package fl.livepreview
Section 81
//mainmenu_backHouse (lywMainMenu.mainmenu_backHouse)
package lywMainMenu {
import flash.events.*;
public class mainmenu_backHouse extends mainmenu_backHouseAsset {
private var mySp:Number;
private var myX:int;
private var myY:int;
public function mainmenu_backHouse(_x:int, _y:int, _sp:Number){
super();
myX = _x;
myY = _y;
mySp = _sp;
init();
}
private function init():void{
this.x = myX;
this.y = myY;
this.addEventListener(Event.ENTER_FRAME, move_func);
}
private function move_func(event:Event):void{
if (this.x <= (0 - this.width)){
this.x = 600;
};
this.x = (this.x - mySp);
}
public function del():void{
this.removeEventListener(Event.ENTER_FRAME, move_func);
}
}
}//package lywMainMenu
Section 82
//mainmenu_bigHouse (lywMainMenu.mainmenu_bigHouse)
package lywMainMenu {
import flash.events.*;
public class mainmenu_bigHouse extends mainmenu_bigHouseAsset {
private var myP;
private var num:int;// = 0
private var mySp:Number;
private var myY:int;
private var myX:int;
public function mainmenu_bigHouse(_x:int, _y:int, _sp:Number, _p){
super();
myP = _p;
myX = _x;
myY = _y;
mySp = _sp;
this.scaleX = 1.2;
this.scaleY = 1.2;
getNum();
init();
}
public function gotoNum():void{
this.gotoAndStop(num);
}
public function del():void{
this.removeEventListener(Event.ENTER_FRAME, move_func);
delete ??getglobalscope
[this];
}
private function init():void{
this.x = myX;
this.y = myY;
this.addEventListener(Event.ENTER_FRAME, move_func);
}
public function getNum():void{
num = (1 + Math.round((Math.random() * 2)));
if (myP.lastNum == num){
getNum();
} else {
gotoNum();
myP.lastNum = num;
};
}
private function move_func(event:Event):void{
if (this.x <= (0 - this.width)){
this.x = 750;
getNum();
};
this.x = (this.x - mySp);
}
}
}//package lywMainMenu
Section 83
//mainmenu_boy (lywMainMenu.mainmenu_boy)
package lywMainMenu {
import flash.events.*;
public class mainmenu_boy extends mainmenu_boyAsset {
private var myP;
private var mySp:Number;
private var myX:int;
private var myY:int;
private var called:Boolean;
public function mainmenu_boy(_x:int, _y:int, _sp:Number, _p){
super();
myX = _x;
myY = _y;
mySp = _sp;
myP = _p;
init();
}
private function call_add_title():void{
myP.add_title();
called = true;
}
public function del():void{
this.removeEventListener(Event.ENTER_FRAME, move_func);
}
private function init():void{
this.x = myX;
this.y = myY;
this.scaleX = 1.04;
this.scaleY = 1.04;
this.addEventListener(Event.ENTER_FRAME, move_func);
}
private function move_func(event:Event):void{
if (this.x <= 100){
this.x = (this.x + mySp);
} else {
if (mySp > 0.1){
this.x = (this.x + mySp);
mySp = (mySp * 0.5);
} else {
mySp = 0;
if (called == false){
call_add_title();
};
};
};
}
}
}//package lywMainMenu
Section 84
//mainmenu_cloud (lywMainMenu.mainmenu_cloud)
package lywMainMenu {
import flash.events.*;
public class mainmenu_cloud extends Cloud1 {
private var mySp:Number;
private var myX:int;
private var myY:int;
public function mainmenu_cloud(_x:int, _y:int, _sp:Number){
super();
myX = _x;
myY = _y;
mySp = _sp;
init();
}
private function init():void{
this.x = myX;
this.y = myY;
this.addEventListener(Event.ENTER_FRAME, move_func);
}
private function move_func(event:Event):void{
if (this.x <= (0 - this.width)){
this.x = (600 + (Math.random() * 100));
};
this.x = (this.x - mySp);
}
public function del():void{
this.removeEventListener(Event.ENTER_FRAME, move_func);
}
}
}//package lywMainMenu
Section 85
//mainmenu_cloud2 (lywMainMenu.mainmenu_cloud2)
package lywMainMenu {
import flash.events.*;
public class mainmenu_cloud2 extends Cloud2 {
private var mySp:Number;
private var myX:int;
private var myY:int;
public function mainmenu_cloud2(_x:int, _y:int, _sp:Number){
super();
myX = _x;
myY = _y;
mySp = _sp;
init();
}
private function init():void{
this.x = myX;
this.y = myY;
this.addEventListener(Event.ENTER_FRAME, move_func);
}
private function move_func(event:Event):void{
if (this.x <= (0 - this.width)){
this.x = (600 + (Math.random() * 100));
};
this.x = (this.x - mySp);
}
public function del():void{
this.removeEventListener(Event.ENTER_FRAME, move_func);
}
}
}//package lywMainMenu
Section 86
//mainmenu_item (lywMainMenu.mainmenu_item)
package lywMainMenu {
import flash.events.*;
public class mainmenu_item extends mainmenu_itemAsset {
private var mySp:Number;
private var myX:int;
private var myY:int;
public function mainmenu_item(_x:int, _y:int, _sp:Number){
super();
myX = _x;
myY = _y;
mySp = _sp;
this.gotoAndStop((1 + Math.round((Math.random() * 2))));
init();
}
private function init():void{
this.x = myX;
this.y = myY;
this.scaleX = 1.3;
this.scaleY = 1.3;
this.addEventListener(Event.ENTER_FRAME, move_func);
}
private function move_func(event:Event):void{
if (this.x <= (0 - this.width)){
this.x = (600 + (Math.random() * 300));
this.gotoAndStop((1 + Math.round((Math.random() * 2))));
};
this.x = (this.x - mySp);
}
public function del():void{
this.removeEventListener(Event.ENTER_FRAME, move_func);
}
}
}//package lywMainMenu
Section 87
//mainmenu_light (lywMainMenu.mainmenu_light)
package lywMainMenu {
import flash.events.*;
public class mainmenu_light extends mainmenu_lightAsset {
private var mySp:Number;
private var myX:int;
private var myY:int;
public function mainmenu_light(_x:int, _y:int, _sp:Number){
super();
myX = _x;
myY = _y;
mySp = _sp;
init();
}
private function init():void{
this.x = myX;
this.y = myY;
this.scaleX = 1.8;
this.scaleY = 1.8;
this.addEventListener(Event.ENTER_FRAME, move_func);
}
private function move_func(event:Event):void{
if (this.x <= (0 - this.width)){
this.x = (600 + this.width);
};
this.x = (this.x - mySp);
}
public function del():void{
this.removeEventListener(Event.ENTER_FRAME, move_func);
}
}
}//package lywMainMenu
Section 88
//mainmenu_midHouse (lywMainMenu.mainmenu_midHouse)
package lywMainMenu {
import flash.events.*;
public class mainmenu_midHouse extends mainmenu_midHouseAsset {
private var mySp:Number;
private var myX:int;
private var myY:int;
public function mainmenu_midHouse(_x:int, _y:int, _sp:Number){
super();
myX = _x;
myY = _y;
mySp = _sp;
init();
}
private function init():void{
this.x = myX;
this.y = myY;
this.addEventListener(Event.ENTER_FRAME, move_func);
}
private function move_func(event:Event):void{
if (this.x <= (0 - this.width)){
this.x = (600 + (Math.random() * 100));
};
this.x = (this.x - mySp);
}
public function del():void{
this.removeEventListener(Event.ENTER_FRAME, move_func);
}
}
}//package lywMainMenu
Section 89
//mainmenu_road (lywMainMenu.mainmenu_road)
package lywMainMenu {
import flash.events.*;
public class mainmenu_road extends mainmenu_roadAsset {
private var mySp:Number;
private var myX:int;
private var myY:int;
public function mainmenu_road(_x:int, _y:int, _sp:Number){
super();
myX = _x;
myY = _y;
mySp = _sp;
init();
}
private function init():void{
this.x = myX;
this.y = myY;
this.addEventListener(Event.ENTER_FRAME, move_func);
}
private function move_func(event:Event):void{
if (this.x <= (0 - this.width)){
this.x = 600;
};
this.x = (this.x - mySp);
}
public function del():void{
this.removeEventListener(Event.ENTER_FRAME, move_func);
}
}
}//package lywMainMenu
Section 90
//mainmenu_walk (lywMainMenu.mainmenu_walk)
package lywMainMenu {
import flash.events.*;
public class mainmenu_walk extends mainmenu_walkAsset {
private var mySp:Number;
private var myX:int;
private var myY:int;
public function mainmenu_walk(_x:int, _y:int, _sp:Number){
super();
myX = _x;
myY = _y;
mySp = _sp;
init();
}
private function init():void{
this.x = myX;
this.y = myY;
this.addEventListener(Event.ENTER_FRAME, move_func);
}
private function move_func(event:Event):void{
if (this.x <= (0 - this.width)){
this.x = 600;
};
this.x = (this.x - mySp);
}
public function del():void{
this.removeEventListener(Event.ENTER_FRAME, move_func);
}
}
}//package lywMainMenu
Section 91
//MainMenuObj (lywMainMenu.MainMenuObj)
package lywMainMenu {
import flash.events.*;
public class MainMenuObj extends MainMenuRescourse {
private var myBH2:mainmenu_bigHouse;
private var myBH3:mainmenu_bigHouse;
private var camSp:Number;// = 10
public var lastNum:int;// = 0
private var item:mainmenu_item;
private var myWalk:mainmenu_walk;
private var cloud1:mainmenu_cloud;
private var light:mainmenu_light;
private var myTitle:mainmenu_title;
private var cloud2:mainmenu_cloud2;
private var myWalk2:mainmenu_walk;
private var myRoad2:mainmenu_road;
private var myMidH:mainmenu_midHouse;
private var myBackH2:mainmenu_backHouse;
private var myMidH2:mainmenu_midHouse;
private var shine:mainmenu_shine;
private var myRoad:mainmenu_road;
private var boy:mainmenu_boy;
private var myBH:mainmenu_bigHouse;
private var myBackH:mainmenu_backHouse;
private var Sp:Number;// = 1
public function MainMenuObj(){
super();
init();
}
private function add_midHouse():void{
myMidH = new mainmenu_midHouse(0, 295, (Sp * 8));
this.addChild(myMidH);
myMidH2 = new mainmenu_midHouse((600 + (Math.random() * 100)), 295, (Sp * 6));
this.addChild(myMidH2);
myMidH.cacheAsBitmap = true;
myMidH2.cacheAsBitmap = true;
}
private function init():void{
initloc();
add_content();
intro_move();
}
private function move_buttons():void{
this.setChildIndex(this.start_game_anim, (this.numChildren - 1));
this.setChildIndex(this.how_to_play_anim, (this.numChildren - 1));
this.setChildIndex(this.more_game_anim, (this.numChildren - 1));
this.start_game_anim.x = 340;
this.how_to_play_anim.x = 340;
this.more_game_anim.x = 340;
this.start_game_anim.gotoAndPlay(1);
this.how_to_play_anim.gotoAndPlay(1);
this.more_game_anim.gotoAndPlay(1);
}
private function add_cloud():void{
cloud1 = new mainmenu_cloud(250, 110, (Sp * 0.5));
cloud2 = new mainmenu_cloud2((Math.random() * 100), 5, (Sp * 0.5));
this.addChild(cloud1);
this.addChild(cloud2);
cloud1.cacheAsBitmap = true;
cloud2.cacheAsBitmap = true;
}
private function add_items():void{
item = new mainmenu_item(600, 300, (Sp * 14));
this.addChild(item);
light = new mainmenu_light(630, 330, (Sp * 15));
this.addChild(light);
shine = new mainmenu_shine();
shine.x = -250;
shine.y = -200;
item.cacheAsBitmap = true;
light.cacheAsBitmap = true;
shine.cacheAsBitmap = true;
this.addChild(shine);
}
private function add_boy():void{
boy = new mainmenu_boy(-520, 400, (Sp * 6.5), this);
boy.cacheAsBitmap = true;
this.addChild(boy);
}
private function initloc():void{
this.y = 600;
this.graphic_cfg.stop();
this.sound_cfg.stop();
}
private function intro_move():void{
this.addEventListener(Event.ENTER_FRAME, intro_move_func);
}
public function add_title():void{
myTitle = new mainmenu_title();
this.addChild(myTitle);
myTitle.x = 210;
myTitle.y = -190;
move_buttons();
}
private function add_backHouse():void{
myBackH = new mainmenu_backHouse(-20, 299, Sp);
this.addChild(myBackH);
myBackH2 = new mainmenu_backHouse(770, 299, Sp);
this.addChild(myBackH2);
myBackH.cacheAsBitmap = true;
myBackH2.cacheAsBitmap = true;
}
private function add_bigHouse():void{
myBH = new mainmenu_bigHouse((Math.random() * 30), 292, (Sp * 14), this);
this.addChild(myBH);
myBH2 = new mainmenu_bigHouse((350 + (Math.random() * 30)), 292, (Sp * 14), this);
this.addChild(myBH2);
myBH3 = new mainmenu_bigHouse((700 + (Math.random() * 30)), 292, (Sp * 14), this);
this.addChild(myBH3);
myBH.cacheAsBitmap = true;
myBH2.cacheAsBitmap = true;
myBH3.cacheAsBitmap = true;
}
private function intro_move_func(event:Event):void{
if (this.y > 10){
camSp = (camSp * 0.99);
this.y = (this.y - camSp);
} else {
camSp = (camSp * 0.9);
this.y = (this.y - camSp);
};
if (camSp <= 0.01){
this.removeEventListener(Event.ENTER_FRAME, intro_move_func);
};
}
private function add_content():void{
add_cloud();
add_backHouse();
add_midHouse();
add_bigHouse();
add_road();
this.setChildIndex(this.graphic_cfg, (this.numChildren - 1));
this.setChildIndex(this.sound_cfg, (this.numChildren - 1));
add_items();
add_boy();
}
public function del_all():void{
this.removeChild(cloud1);
cloud1.del();
this.removeChild(cloud2);
cloud2.del();
this.removeChild(myBackH);
myBackH.del();
this.removeChild(myBackH2);
myBackH2.del();
this.removeChild(myMidH);
myMidH.del();
this.removeChild(myMidH2);
myMidH2.del();
this.removeChild(myWalk);
myWalk.del();
this.removeChild(myWalk2);
myWalk2.del();
this.removeChild(myRoad);
myRoad.del();
this.removeChild(myRoad2);
myRoad2.del();
this.removeChild(myBH);
myBH.del();
this.removeChild(myBH2);
myBH2.del();
this.removeChild(myBH3);
myBH3.del();
this.removeChild(light);
light.del();
this.removeChild(item);
item.del();
this.removeChild(shine);
if (((!((myTitle == null))) && (this.contains(myTitle)))){
this.removeChild(myTitle);
};
this.removeChild(boy);
boy.del();
}
private function add_road():void{
myRoad = new mainmenu_road(-5, 325, (Sp * 16));
this.addChild(myRoad);
myRoad2 = new mainmenu_road((-5 + myRoad.width), 325, (Sp * 16));
this.addChild(myRoad2);
myWalk = new mainmenu_walk(-5, 290, (Sp * 15));
this.addChild(myWalk);
myWalk2 = new mainmenu_walk((-10 + myWalk.width), 290, (Sp * 15));
this.addChild(myWalk2);
myRoad.cacheAsBitmap = true;
myRoad2.cacheAsBitmap = true;
myWalk.cacheAsBitmap = true;
myWalk2.cacheAsBitmap = true;
}
}
}//package lywMainMenu
Section 92
//AbstractScreen (main.AbstractScreen)
package main {
import flash.display.*;
import flash.utils.*;
public class AbstractScreen {
protected var _root:Sprite;
public function AbstractScreen(r:Sprite){
super();
if (getQualifiedClassName(this) == "main::AbstractScreen"){
throw (new ArgumentError("can't be constructed"));
};
_root = r;
}
public function destroy():void{
throw (new Error("Abstract Method!"));
}
}
}//package main
Section 93
//Game (main.Game)
package main {
import flash.display.*;
import flash.events.*;
import util.*;
import flash.utils.*;
import prop.*;
import flash.text.*;
import scores.*;
import flash.ui.*;
public class Game extends AbstractScreen {
private var _upmove:Boolean;
private var levelFlag:Boolean;// = false
private var _randomAngle:Number;// = 60
private var _boyInitPositionX:Number;// = -150
private var _boyInitPositionY:Number;// = 265
private var coinArr:Array;
private var recondX:Number;// = 0
private var recondY:Number;// = 0
private var _completeMC:MovieClip;
private var _mc:MovieClip;
private var _pizzaNum:TextField;
private var object:Object;
private var currDistance:int;
private var _flag:Boolean;// = false
private var backGround:BackGround;
private var endTime:uint;
private var markArr:Array;
private var _propmc:MovieClip;
private var boymc:MovieClip;
private var word1:Words;
private var guestArr:Array;
private var _propClassMC:MovieClip;
public var logicalPause:PauseGame;
private var _stopButton:MovieClip;
private var _rightmove:Boolean;
private var _allEffectesMc:MovieClip;
private var tarArr:Array;
private var _boyCarMc:MovieClip;
private var levelRunFinishToMoveBoy:Boolean;// = false
private var _successEffect:EffectClass;
private var _percentSp2:Number;// = 0
private var _percentSp3:Number;// = 0
private var dx:Number;// = 0
private var dy:Number;// = 0
private var boyMoveKindNumber:int;// = 0
private var wordDisappearID:int;
private var _percentSp1:Number;// = 0
private var _levelOverCount:int;// = 0
private var _propAddPizzaEffectPositionX:Number;// = 25
private var _targetNum:TextField;
private var _leftmove:Boolean;
private var pizzaArr:Array;
private var _hitTarActiveMc:MovieClip;
private var _propAddPizzaEffectPositionY:Number;// = 370
private var boy:Boy;
private var _needNum:TextField;
private var _midTemp1:Number;// = 0
private var _midTemp2:Number;// = 0
private var _midTemp3:Number;// = 0
private var throwPArr:Array;
private var _downmove:Boolean;
private var _levelmc:MovieClip;
private var boyCarArr:Array;
private var angle:Number;// = 0
private var carArr1:Array;
private var carArr2:Array;
private var carArr3:Array;
private var _pizzaThrowFlag:Boolean;// = true
private var _basicAngle:Number;// = 20
private var _curTotalFrame:int;// = 0
private var beforeTime:uint;
private var _hat:MovieClip;
private var _score_act:MovieClip;
private var _coinNum:TextField;
private var _endHitDistance:Number;// = 60
public function Game(r:Sprite){
super(r);
Config.isBoyRunFlag = false;
Config.initBoyRun = false;
Config.inforMoveFlag = false;
Config._passGameMenu = false;
Config._commitFlag = false;
currDistance = 0;
wordDisappearID = 0;
SoundsManager.instance.overNewMusic("xd_games", 1);
initArray();
initDis();
initEvent();
initLevelCount();
}
private function left_up():void{
boyMoveKindNumber = 2;
initEndHitConfig();
}
private function onCar2MoveFinish(e:CarEvent):void{
e.arr = carArr2;
e.carLane = 2;
delCar(e.id, e.arr, e.carLane);
}
private function levelCount():void{
if (Config.successed_pizza_num >= Config.target_pizza_num){
Config.passfilmdescri = 4;
_flag = true;
if (Config.currentLevel == 1){
Dispatch_GooGleEventAndAwardScores.GooGle_FirstLevel();
} else {
if (Config.currentLevel == 4){
Dispatch_GooGleEventAndAwardScores.GooGle_AllLevel();
};
};
} else {
if (Config.successed_pizza_num < Config.target_pizza_num){
Config.passfilmdescri = 5;
_flag = false;
};
};
boyFace();
}
private function handleStreetPizza():void{
if (Config.levelControl == false){
addPizza();
};
var k:Number = 0;
while (k < pizzaArr.length) {
pizzaArr[k].run();
k++;
};
pizzaHitBoy();
}
private function boyHitTar():void{
var tempTar:Tar;
var tarHitArea:Sprite;
var boyHitArea:MovieClip = boy.hitArea;
var k:Number = 0;
while (k < tarArr.length) {
tempTar = tarArr[k];
tarHitArea = tempTar.tarArea;
if (boyHitArea.hitTestObject(tarHitArea)){
SoundsManager.instance.playSound("passTar", 1);
object = tempTar;
tempTar.mc.play();
if (Config._tarCound == 0){
Config._tarCound++;
new EffectClass(_hitTarActiveMc, (DocumentClass.STAGEWIDTH / 2), (DocumentClass.STAGEHEIGHT / 2), "masks");
};
tempTar.mc.addEventListener(Event.ENTER_FRAME, doOtherThing);
};
k++;
};
}
private function boyKeyUp(event:KeyboardEvent):void{
if (event.keyCode == Keyboard.LEFT){
_leftmove = false;
boy._active.gotoAndStop("normal");
boy._wheel.gotoAndStop("normal");
};
if (event.keyCode == Keyboard.UP){
_upmove = false;
boy._active.gotoAndStop("normal");
boy._wheel.gotoAndStop("normal");
};
if (event.keyCode == Keyboard.RIGHT){
_rightmove = false;
boy._active.gotoAndStop("normal");
boy._wheel.gotoAndStop("normal");
};
if (event.keyCode == Keyboard.DOWN){
_downmove = false;
boy._active.gotoAndStop("normal");
boy._wheel.gotoAndStop("normal");
};
if (Config.currentLevel == 1){
if (event.keyCode == Keyboard.SPACE){
_pizzaThrowFlag = true;
boy._active.gotoAndStop("normal");
boy._wheel.gotoAndStop("normal");
};
} else {
if (event.keyCode == Keyboard.SPACE){
_pizzaThrowFlag = true;
boy._active.gotoAndStop("normal");
boy._wheel.gotoAndStop("normal");
};
};
if (event.keyCode == 80){
stopGameKey();
};
}
override public function destroy():void{
delEvent();
delDis();
}
private function stopGame(event:MouseEvent):void{
_stopButton.gotoAndStop(1);
SoundsManager.instance.playSound("menu_presss", 1);
Config.stopFlag = true;
Config.markRunFlag = false;
Config.stopButtonAndLevelRunFlag = true;
Config.isBoyRunFlag = true;
addPause();
}
private function initLevelCount():void{
Config.conf();
}
private function allHandleFunction():void{
handleStreetPizza();
throwPizzaHitCar(carArr2);
throwPizzaHitCar(carArr1);
throwPizzaHitCar(carArr3);
handleStreetSpeed();
handleStreetCoin();
handleBoyHitStreetCarDirectionAndSpeed();
handleStreetMoveCarsAndNpc();
handleFootWayGuests();
throwpizzaHitGuest();
boyHitCar(carArr2);
boyHitCar(carArr3);
boyHitCar(carArr1);
}
private function initArray():void{
pizzaArr = new Array();
guestArr = new Array();
coinArr = new Array();
tarArr = new Array();
markArr = new Array();
throwPArr = new Array();
carArr1 = new Array();
carArr2 = new Array();
carArr3 = new Array();
}
private function boyHitCar(carArr:Array):void{
var car:Car;
var id:int;
var i:int;
while (i < carArr.length) {
car = carArr[i];
if ((((car.y >= Config.car1MinimumValue)) && ((car.y <= Config.car1MaxValue)))){
id = 1;
handleHitting(car);
};
if ((((car.y >= Config.car2MinimumValue)) && ((car.y <= Config.car2MaxValue)))){
id = 2;
handleHitting(car);
};
if ((((car.y >= Config.car3MinimumValue)) && ((car.y <= Config.car3MaxValue)))){
id = 3;
handleHitting(car);
};
i++;
};
}
private function throwPizzaHitNPC(pizzademo:ThrowPizza, cardemo:Car):void{
if (cardemo.flag == false){
if (pizzademo.y <= cardemo.y){
SoundsManager.instance.playSound("eatP", 1);
SoundsManager.instance.playSound("guestGetPSound", 1);
Config.pizzaIsHitting = true;
new EffectClass(cardemo._npcMc, 60, -40, "guestGetPizzas");
boy._active.gotoAndStop("yeah");
boy._wheel.gotoAndStop("yeah");
new EffectClass(_propmc, 500, 370, "Good_Effects");
Config.successed_pizza_num++;
_score_act.gotoAndPlay(2);
(_score_act["score"]["targetNum"] as TextField).text = Config.successed_pizza_num.toString();
_score_act.addEventListener(Event.ENTER_FRAME, goFrame);
cardemo._npcHandMc.gotoAndStop(19);
cardemo.mc.removeChild(cardemo.greenMc);
cardemo._npcMc.removeChild(cardemo._npcWantPizza);
Config.inforMoveFlag = true;
_successEffect = new EffectClass(_allEffectesMc, boy.boymc.x, boy.boymc.y, "success");
cardemo.flag = true;
boy.delPizza(pizzademo.id);
};
} else {
boy.delPizza(pizzademo.id);
Config.pizzaIsHitting = false;
new EffectClass(_allEffectesMc, (cardemo.x + 40), cardemo.y, "pizzahasbroken");
};
}
private function limitFirstTime():void{
var s:Number;
if (_boyCarMc.getChildByName("boymc") == null){
buildBoyObject();
} else {
if (_boyCarMc.getChildByName("boymc") != null){
handleBoyMove();
s = 0;
while (s < throwPArr.length) {
throwPArr[s].run();
s++;
};
if (Config.initBoyRun == true){
handleStreetSpeed();
depthControl();
if (wordDisappearID == 0){
if (word1 == null){
levelFlag = true;
word1 = new Words(_allEffectesMc, 0);
word1.addEventListener("INFOR_MOVE_FINISH", delWords1);
};
};
if (wordDisappearID == 1){
if (word1 == null){
word1 = new Words(_allEffectesMc);
word1.addEventListener("INFOR_MOVE_FINISH", delWords1);
};
};
if (wordDisappearID == 2){
handleStreetCoin(100);
if (word1 == null){
levelFlag = true;
word1 = new Words(_allEffectesMc, 1);
word1.addEventListener("INFOR_MOVE_FINISH", delWords1);
};
};
if (wordDisappearID == 3){
handleStreetCoin();
boyHitCar(carArr2);
boyHitCar(carArr3);
boyHitCar(carArr1);
handleStreetMoveCarsAndNpc();
handleBoyHitStreetCarDirectionAndSpeed();
if (word1 == null){
word1 = new Words(_allEffectesMc);
word1.addEventListener("INFOR_MOVE_FINISH", delWords1);
};
};
if (wordDisappearID == 4){
handleStreetCoin();
boyHitCar(carArr2);
boyHitCar(carArr3);
boyHitCar(carArr1);
handleStreetMoveCarsAndNpc();
handleBoyHitStreetCarDirectionAndSpeed();
if (word1 == null){
levelFlag = true;
word1 = new Words(_allEffectesMc, 2);
word1.addEventListener("INFOR_MOVE_FINISH", delWords1);
};
};
if (wordDisappearID == 5){
handleStreetCoin();
boyHitCar(carArr2);
boyHitCar(carArr3);
boyHitCar(carArr1);
handleStreetMoveCarsAndNpc();
handleBoyHitStreetCarDirectionAndSpeed();
if (word1 == null){
word1 = new Words(_allEffectesMc);
word1.addEventListener("INFOR_MOVE_FINISH", delWords1);
};
};
if (wordDisappearID == 6){
handleStreetCoin();
boyHitCar(carArr2);
boyHitCar(carArr3);
boyHitCar(carArr1);
handleStreetMoveCarsAndNpc();
handleBoyHitStreetCarDirectionAndSpeed();
handleStreetPizza();
throwPizzaHitCar(carArr1);
throwPizzaHitCar(carArr2);
throwPizzaHitCar(carArr3);
if (word1 == null){
levelFlag = true;
word1 = new Words(_allEffectesMc, 3);
word1.addEventListener("INFOR_MOVE_FINISH", delWords1);
};
};
if (wordDisappearID == 7){
allHandleFunction();
if (word1 == null){
word1 = new Words(_allEffectesMc);
word1.addEventListener("INFOR_MOVE_FINISH", delWords1);
};
};
if (wordDisappearID == 8){
allHandleFunction();
if (word1 == null){
levelFlag = true;
word1 = new Words(_allEffectesMc, 4);
word1.addEventListener("INFOR_MOVE_FINISH", delWords1);
};
};
if (wordDisappearID == 9){
allHandleFunction();
if (word1 == null){
if (Config.showLastInformation == true){
word1 = new Words(_allEffectesMc);
word1.addEventListener("INFOR_MOVE_FINISH", delWords1);
};
};
};
if (wordDisappearID == 10){
allHandleFunction();
};
};
};
};
}
private function depthControl():void{
var _tempMC:*;
var depth:Number;
var depthArray:Array = new Array();
var ii:int;
while (ii < _boyCarMc.numChildren) {
_tempMC = _boyCarMc.getChildAt(ii);
if (String(_boyCarMc.getChildAt(ii).name).slice(0, 3) != "boy"){
depth = Math.abs((Config._borderDown - _boyCarMc.getChildAt(ii).y));
depthArray.push({Element:_tempMC, Depth:depth});
} else {
depth = (Config._borderDown - ((_boyCarMc.getChildAt(ii) as MovieClip).getChildAt(0) as MovieClip).y);
depthArray.push({Element:_boyCarMc.getChildAt(ii), Depth:depth});
};
ii++;
};
depthArray.sortOn("Depth", (Array.NUMERIC | Array.DESCENDING));
var _tempLength:int = depthArray.length;
ii = 0;
while (ii < _tempLength) {
_boyCarMc.setChildIndex(depthArray.shift()["Element"], ii);
ii++;
};
}
private function delGuest(id:int):void{
var tempPizza:Guests;
var k:Number = (guestArr.length - 1);
while (k >= 0) {
tempPizza = guestArr[k];
if (tempPizza.id == id){
tempPizza.removeEventListener("GUEST_MOVE_FINISH", onGuestMoveFinish);
tempPizza.del();
guestArr.splice(k, 1);
return;
};
k--;
};
}
private function coinHitBoy():void{
var boyHitArea:MovieClip;
var k:Number;
var tempCoin:Coin;
var coinHitArea:Sprite;
if (boy != null){
boyHitArea = boy.hitArea;
k = 0;
while (k < coinArr.length) {
tempCoin = coinArr[k];
coinHitArea = tempCoin.coinHitArea;
if (boyHitArea.hitTestObject(coinHitArea)){
delCoin(tempCoin.id);
SoundsManager.instance.playSound("eatCoin", 1);
new EffectClass(_allEffectesMc, (boy.x + 10), (boy.y - 50), "coin_disappear");
Config.coin_num++;
Config.total_coin_num++;
if (Config.coin_num == 50){
new EffectClass(_propmc, _propAddPizzaEffectPositionX, _propAddPizzaEffectPositionY, "getPizzaEffect");
Config.pizza_num++;
Config.coin_num = 0;
};
new EffectClass(_propmc, 170, 390, "getCoinEffect");
};
k++;
};
};
}
private function onCoinMoveFinish(e:CoinEvent):void{
delCoin(e.id);
}
private function throwPizzaHitCar(carArr:Array):void{
var tempTP:ThrowPizza;
var i:Number;
var tempCar:Car;
var x1:Number;
var y1:Number;
var j:Number = 0;
while (j < throwPArr.length) {
tempTP = throwPArr[j];
_boyCarMc.setChildIndex(tempTP.mc, (_boyCarMc.numChildren - 1));
if (tempTP.mc.currentFrame == 1){
i = 0;
while (i < carArr.length) {
tempCar = carArr[i];
if (tempCar.showNpc == false){
if ((((tempTP.x >= (tempCar.x - tempCar.desWidth))) && ((tempTP.x <= (tempCar.x + tempCar.desWidth))))){
if (tempTP.y >= (tempCar.y - tempCar.desHeight)){
if (tempTP.y <= tempCar.y){
Config.pizzaIsHitting = true;
boy._active.gotoAndPlay("fail");
boy._wheel.gotoAndPlay("fail");
boy._active.addEventListener(Event.ENTER_FRAME, delfail);
boy._wheel.addEventListener(Event.ENTER_FRAME, delfail);
x1 = (tempTP.x - 40);
y1 = (tempTP.y - 10);
boy.delPizza(tempTP.id);
new EffectClass(_allEffectesMc, x1, y1, "pizzahasbroken");
};
};
};
} else {
if (tempCar.showNpc == true){
if ((((tempTP.x >= (tempCar.x - tempCar.desWidth))) && ((tempTP.x <= (tempCar.x + tempCar.desWidth))))){
if (tempTP.y >= (tempCar.y - tempCar.desHeight)){
throwPizzaHitNPC(tempTP, tempCar);
};
};
};
};
i++;
};
};
j++;
};
}
private function delCoin(id:int):void{
var tempCoin:Coin;
var k:Number = (coinArr.length - 1);
while (k >= 0) {
tempCoin = coinArr[k];
if (tempCoin.id == id){
tempCoin.removeEventListener("COIN_MOVE_FINISH", onCoinMoveFinish);
tempCoin.del();
coinArr.splice(k, 1);
return;
};
k--;
};
}
private function addMessage():void{
beforeTime = getTimer();
_allEffectesMc.addChild(_completeMC);
_completeMC.alpha = 0;
_completeMC.x = 15;
_completeMC.y = 220;
_completeMC.scaleX = 1.2;
_completeMC.scaleY = 1.2;
if (Config.passfilmdescri == 4){
_completeMC.gotoAndStop(1);
boy._active.gotoAndStop("yeah");
boy._wheel.gotoAndStop("yeah");
} else {
if (Config.passfilmdescri == 5){
_completeMC.gotoAndStop(2);
boy._active.gotoAndStop("fail");
boy._wheel.gotoAndStop("fail");
};
};
_completeMC.addEventListener(Event.ENTER_FRAME, completemcRun);
}
private function onCar1MoveFinish(e:CarEvent):void{
e.arr = carArr1;
e.carLane = 1;
delCar(e.id, e.arr, e.carLane);
}
private function delPizza(id:int):void{
var tempPizza:Pizzas;
var k:Number = (pizzaArr.length - 1);
while (k >= 0) {
tempPizza = pizzaArr[k];
if (tempPizza.id == id){
tempPizza.removeEventListener("PIZZA_MOVE_FINISH", onPizzaMoveFinish);
tempPizza.del();
pizzaArr.splice(k, 1);
return;
};
k--;
};
}
private function boyFace():void{
if (_flag == true){
SoundsManager.instance.playSound("yeah", 1);
boy._active.gotoAndStop("yeah");
boy._wheel.gotoAndStop("yeah");
} else {
if (_flag == false){
boy._active.gotoAndPlay("fail");
boy._wheel.gotoAndPlay("fail");
boy._active.addEventListener(Event.ENTER_FRAME, delfail);
boy._wheel.addEventListener(Event.ENTER_FRAME, delfail);
};
};
}
private function initEndHitConfig():void{
recondX = boy.x;
recondY = boy.y;
boy._active.gotoAndPlay("fail");
boy._wheel.gotoAndPlay("fail");
boy._active.addEventListener(Event.ENTER_FRAME, delfail);
boy._wheel.addEventListener(Event.ENTER_FRAME, delfail);
angle = (_basicAngle + (Math.random() * _randomAngle));
dx = Math.abs((Math.cos(angle) * _endHitDistance));
dy = Math.abs((Math.sin(angle) * _endHitDistance));
if (Config.levelControl == false){
if (Config.effectStarOver){
Config.effectStarOver = false;
new EffectClass(_allEffectesMc, boy.x, boy.y, "hitCarEffect");
};
};
Config.moveFlag = true;
Config.isBoyRunFlag = true;
}
private function handleBoyHitStreetCarDirectionAndSpeed():void{
if (Config.levelControl == false){
if (Config.moveFlag == true){
if (boyMoveKindNumber == 1){
boy.subAdd(dx, dy, recondX, recondY, _successEffect);
};
if (boyMoveKindNumber == 2){
boy.subSub(dx, dy, recondX, recondY, _successEffect);
};
if (boyMoveKindNumber == 3){
boy.addSub(dx, dy, recondX, recondY, _successEffect);
};
if (boyMoveKindNumber == 4){
boy.addAdd(dx, dy, recondX, recondY, _successEffect);
};
};
};
}
private function addTar():void{
var row:int;
var startX:Number;
var temp:Tar;
if ((currDistance % Config.tar_time_gap) == 0){
row = Math.floor(((Math.random() * 3) + 1));
startX = ((DocumentClass.STAGEWIDTH + 200) + (Math.random() * Config.tar_every_gap));
temp = new Tar(_propClassMC, row, startX);
temp.addEventListener("TAR_MOVE_FINISH", onTarMoveFinish);
tarArr.push(temp);
};
}
private function delEvent():void{
_root.removeEventListener(Event.DEACTIVATE, spriteRemovedFromStage);
_root.removeEventListener(Event.ENTER_FRAME, runs);
_mc.stage.removeEventListener(KeyboardEvent.KEY_DOWN, boyKeyDown);
_mc.stage.removeEventListener(KeyboardEvent.KEY_UP, boyKeyUp);
_stopButton.removeEventListener(MouseEvent.CLICK, stopGame);
}
private function runs(event:Event):void{
var s:Number;
boyCarArr = new Array();
if (Config.stopFlag == false){
_curTotalFrame++;
logicalPause = null;
currDistance++;
getPizza_Coin();
backGround.move();
if (levelFlag == false){
levelRun();
};
if (Config.levelControl == true){
if ((((((((((((carArr1.length == 0)) && ((carArr2.length == 0)))) && ((carArr3.length == 0)))) && ((guestArr.length == 0)))) && ((coinArr.length == 0)))) && ((pizzaArr.length == 0)))){
if (_levelOverCount == 0){
_levelOverCount++;
levelCount();
levelRunFinishToMoveBoy = true;
addMessage();
};
};
};
if (Config.currentLevel == 1){
limitFirstTime();
} else {
if ((((((Config.currentLevel == 2)) || ((Config.currentLevel == 3)))) || ((Config.currentLevel == 4)))){
if (_boyCarMc.getChildByName("boymc") == null){
buildBoyObject();
} else {
if (_boyCarMc.getChildByName("boymc") != null){
handleBoyMove();
depthControl();
handleStreetTar();
s = 0;
while (s < throwPArr.length) {
throwPArr[s].run();
s++;
};
allHandleFunction();
};
};
};
};
};
}
private function handleStreetTar():void{
var d:Number;
var s:Number;
if ((((Config.currentLevel == 3)) || ((Config.currentLevel == 4)))){
if (Config.levelControl == false){
addTar();
};
d = 0;
while (d < tarArr.length) {
tarArr[d].run();
d++;
};
boyHitTar();
s = 0;
while (s < markArr.length) {
markArr[s].run();
s++;
};
};
}
private function handleFootWayGuests(gap:Number=300):void{
var startX:Number;
var temp:Guests;
if (Config.levelControl == false){
if (Config.currentLevel != 2){
if ((currDistance % gap) == 0){
startX = ((DocumentClass.STAGEWIDTH * 3) + (Math.random() * Config.guest_every_gap));
temp = new Guests(_propClassMC, startX);
temp.addEventListener("GUEST_MOVE_FINISH", onGuestMoveFinish);
guestArr.push(temp);
};
};
};
var i:Number = 0;
while (i < guestArr.length) {
guestArr[i].run();
i++;
};
}
private function buildBoyObject():void{
_boyCarMc.addChild(boymc);
boy = new Boy(boymc, _boyInitPositionX, _boyInitPositionY);
throwPArr = boy.throwPArr;
}
private function initDis():void{
_propClassMC = new MovieClip();
_mc = new MovieClip();
_boyCarMc = new MovieClip();
_allEffectesMc = new MovieClip();
boymc = new MovieClip();
boymc.name = "boymc";
_mc.name = "gameUi";
_completeMC = Attach.getMovieClip("deloverycomplete");
_hitTarActiveMc = new MovieClip();
backGround = new BackGround(_mc);
_root.addChild(_mc);
_root.addChild(_propClassMC);
_root.addChild(_boyCarMc);
_root.addChild(_allEffectesMc);
_root.addChild(_hitTarActiveMc);
_propmc = Attach.getMovieClip("UI");
_root.addChild(_propmc);
_levelmc = _propmc["level_mc"];
_levelmc.gotoAndStop(1);
_hat = (_levelmc.getChildByName("hat") as MovieClip);
_hat.gotoAndStop(1);
_pizzaNum = _propmc["pizza_Num"];
_coinNum = _propmc["coin_Num"];
_needNum = _propmc["needNum"];
_stopButton = _propmc["stop_Button"];
_stopButton.gotoAndStop(1);
_score_act = _propmc["score_act"];
_score_act.gotoAndStop(1);
_targetNum = _score_act["score"]["targetNum"];
_root.addEventListener(Event.DEACTIVATE, spriteRemovedFromStage);
}
private function handleStreetMoveCarsAndNpc(gap:Number=200):void{
if (Config.currentLevel == 1){
if ((currDistance % gap) == 0){
carOnMid();
};
} else {
if (Config.currentLevel == 2){
if ((currDistance % 150) == 0){
carOnTop();
};
if ((currDistance % 500) == 0){
carOnMid();
};
if ((currDistance % 1000) == 0){
carOnBottom();
};
} else {
if (Config.currentLevel == 3){
if ((currDistance % 220) == 0){
carOnMid();
};
if ((currDistance % 180) == 0){
carOnTop();
};
} else {
if (Config.currentLevel == 4){
if ((currDistance % 170) == 0){
carOnMid();
};
if ((currDistance % 190) == 0){
carOnBottom();
};
if ((currDistance % 150) == 0){
carOnTop();
};
};
};
};
};
var n:Number = 0;
while (n < carArr1.length) {
carArr1[n].run();
n++;
};
var m:Number = 0;
while (m < carArr2.length) {
carArr2[m].run();
m++;
};
var h:Number = 0;
while (h < carArr3.length) {
carArr3[h].run();
h++;
};
}
private function goFrame(event:Event):void{
if (_score_act.currentFrame == _score_act.totalFrames){
_score_act.stop();
_score_act.removeEventListener(Event.ENTER_FRAME, goFrame);
_score_act.gotoAndStop(1);
};
getPizza_Coin();
}
private function levelRun():void{
judgeTime();
}
private function delMark(id:int):void{
var tempMark:Mark;
var k:Number = 0;
while (k < markArr.length) {
tempMark = markArr[k];
if (tempMark.id == id){
tempMark.removeEventListener("FRAME_IS_FINISH", onTarMarkFinish);
tempMark.del();
markArr.splice(k, 1);
return;
};
k++;
};
}
private function initEvent():void{
_mc.stage.focus = _mc.stage;
_root.addEventListener(Event.ENTER_FRAME, runs);
_mc.stage.addEventListener(KeyboardEvent.KEY_DOWN, boyKeyDown);
_mc.stage.addEventListener(KeyboardEvent.KEY_UP, boyKeyUp);
_stopButton.addEventListener(MouseEvent.CLICK, stopGame);
}
private function addPizza():void{
var row:int;
var startX:Number;
var temp:Pizzas;
if (Config.pizza_num < 10){
if ((currDistance % Config.pizza_time_gap) == 0){
pizzaArr = new Array();
row = Math.floor(((Math.random() * 3) + 1));
startX = ((DocumentClass.STAGEWIDTH * 2) + (Math.random() * Config.pizza_every_gap));
temp = new Pizzas(_propClassMC, _allEffectesMc, row, startX);
pizzaArr.push(temp);
temp.addEventListener("PIZZA_MOVE_FINISH", onPizzaMoveFinish);
};
};
}
private function carOnTop():void{
var _rowNum:int;
var tempCar:Car;
if (Config.levelControl == false){
_rowNum = 1;
_percentSp1 = ((2 + (Math.random() * 3)) * 0.1);
if (_midTemp1 != 0){
if (_midTemp1 <= _percentSp1){
_percentSp1 = _midTemp1;
};
};
tempCar = new Car(_boyCarMc, _rowNum, (750 + (Math.random() * 100)), _percentSp1);
tempCar.addEventListener("CAR_MOVE_FINISH", onCar1MoveFinish);
carArr1.push(tempCar);
_midTemp1 = _percentSp1;
};
}
private function handleStreetCoin(gap:Number=150):void{
if ((currDistance % gap) == 0){
if (Config.levelControl == false){
addCoin();
};
};
var j:Number = 0;
while (j < coinArr.length) {
coinArr[j].run();
j++;
};
coinHitBoy();
}
private function throwpizzaHitGuest():void{
var tempTP:ThrowPizza;
var i:Number;
var tempGuest:Guests;
var j:Number = 0;
while (j < throwPArr.length) {
tempTP = throwPArr[j];
i = 0;
while (i < guestArr.length) {
tempGuest = guestArr[i];
if ((((tempTP.x >= (tempGuest.x - 150))) && ((tempTP.x <= (tempGuest.x + 150))))){
if (tempTP.y <= (tempGuest.y - 30)){
if (tempGuest.flag == false){
SoundsManager.instance.playSound("eatP", 1);
SoundsManager.instance.playSound("guestGetPSound", 1);
new EffectClass(tempGuest.selfMc, 40, -30, "guestGetPizzas");
Config.showLastInformation = true;
Config.pizzaIsHitting = true;
boy._active.gotoAndStop("yeah");
boy._wheel.gotoAndStop("yeah");
boy.delPizza(tempTP.id);
tempGuest.selfMc.removeChild(tempGuest.greenMc);
tempGuest.selfMc.gotoAndStop(2);
new EffectClass(_propmc, 500, 370, "Good_Effects");
Config.successed_pizza_num++;
_score_act.gotoAndPlay(2);
(_score_act["score"]["targetNum"] as TextField).text = Config.successed_pizza_num.toString();
_score_act.addEventListener(Event.ENTER_FRAME, goFrame);
Config.inforMoveFlag = true;
_successEffect = new EffectClass(_allEffectesMc, boy.boymc.x, boy.boymc.y, "success");
tempGuest.flag = true;
} else {
boy.delPizza(tempTP.id);
Config.pizzaIsHitting = false;
new EffectClass(_allEffectesMc, tempGuest.x, tempGuest.y, "pizzahasbroken");
};
};
};
i++;
};
j++;
};
}
private function boyKeyDown(event:KeyboardEvent):void{
if (Config.isBoyRunFlag == true){
return;
};
if (event.keyCode == Keyboard.LEFT){
_leftmove = true;
boy._active.gotoAndStop("normal");
boy._wheel.gotoAndStop("normal");
};
if (event.keyCode == Keyboard.UP){
_upmove = true;
boy._active.gotoAndStop("left");
boy._wheel.gotoAndStop("left");
};
if (event.keyCode == Keyboard.RIGHT){
_rightmove = true;
boy._active.gotoAndStop("normal");
boy._wheel.gotoAndStop("normal");
};
if (event.keyCode == Keyboard.DOWN){
_downmove = true;
boy._active.gotoAndStop("right");
boy._wheel.gotoAndStop("right");
};
if (Config.currentLevel == 1){
if (wordDisappearID >= 6){
if (event.keyCode == Keyboard.SPACE){
if (Config.initBoyRun == true){
_pizzaThrowFlag = false;
if (Config.pizza_num > 0){
Config.pizza_num = (Config.pizza_num - 1);
boy.ProducedPizza();
} else {
if (Config.pizza_num <= 0){
Config.pizza_num = 0;
boy._active.gotoAndStop("noPizza");
boy._wheel.gotoAndStop("noPizza");
};
};
};
};
};
} else {
if (event.keyCode == Keyboard.SPACE){
if (Config.initBoyRun == true){
_pizzaThrowFlag = false;
if (Config.pizza_num > 0){
Config.pizza_num = (Config.pizza_num - 1);
boy.ProducedPizza();
} else {
if (Config.pizza_num <= 0){
Config.pizza_num = 0;
boy._active.gotoAndStop("noPizza");
boy._wheel.gotoAndStop("noPizza");
};
};
};
};
};
}
private function delDis():void{
_root.removeChild(_hitTarActiveMc);
_root.removeChild(_propmc);
_root.removeChild(_allEffectesMc);
_root.removeChild(_boyCarMc);
_root.removeChild(_mc);
_root.removeChild(_propClassMC);
backGround.delDis();
boy.delDis();
}
private function judgeTime():void{
if ((_curTotalFrame % Config.levelTimeArr[(Config.currentLevel - 1)]) == 0){
if (_levelmc.currentFrame < 100){
_levelmc.gotoAndStop((_levelmc.currentFrame + 1));
_curTotalFrame = 0;
if (_levelmc.currentFrame > 90){
_hat.play();
};
} else {
if (_levelmc.currentFrame == 100){
levelFlag = true;
Config.levelControl = true;
Config.inforMoveFlag = false;
_hat.stop();
};
};
};
}
private function delWords1(e:WordsEvent):void{
word1.del();
wordDisappearID++;
word1 = null;
if ((wordDisappearID % 2) != 0){
levelFlag = false;
};
judgeTime();
}
private function right_up():void{
boyMoveKindNumber = 3;
initEndHitConfig();
}
private function delTar(id:int):void{
var tar:Tar;
var k:Number = 0;
while (k < tarArr.length) {
tar = tarArr[k];
if (tar.id == id){
tar.removeEventListener("TAR_MOVE_FINISH", onTarMoveFinish);
tar.del();
tarArr.splice(k, 1);
return;
};
k++;
};
}
private function addStreetSpeed():void{
if (Config.currentLevel == 1){
Config._streetSpeed = (Config._streetSpeed + 0.06);
if (Config._streetSpeed >= Config._maxStreetSpeed1){
Config._streetSpeed = Config._maxStreetSpeed1;
};
};
if (Config.currentLevel == 2){
Config._streetSpeed = (Config._streetSpeed + 0.08);
if (Config._streetSpeed >= Config._maxStreetSpeed2){
Config._streetSpeed = Config._maxStreetSpeed2;
};
};
if (Config.currentLevel == 3){
Config._streetSpeed = (Config._streetSpeed + 0.08);
if (Config._streetSpeed >= Config._maxStreetSpeed3){
Config._streetSpeed = Config._maxStreetSpeed3;
};
};
if (Config.currentLevel == 4){
Config._streetSpeed = (Config._streetSpeed + 0.08);
if (Config._streetSpeed >= Config._maxStreetSpeed4){
Config._streetSpeed = Config._maxStreetSpeed4;
};
};
}
private function completemcRun(event:Event):void{
if (Config.stopButtonAndLevelRunFlag == false){
_completeMC.alpha = (_completeMC.alpha + 0.01);
if (Config._passGameMenu == true){
_completeMC.removeEventListener(Event.ENTER_FRAME, completemcRun);
_allEffectesMc.removeChild(_completeMC);
} else {
if (_completeMC.alpha >= 1){
endTime = getTimer();
if (((((endTime - beforeTime) >= 3000)) && ((_boyCarMc.numChildren == 1)))){
_completeMC.removeEventListener(Event.ENTER_FRAME, completemcRun);
_allEffectesMc.removeChild(_completeMC);
levelRunFinishToMoveBoy = false;
Config.levelControl = false;
_root.dispatchEvent(new Event(Manager.PASSFILM));
};
};
};
};
}
private function subStreetSpeed():void{
if (Config.currentLevel == 1){
Config._streetSpeed = (Config._streetSpeed - 0.6);
if (Config._streetSpeed <= Config._minStreetSpeed1){
Config._streetSpeed = Config._minStreetSpeed1;
};
};
if (Config.currentLevel == 2){
Config._streetSpeed = (Config._streetSpeed - 0.6);
if (Config._streetSpeed <= Config._minStreetSpeed2){
Config._streetSpeed = Config._minStreetSpeed2;
};
};
if (Config.currentLevel == 3){
Config._streetSpeed = (Config._streetSpeed - 0.7);
if (Config._streetSpeed <= Config._minStreetSpeed3){
Config._streetSpeed = Config._minStreetSpeed3;
};
};
if (Config.currentLevel == 4){
Config._streetSpeed = (Config._streetSpeed - 0.7);
if (Config._streetSpeed <= Config._minStreetSpeed4){
Config._streetSpeed = Config._minStreetSpeed4;
};
};
}
private function onTarMarkFinish(e:MarkEvent):void{
delMark(e.id);
}
private function onTarMoveFinish(e:TarEvent):void{
delTar(e.id);
}
private function handleBoyMove():void{
if (Config.initBoyRun == false){
boy.run();
} else {
if (Config.initBoyRun == true){
if (Config.inforMoveFlag == true){
boy.inforRun(_leftmove, _upmove, _rightmove, _downmove, _successEffect);
};
if (Config.inforMoveFlag == false){
boy.keyRun(_leftmove, _upmove, _rightmove, _downmove);
};
};
};
}
private function handleStreetSpeed():void{
if (_propClassMC.getChildByName("markmc") != null){
subStreetSpeed();
} else {
addStreetSpeed();
};
}
private function handleHitting(car:Car):void{
if (((((boy.x + boy.boyWidth) >= (car.x - car.desWidth))) && (((boy.x - boy.boyWidth) <= ((car.x + car.desWidth) + boy.boyWidth))))){
if ((((boy.y >= (car.y - boy.boyHeight))) && ((boy.y <= (car.y + (car.desHeight / 2)))))){
if (boy.x < (car.x - car.desWidth)){
if (boy.y <= car.y){
left_up();
} else {
if (boy.y > car.y){
left_down();
};
};
};
if ((((boy.x >= (car.x - car.desWidth))) && ((boy.x <= car.x)))){
if (boy.y <= car.y){
left_up();
} else {
if (boy.y > car.y){
left_down();
};
};
};
if ((((boy.x > car.x)) && ((boy.x <= (car.x + car.desWidth))))){
if (boy.y <= car.y){
right_up();
} else {
if (boy.y > car.y){
right_down();
};
};
};
if ((((boy.x > (car.x + car.desWidth))) && ((boy.x <= ((car.x + car.desWidth) + boy.boyWidth))))){
if (boy.y <= car.y){
right_up();
} else {
if (boy.y > car.y){
right_down();
};
};
};
};
};
}
private function delfail(event:Event):void{
if (boy._active.currentLabel == "failEnd"){
boy._active.stop();
boy._active.gotoAndStop("normal");
boy._active.removeEventListener(Event.ENTER_FRAME, delfail);
};
if (boy._wheel.currentLabel == "failEnd"){
boy._wheel.stop();
boy._wheel.gotoAndStop("normal");
boy._wheel.removeEventListener(Event.ENTER_FRAME, delfail);
};
}
private function onCar3MoveFinish(e:CarEvent):void{
e.arr = carArr3;
e.carLane = 3;
delCar(e.id, e.arr, e.carLane);
}
private function stopGameKey():void{
Config.stopFlag = true;
Config.stopButtonAndLevelRunFlag = true;
addPause();
}
private function onPizzaMoveFinish(e:PizzaEvent):void{
delPizza(e.id);
}
private function carOnMid():void{
var _rowNum:int;
var tempCar:Car;
if (Config.levelControl == false){
_rowNum = 2;
_percentSp2 = (((2 + (Math.random() * 3)) + 1) * 0.1);
if (_midTemp2 != 0){
if (_midTemp2 <= _percentSp2){
_percentSp2 = _midTemp2;
};
};
tempCar = new Car(_boyCarMc, _rowNum, 750, _percentSp2);
tempCar.addEventListener("CAR_MOVE_FINISH", onCar2MoveFinish);
carArr2.push(tempCar);
_midTemp2 = _percentSp2;
};
}
private function doOtherThing(event:Event):void{
var tarmc:MovieClip;
if ((event.currentTarget is MovieClip)){
tarmc = (event.currentTarget as MovieClip);
};
if (tarmc.currentFrame == 20){
tarmc.removeEventListener(Event.ENTER_FRAME, doOtherThing);
if ((object is Tar)){
delTar((object as Tar).id);
};
Config.markRunFlag = true;
};
}
private function delCar(id:int, arr:Array, count:int):void{
var temp:Car;
var k:Number = (arr.length - 1);
while (k >= 0) {
temp = arr[k];
if (temp.id == id){
if (count == 1){
temp.removeEventListener("CAR_MOVE_FINISH", onCar1MoveFinish);
};
if (count == 2){
temp.removeEventListener("CAR_MOVE_FINISH", onCar2MoveFinish);
};
if (count == 3){
temp.removeEventListener("CAR_MOVE_FINISH", onCar3MoveFinish);
};
temp.del();
arr.splice(k, 1);
return;
};
k--;
};
}
private function onGuestMoveFinish(e:GuestEvent):void{
delGuest(e.id);
}
private function carOnBottom():void{
var _rowNum:int;
var tempCar:Car;
if (Config.levelControl == false){
_rowNum = 3;
_percentSp3 = ((2 + (Math.random() * 3)) * 0.1);
if (_midTemp3 != 0){
if (_midTemp3 <= _percentSp3){
_percentSp3 = _midTemp3;
};
};
tempCar = new Car(_boyCarMc, _rowNum, (750 + (Math.random() * 200)), _percentSp3);
tempCar.addEventListener("CAR_MOVE_FINISH", onCar3MoveFinish);
carArr3.push(tempCar);
_midTemp3 = _percentSp3;
};
}
private function spriteRemovedFromStage(e:Event):void{
Config.isBoyRunFlag = true;
Config.initBoyRun = false;
Config.stopFlag = true;
Config.levelControl = false;
addPause();
}
private function pizzaHitBoy():void{
var tempPizza:Pizzas;
var pizzaHitArea:Sprite;
var boyHitArea:MovieClip = boy.hitArea;
var i:int;
while (i < pizzaArr.length) {
tempPizza = pizzaArr[i];
pizzaHitArea = tempPizza.hitArea();
if (boyHitArea.hitTestObject(pizzaHitArea)){
SoundsManager.instance.playSound("eatP", 1);
delPizza(tempPizza.id);
new EffectClass(_allEffectesMc, (boy.x + 10), (boy.y - 50), "pizza_disappear");
Config.pizza_num++;
new EffectClass(_propmc, _propAddPizzaEffectPositionX, _propAddPizzaEffectPositionY, "getPizzaEffect");
};
i++;
};
}
private function left_down():void{
boyMoveKindNumber = 1;
initEndHitConfig();
}
private function addPause():void{
if (logicalPause != null){
logicalPause.destroy();
logicalPause = null;
};
logicalPause = new PauseGame(_root);
}
private function right_down():void{
boyMoveKindNumber = 4;
initEndHitConfig();
}
private function getPizza_Coin():void{
_pizzaNum.text = (Config.pizza_num + "");
_coinNum.text = (Config.coin_num + "");
_targetNum.text = (Config.successed_pizza_num + "");
_needNum.text = (Config.target_pizza_num + "");
if (Config.successed_pizza_num >= 5){
Dispatch_GooGleEventAndAwardScores.Award_first();
};
if (Config.total_coin_num >= 50){
Dispatch_GooGleEventAndAwardScores.Award_Second();
};
if (Config.successed_pizza_num >= 10){
Dispatch_GooGleEventAndAwardScores.Award_Third();
};
}
private function addCoin():void{
var temp:Coin;
var coin_num:int = (Config.list_coin_num + Math.floor((Math.random() * Config.list_coin_num)));
var startX:Number = (DocumentClass.STAGEWIDTH + (Math.random() * Config.coin_group_gap));
var startY:Number = ((Config._borderUp + 42) + (Math.random() * ((Config._borderDown - 50) - Config._borderUp)));
var i:Number = 0;
while (i < coin_num) {
temp = new Coin(_propClassMC, (startX + (Config.coin_every_gap * i)), startY);
temp.addEventListener("COIN_MOVE_FINISH", onCoinMoveFinish);
coinArr.push(temp);
i++;
};
}
}
}//package main
Section 94
//Loading (main.Loading)
package main {
import flash.display.*;
import flash.events.*;
import zlong.Template.*;
import flash.text.*;
import zlong.breathxue.utils.*;
public class Loading extends AbstractLoadingClass {
private var _mc_perBar:MovieClip;
private var _mc:Sprite;
private var _mc_perText:TextField;
private static const MC_CLASS_NAME:String = "Loadings";
public function Loading(pmc:Sprite){
super(pmc);
trace("5555555555555555555");
_mc = Attach.getSprite(MC_CLASS_NAME);
pmc.addChild(_mc);
_mc_perBar = (_mc.getChildByName("bar") as MovieClip);
_mc_perText = (_mc.getChildByName("perText") as TextField);
_mc.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
override public function destroy():void{
delEvent();
delDis();
}
private function delDis():void{
_mc.parent.removeChild(_mc);
}
private function delEvent():void{
_mc.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
public function del():void{
delEvent();
delDis();
}
private function enterFrameHandler(event:Event):void{
var percentSWF:Number = (_mc.root.loaderInfo.bytesLoaded / _mc.root.loaderInfo.bytesTotal);
_mc_perBar.gotoAndStop(int((percentSWF * 100)));
_mc_perText.text = ((int((percentSWF * 10000)) / 100) + "");
}
}
}//package main
Section 95
//Manager (main.Manager)
package main {
import flash.display.*;
import flash.events.*;
import util.*;
import flash.net.*;
import scores.*;
public class Manager {
private var _root:Sprite;
private var _screen:AbstractScreen;
private var _tempScreen:PassFilm;
public static const GAMEING_HOW_TO_PLAY:String = "GAMEING_HOW_TO_PLAY";
public static const LOADING_COMPLETE:String = "LOADING_COMPLETE";
public static const CREDITS_LOOK:String = "CREDITS_LOOK";
public static const FAILTOLLGATECOUNT:String = "FAILTOLLGATECOUNT";
public static const REPEATGAME:String = "REPEATGAME";
public static const START_GAME:String = "START_GAME";
public static const PASSFILM:String = "PASSFILM";
public static const CLICK_BACK:String = "CLICK_BACK";
public static const MENU:String = "MENU";
public static const SUCCESSTOLLGATECOUNT:String = "SUCCESSTOLLGATECOUNT";
public static const COMMITWINDOW:String = "COMMITWINDOW";
public static const HOW_TO_PLAY:String = "HOW_TO_PLAY";
public static const MORE_GAMES:String = "MORE_GAMES";
public static const PLAY:String = "PLAY";
public static const CUP_SELECT:String = "CUP_SELECT";
public function Manager(r:Sprite){
super();
_root = r;
initMainMenu();
initEvent();
}
private function initGateSuccess():void{
_screen = new TollGateCount(_root);
}
private function initLinks(event:Event):void{
var request:URLRequest = new URLRequest("http://www.game.com.cn");
navigateToURL(request, "_blank");
}
private function initCupselect():void{
_screen = new CupSelect(_root);
}
private function initCup(event:Event):void{
clearScreen();
initCupselect();
}
private function initHowToPlay():void{
_screen = new HowToPlay(_root, 0);
}
private function reMainMenu():void{
_screen = new NewMenu(_root, Config.soundFrame, Config.qualityFrame);
}
private function initTollGateFail(event:Event):void{
clearScreen();
initGateFailed();
}
private function initList():void{
_screen = new CreditLook(_root);
}
private function initMenu(event:Event):void{
clearScreen();
initMainMenu();
}
private function initGateFailed():void{
_screen = new TollGateCountFailed(_root);
}
private function clearScreen():void{
_screen.destroy();
GC.clear();
}
private function clickBack(e:Event):void{
clearScreen();
initMainMenu();
}
public function initGameingHowToPlay():void{
_screen = new HowToPlay(_root, 1);
}
private function restartGame(event:Event):void{
clearScreen();
reMainMenu();
}
private function initGame(event:Event):void{
clearScreen();
initStartGames();
}
private function initTollGatesSuccess(event:Event):void{
clearScreen();
initGateSuccess();
}
private function initCommit(event:Event):void{
clearScreen();
initCommitScore();
}
public function initMainMenu():void{
_screen = new NewMenu(_root, Config.soundFrame, Config.qualityFrame);
}
private function initEvent():void{
_root.addEventListener(LOADING_COMPLETE, initMenu);
_root.addEventListener(START_GAME, initCup);
_root.addEventListener(HOW_TO_PLAY, initHelp);
_root.addEventListener(GAMEING_HOW_TO_PLAY, showHelpInfo);
_root.addEventListener(MORE_GAMES, initLinks);
_root.addEventListener(CUP_SELECT, initGame);
_root.addEventListener(CLICK_BACK, clickBack);
_root.addEventListener(PLAY, initCup);
_root.addEventListener(CREDITS_LOOK, initAuthorList);
_root.addEventListener(SUCCESSTOLLGATECOUNT, initTollGatesSuccess);
_root.addEventListener(FAILTOLLGATECOUNT, initTollGateFail);
_root.addEventListener(COMMITWINDOW, initCommit);
_root.addEventListener(MENU, restartGame);
_root.addEventListener(REPEATGAME, repeatGame);
_root.addEventListener(PASSFILM, addPassFilm);
}
private function initCommitScore():void{
_screen = new CommitScores(_root);
}
private function showHelpInfo(event:Event):void{
clearScreen();
initGameingHowToPlay();
}
private function repeatGame(event:Event):void{
clearScreen();
initCupselect();
}
private function initStartGames():void{
_screen = new Game(_root);
}
private function initHelp(event:Event):void{
clearScreen();
initHowToPlay();
}
private function addPassFilm(event:Event):void{
_tempScreen = new PassFilm(_root, Config.passfilmdescri);
}
private function initAuthorList(event:Event):void{
clearScreen();
initList();
}
}
}//package main
Section 96
//NewMenu (main.NewMenu)
package main {
import flash.display.*;
import flash.events.*;
import util.*;
import flash.text.*;
import lywMainMenu.*;
public class NewMenu extends AbstractScreen {
private var _howToPlay:MovieClip;
private var _howToPlayBtn:MovieClip;
private var _moreGame:MovieClip;
private var _sound:MovieClip;
private var _quality:MovieClip;
private var _start:MovieClip;
var text:TextField;
private var _moreGameBtn:MovieClip;
private var _obj:MainMenuObj;
private var _startBtn:MovieClip;
private var _qualityFr:int;
private var _soundFr:int;
public function NewMenu(r:Sprite, soundFr:int=1, qualityFr:int=1){
super(r);
_soundFr = soundFr;
_qualityFr = qualityFr;
SoundsManager.instance.playMusic("stantamenu", 1);
Dispatch_GooGleEventAndAwardScores.GooGle_mainmenu();
initDis();
}
private function addStart():void{
_start = (_startBtn.getChildByName("start_game") as MovieClip);
_start.addEventListener(MouseEvent.CLICK, clickStartGame);
}
private function initChild():void{
_startBtn = (_obj.getChildByName("start_game_anim") as MovieClip);
_startBtn.addFrameScript(16, addStart);
_howToPlayBtn = (_obj.getChildByName("how_to_play_anim") as MovieClip);
_howToPlayBtn.addFrameScript(35, addHowToPlay);
_moreGameBtn = (_obj.getChildByName("more_game_anim") as MovieClip);
_moreGameBtn.addFrameScript(56, addMoreGame);
}
private function delDis():void{
_obj.del_all();
_root.removeChild(_obj);
}
private function addHowToPlay():void{
_howToPlay = (_howToPlayBtn.getChildByName("how_to_play") as MovieClip);
_howToPlay.addEventListener(MouseEvent.CLICK, clickHowToPlay);
}
private function soundControl(event:MouseEvent):void{
if (_sound.currentFrame == 1){
Config.soundFrame = 2;
_sound.gotoAndStop(Config.soundFrame);
SoundsManager.instance.Enabled = false;
SoundsManager.instance.MusicEnable = false;
} else {
if (_sound.currentFrame == 2){
Config.soundFrame = 1;
_sound.gotoAndStop(Config.soundFrame);
SoundsManager.instance.Enabled = true;
SoundsManager.instance.MusicEnable = true;
};
};
}
private function clickStartGame(event:MouseEvent):void{
SoundsManager.instance.playSound("menu_presss", 1);
_start.gotoAndStop(3);
Config.passfilmdescri = 1;
_root.removeChild(text);
_root.dispatchEvent(new Event(Manager.PASSFILM));
}
private function clickHowToPlay(event:MouseEvent):void{
SoundsManager.instance.playSound("menu_presss", 1);
_howToPlay.gotoAndStop(3);
Config.passfilmdescri = 2;
_root.removeChild(text);
_root.dispatchEvent(new Event(Manager.PASSFILM));
}
private function initDis():void{
_obj = new MainMenuObj();
_obj.tabChildren = false;
_root.addChild(_obj);
addText();
_quality = (_obj.getChildByName("graphic_cfg") as MovieClip);
_quality.buttonMode = true;
_sound = (_obj.getChildByName("sound_cfg") as MovieClip);
_sound.buttonMode = true;
_quality.y = (_quality.y + 10);
_sound.y = (_sound.y + 10);
_sound.gotoAndStop(_soundFr);
_quality.gotoAndStop(_qualityFr);
initChild();
initEvent();
}
private function qualityControl(e:Event):void{
if (_quality.currentFrame == 1){
_root.stage.quality = StageQuality.MEDIUM;
Config.qualityFrame = 2;
_quality.gotoAndStop(Config.qualityFrame);
} else {
if (_quality.currentFrame == 2){
_root.stage.quality = StageQuality.LOW;
Config.qualityFrame = 3;
_quality.gotoAndStop(Config.qualityFrame);
} else {
if (_quality.currentFrame == 3){
_root.stage.quality = StageQuality.BEST;
Config.qualityFrame = 1;
_quality.gotoAndStop(Config.qualityFrame);
};
};
};
}
private function addMoreGame():void{
_moreGame = (_moreGameBtn.getChildByName("more_game") as MovieClip);
_moreGame.addEventListener(MouseEvent.MOUSE_OVER, overMoreGames);
_moreGame.addEventListener(MouseEvent.MOUSE_OUT, outMoreGames);
}
private function initEvent():void{
_sound.addEventListener(MouseEvent.CLICK, soundControl);
_quality.addEventListener(MouseEvent.CLICK, qualityControl);
}
private function addText():void{
text = new TextField();
_root.addChild(text);
text.text = "V.1.00";
}
private function overMoreGames(event:MouseEvent):void{
SoundsManager.instance.playSound("menu_touchs", 1);
_moreGame.gotoAndStop(2);
}
override public function destroy():void{
removeEvent();
delDis();
}
private function removeEvent():void{
_start.removeEventListener(MouseEvent.CLICK, clickStartGame);
_howToPlay.removeEventListener(MouseEvent.CLICK, clickHowToPlay);
_moreGame.removeEventListener(MouseEvent.MOUSE_OVER, overMoreGames);
_moreGame.removeEventListener(MouseEvent.MOUSE_OUT, outMoreGames);
_sound.removeEventListener(MouseEvent.CLICK, soundControl);
_quality.removeEventListener(MouseEvent.CLICK, qualityControl);
}
private function outMoreGames(event:MouseEvent):void{
_moreGame.gotoAndStop(1);
}
}
}//package main
Section 97
//Stats (net.hires.debug.Stats)
package net.hires.debug {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import flash.system.*;
public class Stats extends Sprite {
protected const WIDTH:uint = 70;
protected const HEIGHT:uint = 100;
protected var xml:XML;
protected var text:TextField;
protected var style:StyleSheet;
protected var timer:uint;
protected var fps:uint;
protected var ms:uint;
protected var ms_prev:uint;
protected var mem:Number;
protected var mem_max:Number;
protected var graph:Bitmap;
protected var rectangle:Rectangle;
protected var fps_graph:uint;
protected var mem_graph:uint;
protected var mem_max_graph:uint;
protected var theme:Object;
public function Stats(_theme:Object=null):void{
this.theme = {bg:51, fps:0xFFFF00, ms:0xFF00, mem:0xFFFF, memmax:0xFF0070};
super();
this.mouseChildren = false;
this.mouseEnabled = false;
if (_theme){
if (_theme.bg != null){
this.theme.bg = _theme.bg;
};
if (_theme.fps != null){
this.theme.fps = _theme.fps;
};
if (_theme.ms != null){
this.theme.ms = _theme.ms;
};
if (_theme.mem != null){
this.theme.mem = _theme.mem;
};
if (_theme.memmax != null){
this.theme.memmax = _theme.memmax;
};
};
this.mem_max = 0;
this.xml = <xml><fps>FPS:</fps><ms>MS:</ms><mem>MEM:</mem><memMax>MAX:</memMax></xml>
;
this.style = new StyleSheet();
this.style.setStyle("xml", {fontSize:"9px", fontFamily:"_sans", leading:"-2px"});
this.style.setStyle("fps", {color:this.hex2css(this.theme.fps)});
this.style.setStyle("ms", {color:this.hex2css(this.theme.ms)});
this.style.setStyle("mem", {color:this.hex2css(this.theme.mem)});
this.style.setStyle("memMax", {color:this.hex2css(this.theme.memmax)});
this.text = new TextField();
this.text.width = this.WIDTH;
this.text.height = 50;
this.text.styleSheet = this.style;
this.text.condenseWhite = true;
this.text.selectable = false;
this.text.mouseEnabled = false;
this.graph = new Bitmap();
this.graph.alpha = 0.3;
this.graph.y = 50;
this.rectangle = new Rectangle((this.WIDTH - 1), 0, 1, (this.HEIGHT - 50));
addEventListener(Event.ADDED_TO_STAGE, this.init, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, this.destroy, false, 0, true);
}
private function init(e:Event):void{
graphics.beginFill(this.theme.bg, 0.3);
graphics.drawRect(0, 0, this.WIDTH, this.HEIGHT);
graphics.endFill();
addChild(this.text);
this.graph.bitmapData = new BitmapData(this.WIDTH, (this.HEIGHT - 50), false, this.theme.bg);
addChild(this.graph);
addEventListener(Event.ENTER_FRAME, this.update);
}
private function destroy(e:Event):void{
graphics.clear();
while (numChildren > 0) {
removeChildAt(0);
};
this.graph.bitmapData.dispose();
removeEventListener(Event.ENTER_FRAME, this.update);
}
private function update(e:Event):void{
this.timer = getTimer();
if ((this.timer - 1000) > this.ms_prev){
this.ms_prev = this.timer;
this.mem = Number((System.totalMemory * 9.54E-7).toFixed(3));
this.mem_max = ((this.mem_max > this.mem)) ? this.mem_max : this.mem;
this.fps_graph = Math.min(this.graph.height, ((this.fps / stage.frameRate) * this.graph.height));
this.mem_graph = (Math.min(this.graph.height, Math.sqrt(Math.sqrt((this.mem * 5000)))) - 2);
this.mem_max_graph = (Math.min(this.graph.height, Math.sqrt(Math.sqrt((this.mem_max * 5000)))) - 2);
this.graph.bitmapData.scroll(-1, 0);
this.graph.bitmapData.fillRect(this.rectangle, this.theme.bg);
this.graph.bitmapData.setPixel((this.graph.width - 1), (this.graph.height - this.fps_graph), this.theme.fps);
this.graph.bitmapData.setPixel((this.graph.width - 1), (this.graph.height - ((this.timer - this.ms) >> 1)), this.theme.ms);
this.graph.bitmapData.setPixel((this.graph.width - 1), (this.graph.height - this.mem_graph), this.theme.mem);
this.graph.bitmapData.setPixel((this.graph.width - 1), (this.graph.height - this.mem_max_graph), this.theme.memmax);
this.xml.fps = ((("FPS: " + this.fps) + " / ") + stage.frameRate);
this.xml.mem = ("MEM: " + this.mem);
this.xml.memMax = ("MAX: " + this.mem_max);
this.fps = 0;
};
this.fps++;
this.xml.ms = ("MS: " + (this.timer - this.ms));
this.ms = this.timer;
this.text.htmlText = this.xml;
}
private function onClick(e:MouseEvent):void{
if (((mouseY / height) > 0.5)){
stage.frameRate--;
} else {
stage.frameRate++;
};
this.xml.fps = ((("FPS: " + this.fps) + " / ") + stage.frameRate);
this.text.htmlText = this.xml;
}
private function hex2css(color:int):String{
return (("#" + color.toString(16)));
}
}
}//package net.hires.debug
Section 98
//MonsterDebugger (nl.demonsters.debugger.MonsterDebugger)
package nl.demonsters.debugger {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
import flash.system.*;
public class MonsterDebugger {
private const TYPE_BOOLEAN:String = "Boolean";
private const COMMAND_GET_DISPLAYOBJECT:String = "GET_DISPLAYOBJECT";
private const TYPE_VECTOR:String = "Vector";
private const TYPE_XMLLIST:String = "XMLList";
private const COMMAND_TRACE:String = "TRACE";
private const ACCESS_METHOD:String = "method";
private const TYPE_XMLVALUE:String = "XMLValue";
private const COMMAND_NOTFOUND:String = "NOTFOUND";
protected const MAX_BUFFER_SIZE:int = 500;
private const COMMAND_MONITOR:String = "MONITOR";
private const ACCESS_CONSTANT:String = "constant";
protected const HIGHLIGHT_BORDER:int = 4;
private const TYPE_FUNCTION:String = "Function";
private const TYPE_UINT:String = "uint";
private const TYPE_INT:String = "int";
protected const MAX_PACKAGE_BYTES:int = 40000;
private const LINE_IN:String = "_debuggerBlue";
private const TYPE_XMLATTRIBUTE:String = "XMLAttribute";
private const COMMAND_SNAPSHOT:String = "SNAPSHOT";
private const ALLOWED_DOMAIN:String = "*";
private const ICON_VARIABLE_READONLY:String = "iconVariableReadonly";
private const ICON_DEFAULT:String = "iconDefault";
private const LINE_OUT:String = "_debuggerRed";
private const COMMAND_BASE:String = "BASE";
private const COMMAND_SHOW_HIGHLIGHT:String = "SHOW_HIGHLIGHT";
private const COMMAND_HIDE_HIGHLIGHT:String = "HIDE_HIGHLIGHT";
private const TYPE_BYTEARRAY:String = "ByteArray";
private const ICON_VARIABLE_WRITEONLY:String = "iconVariableWriteonly";
private const COMMAND_GET_PROPERTIES:String = "GET_PROPERTIES";
private const TYPE_XML:String = "XML";
private const TYPE_XMLNODE:String = "XMLNode";
private const COMMAND_ROOT:String = "ROOT";
private const TYPE_WARNING:String = "Warning";
private const TYPE_VOID:String = "void";
private const PERMISSION_WRITEONLY:String = "writeonly";
private const PERMISSION_READWRITE:String = "readwrite";
private const ICON_VARIABLE:String = "iconVariable";
private const TYPE_METHOD:String = "MethodClosure";
private const ICON_XMLATTRIBUTE:String = "iconXMLAttribute";
private const COMMAND_HELLO:String = "HELLO";
private const COMMAND_GET_FUNCTIONS:String = "GET_FUNCTIONS";
private const PERMISSION_READONLY:String = "readonly";
private const ICON_XMLNODE:String = "iconXMLNode";
private const COMMAND_CLEAR_TRACES:String = "CLEAR_TRACES";
protected const VERSION:Number = 2.51;
private const ICON_WARNING:String = "iconWarning";
private const COMMAND_HELLO_RESPONSE:String = "HELLO_RESPONSE";
private const ICON_XMLVALUE:String = "iconXMLValue";
private const ACCESS_ACCESSOR:String = "accessor";
private const COMMAND_SET_PROPERTY:String = "SET_PROPERTY";
private const TYPE_STRING:String = "String";
private const COMMAND_CALL_METHOD:String = "CALL_METHOD";
private const ICON_FUNCTION:String = "iconFunction";
protected const HIGHLIGHT_COLOR:uint = 0xFFFF00;
private const COMMAND_INSPECT:String = "INSPECT";
private const TYPE_OBJECT:String = "Object";
private const TYPE_NUMBER:String = "Number";
private const ICON_ROOT:String = "iconRoot";
private const TYPE_ARRAY:String = "Array";
private const ACCESS_VARIABLE:String = "variable";
private const COMMAND_GET_OBJECT:String = "GET_OBJECT";
protected const FPS_UPDATE:int = 500;
protected var isConnected:Boolean;// = false
protected var monitorStart:Number;
private var lineIn:LocalConnection;
protected var buffer:Array;
protected var monitorTime:Number;
protected var monitor:Timer;
public var logger:Function;
protected var monitorFrames:uint;
private var lineOut:LocalConnection;
protected var highlight:Sprite;// = null
protected var monitorSprite:Sprite;
protected var isEnabled:Boolean;// = true
protected var root:Object;// = null
public static const COLOR_WARNING:uint = 0xFF3300;
public static const COLOR_NORMAL:uint = 0x111111;
public static const COLOR_ERROR:uint = 0xFF0000;
private static var instance:MonsterDebugger = null;
public function MonsterDebugger(target:Object=null){
var target = target;
buffer = new Array();
super();
if (instance == null){
instance = this;
lineOut = new LocalConnection();
lineOut.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler, false, 0, true);
lineOut.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler, false, 0, true);
lineOut.addEventListener(StatusEvent.STATUS, statusHandler, false, 0, true);
lineIn = new LocalConnection();
lineIn.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler, false, 0, true);
lineIn.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler, false, 0, true);
lineIn.addEventListener(StatusEvent.STATUS, statusHandler, false, 0, true);
lineIn.allowDomain(ALLOWED_DOMAIN);
lineIn.client = this;
monitorTime = new Date().time;
monitorStart = new Date().time;
monitorFrames = 0;
monitorSprite = new Sprite();
monitorSprite.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true);
monitor = new Timer(FPS_UPDATE);
monitor.addEventListener(TimerEvent.TIMER, monitorHandler, false, 0, true);
monitor.start();
lineIn.connect(LINE_IN);
//unresolved jump
var _slot1 = error;
};
instance.root = target;
instance.send({text:COMMAND_HELLO, version:VERSION});
}
private function statusHandler(event:StatusEvent):void{
if (event.level == "error"){
isConnected = false;
};
}
private function asyncErrorHandler(event:AsyncErrorEvent):void{
isConnected = false;
}
protected function htmlEscape(s:String):String{
var xml:XML;
if (s){
if (s.indexOf("&") != -1){
s = s.split("&").join("&");
};
if (s.indexOf("<") != -1){
s = s.split("<").join("<");
};
if (s.indexOf(">") != -1){
s = s.split(">").join(">");
};
if (s.indexOf("'") != -1){
s = s.split("'").join("'");
};
if (s.indexOf("\"") != -1){
s = s.split("\"").join(""");
};
xml = new XML((("<a>" + ??esc_xelem
) + "</a>"));
return (xml.toXMLString().replace(/(^<a>)|(<\/a>$)|(^<a\/>$)/g, ""));
//unresolved jump
};
return ("");
}
protected function sendBuffer():void{
if (buffer.length > 0){
while (buffer.length != 0) {
send(buffer.shift());
};
};
}
protected function createNode(title:String, object:Object=null, close:Boolean=false):String{
var prop:*;
var xml:String = "";
xml = (xml + ("<" + title));
if (object){
for (prop in object) {
xml = (xml + ((((" " + prop) + "=\"") + object[prop]) + "\""));
};
};
if (close){
xml = (xml + (("></" + title) + ">"));
} else {
xml = (xml + ">");
};
return (xml);
}
protected function enterFrameHandler(event:Event):void{
if (isEnabled){
monitorFrames++;
};
}
protected function traceInternal(target:Object, object, color:uint=0x111111, functions:Boolean=false, depth:int=4):void{
var xml:XML;
var memory:uint;
var obj:Object;
if (isEnabled){
xml = XML(parseObject(object, "", functions, 1, depth));
memory = System.totalMemory;
obj = {text:COMMAND_TRACE, date:new Date(), target:String(target), xml:xml, color:color, memory:memory};
if (isConnected){
send(obj);
} else {
sendToBuffer(obj);
};
};
}
protected function getObject(target:String="", parent:int=0){
var splitted:Array;
var i:int;
var index:Number;
var obj:Object;
var target = target;
var parent = parent;
var object:* = instance.root;
if (target != ""){
splitted = target.split(".");
i = 0;
for (;i < (splitted.length - parent);(i = (i + 1))) {
if (splitted[i] != ""){
if (splitted[i] == "children()"){
object = object.children();
} else {
if (splitted[i].indexOf("getChildAt(") == 0){
index = splitted[i].substring(11, splitted[i].indexOf(")", 11));
object = DisplayObjectContainer(object).getChildAt(index);
} else {
object = object[splitted[i]];
};
};
continue;
var _slot1 = error;
obj = {text:COMMAND_NOTFOUND, target:target};
if (isConnected){
send(obj);
} else {
sendToBuffer(obj);
};
break;
};
};
};
return (object);
}
protected function sendToBuffer(obj:Object):void{
buffer.push(obj);
if (buffer.length > MAX_BUFFER_SIZE){
buffer.shift();
};
}
protected function printObject(object, type:String):String{
var s:String = "";
if (type == TYPE_BYTEARRAY){
s = (object["length"] + " bytes");
} else {
s = htmlEscape(String(object));
};
return (s);
}
protected function clearTracesInternal():void{
var obj:Object;
if (isEnabled){
obj = {text:COMMAND_CLEAR_TRACES};
if (isConnected){
send(obj);
} else {
sendToBuffer(obj);
};
};
}
protected function parseXML(node, target:String="", currentDepth:int=1, maxDepth:int=-1):String{
var childTarget:String;
var xml:String = "";
var i:int;
if ((((maxDepth == -1)) || ((currentDepth <= maxDepth)))){
if (target.indexOf("@") != -1){
xml = (xml + createNode("node", {icon:ICON_XMLATTRIBUTE, label:node, name:"", type:TYPE_XMLATTRIBUTE, value:node, target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
if (node.name() == null){
xml = (xml + createNode("node", {icon:ICON_XMLVALUE, label:((("(" + TYPE_XMLVALUE) + ") = ") + printObject(node, TYPE_XMLVALUE)), name:"", type:TYPE_XMLVALUE, value:printObject(node, TYPE_XMLVALUE), target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
if (node.hasSimpleContent()){
xml = (xml + createNode("node", {icon:ICON_XMLNODE, label:(((node.name() + " (") + TYPE_XMLNODE) + ")"), name:node.name(), type:TYPE_XMLNODE, value:"", target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}));
if (node != ""){
xml = (xml + createNode("node", {icon:ICON_XMLVALUE, label:((("(" + TYPE_XMLVALUE) + ") = ") + printObject(node, TYPE_XMLVALUE)), name:"", type:TYPE_XMLVALUE, value:printObject(node, TYPE_XMLVALUE), target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
};
i = 0;
while (i < node.attributes().length()) {
xml = (xml + createNode("node", {icon:ICON_XMLATTRIBUTE, label:((((("@" + node.attributes()[i].name()) + " (") + TYPE_XMLATTRIBUTE) + ") = ") + node.attributes()[i]), name:"", type:TYPE_XMLATTRIBUTE, value:node.attributes()[i], target:(((target + ".") + "@") + node.attributes()[i].name()), access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
i++;
};
xml = (xml + createNode("/node"));
} else {
xml = (xml + createNode("node", {icon:ICON_XMLNODE, label:(((node.name() + " (") + TYPE_XMLNODE) + ")"), name:node.name(), type:TYPE_XMLNODE, value:"", target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}));
i = 0;
while (i < node.attributes().length()) {
xml = (xml + createNode("node", {icon:ICON_XMLATTRIBUTE, label:((((("@" + node.attributes()[i].name()) + " (") + TYPE_XMLATTRIBUTE) + ") = ") + node.attributes()[i]), name:"", type:TYPE_XMLATTRIBUTE, value:node.attributes()[i], target:(((target + ".") + "@") + node.attributes()[i].name()), access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
i++;
};
i = 0;
while (i < node.children().length()) {
childTarget = ((((target + ".") + "children()") + ".") + i);
xml = (xml + parseXML(node.children()[i], childTarget, (currentDepth + 1), maxDepth));
i++;
};
xml = (xml + createNode("/node"));
};
};
};
};
return (xml);
}
protected function send(data:Object):void{
var item:ByteArray;
var dataPackages:Array;
var i:int;
var bytesAvailable:int;
var offset:int;
var total:int;
var length:int;
var tmp:ByteArray;
var data = data;
if (isEnabled){
item = new ByteArray();
item.writeObject(data);
item.compress();
dataPackages = new Array();
i = 0;
if (item.length > MAX_PACKAGE_BYTES){
bytesAvailable = item.length;
offset = 0;
total = Math.ceil((item.length / MAX_PACKAGE_BYTES));
i = 0;
while (i < total) {
length = bytesAvailable;
if (length > MAX_PACKAGE_BYTES){
length = MAX_PACKAGE_BYTES;
};
tmp = new ByteArray();
tmp.writeBytes(item, offset, length);
dataPackages.push({total:total, nr:(i + 1), bytes:tmp});
bytesAvailable = (bytesAvailable - length);
offset = (offset + length);
i = (i + 1);
};
} else {
dataPackages.push({total:1, nr:1, bytes:item});
};
i = 0;
for (;i < dataPackages.length;(i = (i + 1))) {
lineOut.send(LINE_OUT, "onReceivedData", dataPackages[i]);
continue;
var _slot1 = error;
break;
};
};
}
private function securityErrorHandler(event:SecurityErrorEvent):void{
isConnected = false;
}
protected function monitorHandler(event:TimerEvent):void{
var memory:uint;
var now:Number;
var delta:Number;
var fps:uint;
var obj:Object;
if (isEnabled){
memory = System.totalMemory;
now = new Date().time;
delta = (now - monitorTime);
fps = ((monitorFrames / delta) * 1000);
monitorFrames = 0;
monitorTime = now;
obj = {text:COMMAND_MONITOR, memory:memory, fps:fps, time:now, start:monitorStart};
if (isConnected){
send(obj);
} else {
sendToBuffer(obj);
};
};
}
protected function snapshotInternal(target:DisplayObject, color:uint=0x111111):void{
var bitmapData:BitmapData;
var bytes:ByteArray;
var memory:uint;
var obj:Object;
if (isEnabled){
bitmapData = new BitmapData(target.width, target.height);
bitmapData.draw(target);
bytes = bitmapData.getPixels(new Rectangle(0, 0, target.width, target.height));
memory = System.totalMemory;
obj = {text:COMMAND_SNAPSHOT, date:new Date(), target:String(target), bytes:bytes, width:target.width, height:target.height, color:color, memory:memory};
if (isConnected){
send(obj);
} else {
sendToBuffer(obj);
};
bitmapData.dispose();
bytes = null;
};
}
protected function isDisplayObject(object):Boolean{
return ((((object is DisplayObject)) || ((object is DisplayObjectContainer))));
}
public function onReceivedData(data:ByteArray):void{
var object:*;
var method:Function;
var xml:XML;
var command:Object;
var bounds:Rectangle;
var data = data;
if (isEnabled){
data.uncompress();
command = data.readObject();
switch (command["text"]){
case COMMAND_HELLO:
isConnected = true;
send({text:COMMAND_HELLO, version:VERSION});
break;
case COMMAND_HELLO_RESPONSE:
isConnected = true;
sendBuffer();
break;
case COMMAND_ROOT:
object = getObject("", 0);
if (object != null){
xml = XML(parseObject(object, "", command["functions"], 1, 2));
send({text:COMMAND_ROOT, xml:xml});
if (isDisplayObject(object)){
xml = XML(parseDisplayObject(object, "", command["functions"], 1, 2));
send({text:COMMAND_BASE, xml:xml});
};
};
break;
case COMMAND_GET_OBJECT:
object = getObject(command["target"], 0);
if (object != null){
xml = XML(parseObject(object, command["target"], command["functions"], 1, 2));
send({text:COMMAND_GET_OBJECT, xml:xml});
};
break;
case COMMAND_GET_DISPLAYOBJECT:
object = getObject(command["target"], 0);
if (object != null){
if (isDisplayObject(object)){
xml = XML(parseDisplayObject(object, command["target"], command["functions"], 1, 2));
send({text:COMMAND_GET_DISPLAYOBJECT, xml:xml});
};
};
break;
case COMMAND_GET_PROPERTIES:
object = getObject(command["target"], 0);
if (object != null){
xml = XML(parseObject(object, command["target"], false, 1, 1));
send({text:COMMAND_GET_PROPERTIES, xml:xml});
};
break;
case COMMAND_GET_FUNCTIONS:
object = getObject(command["target"], 0);
if (object != null){
xml = XML(getFunctions(object, command["target"]));
send({text:COMMAND_GET_FUNCTIONS, xml:xml});
};
break;
case COMMAND_SET_PROPERTY:
object = getObject(command["target"], 1);
if (object != null){
object[command["name"]] = command["value"];
send({text:COMMAND_SET_PROPERTY, value:object[command["name"]]});
//unresolved jump
var _slot1 = error;
send({text:COMMAND_NOTFOUND, target:command["target"]});
break;
};
break;
case COMMAND_CALL_METHOD:
method = getObject(command["target"], 0);
if (method != null){
if (command["returnType"] == TYPE_VOID){
method.apply(this, command["arguments"]);
} else {
object = method.apply(this, command["arguments"]);
xml = XML(parseObject(object, "", false, 1, 4));
send({text:COMMAND_CALL_METHOD, id:command["id"], xml:xml});
};
};
break;
case COMMAND_SHOW_HIGHLIGHT:
if (highlight != null){
highlight.parent.removeChild(highlight);
highlight = null;
//unresolved jump
var _slot1 = error;
};
object = getObject(command["target"], 0);
if (((isDisplayObject(object)) && (isDisplayObject(object["parent"])))){
bounds = object.getBounds(object["parent"]);
highlight = new Sprite();
highlight.x = 0;
highlight.y = 0;
highlight.graphics.beginFill(0, 0);
highlight.graphics.lineStyle(HIGHLIGHT_BORDER, HIGHLIGHT_COLOR);
highlight.graphics.drawRect(bounds.x, bounds.y, bounds.width, bounds.height);
highlight.graphics.endFill();
highlight.mouseChildren = false;
highlight.mouseEnabled = false;
object["parent"].addChild(highlight);
//unresolved jump
var _slot1 = error;
highlight = null;
};
break;
case COMMAND_HIDE_HIGHLIGHT:
if (highlight != null){
highlight.parent.removeChild(highlight);
highlight = null;
//unresolved jump
var _slot1 = error;
};
break;
};
};
}
protected function parseDisplayObject(object, target:String="", functions:Boolean=false, currentDepth:int=1, maxDepth:int=4):String{
var xml:String;
var childs:Array;
var child:DisplayObject;
var ojectName:String;
var msg:String;
var obj:Object;
var object = object;
var target = target;
var functions = functions;
var currentDepth = currentDepth;
var maxDepth = maxDepth;
xml = "";
var childType = "";
var childIcon = "";
var childName = "";
var childTarget = "";
var childChildren = "";
var i:int;
if ((((maxDepth == -1)) || ((currentDepth <= maxDepth)))){
if (currentDepth == 1){
xml = (xml + createNode("root"));
};
if (currentDepth == 1){
ojectName = DisplayObject(object).name;
if ((((ojectName == null)) || ((ojectName == "null")))){
ojectName = "DisplayObject";
};
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + ojectName) + ")"), target:target}));
};
childs = new Array();
i = 0;
while (i < DisplayObjectContainer(object).numChildren) {
childs.push(DisplayObjectContainer(object).getChildAt(i));
i = (i + 1);
};
i = 0;
for (;i < childs.length;(xml = (xml + createNode("/node"))), (i = (i + 1))) {
child = childs[i];
childName = describeType(child).@name;
childType = parseType(childName);
childTarget = ((((target + ".") + "getChildAt(") + i) + ")");
childIcon = ((child is DisplayObjectContainer)) ? ICON_ROOT : ICON_VARIABLE;
childChildren = ((child is DisplayObjectContainer)) ? String(DisplayObjectContainer(child).numChildren) : "";
xml = (xml + createNode("node", {icon:childIcon, label:((((child.name + " (") + childType) + ") ") + childChildren), name:child.name, type:childType, value:printObject(child, childType), target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}));
xml = (xml + parseDisplayObject(child, childTarget, functions, (currentDepth + 1), maxDepth));
continue;
var _slot1 = error;
xml = (xml + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Unreadable", name:"Unreadable"}, true));
};
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
//unresolved jump
var _slot1 = error;
msg = "";
msg = (msg + createNode("root"));
msg = (msg + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Not found", name:"Not found"}, true));
msg = (msg + createNode("/root"));
obj = {text:COMMAND_NOTFOUND, target:target, xml:XML(msg)};
if (isConnected){
send(obj);
} else {
sendToBuffer(obj);
};
if (currentDepth == 1){
xml = (xml + createNode("/root"));
};
};
return (xml);
}
protected function parseType(type:String):String{
var s:String = type;
if (type.lastIndexOf("::") != -1){
s = type.substring((type.lastIndexOf("::") + 2), type.length);
};
if (s.lastIndexOf(".") != -1){
s = s.substring(0, s.lastIndexOf("."));
};
if (s == TYPE_METHOD){
s = TYPE_FUNCTION;
};
return (htmlEscape(s));
}
protected function parseObject(object, target:String="", functions:Boolean=false, currentDepth:int=1, maxDepth:int=4):String{
var xml:String;
var isXMLString:XML;
var keys:Array;
var key:*;
var properties:Array;
var prop:*;
var variables:XMLList;
var accessors:XMLList;
var constants:XMLList;
var methods:XMLList;
var variablesArr:Array;
var methodsArr:Array;
var double:Boolean;
var permission:String;
var icon:String;
var returnType:String;
var parameters:XMLList;
var args:Array;
var msg:String;
var obj:Object;
var object = object;
var target = target;
var functions = functions;
var currentDepth = currentDepth;
var maxDepth = maxDepth;
xml = "";
var childType = "";
var childName = "";
var childTarget = "";
var description:XML = new XML();
var type = "";
var base = "";
var isXML:Boolean;
var i:int;
var n:int;
if ((((maxDepth == -1)) || ((currentDepth <= maxDepth)))){
if (currentDepth == 1){
xml = (xml + createNode("root"));
};
description = describeType(object);
type = parseType(description.@name);
base = parseType(description.@base);
if (((functions) && ((base == TYPE_FUNCTION)))){
xml = (xml + createNode("node", {icon:ICON_FUNCTION, label:"(Function)", name:"", type:TYPE_FUNCTION, value:"", target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
if ((((type == TYPE_ARRAY)) || ((type == TYPE_VECTOR)))){
if (currentDepth == 1){
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + type) + ")"), target:target}));
};
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((("length" + " (") + TYPE_UINT) + ") = ") + object["length"]), name:"length", type:TYPE_UINT, value:object["length"], target:((target + ".") + "length"), access:ACCESS_VARIABLE, permission:PERMISSION_READONLY}, true));
keys = new Array();
for (key in object) {
keys.push(key);
};
keys.sort();
i = 0;
for (;i < keys.length;(i = (i + 1))) {
childType = parseType(describeType(object[keys[i]]).@name);
childTarget = ((target + ".") + String(keys[i]));
if ((((((((((((childType == TYPE_STRING)) || ((childType == TYPE_BOOLEAN)))) || ((childType == TYPE_NUMBER)))) || ((childType == TYPE_INT)))) || ((childType == TYPE_UINT)))) || ((childType == TYPE_FUNCTION)))){
isXML = false;
isXMLString = new XML();
if (childType == TYPE_STRING){
isXMLString = new XML(object[keys[i]]);
if (((!(isXMLString.hasSimpleContent())) && ((isXMLString.children().length() > 0)))){
isXML = true;
};
//unresolved jump
var _slot1 = error;
};
if (!isXML){
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:((((("[" + keys[i]) + "] (") + childType) + ") = ") + printObject(object[keys[i]], childType)), name:(("[" + keys[i]) + "]"), type:childType, value:printObject(object[keys[i]], childType), target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((("[" + keys[i]) + "] (") + childType) + ")"), name:(("[" + keys[i]) + "]"), type:childType, value:"", target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, false));
xml = (xml + parseXML(isXMLString, ((childTarget + ".") + "cildren()"), currentDepth, maxDepth));
xml = (xml + createNode("/node"));
};
//unresolved jump
var _slot1 = error;
continue;
};
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((("[" + keys[i]) + "] (") + childType) + ")"), name:(("[" + keys[i]) + "]"), type:childType, value:"", target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}));
xml = (xml + parseObject(object[keys[i]], childTarget, functions, (currentDepth + 1), maxDepth));
//unresolved jump
var _slot1 = error;
xml = (xml + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Unreadable", name:"Unreadable"}, true));
};
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
} else {
if (type == TYPE_OBJECT){
if (currentDepth == 1){
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + type) + ")"), target:target}));
};
properties = new Array();
for (prop in object) {
properties.push(prop);
};
properties.sort();
i = 0;
for (;i < properties.length;(i = (i + 1))) {
childType = parseType(describeType(object[properties[i]]).@name);
childTarget = ((target + ".") + properties[i]);
if ((((((((((((childType == TYPE_STRING)) || ((childType == TYPE_BOOLEAN)))) || ((childType == TYPE_NUMBER)))) || ((childType == TYPE_INT)))) || ((childType == TYPE_UINT)))) || ((childType == TYPE_FUNCTION)))){
isXML = false;
isXMLString = new XML();
if (childType == TYPE_STRING){
isXMLString = new XML(object[properties[i]]);
if (((!(isXMLString.hasSimpleContent())) && ((isXMLString.children().length() > 0)))){
isXML = true;
};
//unresolved jump
var _slot1 = error;
};
if (!isXML){
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:((((properties[i] + " (") + childType) + ") = ") + printObject(object[properties[i]], childType)), name:properties[i], type:childType, value:printObject(object[properties[i]], childType), target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((properties[i] + " (") + childType) + ")"), name:properties[i], type:childType, value:"", target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, false));
xml = (xml + parseXML(isXMLString, ((childTarget + ".") + "cildren()"), currentDepth, maxDepth));
xml = (xml + createNode("/node"));
};
//unresolved jump
var _slot1 = error;
continue;
};
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((properties[i] + " (") + childType) + ")"), name:properties[i], type:childType, value:"", target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}));
xml = (xml + parseObject(object[properties[i]], childTarget, functions, (currentDepth + 1), maxDepth));
//unresolved jump
var _slot1 = error;
xml = (xml + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Unreadable", name:"Unreadable"}, true));
};
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
} else {
if (type == TYPE_XML){
if (currentDepth == 1){
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + type) + ")"), target:target}));
};
xml = (xml + parseXML(object, ((target + ".") + "cildren()"), currentDepth, maxDepth));
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
} else {
if (type == TYPE_XMLLIST){
if (currentDepth == 1){
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + type) + ")"), target:target}));
};
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((("length" + " (") + TYPE_UINT) + ") = ") + object.length()), name:"length", type:TYPE_UINT, value:object.length(), target:((target + ".") + "length"), access:ACCESS_VARIABLE, permission:PERMISSION_READONLY}, true));
i = 0;
while (i < object.length()) {
xml = (xml + parseXML(object[i], (((target + ".") + String(i)) + ".children()"), currentDepth, maxDepth));
i = (i + 1);
};
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
} else {
if ((((((((((type == TYPE_STRING)) || ((type == TYPE_BOOLEAN)))) || ((type == TYPE_NUMBER)))) || ((type == TYPE_INT)))) || ((type == TYPE_UINT)))){
isXML = false;
isXMLString = new XML();
if (type == TYPE_STRING){
isXMLString = new XML(object);
if (((!(isXMLString.hasSimpleContent())) && ((isXMLString.children().length() > 0)))){
isXML = true;
};
//unresolved jump
var _slot1 = error;
};
if (!isXML){
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:((("(" + type) + ") = ") + printObject(object, type)), name:"", type:type, value:printObject(object, type), target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(("(" + type) + ")"), name:"", type:type, value:"", target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, false));
xml = (xml + parseXML(isXMLString, ((target + ".") + "cildren()"), currentDepth, maxDepth));
xml = (xml + createNode("/node"));
};
//unresolved jump
var _slot1 = error;
} else {
if (currentDepth == 1){
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + type) + ")"), target:target}));
};
variables = description..variable;
accessors = description..accessor;
constants = description..constant;
methods = description..method;
variablesArr = new Array();
methodsArr = new Array();
double = false;
permission = "";
icon = "";
double = false;
i = 0;
while (i < variables.length()) {
n = 0;
while (n < variablesArr.length) {
if (variablesArr[n].name == variables[i].@name){
double = true;
break;
};
n = (n + 1);
};
if (!double){
variablesArr.push({name:variables[i].@name, xml:variables[i], access:ACCESS_VARIABLE});
};
i = (i + 1);
};
double = false;
i = 0;
while (i < accessors.length()) {
n = 0;
while (n < variablesArr.length) {
if (variablesArr[n].name == accessors[i].@name){
double = true;
break;
};
n = (n + 1);
};
if (!double){
variablesArr.push({name:accessors[i].@name, xml:accessors[i], access:ACCESS_ACCESSOR});
};
i = (i + 1);
};
double = false;
i = 0;
while (i < constants.length()) {
n = 0;
while (n < variablesArr.length) {
if (variablesArr[n].name == constants[i].@name){
double = true;
break;
};
n = (n + 1);
};
if (!double){
variablesArr.push({name:constants[i].@name, xml:constants[i], access:ACCESS_CONSTANT});
};
i = (i + 1);
};
double = false;
i = 0;
while (i < methods.length()) {
n = 0;
while (n < methodsArr.length) {
if (methodsArr[n].name == methods[i].@name){
double = true;
break;
};
n = (n + 1);
};
if (!double){
methodsArr.push({name:methods[i].@name, xml:methods[i], access:ACCESS_METHOD});
};
i = (i + 1);
};
variablesArr.sortOn("name");
methodsArr.sortOn("name");
i = 0;
for (;i < variablesArr.length;(i = (i + 1))) {
childType = parseType(variablesArr[i].xml.@type);
childName = variablesArr[i].xml.@name;
childTarget = ((target + ".") + childName);
permission = PERMISSION_READWRITE;
icon = ICON_VARIABLE;
if (variablesArr[i].access == ACCESS_CONSTANT){
permission = PERMISSION_READONLY;
icon = ICON_VARIABLE_READONLY;
};
if (variablesArr[i].xml.@access == PERMISSION_READONLY){
permission = PERMISSION_READONLY;
icon = ICON_VARIABLE_READONLY;
};
if (variablesArr[i].xml.@access == PERMISSION_WRITEONLY){
permission = PERMISSION_WRITEONLY;
icon = ICON_VARIABLE_WRITEONLY;
};
//unresolved if
if ((((((((((((childType == TYPE_STRING)) || ((childType == TYPE_BOOLEAN)))) || ((childType == TYPE_NUMBER)))) || ((childType == TYPE_INT)))) || ((childType == TYPE_UINT)))) || ((childType == TYPE_FUNCTION)))){
isXML = false;
isXMLString = new XML();
if (childType == TYPE_STRING){
isXMLString = new XML(object[childName]);
if (((!(isXMLString.hasSimpleContent())) && ((isXMLString.children().length() > 0)))){
isXML = true;
};
//unresolved jump
var _slot1 = error;
};
if (!isXML){
xml = (xml + createNode("node", {icon:icon, label:((((childName + " (") + childType) + ") = ") + printObject(object[childName], childType)), name:childName, type:childType, value:printObject(object[childName], childType), target:childTarget, access:variablesArr[i].access, permission:permission}, true));
} else {
xml = (xml + createNode("node", {icon:icon, label:(((childName + " (") + childType) + ")"), name:childName, type:childType, value:"", target:childTarget, access:variablesArr[i].access, permission:permission}, false));
xml = (xml + parseXML(isXMLString, ((childTarget + ".") + "cildren()"), currentDepth, maxDepth));
xml = (xml + createNode("/node"));
};
//unresolved jump
var _slot1 = error;
continue;
};
xml = (xml + createNode("node", {icon:icon, label:(((childName + " (") + childType) + ")"), name:childName, type:childType, target:childTarget, access:variablesArr[i].access, permission:permission}));
xml = (xml + parseObject(object[childName], childTarget, functions, (currentDepth + 1), maxDepth));
//unresolved jump
var _slot1 = error;
xml = (xml + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Unreadable", name:"Unreadable"}, true));
};
if (functions){
i = 0;
while (i < methodsArr.length) {
childType = TYPE_FUNCTION;
childName = methodsArr[i].xml.@name;
childTarget = ((target + ".") + childName);
returnType = parseType(methodsArr[i].xml.@returnType);
parameters = methodsArr[i].xml..parameter;
args = new Array();
n = 0;
while (n < parameters.length()) {
args.push(parseType(parameters[n].@type));
n = (n + 1);
};
xml = (xml + createNode("node", {icon:ICON_FUNCTION, label:((((childName + "(") + args.join(", ")) + "):") + returnType), args:args.join(", "), name:childName, type:TYPE_FUNCTION, access:variablesArr[i].access, returnType:returnType, target:childTarget}, true));
i = (i + 1);
};
};
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
};
};
};
};
};
};
//unresolved jump
var _slot1 = error;
msg = "";
msg = (msg + createNode("root"));
msg = (msg + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Not found", name:"Not found"}, true));
msg = (msg + createNode("/root"));
obj = {text:COMMAND_NOTFOUND, target:target, xml:XML(msg)};
if (isConnected){
send(obj);
} else {
sendToBuffer(obj);
};
if (currentDepth == 1){
xml = (xml + createNode("/root"));
};
};
return (xml);
}
protected function getFunctions(object, target:String=""):String{
var description:XML;
var type:String;
var childType:String;
var childName:String;
var childTarget:String;
var methods:XMLList;
var methodsArr:Array;
var returnType:String;
var parameters:XMLList;
var args:Array;
var argsString:String;
var optional:Boolean;
var double:Boolean;
var i:int;
var n:int;
var msg:String;
var obj:Object;
var object = object;
var target = target;
var xml = "";
xml = (xml + createNode("root"));
description = describeType(object);
type = parseType(description.@name);
childType = "";
childName = "";
childTarget = "";
methods = description..method;
methodsArr = new Array();
optional = false;
double = false;
i = 0;
n = 0;
xml = (xml + createNode("node", {icon:ICON_DEFAULT, label:(("(" + type) + ")"), target:target}));
i = 0;
while (i < methods.length()) {
n = 0;
while (n < methodsArr.length) {
if (methodsArr[n].name == methods[i].@name){
double = true;
break;
};
n = (n + 1);
};
if (!double){
methodsArr.push({name:methods[i].@name, xml:methods[i], access:ACCESS_METHOD});
};
i = (i + 1);
};
methodsArr.sortOn("name");
i = 0;
while (i < methodsArr.length) {
childType = TYPE_FUNCTION;
childName = methodsArr[i].xml.@name;
childTarget = ((target + ".") + childName);
returnType = parseType(methodsArr[i].xml.@returnType);
parameters = methodsArr[i].xml..parameter;
args = new Array();
argsString = "";
optional = false;
n = 0;
while (n < parameters.length()) {
if ((((parameters[n].@optional == "true")) && (!(optional)))){
optional = true;
args.push("[");
};
args.push(parseType(parameters[n].@type));
n = (n + 1);
};
if (optional){
args.push("]");
};
argsString = args.join(", ");
argsString = argsString.replace("[, ", "[");
argsString = argsString.replace(", ]", "]");
xml = (xml + createNode("node", {icon:ICON_FUNCTION, label:((((childName + "(") + argsString) + "):") + returnType), args:argsString, name:childName, type:TYPE_FUNCTION, access:ACCESS_METHOD, returnType:returnType, target:childTarget}));
n = 0;
while (n < parameters.length()) {
xml = (xml + createNode("parameter", {type:parseType(parameters[n].@type), index:parameters[n].@index, optional:parameters[n].@optional}, true));
n = (n + 1);
};
xml = (xml + createNode("/node"));
i = (i + 1);
};
xml = (xml + createNode("/node"));
//unresolved jump
var _slot1 = error;
msg = "";
msg = (msg + createNode("root"));
msg = (msg + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Not found", name:"Not found"}, true));
msg = (msg + createNode("/root"));
obj = {text:COMMAND_NOTFOUND, target:target, xml:XML(msg)};
if (isConnected){
send(obj);
} else {
sendToBuffer(obj);
};
xml = (xml + createNode("/root"));
return (xml);
}
public static function get enabled():Boolean{
if (instance == null){
instance = new MonsterDebugger(null);
};
return (instance.isEnabled);
}
public static function snapshot(target:DisplayObject, color:uint=0x111111):void{
if (instance == null){
instance = new MonsterDebugger(null);
};
if (_slot1.enabled){
instance.snapshotInternal(target, color);
};
}
public static function trace(target:Object, object, color:uint=0x111111, functions:Boolean=false, depth:int=4):void{
if (instance == null){
instance = new MonsterDebugger(target);
};
if (_slot1.enabled){
instance.traceInternal(target, object, color, functions, depth);
};
}
public static function set enabled(value:Boolean):void{
if (instance == null){
instance = new MonsterDebugger(null);
};
instance.isEnabled = value;
}
public static function inspect(target:Object):void{
var object:*;
var xml:XML;
var obj:Object;
if (((!((instance == null))) && (!((target == null))))){
instance.root = target;
object = instance.getObject("", 0);
if (object != null){
xml = XML(instance.parseObject(object, "", false, 1, 2));
obj = {text:instance.COMMAND_INSPECT, xml:xml};
if (instance.isConnected){
instance.send(obj);
} else {
instance.sendToBuffer(obj);
};
if (instance.isDisplayObject(object)){
xml = XML(instance.parseDisplayObject(object, "", false, 1, 2));
obj = {text:instance.COMMAND_BASE, xml:xml};
if (instance.isConnected){
instance.send(obj);
} else {
instance.sendToBuffer(obj);
};
};
};
};
}
public static function clearTraces():void{
if (instance == null){
instance = new MonsterDebugger(null);
};
if (_slot1.enabled){
instance.clearTracesInternal();
};
}
}
}//package nl.demonsters.debugger
Section 99
//BackGround (prop.BackGround)
package prop {
import flash.display.*;
import util.*;
import main.*;
public class BackGround extends AbstractScreen {
private var _duplicate_backGround:MovieClip;
private var _backGround:MovieClip;
private var _street1:MovieClip;
private var _street2:MovieClip;
private var _house2:MovieClip;
private var _mc:MovieClip;
private var _house1:MovieClip;
public static const OFFSET:int = 5;
public static var zleftOutSide:Number = -630;
public static var hLeftOutSide:Number = -1300;
public static var leftOutSide:Number = -800;
public function BackGround(r:Sprite){
super(r);
initDis();
}
public function delDis():void{
_root.removeChild(_mc);
_root.removeChild(_street1);
_root.removeChild(_street2);
_root.removeChild(_house1);
_root.removeChild(_house2);
}
private function initDis():void{
_mc = Attach.getMovieClip("blueColor");
if (Config.currentLevel == 1){
_house1 = Attach.getMovieClip("houseOne");
_house1.y = -50;
_house2 = Attach.getMovieClip("houseOne");
_house2.x = (_house1.x + _house1.width);
_house2.y = _house1.y;
} else {
if (Config.currentLevel == 2){
_house1 = Attach.getMovieClip("houseTwo");
_house1.y = -50;
_house2 = Attach.getMovieClip("houseTwo");
_house2.x = (_house1.x + _house1.width);
_house2.y = _house1.y;
} else {
if (Config.currentLevel == 3){
_house1 = Attach.getMovieClip("houseThree");
_house1.y = -50;
_house2 = Attach.getMovieClip("houseThree");
_house2.x = (_house1.x + _house1.width);
_house2.y = _house1.y;
} else {
if (Config.currentLevel == 4){
_house1 = Attach.getMovieClip("houseFour");
_house1.y = -50;
_house2 = Attach.getMovieClip("houseFour");
_house2.x = (_house1.x + _house1.width);
_house2.y = _house1.y;
};
};
};
};
_house1.cacheAsBitmap = true;
_house2.cacheAsBitmap = true;
_backGround = (_mc.getChildByName("back1") as MovieClip);
_duplicate_backGround = (_mc.getChildByName("back2") as MovieClip);
_mc.cacheAsBitmap = true;
_root.addChild(_mc);
if (Config.currentLevel == 1){
_root.addChild(_house1);
_root.addChild(_house2);
_street1 = Attach.getMovieClip("zebroOne");
_street1.y = 80;
_street2 = Attach.getMovieClip("zebroOne");
_street2.x = ((_street1.x + _street1.width) - OFFSET);
_street2.y = _street1.y;
_root.addChild(_street1);
_root.addChild(_street2);
} else {
if (Config.currentLevel == 2){
_root.addChild(_house1);
_root.addChild(_house2);
_street1 = Attach.getMovieClip("zebroTwo");
_street1.y = 80;
_street2 = Attach.getMovieClip("zebroTwo");
_street2.x = ((_street1.x + _street1.width) - OFFSET);
_street2.y = _street1.y;
_root.addChild(_street1);
_root.addChild(_street2);
} else {
if (Config.currentLevel == 3){
_root.addChild(_house1);
_root.addChild(_house2);
_street1 = Attach.getMovieClip("zebroThree");
_street1.y = 80;
_street2 = Attach.getMovieClip("zebroThree");
_street2.x = ((_street1.x + _street1.width) - OFFSET);
_street2.y = _street1.y;
_root.addChild(_street1);
_root.addChild(_street2);
} else {
if (Config.currentLevel == 4){
_root.addChild(_house1);
_root.addChild(_house2);
_street1 = Attach.getMovieClip("zebroFour");
_street1.y = 80;
_street2 = Attach.getMovieClip("zebroFour");
_street2.x = ((_street1.x + _street1.width) - OFFSET);
_street2.y = _street1.y;
_root.addChild(_street1);
_root.addChild(_street2);
};
};
};
};
_street1.cacheAsBitmap = (_street2.cacheAsBitmap = true);
}
override public function destroy():void{
delDis();
}
public function move():void{
_backGround.x = (_backGround.x - 1);
_duplicate_backGround.x = (_duplicate_backGround.x - 1);
if (_backGround.x <= leftOutSide){
_backGround.x = (_duplicate_backGround.x + _duplicate_backGround.width);
};
if (_duplicate_backGround.x <= leftOutSide){
_duplicate_backGround.x = (_backGround.x + _backGround.width);
};
_street1.x = (_street1.x - Config._streetSpeed);
_street2.x = (_street2.x - Config._streetSpeed);
if (_street1.x <= zleftOutSide){
_street1.x = ((_street2.x + _street2.width) - OFFSET);
};
if (_street2.x <= zleftOutSide){
_street2.x = ((_street1.x + _street1.width) - OFFSET);
};
_house1.x = (_house1.x - (Config._streetSpeed * 0.9));
_house2.x = (_house2.x - (Config._streetSpeed * 0.9));
if (_house1.x <= hLeftOutSide){
_house1.x = (_house2.x + _house2.width);
};
if (_house2.x <= hLeftOutSide){
_house2.x = (_house1.x + _house1.width);
};
}
}
}//package prop
Section 100
//Boy (prop.Boy)
package prop {
import flash.display.*;
import util.*;
public class Boy {
private var _x:Number;
private var _hitArea:MovieClip;
private var xFlag:Boolean;// = false
private var yFlag:Boolean;// = false
private var _boyHeight:Number;// = 54
private var dampSpeedY:Number;// = 0.3
public var _active:MovieClip;
private var _boyWidth:Number;// = 43
private var _downSp:Number;
private var throwPizzaArr:Array;
private var effectMovePex:Number;// = 0
private var _pmc:Sprite;
private var _upSp:Number;
private var _drivingMc:MovieClip;
private var _rightSp:Number;
public var _wheel:MovieClip;
private var curBoyCanRunTimes:int;
private var _boymc:MovieClip;
private var targetX:Number;// = 0
private var targetY:Number;// = 0
private var _leftSp:Number;
private var dampSpeedX:Number;// = 0.3
private var _y:Number;
public static const _stopRunNum:Number = 150;
public function Boy(pmc:Sprite, startX:Number, startY:Number){
super();
_pmc = pmc;
_x = startX;
_y = startY;
if (Config.currentLevel == 1){
_leftSp = (Config._streetSpeed * 0.6);
_rightSp = (Config._streetSpeed * 0.6);
_upSp = (Config._streetSpeed * 0.6);
_downSp = (Config._streetSpeed * 0.6);
} else {
_leftSp = ((Config._streetSpeed * 0.5) * 0.8);
_rightSp = (Config._streetSpeed * 0.5);
_upSp = ((Config._streetSpeed * 0.5) * 0.6);
_downSp = ((Config._streetSpeed * 0.5) * 0.6);
};
throwPizzaArr = new Array();
curBoyCanRunTimes = 0;
_boyWidth = 43;
_boyHeight = 54;
initDis();
}
public function run():void{
_x = (_x + _rightSp);
_boymc.x = _x;
if (_x >= _stopRunNum){
Config.initBoyRun = true;
};
}
public function get boymc():MovieClip{
return (_boymc);
}
private function setTargetYPlace(targetY:Number):void{
if (targetY >= Config._borderDown){
targetY = Config._borderDown;
} else {
if (targetY <= Config._borderUp){
targetY = Config._borderUp;
};
};
}
public function get y():Number{
return (_y);
}
public function delDis():void{
_pmc.removeChild(_boymc);
}
public function get boyHeight():Number{
return (_boyHeight);
}
public function set boyHeight(num:Number):void{
_boyHeight = num;
}
public function set y(num:Number):void{
_y = num;
_boymc.y = _y;
}
public function keyRun(_leftmove:Boolean, _upmove:Boolean, _rightmove:Boolean, _downmove:Boolean):void{
if (Config.isBoyRunFlag == false){
if (_leftmove == true){
_x = (_x - _leftSp);
_boymc.x = _x;
if (_upmove == true){
_y = (_y - _upSp);
_boymc.y = _y;
_active.gotoAndStop("left");
_wheel.gotoAndStop("left");
} else {
if (_downmove == true){
_y = (_y + _downSp);
_boymc.y = _y;
_active.gotoAndStop("right");
_wheel.gotoAndStop("right");
};
};
} else {
if (_rightmove == true){
_x = (_x + _rightSp);
_boymc.x = _x;
if (_upmove == true){
_y = (_y - _upSp);
_boymc.y = _y;
_active.gotoAndStop("left");
_wheel.gotoAndStop("left");
} else {
if (_downmove == true){
_y = (_y + _downSp);
_boymc.y = _y;
_active.gotoAndStop("right");
_wheel.gotoAndStop("right");
};
};
} else {
if (_upmove == true){
_y = (_y - _upSp);
_boymc.y = _y;
if (_leftmove == true){
_x = (_x - _leftSp);
_boymc.x = _x;
} else {
if (_rightmove == true){
_x = (_x + _rightSp);
_boymc.x = _x;
};
};
} else {
if (_downmove == true){
_y = (_y + _downSp);
_boymc.y = _y;
if (_leftmove == true){
_x = (_x - _leftSp);
_boymc.x = _x;
} else {
if (_rightmove == true){
_x = (_x + _rightSp);
_boymc.x = _x;
};
};
};
};
};
};
};
setPlace();
var s:Number = 0;
while (s < throwPizzaArr.length) {
throwPizzaArr[s].run();
s++;
};
}
public function set throwPArr(arr:Array):void{
throwPizzaArr = arr;
}
private function updateDampX():void{
if (dampSpeedX > 0.05){
dampSpeedX = (dampSpeedX - 0.05);
} else {
dampSpeedX = 0.05;
};
}
private function updateDampY():void{
if (dampSpeedY > 0.05){
dampSpeedY = (dampSpeedY - 0.05);
} else {
dampSpeedY = 0.05;
};
}
private function setX():void{
if (_x >= Config._borderRight){
_x = Config._borderRight;
xFlag = true;
} else {
if (_x < Config._borderLeft){
_x = Config._borderLeft;
xFlag = true;
};
};
_boymc.x = _x;
}
private function setY():void{
if (_y >= Config._borderDown){
_y = Config._borderDown;
yFlag = true;
_boymc.y = _y;
} else {
if (_y <= Config._borderUp){
_y = Config._borderUp;
yFlag = true;
_boymc.y = _y;
};
};
_boymc.y = _y;
}
public function set boyWidth(num:Number):void{
_boyWidth = num;
}
private function handled():void{
curBoyCanRunTimes++;
if ((((yFlag == true)) && ((xFlag == true)))){
Config.moveFlag = false;
xFlag = false;
yFlag = false;
Config.isBoyRunFlag = false;
};
}
public function delPizza(id:int):void{
var temp:ThrowPizza;
var k:Number = 0;
while (k < throwPizzaArr.length) {
temp = throwPizzaArr[k];
if (temp.id == id){
temp.removeEventListener("THROWPIZZA_MOVE_FINISH", onPizzaOutUpBorder);
temp.del();
throwPizzaArr.splice(k, 1);
return;
};
k++;
};
}
public function addAdd(number1:Number, number2:Number, recondX:Number, recondY:Number, effect:EffectClass):void{
targetX = (recondX + number1);
targetY = (recondY + number2);
setTargetXPlace(targetX);
setTargetYPlace(targetY);
if (_x >= targetX){
xFlag = true;
_x = targetX;
_boymc.x = _x;
if (effect != null){
effect.xx = _boymc.x;
};
dampSpeedX = 0.3;
} else {
_x = (_x + (number1 * dampSpeedX));
_boymc.x = _x;
if (effect != null){
effect.xx = _boymc.x;
};
updateDampX();
setX();
};
if (_y >= targetY){
yFlag = true;
_y = targetY;
_boymc.y = _y;
if (effect != null){
effect.yy = _boymc.y;
};
dampSpeedY = 0.3;
} else {
_y = (_y + (number2 * dampSpeedY));
_boymc.y = _y;
if (effect != null){
effect.yy = _boymc.y;
};
updateDampY();
setY();
};
handled();
}
public function ProducedPizza():void{
_active.gotoAndStop("throw");
_wheel.gotoAndPlay("throw");
SoundsManager.instance.playSound("throwPSound", 1);
var px:Number = (_x + 20);
var py:Number = (_y - 20);
var tempTP:ThrowPizza = new ThrowPizza((_pmc.parent as MovieClip), px, py);
tempTP.addEventListener("THROWPIZZA_MOVE_FINISH", onPizzaOutUpBorder);
throwPizzaArr.push(tempTP);
}
public function setPlace():void{
if (_x >= Config._borderRight){
_x = Config._borderRight;
} else {
if (_x < Config._borderLeft){
_x = Config._borderLeft;
};
};
_boymc.x = _x;
if (_y >= Config._borderDown){
_y = Config._borderDown;
} else {
if (_y <= Config._borderUp){
_y = Config._borderUp;
};
};
_boymc.y = _y;
}
public function subAdd(number1:Number, number2:Number, recondX:Number, recondY:Number, effect:EffectClass):void{
targetX = (recondX - number1);
targetY = (recondY + number2);
setTargetXPlace(targetX);
setTargetYPlace(targetY);
if (_x <= targetX){
xFlag = true;
_x = targetX;
_boymc.x = _x;
if (effect != null){
effect.xx = _boymc.x;
};
dampSpeedX = 0.3;
} else {
_x = (_x - (number1 * dampSpeedX));
_boymc.x = _x;
if (effect != null){
effect.xx = _boymc.x;
};
updateDampX();
setX();
};
if (_y >= targetY){
yFlag = true;
_y = targetY;
_boymc.y = _y;
if (effect != null){
effect.yy = _boymc.y;
};
dampSpeedY = 0.3;
} else {
_y = (_y + (number2 * dampSpeedY));
_boymc.y = _y;
if (effect != null){
effect.yy = _boymc.y;
};
updateDampY();
setY();
};
handled();
}
public function get throwPArr():Array{
return (throwPizzaArr);
}
public function get hitArea():MovieClip{
return (_hitArea);
}
private function initDis():void{
_boymc = Attach.getMovieClip("pizzaBoyUI");
_boymc.x = _x;
_boymc.y = _y;
_boymc.scaleX = 0.7;
_boymc.scaleY = 0.7;
_boymc.gotoAndStop(1);
_drivingMc = (_boymc.getChildByName("driving") as MovieClip);
_active = (_drivingMc.getChildByName("active") as MovieClip);
_wheel = (_boymc.getChildByName("wheel") as MovieClip);
_hitArea = _boymc["hitting"];
_hitArea.alpha = 0;
_boymc.name = "boy";
_pmc.addChild(_boymc);
_active.gotoAndStop("normal");
_wheel.gotoAndStop("normal");
_boymc.cacheAsBitmap = true;
}
public function get boyWidth():Number{
return (_boyWidth);
}
private function setTargetXPlace(targetX:Number):void{
if (targetX >= Config._borderRight){
targetX = Config._borderRight;
} else {
if (targetX < Config._borderLeft){
targetX = Config._borderLeft;
};
};
}
public function addSub(number1:Number, number2:Number, recondX:Number, recondY:Number, effect:EffectClass):void{
targetX = (recondX + number1);
targetY = (recondY - number2);
setTargetXPlace(targetX);
setTargetYPlace(targetY);
if (_x >= targetX){
xFlag = true;
_x = targetX;
_boymc.x = _x;
if (effect != null){
effect.xx = _boymc.x;
};
dampSpeedX = 0.3;
} else {
_x = (_x + (number1 * dampSpeedX));
_boymc.x = _x;
if (effect != null){
effect.xx = _boymc.x;
};
updateDampX();
setX();
};
if (_y <= targetY){
yFlag = true;
_y = targetY;
_boymc.y = _y;
if (effect != null){
effect.yy = _boymc.y;
};
dampSpeedY = 0.3;
} else {
_y = (_y - (number2 * dampSpeedY));
_boymc.y = _y;
if (effect != null){
effect.yy = _boymc.y;
};
updateDampY();
setY();
};
handled();
}
private function onPizzaOutUpBorder(e:ThrowPizzaEvent):void{
delPizza(e.id);
}
public function subSub(number1:Number, number2:Number, recondX:Number, recondY:Number, effect:EffectClass):void{
targetX = (recondX - number1);
targetY = (recondY - number2);
setTargetXPlace(targetX);
setTargetYPlace(targetY);
if (_x <= targetX){
xFlag = true;
_x = targetX;
_boymc.x = _x;
if (effect != null){
effect.xx = _boymc.x;
};
dampSpeedX = 0.3;
} else {
_x = (_x - (number1 * dampSpeedX));
_boymc.x = _x;
if (effect != null){
effect.xx = _boymc.x;
};
updateDampX();
setX();
};
if (_y <= targetY){
yFlag = true;
_y = targetY;
_boymc.y = _y;
if (effect != null){
effect.yy = _boymc.y;
};
dampSpeedY = 0.3;
} else {
_y = (_y - (number2 * dampSpeedY));
_boymc.y = _y;
if (effect != null){
effect.yy = _boymc.y;
};
updateDampY();
setY();
};
handled();
}
public function set x(num:Number):void{
_x = num;
_boymc.x = _x;
}
public function inforRun(_leftmove:Boolean, _upmove:Boolean, _rightmove:Boolean, _downmove:Boolean, moviec:EffectClass):void{
if (Config.isBoyRunFlag == false){
if (_leftmove == true){
_x = (_x - _leftSp);
_boymc.x = _x;
moviec.xx = (_boymc.x - effectMovePex);
if (_upmove == true){
_y = (_y - _upSp);
_boymc.y = _y;
moviec.yy = (_boymc.y - effectMovePex);
_active.gotoAndStop("left");
_wheel.gotoAndStop("left");
} else {
if (_downmove == true){
_y = (_y + _downSp);
_boymc.y = _y;
moviec.yy = (_boymc.y + effectMovePex);
_active.gotoAndStop("right");
_wheel.gotoAndStop("right");
};
};
} else {
if (_rightmove == true){
_x = (_x + _rightSp);
_boymc.x = _x;
moviec.xx = (_boymc.x + effectMovePex);
if (_upmove == true){
_y = (_y - _upSp);
_boymc.y = _y;
moviec.yy = (_boymc.y - effectMovePex);
_active.gotoAndStop("left");
_wheel.gotoAndStop("left");
} else {
if (_downmove == true){
_y = (_y + _downSp);
_boymc.y = _y;
moviec.yy = (_boymc.y + effectMovePex);
_active.gotoAndStop("right");
_wheel.gotoAndStop("right");
};
};
} else {
if (_upmove == true){
_y = (_y - _upSp);
_boymc.y = _y;
moviec.yy = (_boymc.y - effectMovePex);
if (_leftmove == true){
_x = (_x - _leftSp);
_boymc.x = _x;
moviec.xx = (_boymc.x - effectMovePex);
} else {
if (_rightmove == true){
_x = (_x + _rightSp);
_boymc.x = _x;
moviec.xx = (_boymc.x + effectMovePex);
};
};
} else {
if (_downmove == true){
_y = (_y + _downSp);
_boymc.y = _y;
moviec.yy = (_boymc.y + effectMovePex);
if (_leftmove == true){
_x = (_x - _leftSp);
_boymc.x = _x;
moviec.xx = (_boymc.x - effectMovePex);
} else {
if (_rightmove == true){
_x = (_x + _rightSp);
_boymc.x = _x;
moviec.xx = (_boymc.x + effectMovePex);
};
};
};
};
};
};
};
setPlace();
}
public function get x():Number{
return (_x);
}
}
}//package prop
Section 101
//Car (prop.Car)
package prop {
import flash.display.*;
import flash.events.*;
import util.*;
public class Car extends EventDispatcher {
private var _row:int;
private var randNum:int;
public var _npcHandMc:MovieClip;
private var level1:Array;
private var level2:Array;
private var level3:Array;
private var count:int;// = 0
private var _npcArr1:Array;
private var _npcArr2:Array;
private var _mc:MovieClip;
private var level4:Array;
private var _greenMc:MovieClip;
private var _npcArr3:Array;
private var _id:Number;
private var _pmc:Sprite;
private var _speed:Number;// = 0
private var _flag:Boolean;// = false
private var _desWidth:Number;
public var _npcWantPizza:MovieClip;
public var _npcMc:MovieClip;
private var _desHeight:Number;
private var _showNpc:Boolean;// = false
private var _name:String;
private var _npcX:Number;
private var _npcY:Number;
private var _x:Number;
private var _y:Number;
private static var IdCountCar:int = 0;
private static var leftOutside:Number = -150;
public function Car(pmc:Sprite, row:int, startx:Number, speed:Number){
super();
_id = IdCountCar;
IdCountCar++;
_row = row;
level1 = new Array(3, 5, 6);
level2 = new Array(1, 2, 6);
level3 = new Array(1, 4, 6);
level4 = new Array(1, 2, 4);
_npcArr1 = new Array();
_npcArr2 = new Array();
_npcArr3 = new Array();
_name = "";
if (_row == 1){
_y = (Config.car1MinimumValue + Math.floor((Math.random() * (Config.car1MaxValue - Config.car1MinimumValue))));
};
if (_row == 2){
_y = (Config.car2MinimumValue + Math.floor((Math.random() * (Config.car2MaxValue - Config.car2MinimumValue))));
};
if (_row == 3){
_y = (Config.car3MinimumValue + Math.floor((Math.random() * (Config.car3MaxValue - Config.car3MinimumValue))));
};
_x = startx;
_pmc = pmc;
_speed = speed;
initDis();
}
private function initDis():void{
var rand:int;
if (Config.currentLevel == 1){
rand = level1[Math.floor((Math.random() * level1.length))];
};
if (Config.currentLevel == 2){
rand = level2[Math.floor((Math.random() * level2.length))];
};
if (Config.currentLevel == 3){
rand = level3[Math.floor((Math.random() * level3.length))];
};
if (Config.currentLevel == 4){
rand = level4[Math.floor((Math.random() * level4.length))];
};
_mc = Attach.getMovieClip(("car" + rand));
_mc.cacheAsBitmap = true;
_desWidth = Config.describeArr[(rand - 1)][0];
_desHeight = Config.describeArr[(rand - 1)][1];
_name = (("car" + rand) + id);
_mc.name = _name;
randNum = Math.floor(((Math.random() * 4) + 1));
_mc.gotoAndStop(randNum);
_mc.x = _x;
_mc.y = _y;
_pmc.addChild(_mc);
_mc.cacheAsBitmap = true;
setNpcPositionInTheCar();
npcShowOrHideControl();
}
private function npcShowOrHideControl():void{
if (Config.currentLevel == 1){
_showNpc = false;
};
if (Config.currentLevel == 2){
curLevel2();
};
if (Config.currentLevel == 3){
curLevel3();
};
if (Config.currentLevel == 4){
curLevel4();
};
}
public function get y():Number{
return (_y);
}
private function delDis():void{
_pmc.removeChild(_mc);
}
public function get name():String{
return (_name);
}
private function addGreenArea():void{
_greenMc = Attach.getMovieClip("greenArea");
_greenMc.name = "greenMc";
if (_name.indexOf("car1") != -1){
_greenMc.scaleX = 2;
_greenMc.scaleY = 2;
_greenMc.y = 80;
};
if (_name.indexOf("car2") != -1){
_greenMc.scaleX = 2.5;
_greenMc.scaleY = 2.5;
_greenMc.y = 95;
};
if (_name.indexOf("car3") != -1){
_greenMc.scaleX = 2.3;
_greenMc.scaleY = 2.3;
_greenMc.y = 105;
};
if (_name.indexOf("car4") != -1){
_greenMc.scaleX = 2.5;
_greenMc.scaleY = 2.5;
_greenMc.y = 85;
};
if (_name.indexOf("car5") != -1){
_greenMc.scaleX = 2.6;
_greenMc.scaleY = 2.6;
_greenMc.y = 100;
};
if (_name.indexOf("car6") != -1){
_greenMc.scaleX = 2.5;
_greenMc.scaleY = 2.5;
_greenMc.y = 95;
};
_mc.addChildAt(_greenMc, 0);
_greenMc.cacheAsBitmap = true;
}
public function get greenMc():MovieClip{
return (_greenMc);
}
public function run():void{
var tempEvent:CarEvent;
_x = (_x - (Config._streetSpeed * _speed));
_mc.x = _x;
if ((((((_x <= 600)) && ((_x > leftOutside)))) && ((_showNpc == true)))){
if (count != 1){
SoundsManager.instance.playSound("passCar", 1);
count++;
};
if (_flag == false){
npcFrameControl();
};
};
if (_x <= leftOutside){
tempEvent = new CarEvent("CAR_MOVE_FINISH");
tempEvent.id = _id;
this.dispatchEvent(tempEvent);
};
}
private function curLevel2():void{
var tempNpc1:Npc;
var num1:int;
var tempNpc2:Npc;
if (_row == 1){
_showNpc = true;
addGreenArea();
tempNpc1 = new Npc(_mc, _row, _npcX, _npcY);
_npcArr1.push(tempNpc1);
_npcMc = tempNpc1.mc;
_npcHandMc = tempNpc1.handMc;
_npcWantPizza = tempNpc1.wantPizza;
};
if (_row == 2){
num1 = Math.floor((Math.random() * 4));
if (num1 >= 2){
_showNpc = true;
addGreenArea();
tempNpc2 = new Npc(_mc, _row, _npcX, _npcY);
_npcArr2.push(tempNpc2);
_npcMc = tempNpc2.mc;
_npcHandMc = tempNpc2.handMc;
_npcWantPizza = tempNpc2.wantPizza;
};
};
if (_row == 3){
_showNpc = false;
};
}
private function curLevel4():void{
var num1:int;
var tempNpc1:Npc;
var num2:int;
var tempNpc2:Npc;
if (_row == 1){
num1 = Math.floor((Math.random() * 4));
if (num1 >= 1){
_showNpc = true;
addGreenArea();
tempNpc1 = new Npc(_mc, _row, _npcX, _npcY);
_npcArr1.push(tempNpc1);
_npcMc = tempNpc1.mc;
_npcHandMc = tempNpc1.handMc;
_npcWantPizza = tempNpc1.wantPizza;
};
};
if (_row == 2){
num2 = Math.floor((Math.random() * 4));
if (num2 >= 1){
_showNpc = true;
addGreenArea();
tempNpc2 = new Npc(_mc, _row, _npcX, _npcY);
_npcArr2.push(tempNpc2);
_npcMc = tempNpc2.mc;
_npcHandMc = tempNpc2.handMc;
_npcWantPizza = tempNpc2.wantPizza;
};
};
if (_row == 3){
_showNpc = false;
};
}
public function del():void{
delDis();
}
public function get mc():MovieClip{
return (_mc);
}
private function curLevel3():void{
var num1:int;
var tempNpc1:Npc;
var num2:int;
var tempNpc2:Npc;
if (_row == 1){
num1 = Math.floor((Math.random() * 4));
if (num1 >= 2){
_showNpc = true;
addGreenArea();
tempNpc1 = new Npc(_mc, _row, _npcX, _npcY);
_npcArr2.push(tempNpc1);
_npcMc = tempNpc1.mc;
_npcHandMc = tempNpc1.handMc;
_npcWantPizza = tempNpc1.wantPizza;
};
};
if (_row == 2){
num2 = Math.floor((Math.random() * 4));
if (num2 >= 2){
_showNpc = true;
addGreenArea();
tempNpc2 = new Npc(_mc, _row, _npcX, _npcY);
_npcArr2.push(tempNpc2);
_npcMc = tempNpc2.mc;
_npcHandMc = tempNpc2.handMc;
_npcWantPizza = tempNpc2.wantPizza;
};
};
}
public function get id():int{
return (_id);
}
public function get showNpc():Boolean{
return (_showNpc);
}
public function set desWidth(num:Number):void{
_desWidth = num;
}
private function npcFrameControl():void{
_npcHandMc.play();
if (_npcHandMc.currentFrame == 14){
_npcHandMc.gotoAndPlay(1);
} else {
if (_npcHandMc.currentFrame < 14){
_npcHandMc.gotoAndPlay((_npcHandMc.currentFrame + 1));
};
};
}
public function set desHeight(num:Number):void{
_desHeight = num;
}
private function setNpcPositionInTheCar():void{
if (_name.indexOf("car1") != -1){
_npcX = 0;
_npcY = -20;
};
if (_name.indexOf("car2") != -1){
_npcX = -25;
_npcY = -20;
};
if (_name.indexOf("car3") != -1){
_npcX = 52;
_npcY = -20;
};
if (_name.indexOf("car4") != -1){
_npcX = -5;
_npcY = -25;
};
if (_name.indexOf("car5") != -1){
_npcX = 65;
_npcY = -25;
};
if (_name.indexOf("car6") != -1){
_npcX = -10;
_npcY = -25;
};
}
public function get desHeight():Number{
return (_desHeight);
}
public function get desWidth():Number{
return (_desWidth);
}
public function set flag(b:Boolean):void{
_flag = b;
}
public function get flag():Boolean{
return (_flag);
}
public function get x():Number{
return (_x);
}
}
}//package prop
Section 102
//CarEvent (prop.CarEvent)
package prop {
import flash.events.*;
public class CarEvent extends Event {
public var carLane:int;
public var arr:Array;
public var id:int;
public function CarEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){
super(type, bubbles, cancelable);
}
}
}//package prop
Section 103
//Coin (prop.Coin)
package prop {
import flash.display.*;
import flash.events.*;
import util.*;
public class Coin extends EventDispatcher {
private var _y:Number;
private var _pmc:Sprite;
private var _coinHitting:MovieClip;
private var _mc:MovieClip;
private var _x:Number;
private var _id:int;
private static var IdCount:int = 0;
private static var leftOutside:Number = -100;
public function Coin(pmc:Sprite, startX:Number, startY:Number){
super();
_pmc = pmc;
_id = IdCount;
IdCount++;
_x = startX;
_y = startY;
initDis();
}
public function get y():int{
return (_y);
}
public function del():void{
delDis();
}
private function delDis():void{
_pmc.removeChild(_mc);
}
public function run():void{
var tempEvent:CoinEvent;
_x = (_x - Config._streetSpeed);
_mc.x = _x;
if (_x <= leftOutside){
tempEvent = new CoinEvent("COIN_MOVE_FINISH");
tempEvent.id = _id;
this.dispatchEvent(tempEvent);
};
}
public function get coinHitArea():MovieClip{
return (_coinHitting);
}
public function get mc():MovieClip{
return (_mc);
}
public function get x():int{
return (_x);
}
public function get id():int{
return (_id);
}
private function initDis():void{
_mc = Attach.getMovieClip("coins");
_mc.name = "coins";
_coinHitting = (_mc.getChildByName("hitting") as MovieClip);
_coinHitting.alpha = 0;
_mc.x = _x;
_mc.y = _y;
_pmc.addChild(_mc);
_mc.cacheAsBitmap = true;
_mc.scaleX = 0.25;
_mc.scaleY = 0.25;
}
}
}//package prop
Section 104
//CoinEvent (prop.CoinEvent)
package prop {
import flash.events.*;
public class CoinEvent extends Event {
public var id:int;
public function CoinEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){
super(type, bubbles, cancelable);
}
}
}//package prop
Section 105
//GuestEvent (prop.GuestEvent)
package prop {
import flash.events.*;
public class GuestEvent extends Event {
public var id:int;
public function GuestEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){
super(type, bubbles, cancelable);
}
}
}//package prop
Section 106
//Guests (prop.Guests)
package prop {
import flash.display.*;
import flash.events.*;
import util.*;
public class Guests extends EventDispatcher {
private var _x:Number;
private var _y:Number;
private var _markmc:MovieClip;
private var _pmc:Sprite;
private var _greenMc:MovieClip;
private var _flag:Boolean;// = false
private var _wantPizza:MovieClip;
private var _mc:MovieClip;
private var _id:int;
private static var guestY:Number = 80;
private static var IdCountGuest:int = 0;
private static var maxposition:Number = 1800;
private static var midposition:Number = 600;
private static var lowposition:Number = 580;
private static var leftOutside:Number = -100;
public function Guests(pmc:Sprite, startX:Number){
super();
_id = IdCountGuest;
IdCountGuest++;
_x = startX;
_y = guestY;
_pmc = pmc;
initDis();
}
public function get greenMc():MovieClip{
return (_greenMc);
}
public function get selfMc():MovieClip{
return (_mc);
}
public function run():void{
var tempEvent:GuestEvent;
_x = (_x - Config._streetSpeed);
_mc.x = _x;
if ((((_x >= midposition)) && ((_x < maxposition)))){
_pmc.addChild(_markmc);
_markmc.play();
} else {
if ((((_x > leftOutside)) && ((_x <= lowposition)))){
if (_pmc.getChildByName("markmc") != null){
_pmc.removeChild(_pmc.getChildByName("markmc"));
};
} else {
if (_x <= leftOutside){
tempEvent = new GuestEvent("GUEST_MOVE_FINISH");
tempEvent.id = _id;
this.dispatchEvent(tempEvent);
};
};
};
}
public function set flag(b:Boolean):void{
_flag = b;
}
public function del():void{
delDis();
}
public function get id():int{
return (_id);
}
private function initDis():void{
_greenMc = Attach.getMovieClip("greenArea");
_markmc = Attach.getMovieClip("guestMarks");
_markmc.stop();
_markmc.x = 450;
_markmc.y = 55;
_markmc.scaleX = 1.2;
_markmc.scaleY = 1.2;
_markmc.name = "markmc";
var rand:int = Math.floor(((Math.random() * 7) + 1));
_mc = Attach.getMovieClip(("guest" + rand));
_mc.gotoAndStop(1);
_mc.x = _x;
_mc.y = _y;
_mc.name = "guest";
_greenMc.scaleX = 2.5;
_greenMc.scaleY = 2.5;
_greenMc.y = 125;
_mc.addChild(_greenMc);
_wantPizza = (_mc.getChildByName("wantPizza") as MovieClip);
_wantPizza.scaleX = 0.8;
_wantPizza.scaleY = 0.8;
_pmc.addChildAt(_mc, 0);
}
public function get wantPizza():MovieClip{
return (_wantPizza);
}
private function delDis():void{
_pmc.removeChild(_mc);
}
public function get flag():Boolean{
return (_flag);
}
public function get x():Number{
return (_x);
}
public function get y():Number{
return (_y);
}
}
}//package prop
Section 107
//Mark (prop.Mark)
package prop {
import flash.display.*;
import flash.events.*;
import util.*;
public class Mark extends EventDispatcher {
private var _y:int;
private var _pmc:Sprite;
private var _mc:MovieClip;
private var _x:int;
private var _id:int;
private static var IdCountTarMark:int = 0;
public function Mark(pmc:Sprite){
super();
_id = IdCountTarMark;
IdCountTarMark++;
_x = 450;
_y = 350;
_pmc = pmc;
initDis();
}
public function get y():int{
return (_y);
}
public function get id():int{
return (_id);
}
public function del():void{
delDis();
}
private function delDis():void{
_pmc.removeChild(_mc);
}
public function run():void{
var tempEvent:MarkEvent;
if (_mc.currentFrame == 47){
tempEvent = new MarkEvent("FRAME_IS_FINISH");
tempEvent.id = _id;
this.dispatchEvent(tempEvent);
};
}
public function get x():int{
return (_x);
}
private function initDis():void{
_mc = Attach.getMovieClip("masks");
_mc.x = _x;
_mc.y = _y;
_mc.scaleX = 3;
_mc.scaleY = 3;
_pmc.addChild(_mc);
}
}
}//package prop
Section 108
//MarkEvent (prop.MarkEvent)
package prop {
import flash.events.*;
public class MarkEvent extends Event {
public var id:int;
public function MarkEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){
super(type, bubbles, cancelable);
}
}
}//package prop
Section 109
//Npc (prop.Npc)
package prop {
import flash.display.*;
import util.*;
public class Npc {
private var _x:int;
private var _id:int;
private var _pmc:Sprite;
private var _wantPizza:MovieClip;
private var _row:int;
private var randNum:int;
private var _handmc:MovieClip;
private var _mc:MovieClip;
private var _y:int;
private static var IdCountNpc:int = 0;
public static var leftOutside:Number = -100;
public function Npc(pmc:Sprite, row:int, xnum:Number, ynum:Number){
super();
_pmc = pmc;
_id = IdCountNpc;
IdCountNpc++;
_row = row;
_y = ynum;
_x = xnum;
initDis();
}
private function delDis():void{
_pmc.removeChild(_mc);
}
public function del():void{
delDis();
}
public function get mc():MovieClip{
return (_mc);
}
public function get wantPizza():MovieClip{
return (_wantPizza);
}
private function initDis():void{
randNum = Math.floor(((Math.random() * 7) + 1));
_mc = Attach.getMovieClip(("npc" + randNum));
_mc.gotoAndStop(1);
_handmc = _mc["npc"];
_handmc.gotoAndStop(1);
_mc.x = _x;
_mc.y = _y;
_wantPizza = (_mc.getChildByName("wantPizza") as MovieClip);
_wantPizza.scaleX = 0.7;
_wantPizza.scaleY = 0.7;
_mc.cacheAsBitmap = true;
_pmc.addChild(_mc);
_wantPizza.cacheAsBitmap = true;
}
public function get id():int{
return (_id);
}
public function get handMc():MovieClip{
return (_handmc);
}
public function get x():int{
return (_x);
}
public function get y():int{
return (_y);
}
}
}//package prop
Section 110
//PizzaEvent (prop.PizzaEvent)
package prop {
import flash.events.*;
public class PizzaEvent extends Event {
public var id:int;
public function PizzaEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){
super(type, bubbles, cancelable);
}
}
}//package prop
Section 111
//Pizzas (prop.Pizzas)
package prop {
import flash.display.*;
import flash.events.*;
import util.*;
public class Pizzas extends EventDispatcher {
private var _x:int;
private var _markPmc:Sprite;
private var _markmc:MovieClip;
private var _pmc:Sprite;
private var _id:int;
private var _row:int;
private var _mc:MovieClip;
private var _pizzaHitting:MovieClip;
private var _y:int;
private static var IdCountPizza:int = 0;
private static var noShowMarkNum:Number = 600;
private static var ShowMarkNum:Number = 1100;
public static var leftOutside:Number = -200;
public function Pizzas(pmc:Sprite, markpmc:Sprite, row:int, xnum:Number){
super();
_pmc = pmc;
_id = IdCountPizza;
IdCountPizza++;
_row = row;
if (Math.random() >= 0.5){
_y = (Config.car1MaxValue + (Math.random() * (Config.car2MinimumValue - Config.car1MaxValue)));
} else {
_y = (Config.car2MaxValue + (Math.random() * (Config.car3MinimumValue - Config.car2MaxValue)));
};
_x = xnum;
_markPmc = markpmc;
initDis();
}
public function get selfMc():MovieClip{
return (_mc);
}
private function delDis():void{
_pmc.removeChild(_mc);
}
public function run():void{
var tempEvent:PizzaEvent;
_x = (_x - Config._streetSpeed);
_mc.x = _x;
if ((((_x > noShowMarkNum)) && ((_x < ShowMarkNum)))){
_markPmc.addChild(_markmc);
_markmc.play();
} else {
if ((((_x > leftOutside)) && ((_x <= noShowMarkNum)))){
if (_markPmc.getChildByName("markmc") != null){
_markPmc.removeChild(_markPmc.getChildByName("markmc"));
};
} else {
if (_x <= leftOutside){
tempEvent = new PizzaEvent("PIZZA_MOVE_FINISH");
tempEvent.id = _id;
this.dispatchEvent(tempEvent);
};
};
};
}
public function hitArea():MovieClip{
return (_pizzaHitting);
}
public function del():void{
delDis();
}
private function initDis():void{
_mc = Attach.getMovieClip("pizzas");
_mc.gotoAndStop(1);
_pizzaHitting = (_mc.getChildByName("hitting") as MovieClip);
_mc.x = _x;
_mc.y = _y;
_pmc.addChildAt(_mc, 0);
_markmc = Attach.getMovieClip("pizzaMarks");
_markmc.stop();
_markmc.x = 480;
_markmc.y = _mc.y;
_markmc.name = "markmc";
}
public function get id():int{
return (_id);
}
public function get y():int{
return (_y);
}
public function get x():int{
return (_x);
}
}
}//package prop
Section 112
//Tar (prop.Tar)
package prop {
import flash.display.*;
import flash.events.*;
import util.*;
public class Tar extends EventDispatcher {
private var _y:int;
private var _pmc:Sprite;
private var _tarArea:MovieClip;
private var _mc:MovieClip;
private var _x:int;
private var _id:int;
private var _row:int;
private static var IdCountTar:int = 0;
private static var endPosition:Number = 175;
private static var startPosition:Number = 150;
private static var leftOutside:Number = -100;
public function Tar(pmc:Sprite, row:int, startX:Number){
super();
_id = IdCountTar;
IdCountTar++;
_pmc = pmc;
_x = startX;
_row = row;
_y = (startPosition + (Math.random() * endPosition));
initDis();
}
public function get y():int{
return (_y);
}
public function get mc():MovieClip{
return (_mc);
}
public function run():void{
var tempEvent:TarEvent;
_x = (_x - Config._streetSpeed);
_mc.x = _x;
if (_x <= leftOutside){
tempEvent = new TarEvent("TAR_MOVE_FINISH");
tempEvent.id = _id;
this.dispatchEvent(tempEvent);
};
}
public function del():void{
delDis();
}
private function delDis():void{
_pmc.removeChild(_mc);
}
public function get x():int{
return (_x);
}
public function get id():int{
return (_id);
}
private function initDis():void{
_mc = Attach.getMovieClip("tars");
_mc.stop();
_tarArea = (_mc.getChildByName("hitting") as MovieClip);
_mc.x = _x;
_mc.y = _y;
_mc.cacheAsBitmap = true;
_pmc.addChildAt(_mc, 0);
}
public function get tarArea():MovieClip{
return (_tarArea);
}
}
}//package prop
Section 113
//TarEvent (prop.TarEvent)
package prop {
import flash.events.*;
public class TarEvent extends Event {
public var id:int;
public function TarEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){
super(type, bubbles, cancelable);
}
}
}//package prop
Section 114
//ThrowPizza (prop.ThrowPizza)
package prop {
import flash.display.*;
import flash.events.*;
import util.*;
public class ThrowPizza extends EventDispatcher {
private var _y:Number;
private var _pmc:Sprite;
private var _mc:MovieClip;
private var _x:Number;
private var _id:int;
private static var IdCountThrowed:int = 0;
private static var PizzaThrowOutBorder:int = -50;
public function ThrowPizza(pmc:Sprite, startX:Number, startY:Number){
super();
Config.pizzaIsHitting = false;
_id = IdCountThrowed;
IdCountThrowed++;
_pmc = pmc;
_x = startX;
_y = startY;
initDis();
}
public function get y():Number{
return (_y);
}
public function get id():int{
return (_id);
}
public function del():void{
delDis();
}
private function delDis():void{
_pmc.removeChild(_mc);
}
public function run():void{
var tempEvent:ThrowPizzaEvent;
if (Config.pizzaIsHitting == false){
_y = (_y - Config._throwPizzaSpeed);
_x = (_x - 5);
_mc.x = _x;
_mc.y = _y;
if (_y <= PizzaThrowOutBorder){
tempEvent = new ThrowPizzaEvent("THROWPIZZA_MOVE_FINISH");
tempEvent.id = _id;
this.dispatchEvent(tempEvent);
};
};
}
public function set x(w:Number):void{
_x = w;
}
public function pizzaIsBroken():void{
_mc.gotoAndPlay(2);
}
public function get x():Number{
return (_x);
}
public function get mc():MovieClip{
return (_mc);
}
private function initDis():void{
_mc = Attach.getMovieClip("throwPizzas");
_mc.stop();
_mc.x = _x;
_mc.y = _y;
_pmc.addChild(_mc);
_pmc.setChildIndex(_mc, (_pmc.numChildren - 1));
_mc.cacheAsBitmap = true;
}
public function set y(w:Number):void{
_y = w;
}
}
}//package prop
Section 115
//ThrowPizzaEvent (prop.ThrowPizzaEvent)
package prop {
import flash.events.*;
public class ThrowPizzaEvent extends Event {
public var id:int;
public function ThrowPizzaEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){
super(type, bubbles, cancelable);
}
}
}//package prop
Section 116
//Words (prop.Words)
package prop {
import flash.display.*;
import flash.events.*;
import util.*;
import flash.utils.*;
public class Words extends EventDispatcher {
private var _y:Number;
private var _pmc:Sprite;
private var _number1:Number;// = 6000
private var _number2:Number;// = 3000
private var _timeBefore:uint;
private var _timeAfter:uint;
private var _number3:Number;// = 7000
public var _flag:Boolean;
private var _wordNum:int;
private var _mc:MovieClip;
private var lifeTimeArr:Array;
private var _x:Number;
public function Words(pmc:Sprite, wordNum:int=6){
super();
_pmc = pmc;
_wordNum = wordNum;
_x = 300;
_y = 360;
_timeBefore = getTimer();
lifeTimeArr = new Array();
_flag = false;
initDis();
}
private function delDis():void{
_pmc.removeChild(_mc);
}
private function initDis():void{
switch (_wordNum){
case 0:
trace(" moveWords ");
_mc = Attach.getMovieClip("moveWords");
lifeTimeArr.push(_number1);
break;
case 1:
trace(" coinWords ");
_mc = Attach.getMovieClip("coinWords");
lifeTimeArr.push(_number1);
break;
case 2:
trace(" trafficWords ");
_mc = Attach.getMovieClip("trafficWords");
lifeTimeArr.push(_number1);
break;
case 3:
trace(" throwPizzaWords ");
_mc = Attach.getMovieClip("throwPizzaWords");
lifeTimeArr.push(_number1);
break;
case 4:
trace(" pizzaHitCustomerWords ");
_mc = Attach.getMovieClip("pizzaHitCustomerWords");
lifeTimeArr.push(_number3);
break;
case 5:
trace(" guestGetPizzaWords ");
_mc = Attach.getMovieClip("guestGetPizzaWords");
lifeTimeArr.push(_number1);
break;
default:
trace(" 产生间隔的时间");
_mc = new MovieClip();
lifeTimeArr.push(_number2);
break;
};
_mc.name = "wordMc";
_mc.x = _x;
_mc.y = _y;
_pmc.addChild(_mc);
_mc.addEventListener(Event.ENTER_FRAME, getTimeToCompare);
}
public function del():void{
delDis();
}
private function getTimeToCompare(event:Event):void{
var tempEvent:WordsEvent;
_timeAfter = getTimer();
var _tempTime:int = (_timeAfter - _timeBefore);
if (_tempTime >= lifeTimeArr[0]){
_mc.removeEventListener(Event.ENTER_FRAME, getTimeToCompare);
tempEvent = new WordsEvent("INFOR_MOVE_FINISH");
this.dispatchEvent(tempEvent);
};
}
}
}//package prop
Section 117
//WordsEvent (prop.WordsEvent)
package prop {
import flash.events.*;
public class WordsEvent extends Event {
public var id:int;
public function WordsEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){
super(type, bubbles, cancelable);
}
}
}//package prop
Section 118
//HowtoPlay_367 (rush_rush_pizza_fla.HowtoPlay_367)
package rush_rush_pizza_fla {
import flash.display.*;
public dynamic class HowtoPlay_367 extends MovieClip {
public var how_to_play:HowtoPlay_button;
public function HowtoPlay_367(){
addFrameScript(76, frame77);
}
function frame77(){
stop();
}
}
}//package rush_rush_pizza_fla
Section 119
//MoreGamesat_369 (rush_rush_pizza_fla.MoreGamesat_369)
package rush_rush_pizza_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MoreGamesat_369 extends MovieClip {
public var more_game:MoreGamescopy;
public function MoreGamesat_369(){
addFrameScript(76, frame77);
__setProp_more_game_MoreGamesat();
}
function __setProp_more_game_MoreGamesat(){
try {
more_game["componentInspectorSetting"] = true;
} catch(e:Error) {
};
more_game.position = "button_mainscreen_moregames";
more_game.type = "moregames";
try {
more_game["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame77(){
stop();
}
}
}//package rush_rush_pizza_fla
Section 120
//StartGamebutton__365 (rush_rush_pizza_fla.StartGamebutton__365)
package rush_rush_pizza_fla {
import flash.display.*;
public dynamic class StartGamebutton__365 extends MovieClip {
public var start_game:StartGame_button;
public function StartGamebutton__365(){
addFrameScript(76, frame77);
}
function frame77(){
stop();
}
}
}//package rush_rush_pizza_fla
Section 121
//Timeline_259 (rush_rush_pizza_fla.Timeline_259)
package rush_rush_pizza_fla {
import flash.display.*;
public dynamic class Timeline_259 extends MovieClip {
public function Timeline_259(){
addFrameScript(60, frame61);
}
function frame61(){
stop();
}
}
}//package rush_rush_pizza_fla
Section 122
//Timeline_275 (rush_rush_pizza_fla.Timeline_275)
package rush_rush_pizza_fla {
import flash.display.*;
public dynamic class Timeline_275 extends MovieClip {
public function Timeline_275(){
addFrameScript(78, frame79);
}
function frame79(){
stop();
}
}
}//package rush_rush_pizza_fla
Section 123
//Timeline_399 (rush_rush_pizza_fla.Timeline_399)
package rush_rush_pizza_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Timeline_399 extends MovieClip {
public var __id5_:Logocopy;
public function Timeline_399(){
addFrameScript(103, frame104);
__setProp___id5__();
}
function __setProp___id5__(){
try {
__id5_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id5_.alignHorizontal = "Center";
__id5_.alignVertical = "Center";
__id5_.maxHeight = 40;
__id5_.maxWidth = 150;
__id5_.position = "logo_mainscreen";
try {
__id5_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame104(){
stop();
}
}
}//package rush_rush_pizza_fla
Section 124
//music_1 (santachrismasmusic_fla.music_1)
package santachrismasmusic_fla {
import flash.display.*;
public dynamic class music_1 extends MovieClip {
public function music_1(){
addFrameScript(0, this.frame1);
}
function frame1(){
stop();
}
}
}//package santachrismasmusic_fla
Section 125
//CommitScores (scores.CommitScores)
package scores {
import flash.display.*;
import flash.events.*;
import util.*;
import zlong.spilSystemTool.*;
import flash.text.*;
import main.*;
public class CommitScores extends AbstractScreen {
private var _numbers:TextField;
private var _moreGames:MovieClip;
private var _mc:MovieClip;
private var _credits:MovieClip;
private var _commits:MovieClip;
public function CommitScores(r:Sprite){
super(r);
initDis();
}
private function delDis():void{
_root.removeChild(_mc);
}
override public function destroy():void{
removeEvent();
delDis();
}
private function initChild():void{
_numbers = (_mc.getChildByName("numbers") as TextField);
_moreGames = (_mc.getChildByName("moreGames") as MovieClip);
_moreGames.gotoAndStop(1);
_commits = (_mc.getChildByName("commit") as MovieClip);
_commits.gotoAndStop(1);
_credits = (_mc.getChildByName("credits") as MovieClip);
_credits.gotoAndStop(1);
_numbers.text = String(Config.totalScores);
initEvent();
}
private function removeEvent():void{
_commits.removeEventListener(MouseEvent.CLICK, commit);
_credits.removeEventListener(MouseEvent.CLICK, creditsLook);
}
private function initEvent():void{
_commits.addEventListener(MouseEvent.CLICK, commit);
_credits.addEventListener(MouseEvent.CLICK, creditsLook);
}
public function del():void{
removeEvent();
delDis();
}
private function commit(event:MouseEvent):void{
_commits.gotoAndStop(3);
SoundsManager.instance.playSound("menu_presss", 1);
Award_HighScore.instance.submitScore(Config.totalScores);
_root.dispatchEvent(new Event(Manager.LOADING_COMPLETE));
}
private function creditsLook(event:MouseEvent):void{
SoundsManager.instance.playSound("menu_presss", 1);
_credits.gotoAndStop(3);
_root.dispatchEvent(new Event(Manager.CREDITS_LOOK));
}
private function initDis():void{
_mc = Attach.getMovieClip("commitScores");
_root.addChild(_mc);
_mc.tabChildren = false;
initChild();
}
}
}//package scores
Section 126
//CreditLook (scores.CreditLook)
package scores {
import flash.display.*;
import flash.events.*;
import util.*;
import main.*;
public class CreditLook extends AbstractScreen {
private var _mc:MovieClip;
private var _back:MovieClip;
public function CreditLook(r:Sprite){
super(r);
initDis();
initEvent();
}
private function initEvent():void{
_back.addEventListener(MouseEvent.CLICK, back);
}
private function delDis():void{
_root.removeChild(_mc);
}
private function back(event:MouseEvent):void{
_back.gotoAndStop(3);
SoundsManager.instance.playSound("menu_presss", 1);
_root.dispatchEvent(new Event(Manager.CLICK_BACK));
}
override public function destroy():void{
removeEvent();
delDis();
}
private function removeEvent():void{
(_back as BindButton).delEvent();
_back.removeEventListener(MouseEvent.CLICK, back);
}
private function initDis():void{
_mc = Attach.getMovieClip("creditsUI");
_root.addChild(_mc);
_mc.tabChildren = false;
_back = _mc["btn_back"];
_back.gotoAndStop(1);
}
}
}//package scores
Section 127
//CupSelect (scores.CupSelect)
package scores {
import flash.display.*;
import flash.events.*;
import util.*;
import flash.geom.*;
import main.*;
public class CupSelect extends AbstractScreen {
private const SNOW_NUM:int = 200;
private var bmp:Bitmap;
private var _cupBack:MovieClip;
private var particleBmd:BitmapData;
private var _mc:MovieClip;
private var _maxLev:int;
private var _streetShow:MovieClip;
private var _street2_lock:MovieClip;
private var _street1:MovieClip;
private var _street2:MovieClip;
private var _street3:MovieClip;
private var _street4:MovieClip;
private var snows:Array;
private var _street3_lock:MovieClip;
private var snowMat:Matrix;
private var _start:MovieClip;
private var _message1:MovieClip;
private var _message3:MovieClip;
private var _startCount:int;// = 0
private var _message2:MovieClip;
private var _street4_lock:MovieClip;
private var bmd:BitmapData;
public function CupSelect(r:Sprite){
_maxLev = Cookie.instance.lev["maxLev"];
super(r);
SoundsManager.instance.overNewMusic("rushrushsanta_map", 1);
initSnow();
initDis();
initBitmap();
initEvent();
}
override public function destroy():void{
removeEvent();
delDis();
}
private function initEvent():void{
_cupBack.addEventListener(MouseEvent.CLICK, cupclick);
level1();
if (Config.level2Flag == true){
level2();
};
if (Config.level3Flag == true){
level3();
};
if (Config.level4Flag == true){
level4();
};
}
private function snow():void{
var snow:Snow;
particleBmd = Snow.bitmap;
for each (snow in snows) {
snow.x = (Root.STAGE_WIGHT * Math.random());
snow.y = (Math.random() * Root.STAGE_HEIGHT);
};
_root.addEventListener(Event.ENTER_FRAME, render);
}
public function del():void{
removeEvent();
delDis();
}
private function cupclick(event:MouseEvent):void{
_cupBack.gotoAndStop(3);
SoundsManager.instance.playSound("menu_touchs", 1);
if (_street4_lock.contains((_message3 as Sprite))){
_street4_lock.removeChild(_message3);
};
if (_street3_lock.contains((_message2 as Sprite))){
_street3_lock.removeChild(_message2);
};
if (_street2_lock.contains((_message1 as Sprite))){
_street2_lock.removeChild(_message1);
};
_root.dispatchEvent(new Event(Manager.MENU));
}
public function delDis():void{
if (bmd != null){
bmd = null;
};
if (particleBmd != null){
particleBmd = null;
};
if (bmp != null){
_root.removeChild(bmp);
};
_root.removeChild(_mc);
}
private function render(e:Event):void{
bmd.fillRect(bmd.rect, 0);
bmd.lock();
updateSnow();
bmd.unlock();
}
private function AABBcheck(p:Particle):void{
if (p.x < -10){
p.x = Root.STAGE_WIGHT;
} else {
if (p.x > (Root.STAGE_WIGHT + 10)){
p.x = -10;
};
};
if (p.y > (Root.STAGE_HEIGHT + 10)){
p.y = -10;
};
}
private function level1():void{
streetEvent(_street1);
_street2_lock.addEventListener(MouseEvent.MOUSE_OVER, lockStreetTwo);
_street3_lock.addEventListener(MouseEvent.MOUSE_OVER, lockStreetThree);
_street4_lock.addEventListener(MouseEvent.MOUSE_OVER, lockStreetFour);
}
private function level2():void{
_mc.removeChild(_street2_lock);
streetEvent(_street2);
}
private function level3():void{
_mc.removeChild(_street3_lock);
streetEvent(_street3);
}
private function level4():void{
_mc.removeChild(_street4_lock);
streetEvent(_street4);
}
private function initSnow():void{
var snow:Snow;
snows = new Array(SNOW_NUM);
var i:int;
while (i < SNOW_NUM) {
snow = new Snow();
snow.scale = ((Math.random() * 0.45) + 0.15);
snow.vx = ((Math.random() * 1) - 0.5);
snow.vy = (Math.random() * 2.5);
snow.x = (Root.STAGE_WIGHT * Math.random());
snow.y = (Math.random() * Root.STAGE_HEIGHT);
snows[i] = snow;
i++;
};
}
private function lockStreetThree(event:MouseEvent):void{
if (_street2_lock.contains((_message1 as Sprite))){
_street2_lock.removeChild(_message1);
};
if (_street4_lock.contains((_message3 as Sprite))){
_street4_lock.removeChild(_message3);
};
_message2.x = 40;
_message2.y = 160;
if (!_street3_lock.contains((_message2 as Sprite))){
_street3_lock.addChild(_message2);
_message2.play();
_message2.addEventListener(Event.ENTER_FRAME, messageFrame2);
};
}
private function overEvent(event:MouseEvent):void{
SoundsManager.instance.playSound("map_touchs", 1);
if (_street3_lock.contains((_message2 as Sprite))){
_street3_lock.removeChild(_message2);
};
if (_street4_lock.contains((_message3 as Sprite))){
_street4_lock.removeChild(_message3);
};
if (_street2_lock.contains((_message1 as Sprite))){
_street2_lock.removeChild(_message1);
};
(event.currentTarget as MovieClip).gotoAndStop(2);
}
private function clickEvents(event:MouseEvent):void{
SoundsManager.instance.playSound("map_selects", 1);
var targetmc:MovieClip = (event.currentTarget as MovieClip);
targetmc.gotoAndStop(3);
if (!targetmc.contains((_start as Sprite))){
if (targetmc == _street1){
Config.currentLevel = 1;
_start.x = 280;
_start.y = 350;
Cookie.instance.show["showIs"] = false;
_streetShow.visible = Cookie.instance.show["showIs"];
};
if (targetmc == _street2){
Config.currentLevel = 2;
_start.x = 350;
_start.y = 200;
};
if (targetmc == _street3){
Config.currentLevel = 3;
_start.x = 100;
_start.y = 150;
};
if (targetmc == _street4){
Config.currentLevel = 4;
_start.x = 350;
_start.y = 100;
};
targetmc.addChild(_start);
_start.buttonMode = true;
_start.mouseChildren = false;
_start.gotoAndStop(1);
addStartEvent();
};
}
private function messageFrame1(event:Event):void{
if (_message1.currentFrame == 5){
_message1.stop();
_message1.removeEventListener(Event.ENTER_FRAME, messageFrame1);
};
}
private function messageFrame2(event:Event):void{
if (_message2.currentFrame == 5){
_message2.stop();
_message2.removeEventListener(Event.ENTER_FRAME, messageFrame2);
};
}
private function messageFrame3(event:Event):void{
if (_message3.currentFrame == 5){
_message3.stop();
_message3.removeEventListener(Event.ENTER_FRAME, messageFrame3);
};
}
public function removeStreetEvent(rs:MovieClip):void{
rs.removeEventListener(MouseEvent.MOUSE_OVER, overEvent);
rs.removeEventListener(MouseEvent.MOUSE_OUT, outEvent);
rs.removeEventListener(MouseEvent.CLICK, clickEvents);
}
private function initDis():void{
if (_maxLev == 2){
Config.level2Flag = true;
} else {
if (_maxLev == 3){
Config.level2Flag = true;
Config.level3Flag = true;
} else {
if (_maxLev == 4){
Config.level2Flag = true;
Config.level3Flag = true;
Config.level4Flag = true;
};
};
};
_mc = Attach.getMovieClip("UICupselect");
_mc.name = "Cupselect";
_start = Attach.getMovieClip("starts");
_start.scaleX = 0.8;
_start.scaleY = 0.8;
_message1 = Attach.getMovieClip("messigebox2");
_message2 = Attach.getMovieClip("messigebox3");
_message3 = Attach.getMovieClip("messigebox4");
_streetShow = (_mc.getChildByName("streetShow") as MovieClip);
_streetShow.visible = Cookie.instance.show["showIs"];
_cupBack = (_mc.getChildByName("cupBack") as MovieClip);
_cupBack.buttonMode = true;
_cupBack.mouseChildren = false;
_cupBack.gotoAndStop(1);
_mc.tabChildren = false;
_root.addChild(_mc);
_street1 = (_mc.getChildByName("street1") as MovieClip);
_street2 = (_mc.getChildByName("street2") as MovieClip);
_street3 = (_mc.getChildByName("street3") as MovieClip);
_street4 = (_mc.getChildByName("street4") as MovieClip);
_street1.gotoAndStop(1);
_street2.gotoAndStop(1);
_street3.gotoAndStop(1);
_street4.gotoAndStop(1);
_street2_lock = (_mc.getChildByName("street2_lock") as MovieClip);
_street3_lock = (_mc.getChildByName("street3_lock") as MovieClip);
_street4_lock = (_mc.getChildByName("street4_lock") as MovieClip);
snow();
}
private function initBitmap():void{
bmd = new BitmapData(Root.STAGE_WIGHT, Root.STAGE_HEIGHT, true, 0);
bmp = new Bitmap(bmd);
_root.addChild(bmp);
snowMat = new Matrix();
}
private function addStartEvent():void{
_start.addEventListener(MouseEvent.MOUSE_OVER, _startOver);
_start.addEventListener(MouseEvent.MOUSE_OUT, _startOut);
_start.addEventListener(MouseEvent.CLICK, startclick);
}
private function lockStreetTwo(event:MouseEvent):void{
if (_street3_lock.contains((_message2 as Sprite))){
_street3_lock.removeChild(_message2);
};
if (_street4_lock.contains((_message3 as Sprite))){
_street4_lock.removeChild(_message3);
};
_message1.x = 280;
_message1.y = 180;
if (!_street2_lock.contains((_message1 as Sprite))){
_street2_lock.addChild(_message1);
_message1.play();
_message1.addEventListener(Event.ENTER_FRAME, messageFrame1);
};
}
private function streetEvent(m:MovieClip):void{
m.addEventListener(MouseEvent.MOUSE_OVER, overEvent);
m.addEventListener(MouseEvent.MOUSE_OUT, outEvent);
m.addEventListener(MouseEvent.CLICK, clickEvents);
}
private function startclick(event:MouseEvent):void{
if (_startCount != 1){
SoundsManager.instance.playSound("menu_presss", 1);
_start.gotoAndStop(3);
Config.passfilmdescri = 3;
_startCount++;
_root.dispatchEvent(new Event(Manager.PASSFILM));
};
}
private function _startOver(event:MouseEvent):void{
SoundsManager.instance.playSound("menu_touchs", 1);
_start.gotoAndStop(2);
}
private function updateSnow():void{
var snow:Snow;
for each (snow in snows) {
snow.x = (snow.x + snow.vx);
snow.y = (snow.y + snow.vy);
snowMat.createBox(snow.scale, snow.scale, 0, snow.x, snow.y);
bmd.draw(particleBmd, snowMat);
AABBcheck(snow);
};
}
private function lockStreetFour(event:MouseEvent):void{
if (_street2_lock.contains((_message1 as Sprite))){
_street2_lock.removeChild(_message1);
};
if (_street3_lock.contains((_message2 as Sprite))){
_street3_lock.removeChild(_message2);
};
_message3.x = 270;
_message3.y = 120;
if (!_street4_lock.contains((_message3 as Sprite))){
_street4_lock.addChild(_message3);
_message3.play();
_message3.addEventListener(Event.ENTER_FRAME, messageFrame3);
};
}
private function _startOut(event:MouseEvent):void{
_start.gotoAndStop(1);
}
private function outEvent(event:MouseEvent):void{
(event.currentTarget as MovieClip).gotoAndStop(1);
}
public function removeEvent():void{
(_cupBack as BindButton).delEvent();
_cupBack.removeEventListener(MouseEvent.CLICK, cupclick);
_street2_lock.removeEventListener(MouseEvent.MOUSE_OVER, lockStreetTwo);
_street3_lock.removeEventListener(MouseEvent.MOUSE_OVER, lockStreetThree);
_street4_lock.removeEventListener(MouseEvent.MOUSE_OVER, lockStreetFour);
_start.removeEventListener(MouseEvent.MOUSE_OVER, _startOver);
_start.removeEventListener(MouseEvent.MOUSE_OUT, _startOut);
_start.removeEventListener(MouseEvent.CLICK, startclick);
removeStreetEvent(_street1);
removeStreetEvent(_street2);
removeStreetEvent(_street3);
removeStreetEvent(_street4);
bmd.fillRect(bmd.rect, 0);
_root.removeEventListener(Event.ENTER_FRAME, render);
}
}
}//package scores
Section 128
//HowToPlay (scores.HowToPlay)
package scores {
import flash.display.*;
import flash.events.*;
import util.*;
import main.*;
public class HowToPlay extends AbstractScreen {
private var _num:int;
private var _mc:MovieClip;
private var _play:MovieClip;
public function HowToPlay(r:Sprite, num:int){
super(r);
_num = num;
initDis();
initEvent();
}
override public function destroy():void{
delEvent();
delDis();
}
private function delDis():void{
_root.removeChild(_mc);
}
private function initEvent():void{
_play.addEventListener(MouseEvent.CLICK, playGames);
}
private function playGames(event:MouseEvent):void{
_play.gotoAndStop(3);
SoundsManager.instance.playSound("menu_presss", 1);
if (_num == 0){
Config.passfilmdescri = 6;
_root.dispatchEvent(new Event(Manager.PASSFILM));
};
if (_num == 1){
delEvent();
delDis();
Config.passfilmdescri = 8;
new PassFilm(_root, Config.passfilmdescri);
};
}
private function delEvent():void{
_play.removeEventListener(MouseEvent.CLICK, playGames);
}
private function initDis():void{
_mc = Attach.getMovieClip("UIhowtoplay");
_root.addChild(_mc);
_mc.tabChildren = false;
_root.setChildIndex(_mc, (_root.numChildren - 1));
_play = _mc["plays"];
_play.gotoAndStop(1);
_play.buttonMode = true;
}
}
}//package scores
Section 129
//PassFilm (scores.PassFilm)
package scores {
import flash.display.*;
import flash.events.*;
import util.*;
import main.*;
public class PassFilm extends AbstractScreen {
private var _pmc:Sprite;
private var _endFr:int;// = 67
private var _flag:Boolean;// = false
private var _stopFr:int;// = 40
private var _cont:int;
private var _scaleX:Number;// = 10
private var _mc:MovieClip;
private var _scaleY:Number;// = 10
public function PassFilm(r:Sprite, num:int){
super(r);
_cont = num;
_pmc = r;
initChild();
}
public function del():void{
delDis();
}
override public function destroy():void{
delDis();
}
private function initChild():void{
_mc = Attach.getMovieClip("UIpassfilm");
_mc.x = (DocumentClass.STAGEWIDTH / 2);
_mc.y = (DocumentClass.STAGEHEIGHT / 2);
_pmc.addChild(_mc);
_mc.addEventListener(Event.ENTER_FRAME, pass);
}
private function run(event:Event):void{
_scaleX = (_scaleX + 0.2);
_scaleY = (_scaleY + 0.2);
_mc.scaleX = _scaleX;
_mc.scaleY = _scaleY;
if ((((_scaleX >= 10)) && ((_scaleY >= 10)))){
_mc.removeEventListener(Event.ENTER_FRAME, run);
del();
};
}
private function countKinds():void{
if (_cont == 1){
_root.dispatchEvent(new Event(Manager.START_GAME));
_flag = true;
};
if (_cont == 2){
_root.dispatchEvent(new Event(Manager.HOW_TO_PLAY));
_flag = true;
};
if (_cont == 3){
_root.dispatchEvent(new Event(Manager.CUP_SELECT));
_flag = true;
};
if (_cont == 4){
_root.dispatchEvent(new Event(Manager.SUCCESSTOLLGATECOUNT));
_flag = true;
};
if (_cont == 5){
_root.dispatchEvent(new Event(Manager.FAILTOLLGATECOUNT));
_flag = true;
};
if (_cont == 6){
_root.dispatchEvent(new Event(Manager.PLAY));
_flag = true;
};
if (_cont == 7){
_root.dispatchEvent(new Event(Manager.COMMITWINDOW));
_flag = true;
};
if (_cont == 8){
Config.stopFlag = false;
(_root.getChildByName("gameUi") as MovieClip).alpha = 1;
Config.markRunFlag = true;
_flag = true;
Config.stopButtonAndLevelRunFlag = false;
};
_pmc.setChildIndex(_mc, (_pmc.numChildren - 1));
}
private function pass(e:Event):void{
if (_mc.currentFrame == 39){
_mc.stop();
countKinds();
};
if (_flag == true){
if (_mc.currentFrame != _stopFr){
_mc.gotoAndPlay(_stopFr++);
};
if (_mc.currentFrame == _endFr){
_mc.removeEventListener(Event.ENTER_FRAME, pass);
del();
Config._commitFlag = true;
};
};
}
private function delDis():void{
_pmc.removeChild(_mc);
}
}
}//package scores
Section 130
//PauseGame (scores.PauseGame)
package scores {
import flash.display.*;
import flash.events.*;
import util.*;
import main.*;
public class PauseGame extends AbstractScreen {
private var count:int;// = 0
private var menus:MovieClip;
private var _mc:MovieClip;
private var continueb:MovieClip;
private var howtoplay:MovieClip;
public function PauseGame(r:Sprite){
super(r);
initDis();
initEvent();
}
override public function destroy():void{
removeEvent();
delDis();
}
private function toContinue(event:MouseEvent):void{
continueb.gotoAndStop(3);
SoundsManager.instance.playSound("menu_presss", 1);
count = 1;
Config.isBoyRunFlag = false;
if (count == 1){
Config.stopFlag = false;
Config.markRunFlag = true;
Config.stopButtonAndLevelRunFlag = false;
_mc.stage.focus = _mc.stage;
removeEvent();
delDis();
SoundsManager.instance.playMusic("xd_games", 1);
};
}
private function delDis():void{
_root.removeChild(_mc);
}
private function howToPlay(event:MouseEvent):void{
howtoplay.gotoAndStop(3);
SoundsManager.instance.playSound("menu_presss", 1);
count = 2;
Config.isBoyRunFlag = false;
if (count == 2){
_mc.stage.focus = _mc.stage;
removeEvent();
delDis();
new HowToPlay(_root, 1);
};
}
private function initChild():void{
continueb = _mc["pause"]["continues"];
howtoplay = _mc["pause"]["how_to_play"];
menus = _mc["pause"]["menu"];
continueb.gotoAndStop(1);
howtoplay.gotoAndStop(1);
menus.gotoAndStop(1);
}
private function removeEvent():void{
continueb.addEventListener(MouseEvent.CLICK, toContinue);
howtoplay.addEventListener(MouseEvent.CLICK, howToPlay);
menus.addEventListener(MouseEvent.CLICK, toMenu);
}
private function initEvent():void{
_mc.addEventListener(Event.ENTER_FRAME, runPauseGame);
}
private function toMenu(event:MouseEvent):void{
menus.gotoAndStop(3);
SoundsManager.instance.playSound("menu_presss", 1);
count = 3;
Config.isBoyRunFlag = false;
Config._passGameMenu = true;
if (count == 3){
_mc.stage.focus = _mc.stage;
removeEvent();
delDis();
Config.markRunFlag = true;
Config.stopFlag = false;
Config.levelControl = false;
Config.estopBoyRun = false;
Config.initBoyRun = false;
Config.stopButtonAndLevelRunFlag = false;
_root.dispatchEvent(new Event(Manager.MENU));
};
}
private function runPauseGame(event:Event):void{
_mc.play();
if (_mc.currentFrame == 15){
_mc.stop();
_mc.removeEventListener(Event.ENTER_FRAME, runPauseGame);
continueb.addEventListener(MouseEvent.CLICK, toContinue);
howtoplay.addEventListener(MouseEvent.CLICK, howToPlay);
menus.addEventListener(MouseEvent.CLICK, toMenu);
};
}
private function initDis():void{
SoundsManager.instance.stopMusic();
_mc = Attach.getMovieClip("pauses");
_mc.tabChildren = false;
if (!_root.contains((_mc as Sprite))){
_root.addChild(_mc);
};
_mc.cacheAsBitmap = true;
initChild();
}
}
}//package scores
Section 131
//TollGateCount (scores.TollGateCount)
package scores {
import flash.display.*;
import flash.events.*;
import util.*;
import flash.utils.*;
import flash.text.*;
import main.*;
import flash.ui.*;
public class TollGateCount extends AbstractScreen {
private var _scores:int;// = 0
private var _totalNum:TextField;
private var scoreTemp:int;// = 0
private var intervalId:uint;
private var number:Number;// = 0.2
private var _spaceBar:MovieClip;
private var spaceFlag:Boolean;
private var passFilmCount:int;// = 0
private var _guestNum:TextField;
private var scoreAdd:int;
private var _mc:MovieClip;
private var _coinNum:TextField;
private var intervalDuration:Number;// = 600
private var _pizzaNum:TextField;
public function TollGateCount(r:Sprite){
super(r);
SoundsManager.instance.stopMusic();
SoundsManager.instance.playSound("game_win", 1);
spaceFlag = false;
initDis();
}
private function delDis():void{
_root.removeChild(_mc);
}
private function totalScores(event:Event):void{
if (scoreTemp < _scores){
scoreAdd = ((_scores - scoreTemp) * number);
if (scoreAdd < 1){
scoreAdd = 1;
};
scoreTemp = (scoreTemp + scoreAdd);
_totalNum.text = (scoreTemp + "");
} else {
if (scoreTemp >= _scores){
_totalNum.removeEventListener(Event.ENTER_FRAME, totalScores);
_spaceBar.addEventListener(MouseEvent.CLICK, toCountinue);
_mc.stage.addEventListener(KeyboardEvent.KEY_DOWN, boyKeyDown);
_mc.stage.addEventListener(KeyboardEvent.KEY_UP, boyKeyUp);
};
};
if (Config.totalScores >= 3000){
Dispatch_GooGleEventAndAwardScores.Award_Fiveth();
};
}
private function removeEvent():void{
_mc.stage.removeEventListener(KeyboardEvent.KEY_DOWN, boyKeyDown);
_mc.stage.removeEventListener(KeyboardEvent.KEY_UP, boyKeyUp);
_spaceBar.removeEventListener(MouseEvent.CLICK, toCountinue);
}
private function pizzaScores(event:Event):void{
if (scoreTemp < _scores){
scoreAdd = ((_scores - scoreTemp) * number);
if (scoreAdd < 1){
scoreAdd = 1;
};
scoreTemp = (scoreTemp + scoreAdd);
_pizzaNum.text = (scoreTemp + "");
} else {
if (scoreTemp >= _scores){
_pizzaNum.removeEventListener(Event.ENTER_FRAME, pizzaScores);
_scores = Config.totalScores;
scoreTemp = 0;
scoreAdd = 0;
_totalNum.addEventListener(Event.ENTER_FRAME, totalScores);
};
};
}
override public function destroy():void{
removeEvent();
delDis();
}
private function guestScores(event:Event):void{
if (scoreTemp < _scores){
scoreAdd = ((_scores - scoreTemp) * number);
if (scoreAdd < 1){
scoreAdd = 1;
};
scoreTemp = (scoreTemp + scoreAdd);
_guestNum.text = (scoreTemp + "");
} else {
if (scoreTemp >= _scores){
_guestNum.removeEventListener(Event.ENTER_FRAME, guestScores);
_scores = (Config.pizza_num * 40);
scoreTemp = 0;
scoreAdd = 0;
_pizzaNum.addEventListener(Event.ENTER_FRAME, pizzaScores);
};
};
}
private function coinScores(event:Event):void{
if (scoreTemp < _scores){
scoreAdd = ((_scores - scoreTemp) * number);
if (scoreAdd < 1){
scoreAdd = 1;
};
scoreTemp = (scoreTemp + scoreAdd);
_coinNum.text = (scoreTemp + "");
} else {
if (scoreTemp >= _scores){
_coinNum.removeEventListener(Event.ENTER_FRAME, coinScores);
_scores = (Config.successed_pizza_num * 100);
scoreTemp = 0;
scoreAdd = 0;
_guestNum.addEventListener(Event.ENTER_FRAME, guestScores);
};
};
}
private function myRepeatingFunction():void{
_coinNum.addEventListener(Event.ENTER_FRAME, coinScores);
clearInterval(intervalId);
}
private function initDis():void{
_mc = Attach.getMovieClip("toll_gate_Counts");
_root.addChild(_mc);
_mc.tabChildren = false;
Config.totalScores = (((Config.pizza_num * 40) + (Config.total_coin_num * 5)) + (Config.successed_pizza_num * 100));
_coinNum = (_mc.getChildByName("coinNum") as TextField);
_guestNum = (_mc.getChildByName("guestNum") as TextField);
_pizzaNum = (_mc.getChildByName("pizzaNum") as TextField);
_totalNum = (_mc.getChildByName("totalNum") as TextField);
_coinNum.text = String(0);
_guestNum.text = String(0);
_pizzaNum.text = String(0);
_totalNum.text = String(0);
_spaceBar = (_mc.getChildByName("bar") as MovieClip);
_scores = (Config.total_coin_num * 5);
intervalId = setInterval(myRepeatingFunction, intervalDuration);
}
private function toCountinue(e:Event):void{
if (passFilmCount == 0){
handleContinue();
passFilmCount++;
};
}
private function boyKeyUp(event:KeyboardEvent):void{
if (event.keyCode == Keyboard.SPACE){
if (passFilmCount == 0){
handleContinue();
passFilmCount++;
};
};
}
private function boyKeyDown(event:KeyboardEvent):void{
if (event.keyCode == Keyboard.SPACE){
};
}
private function handleContinue():void{
if (Config.currentLevel == 1){
if (Config.level2Flag == false){
Config.level2Flag = true;
Cookie.instance.lev["maxLev"] = 2;
};
Config.passfilmdescri = 1;
_root.dispatchEvent(new Event(Manager.PASSFILM));
};
if (Config.currentLevel == 2){
if (Config.level3Flag == false){
Config.level3Flag = true;
Cookie.instance.lev["maxLev"] = 3;
};
Config.passfilmdescri = 1;
_root.dispatchEvent(new Event(Manager.PASSFILM));
};
if (Config.currentLevel == 3){
if (Config.level4Flag == false){
Config.level4Flag = true;
Cookie.instance.lev["maxLev"] = 4;
};
Config.passfilmdescri = 1;
_root.dispatchEvent(new Event(Manager.PASSFILM));
};
if (Config.currentLevel == 4){
Cookie.instance.lev["maxLev"] = 4;
Config.passfilmdescri = 7;
_root.dispatchEvent(new Event(Manager.PASSFILM));
Config.finishAllGate = true;
};
if (Cookie.instance.achi["achi4"] == false){
Dispatch_GooGleEventAndAwardScores.Award_Fourth();
};
Cookie.flush();
}
}
}//package scores
Section 132
//TollGateCountFailed (scores.TollGateCountFailed)
package scores {
import flash.display.*;
import flash.events.*;
import util.*;
import flash.utils.*;
import flash.text.*;
import main.*;
import flash.ui.*;
public class TollGateCountFailed extends AbstractScreen {
private var _scores:int;// = 0
private var _totalNum:TextField;
private var scoreTemp:int;// = 0
private var number:Number;// = 0.2
private var _spaceBar:MovieClip;
private var intervalId:uint;
private var passFilmCount:int;// = 0
private var _guestNum:TextField;
private var scoreAdd:int;
private var _mc:MovieClip;
private var _coinNum:TextField;
private var intervalDuration:Number;// = 600
private var _pizzaNum:TextField;
public function TollGateCountFailed(r:Sprite){
super(r);
SoundsManager.instance.stopMusic();
SoundsManager.instance.playSound("game_lose", 1);
initDis();
}
private function delDis():void{
_root.removeChild(_mc);
}
private function totalScores(event:Event):void{
if (scoreTemp < _scores){
scoreAdd = ((_scores - scoreTemp) * number);
if (scoreAdd < 1){
scoreAdd = 1;
};
scoreTemp = (scoreTemp + scoreAdd);
_totalNum.text = (scoreTemp + "");
} else {
if (scoreTemp >= _scores){
_totalNum.removeEventListener(Event.ENTER_FRAME, totalScores);
_spaceBar.addEventListener(MouseEvent.CLICK, toCountinue);
_mc.stage.addEventListener(KeyboardEvent.KEY_DOWN, boyKeyDown);
_mc.stage.addEventListener(KeyboardEvent.KEY_UP, boyKeyUp);
};
};
}
private function removeEvent():void{
_spaceBar.removeEventListener(MouseEvent.CLICK, toCountinue);
_mc.stage.removeEventListener(KeyboardEvent.KEY_DOWN, boyKeyDown);
_mc.stage.removeEventListener(KeyboardEvent.KEY_UP, boyKeyUp);
}
private function pizzaScores(event:Event):void{
if (scoreTemp < _scores){
scoreAdd = ((_scores - scoreTemp) * number);
if (scoreAdd < 1){
scoreAdd = 1;
};
scoreTemp = (scoreTemp + scoreAdd);
_pizzaNum.text = (scoreTemp + "");
} else {
if (scoreTemp >= _scores){
_pizzaNum.removeEventListener(Event.ENTER_FRAME, pizzaScores);
_scores = Config.totalScores;
trace((" Config.totalScores " + Config.totalScores));
scoreTemp = 0;
scoreAdd = 0;
_totalNum.addEventListener(Event.ENTER_FRAME, totalScores);
};
};
}
private function coinScores(event:Event):void{
if (scoreTemp < _scores){
scoreAdd = ((_scores - scoreTemp) * number);
if (scoreAdd < 1){
scoreAdd = 1;
};
scoreTemp = (scoreTemp + scoreAdd);
_coinNum.text = (scoreTemp + "");
} else {
if (scoreTemp >= _scores){
_coinNum.removeEventListener(Event.ENTER_FRAME, coinScores);
_scores = (Config.successed_pizza_num * 100);
scoreTemp = 0;
scoreAdd = 0;
_guestNum.addEventListener(Event.ENTER_FRAME, guestScores);
};
};
}
override public function destroy():void{
removeEvent();
delDis();
}
private function guestScores(event:Event):void{
if (scoreTemp < _scores){
scoreAdd = ((_scores - scoreTemp) * number);
if (scoreAdd < 1){
scoreAdd = 1;
};
scoreTemp = (scoreTemp + scoreAdd);
_guestNum.text = (scoreTemp + "");
} else {
if (scoreTemp >= _scores){
_guestNum.removeEventListener(Event.ENTER_FRAME, guestScores);
_scores = (Config.pizza_num * 40);
scoreTemp = 0;
scoreAdd = 0;
_pizzaNum.addEventListener(Event.ENTER_FRAME, pizzaScores);
};
};
}
private function myRepeatingFunction():void{
_coinNum.addEventListener(Event.ENTER_FRAME, coinScores);
clearInterval(intervalId);
}
private function initDis():void{
_mc = Attach.getMovieClip("tollGateFailed");
_root.addChild(_mc);
_mc.tabChildren = false;
Config.totalScores = (((Config.pizza_num * 40) + (Config.total_coin_num * 5)) + (Config.successed_pizza_num * 100));
_coinNum = (_mc.getChildByName("coinNum") as TextField);
_guestNum = (_mc.getChildByName("guestNum") as TextField);
_pizzaNum = (_mc.getChildByName("pizzaNum") as TextField);
_totalNum = (_mc.getChildByName("totalNum") as TextField);
_coinNum.text = String(0);
_guestNum.text = String(0);
_pizzaNum.text = String(0);
_totalNum.text = String(0);
_spaceBar = (_mc.getChildByName("bar") as MovieClip);
_scores = (Config.total_coin_num * 5);
intervalId = setInterval(myRepeatingFunction, intervalDuration);
}
private function toCountinue(e:Event):void{
if (passFilmCount == 0){
handleContinue();
passFilmCount++;
};
}
private function boyKeyUp(event:KeyboardEvent):void{
if (event.keyCode == Keyboard.SPACE){
if (passFilmCount == 0){
handleContinue();
passFilmCount++;
};
};
}
private function boyKeyDown(event:KeyboardEvent):void{
if (event.keyCode == Keyboard.SPACE){
};
}
private function handleContinue():void{
if (Config.currentLevel == 1){
Config.passfilmdescri = 1;
_root.dispatchEvent(new Event(Manager.PASSFILM));
};
if (Config.currentLevel == 2){
Config.passfilmdescri = 1;
_root.dispatchEvent(new Event(Manager.PASSFILM));
};
if (Config.currentLevel == 3){
Config.passfilmdescri = 1;
_root.dispatchEvent(new Event(Manager.PASSFILM));
};
if (Config.currentLevel == 4){
Config.passfilmdescri = 1;
_root.dispatchEvent(new Event(Manager.PASSFILM));
};
}
}
}//package scores
Section 133
//musics_2 (sound_fla.musics_2)
package sound_fla {
import flash.display.*;
public dynamic class musics_2 extends MovieClip {
public function musics_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package sound_fla
Section 134
//sounds_1 (sound_fla.sounds_1)
package sound_fla {
import flash.display.*;
public dynamic class sounds_1 extends MovieClip {
public function sounds_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package sound_fla
Section 135
//Submitter (Spill.Components.Submitter)
package Spill.Components {
import flash.display.*;
public dynamic class Submitter extends MovieClip {
}
}//package Spill.Components
Section 136
//MainTimeline (Submitter_fla.MainTimeline)
package Submitter_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import Spill.Components.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var submitter:Submitter;
public function MainTimeline(){
addFrameScript(0, frame1);
}
function frame1(){
submitter = new Submitter();
submitter.addEventListener(Event.COMPLETE, SubmiterComponentInitialized);
submitter.addEventListener(IOErrorEvent.IO_ERROR, FailedToLoadSubmitter);
submitter.addEventListener("LoadingFailed", FailedToInitialiseSubmitter);
submitter._O0000Ol01(parent, "ExampleGame", "ExampleGame.html", 0, "normal", "", 0, 0, 1, true, 1);
submitter = new Submitter();
submitter.addEventListener(Event.COMPLETE, SubmiterComponentInitialized);
submitter.addEventListener(IOErrorEvent.IO_ERROR, FailedToLoadSubmitter);
submitter.addEventListener("LoadingFailed", FailedToInitialiseSubmitter);
submitter._O0000Ol01(parent, "ExampleGame", "ExampleGame.html", 0, "normal", "", 0, 0, 1, true, 1);
}
public function FailedToInitialiseSubmitter(_arg1:Event):void{
trace("Domain allowed:", submitter.isDomainAllowed());
trace("Submitter failed to initialize, probably the domain on which you are running the game is not allowed to make use of the submitter");
submitter.removeEventListener(Event.COMPLETE, SubmiterComponentInitialized);
submitter.addEventListener(IOErrorEvent.IO_ERROR, FailedToLoadSubmitter);
submitter.removeEventListener("LoadingFailed", FailedToInitialiseSubmitter);
submitter = null;
}
public function FailedToLoadSubmitter(_arg1:Event):void{
trace("Domain allowed:", submitter.isDomainAllowed());
trace("Submitter failed to load");
submitter.removeEventListener(Event.COMPLETE, SubmiterComponentInitialized);
submitter.addEventListener(IOErrorEvent.IO_ERROR, FailedToLoadSubmitter);
submitter.removeEventListener("LoadingFailed", FailedToInitialiseSubmitter);
submitter = null;
}
public function SubmiterComponentInitialized(_arg1:Event=null):void{
submitter.removeEventListener(Event.COMPLETE, SubmiterComponentInitialized);
trace("Domain allowed:", submitter.isDomainAllowed());
submitter.submitGrantAward("Award_Tag");
submitter.submitScore(346);
}
}
}//package Submitter_fla
Section 137
//Attach (util.Attach)
package util {
import flash.display.*;
import flash.media.*;
import flash.utils.*;
public class Attach {
public function Attach(){
super();
}
public static function getSound(s:String):Sound{
var temp:Class = (getDefinitionByName(s) as Class);
var returnObj:Sound = new (temp);
return (returnObj);
}
public static function getMovieClip(s:String):MovieClip{
var temp:Class = (getDefinitionByName(s) as Class);
var returnObj:MovieClip = new (temp);
return (returnObj);
}
public static function getSprite(s:String):Sprite{
var temp:Class = (getDefinitionByName(s) as Class);
var returnObj:Sprite = new (temp);
return (returnObj);
}
public static function getBitmapData(s:String):BitmapData{
var temp:Class = (getDefinitionByName(s) as Class);
var returnObj:BitmapData = new temp(null, null);
return (returnObj);
}
}
}//package util
Section 138
//BindButton (util.BindButton)
package util {
import flash.display.*;
import flash.events.*;
public class BindButton extends MovieClip {
public function BindButton(){
super();
initEvent();
this.mouseChildren = false;
this.buttonMode = true;
}
private function mouseOutEvent(event:MouseEvent):void{
this.gotoAndStop(1);
}
private function mouseOverEvent(event:MouseEvent):void{
SoundsManager.instance.playSound("menu_touchs", 1);
this.gotoAndStop(2);
}
private function initEvent():void{
this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverEvent);
this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutEvent);
}
public function delEvent():void{
this.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverEvent);
this.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutEvent);
}
}
}//package util
Section 139
//Config (util.Config)
package util {
public class Config {
public static const car2MinimumValue:Number = 250;
public static const _borderLeft:Number = 15;
public static const _borderUp:Number = 100;
public static const car1MaxValue:Number = 170;
public static const car2MaxValue:Number = 275;
public static const car3MaxValue:Number = 360;
public static const car1MinimumValue:Number = 155;
public static const car3MinimumValue:Number = 335;
public static const _borderDown:Number = 355;
public static const _borderRight:Number = 560;
public static var award1Flag:Boolean = Cookie.instance.achi["achi1"];
public static var guest_every_gap:Number = 500;
public static var _tarSpeed:Number = _streetSpeed;
public static var showLastInformation:Boolean = false;
public static var estopBoyRun:Boolean = false;
public static var markRunFlag:Boolean = false;
public static var _maxStreetSpeed1:Number = 20;
public static var target_pizza_num:int = 5;
public static var _loadingCompleteFlag:Boolean = false;
public static var award5Flag:Boolean = Cookie.instance.achi["achi5"];
public static var successed_pizza_num:int = 0;
public static var levelTimeArr:Array = new Array(16, 20, 28, 40);
public static var levelControl:Boolean = false;
public static var pizza_time_gap:Number = 160;
public static var _pizzaSpeed:Number = _streetSpeed;
public static var _streetSpeed:Number = 8;
public static var award3Flag:Boolean = Cookie.instance.achi["achi3"];
public static var level3Flag:Boolean = false;
public static var pizza_num:int = 20;
public static var coin_time_gap:Number = 150;
public static var initBoyRun:Boolean = false;
public static var musicFrame:int = 1;
public static var list_coin_num:int = 7;
public static var total_coin_num:int = 0;
public static var award2Flag:Boolean = Cookie.instance.achi["achi2"];
public static var _pizzaBoySpeed:Number = (_streetSpeed * 0.5);
public static var totalScores:int;
public static var inforMoveFlag:Boolean = false;
public static var coin_every_gap:Number = 40;
public static var stopFlag:Boolean = false;
public static var levelMcEndPosition:Number = 220;
public static var currentLevel:int = 1;
public static var describeArr:Array = new Array([84, 36], [96, 37.65], [90, 54], [98, 37.35], [103, 41], [100, 40]);
public static var levelLength:Number = 10;
public static var award4Flag:Boolean = Cookie.instance.achi["achi4"];
public static var tar_every_gap:Number = 300;
public static var totalLevel:int = 4;
public static var qualityFrame:int = 1;
public static var stopButtonAndLevelRunFlag:Boolean = false;
public static var levelMcInforPosition:Number = 150;
public static var soundFrame:int = 1;
public static var _coinSpeed:Number = _streetSpeed;
public static var _tarCound:int = 0;
public static var pizza_every_gap:Number = 200;
public static var level4Flag:Boolean = false;
public static var tar_time_gap:Number = 450;
public static var _passGameMenu:Boolean = false;
public static var level2Flag:Boolean = false;
public static var pizzaIsHitting:Boolean = false;
public static var passfilmdescri:int = 0;
public static var coin_num:int = 0;
public static var _minStreetSpeed1:Number = 8;
public static var _minStreetSpeed2:Number = 14;
public static var _minStreetSpeed3:Number = 16;
public static var _minStreetSpeed4:Number = 20;
public static var _throwPizzaSpeed:Number = 15;
public static var _commitFlag:Boolean = false;
public static var guest_time_gap:Number = 200;
public static var moveFlag:Boolean = false;
public static var coin_group_gap:Number = 300;
public static var _maxStreetSpeed2:Number = 22;
public static var _maxStreetSpeed3:Number = 30;
public static var isBoyRunFlag:Boolean = false;
public static var effectStarOver:Boolean = true;
public static var finishAllGate:Boolean = false;
public static var _cupLevelShow:Boolean = true;
public static var _maxStreetSpeed4:Number = 40;
public function Config(){
super();
}
public static function conf():void{
if (Config.currentLevel == 1){
Config.pizza_num = 10;
Config.coin_num = 0;
Config.total_coin_num = 0;
Config.successed_pizza_num = 0;
Config.target_pizza_num = 4;
Config._streetSpeed = Config._minStreetSpeed1;
Config.levelLength = 16;
Config.showLastInformation = false;
} else {
if (Config.currentLevel == 2){
Config.pizza_num = 15;
Config.coin_num = 0;
Config.total_coin_num = 0;
Config.successed_pizza_num = 0;
Config.target_pizza_num = 10;
Config.guest_time_gap = 170;
Config.tar_time_gap = 270;
Config._streetSpeed = Config._minStreetSpeed2;
Config.levelLength = 11;
Config.showLastInformation = false;
} else {
if (Config.currentLevel == 3){
Config.pizza_num = 15;
Config.coin_num = 0;
Config.total_coin_num = 0;
Config.successed_pizza_num = 0;
Config.target_pizza_num = 15;
Config.guest_time_gap = 140;
Config.tar_time_gap = 230;
Config.showLastInformation = false;
Config.levelLength = 9;
Config._streetSpeed = Config._minStreetSpeed3;
} else {
if (Config.currentLevel == 4){
Config.pizza_num = 30;
Config.coin_num = 0;
Config.total_coin_num = 0;
Config.successed_pizza_num = 0;
Config.target_pizza_num = 30;
Config.guest_time_gap = 110;
Config.tar_time_gap = 200;
Config.levelLength = 7;
Config._streetSpeed = Config._minStreetSpeed4;
Config.showLastInformation = false;
};
};
};
};
}
}
}//package util
Section 140
//Cookie (util.Cookie)
package util {
import flash.net.*;
public class Cookie {
private const NAME:String = "Rush_Rush_Santa";
private static var _instance:Cookie;
private static var _share:SharedObject;
private static var _data:Object;
public function Cookie():void{
super();
init();
}
public function get money():Object{
return (_data["money"]);
}
private function initData():void{
_data = _share.data;
initMaxLev();
initCurMoney();
initGridding();
initThermometer();
initSound();
initAchi();
initCupLevelShow();
}
private function initAchi():void{
var temp:Object;
if (_data["achi"] == null){
temp = {achi1:false, achi2:false, achi3:false, achi4:false, achi5:false};
_data["achi"] = temp;
};
}
public function get achi():Object{
return (_data["achi"]);
}
public function get lev():Object{
return (_data["lev"]);
}
public function get thermometer():Object{
return (_data["thermometer"]);
}
private function initMaxLev():void{
var temp:Object;
if (_data["lev"] == null){
temp = {maxLev:1};
_data["lev"] = temp;
};
}
public function get show():Object{
return (_data["show"]);
}
private function initShare():void{
_share = SharedObject.getLocal(NAME, "/");
}
public function init():void{
initShare();
initData();
}
public function del():void{
_share.close();
}
private function initCupLevelShow():void{
var temp:Object;
if (_data["show"] == null){
temp = {showIs:true};
_data["show"] = temp;
};
}
private function initGridding():void{
var temp:Object;
if (_data["gridding"] == null){
temp = {griddingLengthNumber:6};
_data["gridding"] = temp;
};
}
private function initCurMoney():void{
var temp:Object;
if (_data["money"] == null){
temp = {curMoney:0};
_data["money"] = temp;
};
}
public function get gridding():Object{
return (_data["gridding"]);
}
private function initThermometer():void{
var temp:Object;
if (_data["thermometer"] == null){
temp = {thermometerLev:1};
_data["thermometer"] = temp;
};
}
public function get sound():Object{
return (_data["sound"]);
}
private function initSound():void{
var temp:Object;
if (_data["sound"] == null){
temp = {soundOn:true};
_data["sound"] = temp;
};
}
public static function get instance():Cookie{
if (_instance == null){
_instance = new (Cookie);
};
return (_instance);
}
public static function get data():Object{
return (_data);
}
public static function flush():void{
_share.flush();
}
public static function clear():void{
_share.clear();
}
}
}//package util
Section 141
//Dispatch_GooGleEventAndAwardScores (util.Dispatch_GooGleEventAndAwardScores)
package util {
import zlong.spilSystemTool.*;
public class Dispatch_GooGleEventAndAwardScores {
public function Dispatch_GooGleEventAndAwardScores(){
super();
}
public static function Award_Fourth():void{
if (Cookie.instance.achi["achi4"] == false){
Trace("----submitAchievement award4");
Award_HighScore.instance.submitAchievement("award4");
Cookie.instance.achi["achi4"] = true;
};
}
public static function GooGle_mainmenu():void{
Trace("-----mainscreen viewed ");
GoogleEvent.instance.gaTrackEvent("mainscreen viewed ");
}
public static function Award_Second():void{
if (Cookie.instance.achi["achi2"] == false){
Trace("----submitAchievement award2");
Award_HighScore.instance.submitAchievement("award2");
Cookie.instance.achi["achi2"] = true;
};
}
public static function Award_Fiveth():void{
if (Cookie.instance.achi["achi5"] == false){
Trace("----submitAchievement award5");
Award_HighScore.instance.submitAchievement("award5");
Cookie.instance.achi["achi5"] = true;
};
}
public static function GooGle_AllLevel():void{
Trace("-----google Game Complete ");
GoogleEvent.instance.gaTrackEvent("Game Complete");
}
public static function GooGle_FirstLevel():void{
Trace("-----google First Level Complete ");
GoogleEvent.instance.gaTrackEvent("First Level Complete ");
}
public static function Award_Third():void{
if (Cookie.instance.achi["achi3"] == false){
Trace("----submitAchievement award3");
Award_HighScore.instance.submitAchievement("award3");
Cookie.instance.achi["achi3"] = true;
};
}
public static function Award_first():void{
if (Cookie.instance.achi["achi1"] == false){
Trace("----submitAchievement award1");
Award_HighScore.instance.submitAchievement("award1");
Cookie.instance.achi["achi1"] = true;
};
}
}
}//package util
Section 142
//EffectClass (util.EffectClass)
package util {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class EffectClass extends MovieClip {
private var _str:String;
private var _effectMc:MovieClip;
private var _pmc:Sprite;
private var _curFrame:int;// = 0
private var _star:MovieClip;
private var _x:Number;
private var _y:Number;
public function EffectClass(r:Sprite, xx:Number, yy:Number, str:String){
super();
_pmc = r;
_x = xx;
_y = yy;
_str = str;
initDis();
initEvent();
}
private function starRun(event:Event):void{
if (_star.currentFrame == 18){
_star.stop();
_star.removeEventListener(Event.ENTER_FRAME, frameRun);
if (_pmc.contains((_effectMc as Sprite))){
_pmc.removeChild(_effectMc);
Config.effectStarOver = true;
};
};
}
public function set xx(n:Number):void{
_x = n;
_effectMc.x = _x;
}
private function frameRun(event:Event):void{
if (_str == "success"){
if (Config.inforMoveFlag == false){
_effectMc.stop();
_effectMc.removeEventListener(Event.ENTER_FRAME, frameRun);
_pmc.removeChild(_effectMc);
};
if (Config.inforMoveFlag == true){
if (_effectMc.currentFrame == _effectMc.totalFrames){
_effectMc.stop();
_effectMc.removeEventListener(Event.ENTER_FRAME, frameRun);
_pmc.removeChild(_effectMc);
Config.inforMoveFlag = false;
};
};
};
if ((((_str == "message")) || ((_str == "Good_Effects")))){
if (_effectMc.currentFrame == _effectMc.totalFrames){
_effectMc.stop();
_effectMc.removeEventListener(Event.ENTER_FRAME, frameRun);
_pmc.removeChild(_effectMc);
};
};
if ((((((((((((((_str == "getPizzaEffect")) || ((_str == "getCoinEffect")))) || ((_str == "WellDoneEffect")))) || ((_str == "guestGetPizzas")))) || ((_str == "coin_disappear")))) || ((_str == "pizza_disappear")))) || ((_str == "pizzahasbroken")))){
if (_effectMc.currentFrame == _effectMc.totalFrames){
_effectMc.stop();
_effectMc.removeEventListener(Event.ENTER_FRAME, frameRun);
_pmc.removeChild(_effectMc);
Config.pizzaIsHitting = false;
};
};
if ((((_str == "levelEffect")) || ((_str == "IWantPizza")))){
if (_effectMc.currentFrame == _effectMc.totalFrames){
_effectMc.stop();
_effectMc.removeEventListener(Event.ENTER_FRAME, frameRun);
_pmc.removeChild(_effectMc);
};
};
if (_str == "masks"){
if (Config.markRunFlag == true){
if (_curFrame == 0){
if (_effectMc.currentFrame == _effectMc.totalFrames){
_effectMc.stop();
_effectMc.removeEventListener(Event.ENTER_FRAME, frameRun);
_pmc.removeChild(_effectMc);
Config._tarCound = 0;
};
} else {
if (_curFrame > 0){
if (_effectMc.currentFrame != _curFrame++){
_effectMc.gotoAndPlay(_curFrame);
};
if (_effectMc.currentFrame == _effectMc.totalFrames){
_effectMc.stop();
_effectMc.removeEventListener(Event.ENTER_FRAME, frameRun);
_pmc.removeChild(_effectMc);
Config._tarCound = 0;
};
};
};
} else {
if (Config.markRunFlag == false){
_curFrame = _effectMc.currentFrame;
_effectMc.gotoAndStop(_curFrame);
};
};
};
}
private function initEvent():void{
_effectMc.addEventListener(Event.ENTER_FRAME, frameRun);
}
public function get yy():Number{
return (_y);
}
public function get xx():Number{
return (_x);
}
public function set yy(n:Number):void{
_y = n;
_effectMc.y = _y;
}
private function initDis():void{
if (_str == "Good_Effects"){
_effectMc = new (getDefinitionByName("Good_Effects"));
_effectMc.scaleX = 1.5;
_effectMc.scaleY = 1.5;
};
if (_str == "IWantPizza"){
_effectMc = new (getDefinitionByName("IWantPizza"));
_effectMc.scaleX = 2;
_effectMc.scaleY = 2;
};
if (_str == "message"){
_effectMc = new (getDefinitionByName("messigebox2"));
_effectMc.scaleX = 2;
_effectMc.scaleY = 2;
};
if (_str == "masks"){
_effectMc = new (getDefinitionByName("masks"));
_effectMc.scaleX = 4;
_effectMc.scaleY = 4;
SoundsManager.instance.playSound("tarMark", 1);
};
if (_str == "coin_disappear"){
_effectMc = new (getDefinitionByName("coin_disappear"));
_effectMc.scaleX = 0.25;
_effectMc.scaleY = 0.25;
};
if (_str == "pizza_disappear"){
_effectMc = new (getDefinitionByName("pizza_disappear"));
};
if (_str == "pizzahasbroken"){
_effectMc = new (getDefinitionByName("pizzahasbroken"));
_effectMc.scaleX = 1.5;
_effectMc.scaleY = 1.5;
};
if (_str == "getCoinEffect"){
_effectMc = new (getDefinitionByName("getCoinEffect"));
_effectMc.scaleX = 1.2;
_effectMc.scaleY = 1.2;
};
if (_str == "getPizzaEffect"){
_effectMc = new (getDefinitionByName("getPizzaEffect"));
_effectMc.scaleX = 1.3;
_effectMc.scaleY = 1.3;
};
if (_str == "WellDoneEffect"){
_effectMc = new (getDefinitionByName("WellDoneEffect"));
};
if (_str == "levelEffect"){
_effectMc = new (getDefinitionByName("levelEffect"));
};
if (_str == "guestGetPizzas"){
_effectMc = new (getDefinitionByName("guestGetPizzas"));
};
if (_str == "success"){
_effectMc = new (getDefinitionByName("success"));
_effectMc.scaleX = 0.2;
_effectMc.scaleY = 0.2;
};
if (_str == "hitCarEffect"){
SoundsManager.instance.playSound("pong", 1);
_effectMc = new (getDefinitionByName("hitCarEffect"));
_effectMc.scaleX = 0.3;
_effectMc.scaleY = 0.3;
_star = _effectMc["star"];
_star.addEventListener(Event.ENTER_FRAME, starRun);
};
_effectMc.cacheAsBitmap = true;
_effectMc.x = _x;
_effectMc.y = _y;
_pmc.addChild(_effectMc);
}
}
}//package util
Section 143
//GC (util.GC)
package util {
import flash.net.*;
public class GC {
public function GC(){
super();
}
public static function clear():void{
new LocalConnection().connect("haha");
new LocalConnection().connect("haha");
//unresolved jump
var _slot1 = error;
}
}
}//package util
Section 144
//Particle (util.Particle)
package util {
public class Particle {
public var vx:Number;
public var vy:Number;
public var lifeTotal:uint;
public var lifeTime:uint;
public var color:uint;
public var next:Particle;
public var x:Number;
public var y:Number;
public function Particle(){
super();
}
}
}//package util
Section 145
//Snow (util.Snow)
package util {
import flash.display.*;
public class Snow extends Particle {
public var scale:Number;
private static const R:int = 4;
private static var instance:Snow = new (Snow);
;
public static var bitmap:BitmapData;
public function Snow(){
super();
if (instance){
instance.draw();
instance = null;
};
}
private function draw():void{
trace("snow drawing");
var snow:Shape = new Shape();
var g:Graphics = snow.graphics;
g.beginFill(0xFFFFFF);
g.drawCircle(R, R, R);
g.endFill();
bitmap = new BitmapData((2 * R), (2 * R), true, 0);
bitmap.draw(snow);
}
}
}//package util
Section 146
//SoundsManager (util.SoundsManager)
package util {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class SoundsManager extends EventDispatcher {
private const VALUE_FADE:Number = 0.02;
private var fadeInTimer:Timer;
private var curMusic_sc:SoundChannel;
private var curMusic_so:Sound;
private var valueSound:Number;
private var valueGroupSound:Number;
private var fadeTimes:int;
private var fadeInLabel:String;
private var valueMusic:Number;
private var fadeOutTimer:Timer;
private var curMusic_st:String;
private var enabled:Boolean;
private var pauseMusic_st:String;
private var soundArr:Array;
private var musicEnabled:Boolean;
private var currGroupSoundId:int;
private var groupSoundArr:Array;
private var curMusic_rp:int;
private var pausePos:Number;
private static var currentInstance:SoundsManager;
public function SoundsManager(){
super();
init();
}
private function initGroupSound():void{
var obj:Object = groupSoundArr[currGroupSoundId];
obj["soundChannel"] = obj["sound"].play(0, 0, new SoundTransform(valueGroupSound));
initGroupSoundChannelEvent(obj["soundChannel"]);
}
public function get ValueGroupSound():Number{
return (valueGroupSound);
}
public function set ValueSound(n:Number):void{
var i:int;
var transform:SoundTransform;
valueSound = n;
if (soundArr != null){
i = 0;
while (i < soundArr.length) {
transform = soundArr[i]["soundChannel"].soundTransform;
transform.volume = n;
soundArr[i]["soundChannel"].soundTransform = transform;
i++;
};
};
}
private function stopFadeIn():void{
var transform:SoundTransform;
if (((curMusic_sc) && (curMusic_sc.soundTransform))){
transform = curMusic_sc.soundTransform;
transform.volume = valueMusic;
curMusic_sc.soundTransform = transform;
delFadeInTimer();
};
}
public function set ValueGroupSound(n:Number):void{
var transform:SoundTransform;
valueGroupSound = n;
if (groupSoundArr != null){
transform = groupSoundArr[currGroupSoundId]["soundChannel"].soundTransform;
transform.volume = n;
groupSoundArr[currGroupSoundId]["soundChannel"].soundTransform = transform;
};
}
private function remSoundArr(sc:SoundChannel):void{
var obj:Object;
var i:int;
while (i < soundArr.length) {
obj = soundArr[i];
if (((obj["soundChannel"]) && ((obj["soundChannel"] == sc)))){
obj["soundChannel"].stop();
obj["label"] = null;
obj["sound"] = null;
obj["soundChannel"] = null;
soundArr.splice(i, 1);
};
i++;
};
}
public function stopAllSound():void{
var i:int;
while (i < soundArr.length) {
delSound(soundArr[i]["soundChannel"]);
i++;
};
}
public function get FadeTimes():int{
return (fadeTimes);
}
public function fadeOutMusic():void{
if (curMusic_sc != null){
startFadeOut();
};
}
public function set FadeTimes(v:int):void{
fadeTimes = v;
}
public function get curMusic_sound():Sound{
return (curMusic_so);
}
private function init():void{
FadeTimes = 300;
Enabled = true;
MusicEnable = true;
ValueMusic = 1;
ValueSound = 1;
valueGroupSound = 1;
soundArr = new Array();
groupSoundArr = new Array();
}
private function initMusicSoundChannel(musicChannel:SoundChannel):void{
if (!musicChannel){
return;
};
if (curMusic_sc){
curMusic_sc.removeEventListener(Event.SOUND_COMPLETE, musicCompleteHandler);
curMusic_sc = null;
};
curMusic_sc = musicChannel;
curMusic_sc.addEventListener(Event.SOUND_COMPLETE, musicCompleteHandler);
}
private function addSoundArr(obj:Object):void{
soundArr.push(obj);
}
public function overOldSound(s:String, v:Number, loops:int=0):void{
var same:Boolean;
var obj:Object;
var i:int;
if (enabled){
same = false;
i = 0;
while (i < soundArr.length) {
obj = soundArr[i];
if (obj["label"] == s){
same = true;
break;
};
i++;
};
if (same){
delSound(obj["soundChannel"]);
};
playSound(s, v, loops);
};
}
public function delAllTimer():void{
if (fadeInTimer != null){
fadeInTimer.removeEventListener(TimerEvent.TIMER, fadeIn);
fadeInTimer = null;
};
if (fadeOutTimer != null){
fadeOutTimer.removeEventListener(TimerEvent.TIMER, fadeOut);
fadeOutTimer = null;
};
}
private function startFadeIn(s:String, t:int):void{
initMusic(s, 0.3, t);
initFadeInTimer();
}
public function set ValueMusic(n:Number):void{
var transform:SoundTransform;
valueMusic = n;
if (curMusic_sc != null){
transform = curMusic_sc.soundTransform;
transform.volume = n;
curMusic_sc.soundTransform = transform;
};
}
public function stopSound(s:String):void{
var obj:Object;
var i:int;
while (i < soundArr.length) {
obj = soundArr[i];
if (obj["label"] == s){
delSound(obj["soundChannel"]);
break;
};
i++;
};
}
public function get Enabled():Boolean{
return (enabled);
}
private function delGroupSoundChannelEvent(sc:SoundChannel):void{
sc.removeEventListener(Event.SOUND_COMPLETE, groupSoundCompleteHandler);
}
private function fadeOut(e:TimerEvent):void{
var transform:SoundTransform;
if (curMusic_sc){
transform = curMusic_sc.soundTransform;
transform.volume = (transform.volume - VALUE_FADE);
curMusic_sc.soundTransform = transform;
if (curMusic_sc.soundTransform.volume <= 0){
stopFadeOut();
};
};
}
public function playSound(s:String, v:Number, loops:int=0):void{
if (enabled){
initSound(s, v, loops);
};
}
public function get ValueSound():Number{
return (valueSound);
}
public function get currentMusic_sc():String{
if (curMusic_sc == null){
return (null);
};
return (curMusic_st);
}
private function delSound(sc:SoundChannel):void{
delSoundChannelEvent(sc);
remSoundArr(sc);
}
private function fadeIn(e:TimerEvent):void{
var transform:SoundTransform;
if (curMusic_sc){
transform = curMusic_sc.soundTransform;
transform.volume = (transform.volume + VALUE_FADE);
curMusic_sc.soundTransform = transform;
if (curMusic_sc.soundTransform.volume >= valueMusic){
stopFadeIn();
};
};
}
public function set Enabled(b:Boolean):void{
enabled = b;
if (b){
} else {
stopAllSound();
};
}
public function overNewSound(s:String, v:Number, loops:int=0):void{
var same:Boolean;
var obj:Object;
var i:int;
if (enabled){
same = false;
i = 0;
while (i < soundArr.length) {
obj = soundArr[i];
if (obj["label"] == s){
same = true;
break;
};
i++;
};
if (!same){
playSound(s, v, loops);
};
};
}
public function pauseMusic():void{
if (curMusic_sc != null){
pausePos = curMusic_sc.position;
curMusic_sc.stop();
curMusic_sc = null;
pauseMusic_st = curMusic_st;
};
}
public function set MusicEnable(b:Boolean):void{
musicEnabled = b;
if (curMusic_st != null){
if (b){
restartMusic();
} else {
pauseMusic();
};
};
}
private function delGroupSound():void{
var obj:Object = groupSoundArr[currGroupSoundId];
obj["soundChannel"].stop();
obj["soundChannel"] = null;
}
public function restartMusic():void{
var musicChannel:SoundChannel;
if (pauseMusic_st == curMusic_st){
musicChannel = curMusic_so.play(pausePos, 1, new SoundTransform(valueMusic));
initMusicSoundChannel(musicChannel);
pausePos = NaN;
} else {
initMusic(curMusic_st, ValueMusic);
};
}
private function stopFadeOut():void{
delFadeOutTimer();
delMusic();
if (fadeInLabel != null){
initMusic(fadeInLabel, 0, curMusic_rp);
initFadeInTimer();
fadeInLabel = null;
};
}
public function playMusic(s:String, v:Number, t:int=2147483647):void{
curMusic_st = s;
curMusic_rp = t;
if (musicEnabled){
if (curMusic_sc != null){
stopMusic();
};
initMusic(s, v, t);
};
}
public function overNewMusic(s:String, v:Number):void{
if (((!((curMusic_st == s))) && (musicEnabled))){
playMusic(s, v);
};
}
private function delMusic():void{
if (curMusic_sc){
curMusic_sc.stop();
curMusic_sc.removeEventListener(Event.SOUND_COMPLETE, musicCompleteHandler);
curMusic_sc = null;
};
curMusic_st = null;
curMusic_so = null;
}
private function delFadeOutTimer():void{
fadeOutTimer.stop();
fadeOutTimer.removeEventListener(TimerEvent.TIMER, fadeOut);
fadeOutTimer = null;
}
private function initSound(s:String, v:Number, loops:int):void{
var obj:Object = new Object();
obj["label"] = s;
obj["sound"] = getSound(s);
obj["soundChannel"] = obj["sound"].play(0, loops, new SoundTransform(v));
initSoundChannelEvent(obj["soundChannel"]);
addSoundArr(obj);
}
private function getSound(s:String):Sound{
var temp:Class = (getDefinitionByName(s) as Class);
var returnObj:Sound = new (temp);
return (returnObj);
}
private function groupSoundCompleteHandler(e:Event):void{
delGroupSound();
currGroupSoundId++;
if (currGroupSoundId == groupSoundArr.length){
currGroupSoundId = 0;
};
initGroupSound();
}
public function get ValueMusic():Number{
return (valueMusic);
}
public function fadeInMusic(s:String, t:int=2147483647):void{
curMusic_st = s;
curMusic_rp = t;
if (musicEnabled){
if (curMusic_sc != null){
fadeInLabel = s;
startFadeOut();
} else {
startFadeIn(s, t);
};
};
}
public function stopMusic():void{
if (curMusic_sc != null){
delMusic();
};
}
public function setOneValueSound(s:String, n:Number):void{
var transform:SoundTransform;
var i:int;
while (i < soundArr.length) {
if (s == soundArr[i]["label"]){
transform = soundArr[i]["soundChannel"].soundTransform;
};
transform.volume = n;
soundArr[i]["soundChannel"].soundTransform = transform;
i++;
};
}
private function initFadeOutTimer():void{
if (fadeOutTimer){
return;
};
if (fadeInTimer){
delFadeInTimer();
};
fadeOutTimer = new Timer((fadeTimes / (valueMusic / VALUE_FADE)));
fadeOutTimer.addEventListener(TimerEvent.TIMER, fadeOut);
fadeOutTimer.start();
}
private function musicCompleteHandler(event:Event):void{
var musicChannel:SoundChannel;
curMusic_rp--;
if (curMusic_rp > 0){
musicChannel = curMusic_so.play(0, 1, new SoundTransform(valueMusic));
initMusicSoundChannel(musicChannel);
};
}
private function initSoundChannelEvent(sc:SoundChannel):void{
if (sc){
sc.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
};
}
public function get MusicEnable():Boolean{
return (musicEnabled);
}
public function stopGroupSound():void{
var obj:Object;
if (groupSoundArr != null){
obj = groupSoundArr[currGroupSoundId];
if (obj != null){
delGroupSoundChannelEvent(obj["soundChannel"]);
delGroupSound();
};
groupSoundArr = new Array();
currGroupSoundId = NaN;
};
}
private function delSoundChannelEvent(sc:SoundChannel):void{
if (sc){
sc.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
};
}
private function initMusic(s:String, v:Number, t:int=2147483647):void{
curMusic_st = s;
curMusic_so = getSound(s);
curMusic_rp = t;
curMusic_sc = curMusic_so.play(0, 1, new SoundTransform(v));
initMusicSoundChannel(curMusic_sc);
}
private function initFadeInTimer():void{
if (fadeInTimer){
return;
};
if (fadeOutTimer){
delFadeOutTimer();
};
fadeInTimer = new Timer((fadeTimes / (valueMusic / VALUE_FADE)));
fadeInTimer.addEventListener(TimerEvent.TIMER, fadeIn);
fadeInTimer.start();
}
private function initGroupSoundChannelEvent(sc:SoundChannel):void{
sc.addEventListener(Event.SOUND_COMPLETE, groupSoundCompleteHandler);
}
private function delFadeInTimer():void{
fadeInTimer.stop();
fadeInTimer.removeEventListener(TimerEvent.TIMER, fadeIn);
fadeInTimer = null;
}
private function soundCompleteHandler(e:Event):void{
delSound((e.target as SoundChannel));
}
public function addAllTimer():void{
if (fadeInTimer == null){
fadeInTimer = new Timer((fadeTimes / (valueMusic / VALUE_FADE)));
fadeInTimer.addEventListener(TimerEvent.TIMER, fadeIn);
fadeInTimer.start();
};
if (fadeOutTimer == null){
fadeOutTimer = new Timer((fadeTimes / (valueMusic / VALUE_FADE)));
fadeOutTimer.addEventListener(TimerEvent.TIMER, fadeOut);
fadeOutTimer.start();
};
}
private function startFadeOut():void{
initFadeOutTimer();
}
public static function get instance():SoundsManager{
if (currentInstance == null){
currentInstance = new (SoundsManager);
};
return (currentInstance);
}
}
}//package util
Section 147
//AbstractEffect (zlong.breathxue.utils.animationEffect.AbstractEffect)
package zlong.breathxue.utils.animationEffect {
import flash.display.*;
import flash.utils.*;
import zlong.breathxue.utils.*;
public class AbstractEffect {
protected var _mc:DisplayObject;
protected var _id:uint;
protected var _isMerge:Boolean;
protected var _runframe:uint;
protected var _stepframe:uint;
protected var _frameTimerId:uint;
protected var _running:Boolean;
breathxue_utils_internal static const VERSION:String = "v1.15.201008201148";
public function AbstractEffect(){
super();
if (getQualifiedClassName(this) == "zlong::breathxue::utils::animationEffect::AbstractEffect"){
throw (new ArgumentError("can't be constructed"));
};
}
protected function initAbSet(id:uint, mc:DisplayObject, runframe:uint, isMerge:Boolean):void{
this._id = id;
this._mc = mc;
this._isMerge = isMerge;
this._runframe = runframe;
this._stepframe = 0;
this._frameTimerId = 0;
this._running = true;
if (this._mc == null){
throw (new ArgumentError("mc can't = null"));
};
}
function checkFinish():Boolean{
return (true);
}
function step():void{
}
function dispatchEvent():void{
}
function pause():void{
this._running = false;
if (this._frameTimerId != 0){
FrameTimer.pauseById(this._frameTimerId);
};
}
function reStart():void{
this._running = true;
if (this._frameTimerId != 0){
FrameTimer.reStartById(this._frameTimerId);
};
}
function del():void{
}
protected function delMeByFrameTimer():void{
this._frameTimerId = 0;
var _local1 = getDefinitionByName(getQualifiedClassName(this));
_local1["del"](this._id);
this.dispatchEvent();
}
function get mc():DisplayObject{
return (this._mc);
}
function get isMerge():Boolean{
return (this._isMerge);
}
function get id():uint{
return (this._id);
}
}
}//package zlong.breathxue.utils.animationEffect
Section 148
//EffectManager (zlong.breathxue.utils.animationEffect.EffectManager)
package zlong.breathxue.utils.animationEffect {
import flash.display.*;
import flash.events.*;
import zlong.breathxue.utils.animationEffect.*;
import zlong.breathxue.utils.*;
class EffectManager {
public var IdCount:uint;
private var _arr:Array;
breathxue_utils_internal static const VERSION:String = "v1.15.201008201148";
function EffectManager():void{
super();
this.IdCount = 0;
this._arr = new Array();
}
public function push(effect:AbstractEffect):uint{
this._arr.push(effect);
if (this._arr.length > 0){
GoddenEnterFrame.instance.addEventListener(Event.ENTER_FRAME, this.run);
};
return (this.IdCount++);
}
function findAndDeleteSameMcEffect(mc:DisplayObject, isMerge:Boolean):AbstractEffect{
var tempEffect:AbstractEffect;
var i:int = (this._arr.length - 1);
while (i >= 0) {
tempEffect = this._arr[i];
if (tempEffect.mc == mc){
if (((isMerge) && (tempEffect.isMerge))){
return (tempEffect);
};
this._arr.splice(i, 1);
};
i--;
};
return (null);
}
private function run(event:Event):void{
var tempEffect:AbstractEffect;
var tmc:AbstractEffect;
var i:int;
while (i < this._arr.length) {
tempEffect = this._arr[i];
if (tempEffect.checkFinish()){
tmc = (this._arr[i] as AbstractEffect);
this._arr.splice(i, 1);
tmc.dispatchEvent();
i--;
if (this._arr.length <= 0){
GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, this.run);
};
} else {
tempEffect.step();
};
i++;
};
}
public function del(id:uint):void{
var i:int;
while (i < this._arr.length) {
if ((this._arr[i] as AbstractEffect).id == id){
(this._arr[i] as AbstractEffect).del();
this._arr.splice(i, 1);
if (this._arr.length <= 0){
GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, this.run);
};
return;
};
i++;
};
}
public function delByMc(mc:DisplayObject):void{
var temp:AbstractEffect;
var i:int = (this._arr.length - 1);
while (i >= 0) {
temp = this._arr[i];
if (temp.mc == mc){
temp.del();
this._arr.splice(i, 1);
};
i--;
};
}
public function delAll():void{
var i:int;
while (i < this._arr.length) {
(this._arr[i] as AbstractEffect).del();
i++;
};
this._arr = new Array();
GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, this.run);
}
public function pauseAll():void{
var i:int;
while (i < this._arr.length) {
(this._arr[i] as AbstractEffect).pause();
i++;
};
GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, this.run);
}
public function reStartAll():void{
var i:int;
while (i < this._arr.length) {
(this._arr[i] as AbstractEffect).reStart();
i++;
};
GoddenEnterFrame.instance.addEventListener(Event.ENTER_FRAME, this.run);
}
}
}//package zlong.breathxue.utils.animationEffect
Section 149
//MoveEffect (zlong.breathxue.utils.animationEffect.MoveEffect)
package zlong.breathxue.utils.animationEffect {
import flash.display.*;
import flash.events.*;
import zlong.breathxue.utils.math.*;
import zlong.breathxue.utils.*;
public class MoveEffect extends AbstractEffect {
private var _position:mVector;
private var _EndPoint:mVector;
private var _stepVector:mVector;
breathxue_utils_internal static const VERSION:String = "v1.15.201008201148";
public static const Move_EFFECT_FINISH:String = "Move_EFFECT_FINISH";
private static var _effectManager:EffectManager = new EffectManager();
private function initSet(id:uint, mc:DisplayObject, StartPoint:mVector, EndPoint:mVector, stepDistance:Number, runframe:uint=0, stepVector:mVector=null, isMerge:Boolean=false, sameMcEffect:AbstractEffect=null):void{
super.initAbSet(id, mc, runframe, isMerge);
this._EndPoint = EndPoint;
this._stepVector = stepVector;
if ((((stepDistance == 0)) && ((runframe == 0)))){
throw (new ArgumentError("one of stepDistance or runframe need be setting"));
};
if (((!(this._EndPoint)) && (((!(stepVector)) || ((_runframe == 0)))))){
throw (new ArgumentError("if EndAlpha == NaN,then stepVector and runframe must be setting"));
};
if (StartPoint == null){
StartPoint = new mVector(_mc.x, _mc.y);
};
if (((isMerge) && (sameMcEffect))){
this._position = (sameMcEffect as MoveEffect)._position;
} else {
this._position = new mVector();
_mc.x = (this._position.x = StartPoint.x);
_mc.y = (this._position.y = StartPoint.y);
};
if (!this._EndPoint){
_frameTimerId = FrameTimer.push(new FrameTimer(_runframe), delMeByFrameTimer);
} else {
this._stepVector = this._EndPoint.minus(this._position);
if (_runframe > 0){
this._stepVector.multEquals((1 / (_runframe - _stepframe)));
} else {
this._stepVector.length = Math.abs(stepDistance);
};
};
}
override function step():void{
var tempStepDistance:Number;
if (!_running){
return;
};
if (this._EndPoint){
if (_runframe > 0){
this._stepVector = this._EndPoint.minus(this._position);
this._stepVector.multEquals((1 / (_runframe - _stepframe)));
_stepframe++;
} else {
tempStepDistance = this._stepVector.length;
this._stepVector = this._EndPoint.minus(this._position);
this._stepVector.length = Math.abs(tempStepDistance);
};
};
_mc.x = (this._position.x = (this._position.x + this._stepVector.x));
_mc.y = (this._position.y = (this._position.y + this._stepVector.y));
}
override function checkFinish():Boolean{
if (((this._EndPoint) && ((((((_runframe > 0)) && ((_stepframe >= _runframe)))) || ((this._EndPoint.minus(this._position).length <= Math.abs(this._stepVector.length))))))){
_mc.x = (this._position.x = this._EndPoint.x);
_mc.y = (this._position.y = this._EndPoint.y);
return (true);
};
return (false);
}
override function dispatchEvent():void{
_mc.dispatchEvent(new Event(Move_EFFECT_FINISH));
}
override function del():void{
this._position = null;
this._EndPoint = null;
this._stepVector = null;
if (_frameTimerId != 0){
FrameTimer.delById(_frameTimerId);
};
}
public static function push(mc:DisplayObject, StartPoint:mVector, EndPoint:mVector, stepDistance:Number, runframe:uint=0, stepVector:mVector=null, isMerge:Boolean=false):uint{
var sameMcEffect:AbstractEffect = _effectManager.findAndDeleteSameMcEffect(mc, isMerge);
var tempMoveEffect:MoveEffect = new (MoveEffect);
tempMoveEffect.initSet(_effectManager.IdCount, mc, StartPoint, EndPoint, stepDistance, runframe, stepVector, isMerge, sameMcEffect);
return (_effectManager.push(tempMoveEffect));
}
public static function del(id:uint):void{
_effectManager.del(id);
}
public static function delByMc(mc:DisplayObject):void{
_effectManager.delByMc(mc);
}
public static function delAll():void{
_effectManager.delAll();
}
public static function pauseAll():void{
_effectManager.pauseAll();
}
public static function reStartAll():void{
_effectManager.reStartAll();
}
}
}//package zlong.breathxue.utils.animationEffect
Section 150
//TC (zlong.breathxue.utils.debug.TC)
package zlong.breathxue.utils.debug {
import flash.display.*;
import flash.events.*;
import zlong.breathxue.utils.math.*;
import zlong.breathxue.utils.animationEffect.*;
import zlong.breathxue.utils.*;
import flash.text.*;
public class TC {
breathxue_utils_internal static const VERSION:String = "v1.15.201008201148";
static const TITLE_HEIGHT:int = 20;
private static var _tabArr:Array;
private static var _tabArrNum:Array;
static var _width:int;
static var _height:int;
private static var _MC:Sprite;
private static var _showMc:Sprite;
private static var _smallMc:Sprite;
private static var _smallMcPos:mVector;
private static var _nowEffect:Boolean;
public static function InitTC(mc:Sprite, width:int=0, height:int=0, startOpen:Boolean=true):void{
if (mc.stage == null){
return;
};
TcShow = true;
_smallMcPos = new mVector(0, -20);
if (width == 0){
width = ((mc.stage.stageWidth / 3) * 2);
};
if (height == 0){
height = ((mc.stage.stageHeight / 3) * 2);
};
_width = width;
_height = height;
_MC = new Sprite();
mc.addChild(_MC);
_MC.alpha = 0.5;
_tabArr = new Array();
_tabArrNum = new Array();
createShow();
createSmall(width);
if (!startOpen){
openAndClose();
};
_MC.addEventListener(Event.ENTER_FRAME, run);
}
private static function run(event:Event):void{
if (_MC.parent.getChildIndex(_MC) != (_MC.parent.numChildren - 1)){
_MC.parent.addChild(_MC);
};
}
private static function createShow():void{
_showMc = new Sprite();
_MC.addChild(_showMc);
_showMc.addChild(maketitle(_width));
var temp:TC_Tab = new TC_Tab(_showMc, "*", 0, 2);
_tabArr["*"] = temp;
_tabArrNum.push("*");
temp = new TC_Tab(_showMc, "&NT&", 1, 2);
temp.visible = true;
_tabArr["&NT&"] = temp;
_tabArrNum.push("&NT&");
_MC.stage.addEventListener(KeyboardEvent.KEY_DOWN, openAndClose);
}
private static function maketitle(w:int):DisplayObject{
var handMc:Sprite = new Sprite();
handMc.graphics.beginFill(11187199);
handMc.graphics.drawRect(0, 0, w, TITLE_HEIGHT);
handMc.graphics.endFill();
handMc.doubleClickEnabled = true;
var titleText:TextField = new TextField();
titleText.text = "Debug Text ('ctrl + d' open and close it)";
titleText.width = w;
titleText.height = TITLE_HEIGHT;
titleText.mouseEnabled = false;
titleText.selectable = false;
handMc.addChild(titleText);
var closeButton:Sprite = new Sprite();
closeButton.graphics.beginFill(0, 0);
closeButton.graphics.drawRect(0, 0, 18, 18);
closeButton.graphics.endFill();
closeButton.graphics.lineStyle(2, 4084223);
closeButton.graphics.moveTo(6, 6);
closeButton.graphics.lineTo(12, 12);
closeButton.graphics.moveTo(12, 6);
closeButton.graphics.lineTo(6, 12);
closeButton.x = (w - 19);
closeButton.y = 1;
handMc.addChild(closeButton);
closeButton.addEventListener(MouseEvent.CLICK, openAndClose);
handMc.addEventListener(MouseEvent.DOUBLE_CLICK, openAndClose);
handMc.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
handMc.addEventListener(MouseEvent.MOUSE_UP, endMove);
return (handMc);
}
private static function createSmall(w:int):void{
_smallMc = new Sprite();
_smallMc.x = _smallMcPos.x;
_smallMc.y = _smallMcPos.y;
var handMc:Sprite = new Sprite();
handMc.y = 0;
handMc.graphics.beginFill(11187199);
handMc.graphics.drawRect(0, 0, (w / 2), TITLE_HEIGHT);
handMc.graphics.endFill();
handMc.doubleClickEnabled = true;
var titleText:TextField = new TextField();
titleText.text = "Debug Text";
titleText.width = (w / 2);
titleText.height = TITLE_HEIGHT;
titleText.mouseEnabled = false;
titleText.selectable = false;
handMc.addChild(titleText);
_smallMc.addChild(handMc);
handMc.addEventListener(MouseEvent.DOUBLE_CLICK, openAndClose);
}
private static function openAndClose(event:Event=null):void{
var e:KeyboardEvent = (event as KeyboardEvent);
if (((!(_nowEffect)) && (((((!(e)) || (((e.ctrlKey) && ((e.keyCode == 68)))))) || (((e.shiftKey) && ((e.keyCode == 68)))))))){
if (_showMc.parent == null){
MoveEffect.push(_smallMc, _smallMcPos, new mVector(_showMc.x, _showMc.y), 0, 5);
_smallMc.addEventListener(MoveEffect.Move_EFFECT_FINISH, EffectFinish);
_nowEffect = true;
} else {
_showMc.visible = false;
_MC.addChild(_smallMc);
MoveEffect.push(_smallMc, new mVector(_showMc.x, _showMc.y), _smallMcPos, 0, 5);
_smallMc.addEventListener(MoveEffect.Move_EFFECT_FINISH, EffectFinish);
_nowEffect = true;
};
};
}
private static function EffectFinish(event:Event):void{
_smallMc.removeEventListener(MoveEffect.Move_EFFECT_FINISH, EffectFinish);
_nowEffect = false;
if (_showMc.parent == null){
_showMc.visible = true;
_MC.addChild(_showMc);
_MC.removeChild(_smallMc);
} else {
_MC.removeChild(_showMc);
};
}
private static function endMove(event:MouseEvent):void{
_showMc.stopDrag();
}
private static function startMove(event:MouseEvent):void{
_showMc.startDrag();
}
public static function SHOW(type:String, arg:Array):void{
var i:int;
if (_MC){
if (type != ""){
if (!(_tabArr[type] is TC_Tab)){
_tabArr[type] = new TC_Tab(_showMc, type, _tabArrNum.length, (_tabArrNum.length + 1));
_tabArrNum.push(type);
i = 0;
while (i < _tabArrNum.length) {
(_tabArr[_tabArrNum[i]] as TC_Tab).updateTabTitle(i, _tabArrNum.length);
i++;
};
};
(_tabArr[type] as TC_Tab).show((((Tools.getNowTimeAndMileSecond_1() + ": ") + arg.join(" ")) + "\n"));
} else {
(_tabArr["&NT&"] as TC_Tab).show((((Tools.getNowTimeAndMileSecond_1() + ": ") + arg.join(" ")) + "\n"));
};
(_tabArr["*"] as TC_Tab).show((((Tools.getNowTimeAndMileSecond_1() + ": ") + arg.join(" ")) + "\n"));
_MC.parent.setChildIndex(_MC, (_MC.parent.numChildren - 1));
};
}
public static function onTabTitle(name:String):void{
var i:String;
for (i in _tabArr) {
if ((_tabArr[i] is TC_Tab)){
(_tabArr[i] as TC_Tab).visible = false;
};
};
(_tabArr[name] as TC_Tab).visible = true;
}
}
}//package zlong.breathxue.utils.debug
Section 151
//TC_Tab (zlong.breathxue.utils.debug.TC_Tab)
package zlong.breathxue.utils.debug {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class TC_Tab {
private var _pmc:DisplayObjectContainer;
private var _name:String;
private var _tabTitle:Sprite;
private var _Text:TextField;
private var _tabBaby:Sprite;
private static const colorArr:Array = [14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988];
static var TabTitleHeight:Number = 20;
static var maxWidth:Number = 80;
public function TC_Tab(pmc:DisplayObjectContainer, name:String, id:uint, totalNum:uint){
super();
this._pmc = pmc;
this._name = name;
this.createTabTitle(id, totalNum);
this.createTabBady(id);
}
private function createTabTitle(id:uint, totalNum:uint):void{
this._tabTitle = new Sprite();
this._pmc.addChild(this._tabTitle);
this._tabTitle.y = TC.TITLE_HEIGHT;
this._tabTitle.addEventListener(MouseEvent.CLICK, this.onTabTitle);
this.updateTabTitle(id, totalNum);
var tabtitle:TextField = new TextField();
this._tabTitle.addChild(tabtitle);
tabtitle.text = this._name;
tabtitle.mouseEnabled = false;
tabtitle.selectable = false;
}
private function onTabTitle(event:MouseEvent):void{
TC.onTabTitle(this._name);
}
function updateTabTitle(id:uint, totalNum:uint):void{
var tabWidth:Number = (((TC._width / totalNum) > maxWidth)) ? maxWidth : (TC._width / totalNum);
this._tabTitle.graphics.clear();
this._tabTitle.graphics.beginFill(colorArr[id]);
this._tabTitle.graphics.drawRect(0, 0, tabWidth, TabTitleHeight);
this._tabTitle.graphics.endFill();
this._tabTitle.x = (tabWidth * id);
}
private function createTabBady(id:uint):void{
this._tabBaby = new Sprite();
this._pmc.addChild(this._tabBaby);
this._tabBaby.visible = false;
this._tabBaby.y = (TC.TITLE_HEIGHT + TabTitleHeight);
this._tabBaby.graphics.beginFill(colorArr[id]);
this._tabBaby.graphics.drawRect(0, 0, TC._width, ((TC._height - TC.TITLE_HEIGHT) - TabTitleHeight));
this._tabBaby.graphics.endFill();
this._Text = new TextField();
this._Text.width = TC._width;
this._Text.height = ((TC._height - TC.TITLE_HEIGHT) - TabTitleHeight);
this._tabBaby.addChild(this._Text);
this._Text.multiline = true;
this._Text.mouseWheelEnabled = true;
this._Text.wordWrap = true;
}
public function show(string:String):void{
var t:int = this._Text.scrollV;
this._Text.appendText(string);
if (this._Text.length != this._Text.selectionEndIndex){
this._Text.scrollV = t;
} else {
this._Text.scrollV = this._Text.numLines;
};
}
public function set visible(v:Boolean):void{
this._tabBaby.visible = v;
}
public function get name():String{
return (this._name);
}
public function set name(value:String):void{
this._name = value;
}
}
}//package zlong.breathxue.utils.debug
Section 152
//TcShow (zlong.breathxue.utils.debug.TcShow)
package zlong.breathxue.utils.debug {
public var TcShow:Boolean = false;
}//package zlong.breathxue.utils.debug
Section 153
//mVector (zlong.breathxue.utils.math.mVector)
package zlong.breathxue.utils.math {
import zlong.breathxue.utils.*;
public class mVector {
public var x:Number;
public var y:Number;
breathxue_utils_internal static const VERSION:String = "v1.15.201008201148";
public static var PI_OVER_ONE_EIGHTY:Number = 0.0174532925199433;
public function mVector(px:Number=0, py:Number=0){
super();
this.x = px;
this.y = py;
}
public function setTo(px:Number, py:Number):void{
this.x = px;
this.y = py;
}
public function copyFrom(v:mVector):mVector{
this.x = v.x;
this.y = v.y;
return (this);
}
public function toString():String{
var rx:Number = (Math.round((this.x * 1000)) / 1000);
var ry:Number = (Math.round((this.y * 1000)) / 1000);
return ((((("[" + rx) + ", ") + ry) + "]"));
}
public function clone():mVector{
return (new mVector(this.x, this.y));
}
public function plus(v:mVector):mVector{
return (new mVector((this.x + v.x), (this.y + v.y)));
}
public function plusEquals(v:mVector):mVector{
this.x = (this.x + v.x);
this.y = (this.y + v.y);
return (this);
}
public function minus(v:mVector):mVector{
return (new mVector((this.x - v.x), (this.y - v.y)));
}
public function minusEquals(v:mVector):mVector{
this.x = (this.x - v.x);
this.y = (this.y - v.y);
return (this);
}
public function negate():mVector{
return (new mVector(-(this.x), -(this.y)));
}
public function negateEquals():void{
this.x = -(this.x);
this.y = -(this.y);
}
public function mult(s:Number):mVector{
return (new mVector((this.x * s), (this.y * s)));
}
public function multEquals(s:Number):mVector{
this.x = (this.x * s);
this.y = (this.y * s);
return (this);
}
public function rotateAngle(ang:Number):mVector{
var cos:Number = TF_Class.cosD(ang);
var sin:Number = TF_Class.sinD(ang);
var result:mVector = new mVector(((this.x * cos) - (this.y * sin)), ((this.y * cos) + (this.x * sin)));
return (result);
}
public function rotateAngleEquals(ang:Number):mVector{
return (this.copyFrom(this.rotateAngle(ang)));
}
public function rotateAngleForTarget(ang:Number, targetPoint:mVector):mVector{
var tempVector:mVector = this.minus(targetPoint);
var cos:Number = TF_Class.cosD(ang);
var sin:Number = TF_Class.sinD(ang);
var tempResult:mVector = new mVector(((tempVector.x * cos) - (tempVector.y * sin)), ((tempVector.y * cos) + (tempVector.x * sin)));
var result:mVector = tempResult.plus(targetPoint);
return (result);
}
public function rotateAngleForTargetEquals(ang:Number, targetPoint:mVector):mVector{
return (this.copyFrom(this.rotateAngleForTarget(ang, targetPoint)));
}
public function rotateRadian(radian:Number):mVector{
var cos:Number = Math.cos(radian);
var sin:Number = Math.sin(radian);
var result:mVector = new mVector(((this.x * cos) - (this.y * sin)), ((this.y * cos) + (this.x * sin)));
return (result);
}
public function rotateRadianEquals(radian:Number):mVector{
return (this.copyFrom(this.rotateRadian(radian)));
}
public function rotateRadianForTarget(radian:Number, targetPoint:mVector):mVector{
var tempVector:mVector = this.minus(targetPoint);
var cos:Number = Math.cos(radian);
var sin:Number = Math.sin(radian);
var tempResult:mVector = new mVector(((tempVector.x * cos) - (tempVector.y * sin)), ((tempVector.y * cos) + (tempVector.x * sin)));
var result:mVector = tempResult.plus(targetPoint);
return (result);
}
public function rotateRadianForTargetEquals(radian:Number, targetPoint:mVector):mVector{
return (this.copyFrom(this.rotateRadianForTarget(radian, targetPoint)));
}
public function dot(v:mVector):Number{
return (((this.x * v.x) + (this.y * v.y)));
}
public function cross(v:mVector):Number{
return (((this.x * v.y) - (this.y * v.x)));
}
public function times(v:mVector):mVector{
return (new mVector((this.x * v.x), (this.y * v.y)));
}
public function div(s:Number):mVector{
if (s == 0){
s = 0.0001;
};
return (new mVector((this.x / s), (this.y / s)));
}
public function divEquals(s:Number):mVector{
if (s == 0){
s = 0.0001;
};
this.x = (this.x / s);
this.y = (this.y / s);
return (this);
}
public function distance(v:mVector):Number{
var delta:mVector = this.minus(v);
return (delta.length);
}
public function normalize():mVector{
var m:Number = this.length;
if (m == 0){
m = 0.0001;
};
return (this.mult((1 / m)));
}
public function compare(v:mVector):Boolean{
if ((((this.x == v.x)) && ((this.y == v.y)))){
return (true);
};
return (false);
}
public function getNormal():mVector{
return (new mVector(-(this.y), this.x));
}
public function isNormalTo(v:mVector):Boolean{
return ((this.dot(v) == 0));
}
public function angleBetween(v:mVector):Number{
var dp:Number = this.dot(v);
var cosAngle:Number = (dp / (this.length * v.length));
return (TF_Class.acosD(cosAngle));
}
public function radianBetween(v:mVector):Number{
var cos:Number = (this.dot(v) / (this.length * v.length));
return (Math.acos(cos));
}
public function get length():Number{
return (Math.sqrt(((this.x * this.x) + (this.y * this.y))));
}
public function set length(len:Number):void{
var r:Number = this.length;
if (r){
this.multEquals((len / r));
} else {
this.x = len;
};
}
public function set angle(ang:Number):void{
var r:Number = this.length;
this.x = (r * TF_Class.cosD(ang));
this.y = (r * TF_Class.sinD(ang));
}
public function get angle():Number{
return (TF_Class.atan2D(this.y, this.x));
}
}
}//package zlong.breathxue.utils.math
Section 154
//TF_Class (zlong.breathxue.utils.math.TF_Class)
package zlong.breathxue.utils.math {
import zlong.breathxue.utils.*;
public class TF_Class {
breathxue_utils_internal static const VERSION:String = "v1.15.201008201148";
public static function sinD(angle:Number):Number{
return (Math.sin((angle * (Math.PI / 180))));
}
public static function cosD(angle:Number):Number{
return (Math.cos((angle * (Math.PI / 180))));
}
public static function tanD(angle:Number):Number{
return (Math.tan((angle * (Math.PI / 180))));
}
public static function asinD(ratio:Number):Number{
return ((Math.asin(ratio) * (180 / Math.PI)));
}
public static function acosD(ratio:Number):Number{
return ((Math.acos(ratio) * (180 / Math.PI)));
}
public static function atanD(ratio:Number):Number{
return ((Math.atan(ratio) * (180 / Math.PI)));
}
public static function atan2D(y:Number, x:Number):Number{
return ((Math.atan2(y, x) * (180 / Math.PI)));
}
public static function distance(x1:Number, y1:Number, x2:Number, y2:Number):Number{
var dx:Number = (x2 - x1);
var dy:Number = (y2 - y1);
return (Math.sqrt(((dx * dx) + (dy * dy))));
}
public static function angleOfLine(x1:Number, y1:Number, x2:Number, y2:Number):Number{
return (atan2D((y2 - y1), (x2 - x1)));
}
public static function degreesToRadians(angle:Number):Number{
return ((angle * (Math.PI / 180)));
}
public static function radiansToDegrees(angle:Number):Number{
return ((angle * (180 / Math.PI)));
}
public static function fixAngle(angle:Number):Number{
angle = (angle % 360);
return (((angle)<0) ? (angle + 360) : angle);
}
public static function cartesianToPolar(p:mVector):Object{
var radius:Number = Math.sqrt(((p.x * p.x) + (p.y * p.y)));
var theta:Number = atan2D(p.y, p.x);
return ({r:radius, t:theta});
}
public static function FormatAngle(r:Number):Number{
r = (r % 360);
if (r > 180){
r = (r - 360);
};
if (r < -180){
r = (r + 360);
};
return (r);
}
public static function FormatAngle90(r:Number):Number{
r = (r % 180);
if (r > 90){
r = (180 - r);
};
if (r < -90){
r = (r + 180);
};
return (r);
}
}
}//package zlong.breathxue.utils.math
Section 155
//Attach (zlong.breathxue.utils.Attach)
package zlong.breathxue.utils {
import flash.display.*;
import flash.media.*;
import flash.utils.*;
public class Attach {
breathxue_utils_internal static const VERSION:String = "v1.15.201008201148";
private static var bitMapDataArray:Array;
public static function getDisplayObject(s:String):DisplayObject{
var temp:Class = (getDefinitionByName(s) as Class);
var returnObj:DisplayObject = new (temp);
return (returnObj);
}
public static function getSprite(s:String):Sprite{
var temp:Class = (getDefinitionByName(s) as Class);
var returnObj:Sprite = new (temp);
return (returnObj);
}
public static function getMovieClip(s:String):MovieClip{
var temp:Class = (getDefinitionByName(s) as Class);
var returnObj:MovieClip = new (temp);
return (returnObj);
}
public static function getBitmapData(s:String, repeatedUse_NoChange:Boolean=false):BitmapData{
var i:int;
if (repeatedUse_NoChange){
if (!bitMapDataArray){
bitMapDataArray = new Array();
};
i = 0;
while (i < bitMapDataArray.length) {
if (bitMapDataArray[i][0] == s){
return (bitMapDataArray[i][1]);
};
i++;
};
};
var temp:Class = (getDefinitionByName(s) as Class);
var returnObj:BitmapData = new temp(null, null);
if (repeatedUse_NoChange){
bitMapDataArray.push([s, returnObj]);
};
return (returnObj);
}
public static function clearBitmapDataCache():void{
var i:int;
while (i < bitMapDataArray.length) {
(bitMapDataArray[i][1] as BitmapData).dispose();
i++;
};
bitMapDataArray = new Array();
}
public static function getSound(s:String):Sound{
var temp:Class = (getDefinitionByName(s) as Class);
var returnObj:Sound = new (temp);
return (returnObj);
}
}
}//package zlong.breathxue.utils
Section 156
//breathxue_utils_internal (zlong.breathxue.utils.breathxue_utils_internal)
package zlong.breathxue.utils {
public namespace breathxue_utils_internal = "http://www.zlonggames.com/flash/breathxue/utils/internal";
}//package zlong.breathxue.utils
Section 157
//FrameTimer (zlong.breathxue.utils.FrameTimer)
package zlong.breathxue.utils {
import flash.display.*;
import flash.events.*;
public class FrameTimer implements IEventDispatcher {
private var _ED:EventDispatcher;
private var _running:Boolean;
private var _runframe:uint;
private var _cycleNum:uint;
private var _step:uint;
private var _id:uint;
private var _returnFunctionAlarm:Function;
private var _returnFunctionFinish:Function;
breathxue_utils_internal static const VERSION:String = "v1.15.201008201148";
public static const FRAMETIMER_ALARM:String = "FRAMETIMER_ALARM";
public static const FRAMETIMER_FINISH:String = "FRAMETIMER_FINISH";
private static var IdCount:uint = 1;
private static var _arr:Array = new Array();
public function FrameTimer(runframe:uint, cycleNum:uint=0, Millisecond:uint=0, mc:DisplayObject=null){
super();
this._running = true;
this._step = 0;
this._runframe = runframe;
this._cycleNum = cycleNum;
this._ED = new EventDispatcher(this);
if ((((Millisecond > 0)) && (mc))){
if (!mc.stage){
throw (new ArgumentError("mc didn`t connect stage"));
};
this._runframe = uint(((Millisecond / 1000) * mc.stage.frameRate));
};
this._id = FrameTimer.add(this);
}
public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{
this._ED.addEventListener(type, listener, useCapture, priority, useWeakReference);
}
public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{
this._ED.removeEventListener(type, listener, useCapture);
}
public function dispatchEvent(event:Event):Boolean{
return (this._ED.dispatchEvent(event));
}
public function hasEventListener(type:String):Boolean{
return (this._ED.hasEventListener(type));
}
public function willTrigger(type:String):Boolean{
return (this._ED.willTrigger(type));
}
public function pause():void{
this._running = false;
}
public function reStart():void{
this._running = true;
}
public function del():void{
FrameTimer.delById(this._id);
}
public function get id():uint{
return (this._id);
}
public static function push(fTimer:FrameTimer, returnFunctionAlarm:Function=null, returnFunctionFinish:Function=null):uint{
fTimer._returnFunctionAlarm = returnFunctionAlarm;
fTimer._returnFunctionFinish = returnFunctionFinish;
return (fTimer._id);
}
private static function add(fTimer:FrameTimer, returnFunctionAlarm:Function=null, returnFunctionFinish:Function=null):uint{
_arr.push(fTimer);
if (_arr.length > 0){
GoddenEnterFrame.instance.addEventListener(Event.ENTER_FRAME, run);
};
return (IdCount++);
}
private static function run(event:Event):void{
var tempFrameTimer:FrameTimer;
var i:int;
while (i < _arr.length) {
tempFrameTimer = _arr[i];
if (!tempFrameTimer._running){
} else {
if (tempFrameTimer._step >= tempFrameTimer._runframe){
tempFrameTimer._ED.dispatchEvent(new Event(FRAMETIMER_ALARM));
if (tempFrameTimer._returnFunctionAlarm != null){
tempFrameTimer._returnFunctionAlarm();
};
tempFrameTimer._step = 0;
tempFrameTimer._step++;
if (tempFrameTimer._cycleNum <= 0){
tempFrameTimer._ED.dispatchEvent(new Event(FRAMETIMER_FINISH));
if (tempFrameTimer._returnFunctionFinish != null){
tempFrameTimer._returnFunctionFinish();
};
_arr.splice(i, 1);
i--;
if (_arr.length <= 0){
GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, run);
};
} else {
tempFrameTimer._cycleNum--;
};
} else {
tempFrameTimer._step++;
};
};
i++;
};
}
public static function pauseById(id:uint):void{
var i:int;
while (i < _arr.length) {
if ((_arr[i] as FrameTimer)._id == id){
(_arr[i] as FrameTimer).pause();
};
i++;
};
}
public static function reStartById(id:uint):void{
var i:int;
while (i < _arr.length) {
if ((_arr[i] as FrameTimer)._id == id){
(_arr[i] as FrameTimer).reStart();
};
i++;
};
}
public static function delById(id:uint):void{
var i:int;
while (i < _arr.length) {
if ((_arr[i] as FrameTimer)._id == id){
_arr.splice(i, 1);
if (_arr.length <= 0){
GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, run);
};
return;
};
i++;
};
}
public static function delAll():void{
_arr = new Array();
GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, run);
}
public static function pauseAll():void{
GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, run);
}
public static function reStartAll():void{
GoddenEnterFrame.instance.addEventListener(Event.ENTER_FRAME, run);
}
}
}//package zlong.breathxue.utils
Section 158
//GoddenEnterFrame (zlong.breathxue.utils.GoddenEnterFrame)
package zlong.breathxue.utils {
import flash.display.*;
import flash.events.*;
public class GoddenEnterFrame extends EventDispatcher {
private var _listenerMc:DisplayObject;
private var _controlFunction:Function;
private static var _instance:GoddenEnterFrame;
public function GoddenEnterFrame(target:IEventDispatcher=null){
super(target);
this._controlFunction = this.undefinedControlFunction;
this._listenerMc = new Bitmap();
}
private function run(event:Event):void{
this._controlFunction(event);
}
private function undefinedControlFunction(event:Event):void{
dispatchEvent(event);
}
public function set controlFunction(f:Function):void{
this._controlFunction = f;
}
override public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{
super.addEventListener(type, listener, useCapture, priority, useWeakReference);
this._listenerMc.addEventListener(Event.ENTER_FRAME, this.run);
}
override public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{
super.removeEventListener(type, listener, useCapture);
if (!this.hasEventListener(Event.ENTER_FRAME)){
this._listenerMc.removeEventListener(Event.ENTER_FRAME, this.run);
};
}
public static function get instance():GoddenEnterFrame{
if (!_instance){
_instance = new (GoddenEnterFrame);
};
return (_instance);
}
}
}//package zlong.breathxue.utils
Section 159
//Tools (zlong.breathxue.utils.Tools)
package zlong.breathxue.utils {
import flash.display.*;
import flash.geom.*;
public class Tools {
breathxue_utils_internal static const VERSION:String = "v1.15.201008201148";
public static function getNowTimeAndMileSecond_1():String{
var time:Date = new Date();
var h:int = time.getHours();
var m:int = time.getMinutes();
var s:int = time.getSeconds();
var ms:int = time.getMilliseconds();
return (((((((((h < 10)) ? ("0" + h) : h + ":") + ((m < 10)) ? ("0" + m) : m) + ":") + ((s < 10)) ? ("0" + s) : s) + ":") + ((ms < 10)) ? ("00" + ms) : ((ms < 100)) ? ("0" + ms) : ms));
}
public static function cutBmp(_mc:DisplayObject, _bmpDataWidth:int, _bmpDataHeight:int, _cutStartX:int, _cutStartY:int, _cutBmpWidth:int, _cutBmpHeight:int):BitmapData{
var bitmapData:BitmapData;
var rectangle:Rectangle;
var matrix:Matrix = new Matrix();
matrix.tx = -(_cutStartX);
matrix.ty = -(_cutStartY);
rectangle = new Rectangle(0, 0, _cutBmpWidth, _cutBmpHeight);
bitmapData = new BitmapData(_bmpDataWidth, _bmpDataHeight, true, 0);
bitmapData.draw(_mc, matrix, null, null, rectangle, true);
return (bitmapData);
}
}
}//package zlong.breathxue.utils
Section 160
//Countries (zlong.country.Countries)
package zlong.country {
import zlong.country.*;
import zlong.*;
class Countries {
private var _countries:Object;
private var _portal:String;
private var _portalGroup:Array;
private var _country:String;
private var _countryGroup:Array;
localComponent_internal static const VERSION:String = "v1.08.201012121509";
function Countries(){
super();
this.initPortalGroup();
}
function set portal(gameType:String):void{
if (!this.inArray(gameType, this._portalGroup)){
throw (new ArgumentError(("Please set portal with value : " + this._portalGroup.toString())));
};
this._portal = gameType;
this.initCountries();
if (((!((this._country == null))) && (!(this.inArray(this._country, this._countryGroup))))){
throw (new ArgumentError(("Please reset country with value : " + this._countryGroup.toString())));
};
}
function get portal():String{
return (this._portal);
}
function set country(name:String):void{
if (((!((this._countryGroup == null))) && (!(this.inArray(name, this._countryGroup))))){
this._country = this._countryGroup[0];
Trace("||ZFW||", ("Error in the country value,set country with default value : " + this._countryGroup[0]));
Trace("||ZFW||", ("Please set country with value : " + this._countryGroup.toString()));
} else {
this._country = name;
};
}
function get current():CountryItem{
if (this._portal == null){
throw (new ArgumentError("Please set portal"));
};
if (this._country == null){
throw (new ArgumentError("Please set country"));
};
return (this._countries[this._country]);
}
function get countryGroup():Array{
if (this._countryGroup == null){
throw (new ArgumentError("Please set portal"));
};
return (this._countryGroup);
}
private function initCountries():void{
var countryItem:CountryItem;
var name:String;
var domain:String;
var game:String;
var language:int;
this._countries = new Object();
this._countryGroup = new Array();
var i:int;
while (i < CountriesData.DATA[this._portal]["country"].length()) {
name = CountriesData.DATA[this._portal]["country"][i].@name;
domain = CountriesData.DATA[this._portal]["country"][i].@domain;
game = CountriesData.DATA[this._portal]["country"][i].@game;
language = int(CountriesData.DATA[this._portal]["country"][i].@language);
countryItem = new CountryItem();
countryItem.name = name;
countryItem.domain = domain;
countryItem.game = game;
countryItem.language = language;
this._countries[countryItem.name] = countryItem;
this._countryGroup.push(name);
i++;
};
}
private function initPortalGroup():void{
this._portalGroup = new Array();
var i:int;
while (i < CountriesData.DATA.children().length()) {
this._portalGroup.push(CountriesData.DATA.children()[i].name());
i++;
};
}
private function inArray(str:String, arr:Array):Boolean{
var i:int;
while (i < arr.length) {
if (str == arr[i]){
return (true);
};
i++;
};
return (false);
}
}
}//package zlong.country
Section 161
//CountriesData (zlong.country.CountriesData)
package zlong.country {
import zlong.*;
class CountriesData {
localComponent_internal static const VERSION:String = "v1.08.201012121509";
static const DATA:XML = <data>
<family>
<!-- new -->
<country name="arg" domain="www.juegos.com.ar" game="game" language="18"/><!-- Argentina -->
<country name="mx" domain="www.juegos.mx" game="game" language="19"/><!-- Mexico -->
<country name="ar" domain="www.dailygame.com" game="game" language="1"/><!-- Arabic(English US) 2009.07.14-->
<country name="br" domain="www.ojogos.com.br" game="jogo" language="7"/><!-- Brazillian -->
<country name="cn" domain="www.game.com.cn" game="moregames" language="17"/><!-- Chinese -->
<country name="de" domain="www.jetztspielen.de" game="spiel" language="5"/><!-- German -->
<country name="es" domain="www.juegos.com" game="juego" language="6"/><!-- Spanish -->
<country name="fr" domain="www.jeux.fr" game="jeu" language="4"/><!-- French -->
<country name="id" domain="www.games.co.id" game="permainanme" language="14"/><!-- Indonesian -->
<country name="in" domain="www.game.co.in" game="game" language="2"/><!-- English UK -->
<country name="it" domain="www.gioco.it" game="gioco" language="9"/><!-- Italian -->
<country name="jp" domain="www.egames.jp" game="game" language="16"/><!-- Japanese -->
<country name="nl" domain="www.spelletjes.nl" game="spel" language="3"/><!-- Dutch -->
<country name="pl" domain="www.gry.pl" game="gra" language="11"/><!-- Polish -->
<country name="pt" domain="www.ojogos.pt" game="jogo" language="8"/><!-- Portuguese -->
<country name="ru" domain="www.ourgames.ru" game="igra" language="12"/><!-- Russian -->
<country name="se" domain="www.spela.se" game="spel_" language="10"/><!-- Swedish -->
<country name="en_uk" domain="www.games.co.uk" game="game" language="2"/><!-- English UK -->
<country name="en_us" domain="www.gamesgames.com" game="game" language="1"/><!-- English US -->
<!-- removed -->
<!-- country name="ph" domain="www.laro.com.ph" game="game" language="2"/ --><!-- English UK -->
<!-- country name="tr" domain="www.asoyun.com" game="oyun" language="13"/ --><!-- Turkish -->
<!-- country name="my" domain="www.game.com.my" game="permainan_" language="15"/ --><!-- Malaysian -->
</family>
<tween>
<!-- new -->
<country name="arg" domain="www.juegos.com.ar" game="game" language="18"/><!-- Argentina -->
<country name="mx" domain="www.juegos.mx" game="game" language="19"/><!-- Mexico -->
<country name="ar" domain="www.dailygame.com" game="game" language="1"/><!-- Arabic(English US) 2009.07.14 -->
<country name="br" domain="www.clickjogos.com" game="jogo" language="7"/><!-- Brazillian -->
<country name="cn" domain="www.game.com.cn" game="moregames" language="17"/><!-- Chinese -->
<country name="de" domain="www.spielen.com" game="spiel" language="5"/><!-- German -->
<country name="es" domain="www.zapjuegos.com" game="juego" language="6"/><!-- Spanish -->
<country name="fr" domain="www.jeu.fr" game="jeu" language="4"/><!-- French -->
<country name="id" domain="www.games.co.id" game="permainanme" language="14"/><!-- Indonesian -->
<country name="in" domain="www.game.co.in" game="game" language="2"/><!-- English UK -->
<country name="it" domain="www.gioco.it" game="gioco" language="9"/><!-- Italian 2009.08.10 -->
<country name="jp" domain="www.egames.jp" game="game" language="16"/><!-- Japanese -->
<country name="nl" domain="www.spel.nl" game="spel" language="3"/><!-- Dutch -->
<country name="pl" domain="www.gry.pl" game="gra" language="11"/><!-- Polish 2009.08.10-->
<country name="pt" domain="www.ojogos.pt" game="jogo" language="8"/><!-- Portuguese -->
<country name="ru" domain="www.flashgames.ru" game="igra" language="12"/><!-- Russian -->
<country name="se" domain="www.spel.se" game="spel_" language="10"/><!-- Swedish -->
<country name="en_uk" domain="www.agame.com" game="game" language="2"/><!-- English UK 2009.08.28-->
<country name="en_us" domain="www.agame.com" game="game" language="1"/><!-- English US -->
<!-- removed -->
<!-- country name="ph" domain="www.laro.com.ph" game="game" language="2"/ --><!-- English UK -->
<!-- country name="tr" domain="www.asoyun.com" game="oyun" language="13"/ --><!-- Turkish -->
<!-- country name="my" domain="www.game.com.my" game="permainan_" language="15"/ --><!-- Malaysian -->
</tween>
<girl>
<!-- new -->
<country name="arg" domain="www.juegosdechicas.com.ar" game="game" language="18"/><!-- Argentina -->
<country name="mx" domain="www.juegosdechicas.mx" game="game" language="19"/><!-- Mexico -->
<country name="ar" domain="www.dailygame.com" game="game" language="1"/><!-- Arabic(English US) 2009.07.14-->
<country name="br" domain="www.girlsgogames.com.br" game="jogo" language="7"/><!-- Brazillian -->
<country name="cn" domain="www.game.com.cn" game="moregames" language="17"/><!-- Chinese -->
<country name="de" domain="www.girlsgogames.de" game="spiel" language="5"/><!-- German -->
<country name="es" domain="www.girlsgogames.es" game="juego" language="6"/><!-- Spanish -->
<country name="fr" domain="www.girlsgogames.fr" game="jeu" language="4"/><!-- French -->
<country name="id" domain="www.games.co.id" game="permainanme" language="14"/><!-- Indonesian -->
<country name="in" domain="www.game.co.in" game="game" language="2"/><!-- English UK -->
<country name="it" domain="www.girlsgogames.it" game="gioco" language="9"/><!-- Italian -->
<country name="jp" domain="www.egames.jp" game="game" language="16"/><!-- Japanese -->
<country name="nl" domain="www.girlsgogames.nl" game="spel" language="3"/><!-- Dutch -->
<country name="pl" domain="www.girlsgogames.pl" game="gra" language="11"/><!-- Polish -->
<country name="pt" domain="www.ojogos.pt" game="jogo" language="8"/><!-- Portuguese -->
<country name="ru" domain="www.girlsgogames.ru" game="igra" language="12"/><!-- Russian -->
<country name="se" domain="www.girlsgogames.se" game="spel_" language="10"/><!-- Swedish -->
<country name="en_uk" domain="www.girlsgogames.co.uk" game="game" language="2"/><!-- English UK -->
<country name="en_us" domain="www.girlsgogames.com" game="game" language="1"/><!-- English US -->
<!-- removed -->
<!-- country name="ph" domain="www.laro.com.ph" game="game" language="2"/ --><!-- English UK -->
<!-- country name="tr" domain="www.girlsgogamestr.com" game="oyun" language="13"/ --><!-- Turkish -->
<!-- country name="my" domain="www.game.com.my" game="permainan_" language="15"/ --><!-- Malaysian -->
</girl>
<teen>
<!-- new -->
<!--country name="arg" domain="www.juegosdechicas.com.ar" game="game" language="18"/ --><!-- Argentina -->
<!--country name="mx" domain="www.juegosdechicas.mx" game="game" language="19"/ --><!-- Mexico -->
<!--country name="ar" domain="www.dailygame.com" game="game" language="1"/ --><!-- Arabic(English US) 2009.07.14-->
<!--country name="br" domain="www.a10.com" game="jogo" language="7"/ --><!-- Brazillian -->
<!--country name="cn" domain="www.game.com.cn" game="moregames" language="17"/ --><!-- Chinese -->
<!--country name="de" domain="www.a10.com" game="spiel" language="5"/ --><!-- German -->
<!--country name="es" domain="www.a10.com" game="juego" language="6"/ --><!-- Spanish -->
<!--country name="fr" domain="www.a10.com" game="jeu" language="4"/ --><!-- French -->
<!--country name="id" domain="www.a10.com" game="permainanme" language="14"/ --><!-- Indonesian -->
<!--country name="in" domain="www.a10.com" game="game" language="2"/ --><!-- English UK -->
<!--country name="it" domain="www.a10.com" game="gioco" language="9"/ --><!-- Italian -->
<!--country name="jp" domain="www.a10.com" game="game" language="16"/ --><!-- Japanese -->
<!--country name="nl" domain="www.a10.com" game="spel" language="3"/ --><!-- Dutch -->
<!--country name="pl" domain="www.a10.com" game="gra" language="11"/ --><!-- Polish -->
<!--country name="pt" domain="www.a10.com" game="jogo" language="8"/ --><!-- Portuguese -->
<!--country name="ru" domain="www.a10.com" game="igra" language="12"/ --><!-- Russian -->
<!--country name="se" domain="www.a10.com" game="spel_" language="10"/ --><!-- Swedish -->
<!--country name="en_uk" domain="www.a10.com" game="game" language="2"/ --><!-- English UK -->
<country name="en_us" domain="www.a10.com" game="game" language="1"/><!-- English US -->
<!-- removed -->
<!-- country name="ph" domain="www.a10.com" game="game" language="2"/ --><!-- English UK -->
<!-- country name="tr" domain="www.a10.com" game="oyun" language="13"/ --><!-- Turkish -->
<!-- country name="my" domain="www.a10.com" game="permainan_" language="15"/ --><!-- Malaysian -->
</teen>
<zapapa>
<!-- new -->
<country name="arg" domain="www.zapapa.com" game="game" language="18"/><!-- Argentina -->
<country name="mx" domain="www.zapapa.com" game="game" language="19"/><!-- Mexico -->
<country name="ar" domain="www.zapapa.com" game="game" language="1"/><!-- Arabic(English US) 2009.07.14-->
<country name="br" domain="www.zapapa.com" game="game" language="7"/><!-- Brazillian -->
<country name="cn" domain="www.zapapa.com" game="game" language="17"/><!-- Chinese -->
<country name="de" domain="www.zapapa.com" game="game" language="5"/><!-- German -->
<country name="es" domain="www.zapapa.com" game="game" language="6"/><!-- Spanish -->
<country name="fr" domain="www.zapapa.com" game="game" language="4"/><!-- French -->
<country name="id" domain="www.zapapa.com" game="game" language="14"/><!-- Indonesian -->
<country name="in" domain="www.zapapa.com" game="game" language="2"/><!-- English UK -->
<country name="it" domain="www.zapapa.com" game="game" language="9"/><!-- Italian -->
<country name="jp" domain="www.zapapa.com" game="game" language="16"/><!-- Japanese -->
<country name="nl" domain="www.zapapa.com" game="game" language="3"/><!-- Dutch -->
<country name="pl" domain="www.zapapa.com" game="game" language="11"/><!-- Polish -->
<country name="pt" domain="www.zapapa.com" game="game" language="8"/><!-- Portuguese -->
<country name="ru" domain="www.zapapa.com" game="game" language="12"/><!-- Russian -->
<country name="se" domain="www.zapapa.com" game="game" language="10"/><!-- Swedish -->
<country name="en_uk" domain="www.zapapa.com" game="game" language="2"/><!-- English UK -->
<country name="en_us" domain="www.zapapa.com" game="game" language="1"/><!-- English US -->
</zapapa>
<hyves>
<!-- new -->
<country name="nl" domain="www.zapapa.nl" game="game" language="3"/><!-- Dutch -->
</hyves>
</data>
;
}
}//package zlong.country
Section 162
//CountryInfo (zlong.country.CountryInfo)
package zlong.country {
import zlong.domain.*;
import zlong.*;
import zlong.data.*;
public class CountryInfo {
private var countries:Countries;
localComponent_internal static const VERSION:String = "v1.08.201012121509";
private static var _instance:CountryInfo;
public function CountryInfo(){
super();
this.countries = new Countries();
}
public function set portal(portal:String):void{
this.countries.portal = portal;
}
public function get portal():String{
return (this.countries.portal);
}
public function set country(country:String):void{
this.countries.country = country;
}
public function get country():String{
return (this.countries.current.name);
}
public function get domain():String{
return (this.countries.current.domain);
}
public function get language():int{
return (this.countries.current.language);
}
public function get countryGroup():Array{
return (this.countries.countryGroup);
}
public function get copyRightLink():String{
var str:String;
str = "http://www.gameportal.net";
str = (str + "/");
str = (str + ("?utm_medium=brandedgames_" + (DomainInfo.instance.allowed) ? "internal" : "external"));
str = (str + ("&utm_campaign=" + GameInfo.name));
str = (str + ("&utm_source=" + DomainInfo.instance.domainAb));
str = (str + "&utm_content=Mainscreen");
return (str);
}
public function get moreGameLink():String{
var str:String;
str = ("http://" + this.domain);
if (this.countries.current.name != "cn"){
str = (str + "/");
str = (str + ("?utm_medium=brandedgames_" + (DomainInfo.instance.allowed) ? "internal" : "external"));
str = (str + ("&utm_campaign=" + GameInfo.name));
str = (str + ("&utm_source=" + DomainInfo.instance.domainAb));
} else {
str = (str + "/");
str = (str + "moregames");
str = (str + "/");
};
return (str);
}
public function get thisGameLink():String{
var str:String;
str = ("http://" + this.domain);
str = (str + ((("/" + this.countries.current.game) + "/") + GameInfo.html));
if (this.countries.current.name != "cn"){
str = (str + ("?utm_medium=brandedgames_" + (DomainInfo.instance.allowed) ? "internal" : "external"));
str = (str + ("&utm_campaign=" + GameInfo.name));
str = (str + ("&utm_source=" + DomainInfo.instance.domainAb));
};
return (str);
}
public function get sendToFriendLink():String{
var str:String = this.thisGameLink;
if (this.countries.current.name != "cn"){
str = (str + "&utm_content=send_to_friend");
};
return (str);
}
public static function get instance():CountryInfo{
if (_instance == null){
_instance = new (CountryInfo);
};
return (_instance);
}
}
}//package zlong.country
Section 163
//CountryItem (zlong.country.CountryItem)
package zlong.country {
import zlong.*;
final class CountryItem {
var name:String;
var domain:String;
var game:String;
var language:int;
localComponent_internal static const VERSION:String = "v1.08.201012121509";
}
}//package zlong.country
Section 164
//CountryCookie (zlong.data.CountryCookie)
package zlong.data {
import flash.net.*;
import zlong.*;
public class CountryCookie {
localComponent_internal static const VERSION:String = "v1.08.201012121509";
private static const name:String = "spilgames_language_v100";
private static const countryName:String = "savedLang";
private static var so:SharedObject;
public function CountryCookie():void{
super();
so = SharedObject.getLocal(name, "/");
}
localComponent_internal static function set country(_value:String):void{
so.data[countryName] = _value;
}
localComponent_internal static function get country():String{
return (so.data[countryName]);
}
}
}//package zlong.data
Section 165
//GameInfo (zlong.data.GameInfo)
package zlong.data {
import zlong.*;
public class GameInfo {
localComponent_internal static const VERSION:String = "v1.08.201012121509";
localComponent_internal static var cnversion:Boolean = false;
localComponent_internal static var portal:String = "family";
localComponent_internal static var name:String = "game_name";
localComponent_internal static var html:String = "Game-Name.html";
localComponent_internal static var width:int = 550;
localComponent_internal static var height:int = 400;
}
}//package zlong.data
Section 166
//AbstractBindingDisplay (zlong.display.AbstractBindingDisplay)
package zlong.display {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class AbstractBindingDisplay extends MovieClip {
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public function AbstractBindingDisplay(){
super();
if (getQualifiedClassName(this) == "zlong::display::AbstractBindingDisplay"){
throw (new ArgumentError("can't be constructed"));
};
}
public function initEvent(e:Event=null):void{
}
public function delEvent(e:Event=null):void{
}
}
}//package zlong.display
Section 167
//BindingDisplayEvent (zlong.display.BindingDisplayEvent)
package zlong.display {
import flash.events.*;
public class BindingDisplayEvent extends Event {
private var _BD:AbstractBindingDisplay;
private var _displayType:String;
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public static const BINDING_DISPLAY_INIT:String = "BINDING_DISPLAY_INIT";
public static const BINDING_DISPLAY_DEL_EVENT:String = "BINDING_DISPLAY_DEL_EVENT";
public static const BINDING_DISPLAY_ADDED_TO_STAGE:String = "BINDING_DISPLAY_ADDED_TO_STAGE";
public static const BINDING_DISPLAY_REMOVE_TO_STAGE:String = "BINDING_DISPLAY_REMOVE_TO_STAGE";
public function BindingDisplayEvent(type:String, BD:AbstractBindingDisplay, displayType:String, bubbles:Boolean=false, cancelable:Boolean=false){
super(type, bubbles, cancelable);
this._BD = BD;
this._displayType = displayType;
}
public function get bindingDisplay():AbstractBindingDisplay{
return (this._BD);
}
public function get displayType():String{
return (this._displayType);
}
}
}//package zlong.display
Section 168
//BindingDisplayManager (zlong.display.BindingDisplayManager)
package zlong.display {
import flash.events.*;
public class BindingDisplayManager extends EventDispatcher {
localComponent_internal static const VERSION:String = "v1.08.201012121509";
private static var _instance:BindingDisplayManager;
public function BindingDisplayManager():void{
super();
}
public static function get Instance():BindingDisplayManager{
if (_instance == null){
_instance = new (BindingDisplayManager);
};
return (_instance);
}
}
}//package zlong.display
Section 169
//Copyright (zlong.display.Copyright)
package zlong.display {
import flash.events.*;
import zlong.navigate.*;
public class Copyright extends AbstractBindingDisplay {
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public function Copyright(){
super();
this.gotoAndStop(1);
this.buttonMode = true;
this.mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_INIT, this, "Copyright"));
}
private function addToStageHandler(e:Event):void{
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_ADDED_TO_STAGE, this, "Copyright"));
this.initEvent();
}
private function removeFromStageHandler(e:Event):void{
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_REMOVE_TO_STAGE, this, "Copyright"));
this.delEvent();
}
override public function initEvent(e:Event=null):void{
if (this.hasEventListener(Event.ADDED_TO_STAGE)){
removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
};
this.addEventListener(MouseEvent.CLICK, Handler.click_copyright);
this.addEventListener(MouseEvent.ROLL_OVER, this.rollOverHandler);
this.addEventListener(MouseEvent.MOUSE_DOWN, this.mouseDownHandler);
this.addEventListener(MouseEvent.MOUSE_UP, this.mouseUpHandler);
this.addEventListener(MouseEvent.ROLL_OUT, this.rollOutHandler);
this.addEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler);
}
override public function delEvent(e:Event=null):void{
this.removeEventListener(MouseEvent.CLICK, Handler.click_copyright);
this.removeEventListener(MouseEvent.ROLL_OVER, this.rollOverHandler);
this.removeEventListener(MouseEvent.MOUSE_DOWN, this.mouseDownHandler);
this.removeEventListener(MouseEvent.MOUSE_UP, this.mouseUpHandler);
this.removeEventListener(MouseEvent.ROLL_OUT, this.rollOutHandler);
if (this.hasEventListener(Event.ADDED_TO_STAGE)){
removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
};
if (this.hasEventListener(Event.REMOVED_FROM_STAGE)){
removeEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler);
};
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_DEL_EVENT, this, "Copyright"));
}
private function rollOverHandler(evt:MouseEvent):void{
this.gotoAndStop(2);
}
private function mouseDownHandler(evt:MouseEvent):void{
this.gotoAndStop(3);
}
private function mouseUpHandler(evt:MouseEvent):void{
this.gotoAndStop(2);
}
private function rollOutHandler(evt:MouseEvent):void{
this.gotoAndStop(1);
}
}
}//package zlong.display
Section 170
//CountriesBox (zlong.display.CountriesBox)
package zlong.display {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import zlong.data.*;
import zlong.*;
import zlong.country.*;
public class CountriesBox extends AbstractBindingDisplay {
private var i:uint;
private var mul:int;// = 1
private var baseX:Number;// = 0
private var baseY:Number;// = 0
private var nameGroup:Array;
private var obj:Object;
private var pop:Sprite;
private var flagMc:MovieClip;
private var selectBox:MovieClip;
private var country_name:MovieClip;
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public function CountriesBox(){
this.nameGroup = [];
super();
if (GameInfo.portal == GameSetting.PORTAL_TYPE_HYVES){
this.visible = false;
};
addEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_INIT, this, "CountriesBox"));
}
private function addToStageHandler(e:Event):void{
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_ADDED_TO_STAGE, this, "CountriesBox"));
this.initEvent();
}
private function removeFromStageHandler(e:Event):void{
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_REMOVE_TO_STAGE, this, "CountriesBox"));
this.delEvent();
}
override public function initEvent(e:Event=null):void{
if (this.hasEventListener(Event.ADDED_TO_STAGE)){
removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
};
this.initShow();
addEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler);
}
override public function delEvent(e:Event=null):void{
removeEventListener(MouseEvent.ROLL_OVER, this.overHandler);
removeEventListener(MouseEvent.ROLL_OUT, this.outHandler);
removeEventListener(MouseEvent.CLICK, this.clickHandler);
if (this.hasEventListener(Event.ADDED_TO_STAGE)){
removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
};
if (this.hasEventListener(Event.REMOVED_FROM_STAGE)){
removeEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler);
};
this.delPoPEvent();
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_DEL_EVENT, this, "CountriesBox"));
}
private function initShow():void{
this.obj = new Object();
this.initPos();
this.setFlag();
this.setPop();
this.initFlagEvent();
this.initPoPEvent();
if (GameInfo.cnversion){
this.visible = false;
this.setLanguage("cn");
};
}
private function initPos():void{
var p:Point = new Point();
p = this.parent.localToGlobal(new Point(x, y));
if (p.y > (GameInfo.height / 2)){
this.mul = 1;
} else {
this.mul = -1;
};
}
private function setFlag():void{
this.country_name = (getChildByName("countryName") as MovieClip);
this.flagMc = (getChildByName("flag") as MovieClip);
this.flagMc.gotoAndStop(CountryInfo.instance.country);
this.country_name.gotoAndStop(CountryInfo.instance.country);
}
private function setPop():void{
var unitW:Number;
var unitH:Number;
var pop_flag:MovieClip;
var _name:String;
var pop_flag_flag:MovieClip;
var dx:Number = 0;
var dy:Number = 0;
this.pop = (getChildByName("popList") as Sprite);
this.selectBox = (getChildByName("selectbox") as MovieClip);
unitW = this.pop.getChildByName("_blank").width;
unitH = (this.pop.getChildByName("_blank").height - 1);
this.baseX = this.selectBox.x;
this.nameGroup = CountryInfo.instance.countryGroup;
var len:int = this.nameGroup.length;
if (this.mul == 1){
this.baseY = ((this.selectBox.y - (Math.round((len / 2)) * unitH)) + unitH);
} else {
this.baseY = ((this.selectBox.y + this.selectBox.height) + unitH);
};
this.pop.y = this.baseY;
this.pop.visible = false;
this.pop.getChildByName("_blank").visible = false;
this.i = 0;
while (this.i < len) {
_name = this.nameGroup[this.i];
if (this.pop.getChildByName(("l_" + _name)) != null){
pop_flag = (this.pop.getChildByName(("l_" + _name)) as MovieClip);
pop_flag.mouseChildren = false;
pop_flag.buttonMode = true;
pop_flag.stop();
pop_flag_flag = (pop_flag.getChildByName("flag") as MovieClip);
pop_flag_flag.mouseEnabled = false;
pop_flag_flag.mouseChildren = false;
pop_flag_flag.gotoAndStop(_name);
this.obj[("l_" + _name)] = true;
dx = (((this.i % 2) == 0)) ? 0 : 1;
pop_flag.x = ((unitW * (this.i % 2)) - dx);
pop_flag.y = ((unitH * Math.floor((this.i / 2))) - unitH);
};
this.i++;
};
this.i = 0;
while (this.i < this.pop.numChildren) {
if (this.pop.getChildAt(this.i).name.indexOf("l_") != -1){
if (this.obj[this.pop.getChildAt(this.i).name] == undefined){
this.pop.getChildAt(this.i).visible = false;
};
};
this.i++;
};
if ((this.nameGroup.length % 2) == 0){
this.pop.getChildByName("_blank").visible = false;
} else {
this.pop.getChildByName("_blank").visible = true;
this.pop.getChildByName("_blank").x = (unitW - 1);
this.pop.getChildByName("_blank").y = (((unitH * Math.floor((this.nameGroup.length / 2))) - unitH) - dy);
};
}
private function initFlagEvent():void{
addEventListener(MouseEvent.ROLL_OVER, this.overHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, this.outHandler, false, 0, true);
addEventListener(MouseEvent.CLICK, this.clickHandler, false, 0, true);
}
private function clickHandler(e:MouseEvent):void{
var _flag:MovieClip;
var _name:String = e.target["name"];
if (_name == "_blank"){
return;
};
if (_name.indexOf("l_") != -1){
_flag = (e.target["getChildByName"]("flag") as MovieClip);
this.flagMc.gotoAndStop(_name.substr(2));
this.country_name.gotoAndStop(_flag.currentFrame);
this.setLanguage(_name.substr(2));
this.pop.visible = false;
};
}
private function setLanguage(_cnm:String):void{
CountryInfo.instance.country = _cnm;
CountryCookie.country = _cnm;
Dispatcher.langChanged();
}
private function overHandler(e:MouseEvent):void{
this.pop.visible = true;
}
private function outHandler(e:MouseEvent):void{
this.pop.visible = false;
}
private function initPoPEvent():void{
this.pop.addEventListener(MouseEvent.MOUSE_OVER, this.overPoPHandler);
this.pop.addEventListener(MouseEvent.MOUSE_OUT, this.outPoPHandler);
}
private function delPoPEvent():void{
this.pop.removeEventListener(MouseEvent.MOUSE_OVER, this.overPoPHandler);
this.pop.removeEventListener(MouseEvent.MOUSE_OUT, this.outPoPHandler);
}
private function overPoPHandler(e:MouseEvent):void{
var _local2 = e.target;
_local2["gotoAndStop"](2);
}
private function outPoPHandler(e:MouseEvent):void{
var _local2 = e.target;
_local2["gotoAndStop"](1);
}
}
}//package zlong.display
Section 171
//Dispatcher (zlong.display.Dispatcher)
package zlong.display {
import flash.events.*;
import zlong.*;
class Dispatcher {
localComponent_internal static const VERSION:String = "v1.08.201012121509";
static const LANGUAGE_CHANGED:String = "languageChanged";
static var dispatcher:EventDispatcher = new EventDispatcher();
static function langChanged():void{
dispatcher.dispatchEvent(new Event(LANGUAGE_CHANGED));
}
}
}//package zlong.display
Section 172
//ExtButton (zlong.display.ExtButton)
package zlong.display {
import flash.events.*;
import zlong.navigate.*;
public class ExtButton extends AbstractBindingDisplay {
private var _type:String;// = "moregames"
private var _position:String;// = "button_preloader"
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public function ExtButton(){
super();
this.gotoAndStop(1);
this.buttonMode = true;
this.mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_INIT, this, "ExtButton"));
}
private function addToStageHandler(e:Event):void{
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_ADDED_TO_STAGE, this, "ExtButton"));
this.initEvent();
}
private function removeFromStageHandler(e:Event):void{
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_REMOVE_TO_STAGE, this, "ExtButton"));
this.delEvent();
}
override public function initEvent(e:Event=null):void{
if (this.hasEventListener(Event.ADDED_TO_STAGE)){
removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
};
this.addEventListener(MouseEvent.CLICK, this.clickHandler);
this.addEventListener(MouseEvent.ROLL_OVER, this.rollOverHandler);
this.addEventListener(MouseEvent.MOUSE_DOWN, this.mouseDownHandler);
this.addEventListener(MouseEvent.MOUSE_UP, this.mouseUpHandler);
this.addEventListener(MouseEvent.ROLL_OUT, this.rollOutHandler);
this.addEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler);
}
override public function delEvent(e:Event=null):void{
this.removeEventListener(MouseEvent.CLICK, this.clickHandler);
this.removeEventListener(MouseEvent.ROLL_OVER, this.rollOverHandler);
this.removeEventListener(MouseEvent.MOUSE_DOWN, this.mouseDownHandler);
this.removeEventListener(MouseEvent.MOUSE_UP, this.mouseUpHandler);
this.removeEventListener(MouseEvent.ROLL_OUT, this.rollOutHandler);
if (this.hasEventListener(Event.ADDED_TO_STAGE)){
removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
};
if (this.hasEventListener(Event.REMOVED_FROM_STAGE)){
removeEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler);
};
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_DEL_EVENT, this, "ExtButton"));
}
public function set position(_str:String):void{
this._position = _str;
}
public function set type(_str:String):void{
this._type = _str;
}
private function clickHandler(e:MouseEvent):void{
if (this._type == "moregames"){
Handler.click_moregames(this._position);
} else {
Handler.click_thisgame(this._position);
};
}
private function rollOverHandler(evt:MouseEvent):void{
this.gotoAndStop(2);
}
private function mouseDownHandler(evt:MouseEvent):void{
this.gotoAndStop(3);
}
private function mouseUpHandler(evt:MouseEvent):void{
this.gotoAndStop(2);
}
private function rollOutHandler(evt:MouseEvent):void{
this.gotoAndStop(1);
}
}
}//package zlong.display
Section 173
//HyvesLoading (zlong.display.HyvesLoading)
package zlong.display {
import flash.display.*;
import zlong.country.*;
import zlong.*;
public class HyvesLoading extends Sprite {
public function HyvesLoading(){
var logo:Sprite;
var logohyves:Sprite;
var hyves:Sprite;
var poweredby:Sprite;
super();
if (CountryInfo.instance.portal == GameSetting.PORTAL_TYPE_HYVES){
logo = (this.getChildByName("logo") as Sprite);
if (logo){
logo.visible = false;
};
Trace("||error||", "logo not in HyvesLoading");
} else {
logohyves = (this.getChildByName("logohyves") as Sprite);
hyves = (this.getChildByName("hyves") as Sprite);
poweredby = (this.getChildByName("poweredby") as Sprite);
logohyves.visible = false;
hyves.visible = false;
poweredby.visible = false;
//unresolved jump
var _slot1 = e;
Trace("||error||", _slot1);
this.visible = false;
};
}
}
}//package zlong.display
Section 174
//Logo (zlong.display.Logo)
package zlong.display {
import flash.display.*;
import flash.events.*;
import zlong.breathxue.utils.math.*;
import zlong.country.*;
import zlong.navigate.*;
public class Logo extends AbstractBindingDisplay {
private const MAX_WIDTH:int = 200;
private const Max_HEIGHT:int = 50;
private var _hitArea:Sprite;
private var _position:String;// = "logo_preloader"
private var _alignHorizontal:String;// = "Center"
private var _alignVertical:String;// = "Center"
private var _maxWidth:Number;// = 150
private var _maxHeight:Number;// = 40
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public function Logo(){
super();
this.initDis();
addEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler, false, 0, true);
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_INIT, this, "Logo"));
}
private function addToStageHandler(e:Event):void{
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_ADDED_TO_STAGE, this, "Logo"));
this.initEvent();
}
private function removeFromStageHandler(e:Event):void{
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_REMOVE_TO_STAGE, this, "Logo"));
this.delEvent();
}
override public function initEvent(e:Event=null):void{
gotoAndStop(CountryInfo.instance.domain);
if (this.hasEventListener(Event.ADDED_TO_STAGE)){
removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
};
this.addEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler);
this.addEventListener(MouseEvent.CLICK, this.clickHandler);
Dispatcher.dispatcher.addEventListener(Dispatcher.LANGUAGE_CHANGED, this.langChangeHandler);
this.updateView();
}
override public function delEvent(e:Event=null):void{
this.delDis();
if (this.hasEventListener(Event.ADDED_TO_STAGE)){
removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
};
if (this.hasEventListener(Event.REMOVED_FROM_STAGE)){
removeEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler);
};
this.removeEventListener(MouseEvent.CLICK, this.clickHandler);
Dispatcher.dispatcher.removeEventListener(Dispatcher.LANGUAGE_CHANGED, this.langChangeHandler);
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_DEL_EVENT, this, "Logo"));
}
public function set position(_str:String):void{
this._position = _str;
}
public function set alignHorizontal(str:String):void{
this._alignHorizontal = str;
}
public function set alignVertical(str:String):void{
this._alignVertical = str;
}
public function set maxWidth(value:Number):void{
if (value < 0){
value = 0;
} else {
if (value > this.MAX_WIDTH){
value = this.MAX_WIDTH;
};
};
this._maxWidth = value;
}
public function set maxHeight(value:Number):void{
if (value < 0){
value = 0;
} else {
if (value > this.Max_HEIGHT){
value = this.Max_HEIGHT;
};
};
this._maxHeight = value;
}
private function updateView():void{
var wh:mVector;
var scale1:Number;
var scale2:Number;
var scale:Number;
var twh:Sprite = (this.getChildByName("wh") as Sprite);
var target:Sprite = (this.getChildAt(0) as Sprite);
if (!target){
return;
};
target.scaleX = 1;
target.scaleY = 1;
if (twh){
wh = new mVector(twh.width, twh.height);
} else {
wh = new mVector(target.width, target.height);
};
if ((((wh.x > 0)) && ((wh.y > 0)))){
scale1 = (this._maxHeight / wh.y);
scale2 = (this._maxWidth / wh.x);
scale = ((scale1 > scale2)) ? scale2 : scale1;
wh.multEquals(scale);
target.scaleX = scale;
target.scaleY = scale;
};
if (this._alignHorizontal){
switch (this._alignHorizontal){
case "Left":
target.x = 0;
break;
case "Right":
target.x = (this.MAX_WIDTH - wh.x);
break;
case "Center":
target.x = ((this.MAX_WIDTH - wh.x) / 2);
break;
};
};
if (this._alignVertical){
switch (this._alignVertical){
case "Up":
target.y = 0;
break;
case "Down":
target.y = (this.Max_HEIGHT - wh.y);
break;
case "Center":
target.y = ((this.Max_HEIGHT - wh.y) / 2);
break;
};
};
this._hitArea.width = wh.x;
this._hitArea.height = wh.y;
this._hitArea.x = target.x;
this._hitArea.y = target.y;
}
private function initDis():void{
buttonMode = true;
this._hitArea = new Sprite();
this.addChild(this._hitArea);
this._hitArea.graphics.beginFill(3368601, 0);
this._hitArea.graphics.drawRect(0, 0, 10, 10);
this._hitArea.graphics.endFill();
this.getChildByName("displayArea_mc").visible = false;
var i:int;
while (i < this.totalFrames) {
this.addFrameScript(i, this.updateView);
i++;
};
}
private function delDis():void{
stop();
}
private function clickHandler(e:MouseEvent):void{
Handler.click_moregames(this._position);
}
private function langChangeHandler(e:Event):void{
gotoAndStop(CountryInfo.instance.domain);
}
}
}//package zlong.display
Section 175
//Menu (zlong.display.Menu)
package zlong.display {
import flash.events.*;
import flash.display.*;
import zlong.country.*;
import zlong.*;
import flash.ui.*;
import zlong.navigate.*;
public class Menu {
private var displayObject:InteractiveObject;
private var menu:ContextMenu;
private var item:ContextMenuItem;
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public function Menu(doc:InteractiveObject){
super();
this.displayObject = doc;
this.init();
this.initEvent();
}
private function init():void{
this.menu = new ContextMenu();
this.menu.hideBuiltInItems();
var defaultItems:ContextMenuBuiltInItems = this.menu.builtInItems;
defaultItems.print = true;
defaultItems.zoom = true;
defaultItems.quality = true;
this.item = new ContextMenuItem(("MoreGame: " + CountryInfo.instance.domain));
this.menu.customItems.push(this.item);
this.displayObject.contextMenu = this.menu;
}
private function initEvent():void{
this.item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, this.clickItemHandler);
Dispatcher.dispatcher.addEventListener(Dispatcher.LANGUAGE_CHANGED, this.changeLang);
}
private function changeLang(e:Event):void{
this.item.caption = CountryInfo.instance.domain;
}
private function clickItemHandler(e:ContextMenuEvent):void{
Handler.click_moregames("Contex_Menu");
}
}
}//package zlong.display
Section 176
//TranText (zlong.display.TranText)
package zlong.display {
import flash.events.*;
import zlong.country.*;
public class TranText extends AbstractBindingDisplay {
private var isChange:Boolean;// = true
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public function TranText(){
super();
addEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler, false, 0, true);
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_INIT, this, "TranText"));
}
private function addToStageHandler(e:Event):void{
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_ADDED_TO_STAGE, this, "TranText"));
this.initEvent();
}
private function removeFromStageHandler(e:Event):void{
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_REMOVE_TO_STAGE, this, "TranText"));
this.delEvent();
}
override public function initEvent(e:Event=null):void{
this.changeLang();
if (this.hasEventListener(Event.ADDED_TO_STAGE)){
removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
};
addEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler);
Dispatcher.dispatcher.addEventListener(Dispatcher.LANGUAGE_CHANGED, this.langChangeHandler);
}
override public function delEvent(e:Event=null):void{
if (this.hasEventListener(Event.ADDED_TO_STAGE)){
removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler);
};
if (this.hasEventListener(Event.REMOVED_FROM_STAGE)){
removeEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler);
};
Dispatcher.dispatcher.removeEventListener(Dispatcher.LANGUAGE_CHANGED, this.langChangeHandler);
BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_DEL_EVENT, this, "TranText"));
}
public function set change(_v:Boolean):void{
this.isChange = _v;
}
private function changeLang():void{
gotoAndStop(CountryInfo.instance.language);
}
private function langChangeHandler(e:Event):void{
if (this.isChange){
this.changeLang();
};
}
}
}//package zlong.display
Section 177
//DomainData (zlong.domain.DomainData)
package zlong.domain {
import zlong.*;
final class DomainData {
localComponent_internal static const VERSION:String = "v1.08.201012121509";
static const allowedDomain:Array = ["www8.agame.com", "www.zlonggamestest.com", "gamedev.dev.spilgames.com"];
}
}//package zlong.domain
Section 178
//DomainInfo (zlong.domain.DomainInfo)
package zlong.domain {
import flash.net.*;
import zlong.*;
public final class DomainInfo {
private var _allowed:Boolean;
private var _domain:String;
private var _domainAb:String;
localComponent_internal static const VERSION:String = "v1.08.201012121509";
private static var _instance:DomainInfo;
public function DomainInfo(){
super();
this._domain = new LocalConnection().domain;
this.initAllowed();
this.initAb();
}
localComponent_internal function get allowed():Boolean{
return (this._allowed);
}
localComponent_internal function get domain():String{
return (this._domain);
}
localComponent_internal function get domainAb():String{
return (this._domainAb);
}
private function initAllowed():void{
var i:int;
while (i < DomainData.allowedDomain.length) {
if (this._domain == DomainData.allowedDomain[i]){
this._allowed = true;
break;
};
i++;
};
}
private function initAb():void{
var temp:Array;
var extention:int;
var name:int;
if (this._domain != "localhost"){
temp = this._domain.split(".");
extention = (temp.length - 1);
name = (temp.length - 2);
this._domainAb = ((temp[name] + ".") + temp[extention]);
} else {
this._domainAb = "offline_play";
};
}
public static function get instance():DomainInfo{
if (_instance == null){
_instance = new (DomainInfo);
};
return (_instance);
}
}
}//package zlong.domain
Section 179
//Handler (zlong.navigate.Handler)
package zlong.navigate {
import flash.events.*;
import zlong.country.*;
import flash.net.*;
import zlong.*;
import flash.external.*;
public class Handler {
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public static function click_gamecn(e:Event=null):void{
var request:URLRequest = new URLRequest("http://www.game.com.cn");
navigateToURL(request, "_blank");
}
public static function click_copyright(e:Event=null):void{
var request:URLRequest;
if (CountryInfo.instance.country == "cn"){
request = new URLRequest("http://www.game.com.cn");
} else {
request = new URLRequest(CountryInfo.instance.copyRightLink);
};
navigateToURL(request, "_blank");
Trace("||Tester||", request.url);
}
public static function refurbish(e:Event=null):void{
var e = e;
ExternalInterface.call("location.reload");
navigateToURL(new URLRequest(ExternalInterface.call("window.location.href.toString")), "_top");
//unresolved jump
var _slot1 = myError;
}
public static function click_thisgame(_position:String):void{
var request:URLRequest;
if (CountryInfo.instance.country == "cn"){
request = new URLRequest(CountryInfo.instance.moreGameLink);
} else {
request = new URLRequest(((CountryInfo.instance.thisGameLink + "&utm_content=") + _position));
};
navigateToURL(request, "_blank");
Trace("||Tester||", request.url);
}
public static function click_moregames(_position:String):void{
var request:URLRequest;
if (CountryInfo.instance.country == "cn"){
request = new URLRequest(CountryInfo.instance.moreGameLink);
} else {
request = new URLRequest(((CountryInfo.instance.moreGameLink + "&utm_content=") + _position));
};
navigateToURL(request, "_blank");
Trace("||Tester||", request.url);
}
}
}//package zlong.navigate
Section 180
//LocalSiteDataLoader (zlong.site.LocalSiteDataLoader)
package zlong.site {
import flash.events.*;
import flash.net.*;
import zlong.*;
public class LocalSiteDataLoader {
private var _localSiteDataLoader:URLLoader;
localComponent_internal static const VERSION:String = "v1.08.201012121509";
private static var _localSiteDataLoaderFinish:Boolean = true;
public function LocalSiteDataLoader(){
super();
_localSiteDataLoaderFinish = false;
this._localSiteDataLoader = new URLLoader();
this._localSiteDataLoader.dataFormat = URLLoaderDataFormat.TEXT;
this._localSiteDataLoader.addEventListener(IOErrorEvent.IO_ERROR, this.errorHandler);
this._localSiteDataLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.errorHandler);
this._localSiteDataLoader.addEventListener(Event.COMPLETE, this.LocalSiteDataLoaderFinish);
this._localSiteDataLoader.load(new URLRequest(SiteData.URL));
//unresolved jump
var _slot1 = e;
errorHandler();
}
private function LocalSiteDataLoaderFinish(event:Event):void{
SiteData.allowedSite = new XML(this._localSiteDataLoader.data);
_localSiteDataLoaderFinish = true;
SiteInfo.instance.reInit();
this.delLocalSiteDataLoader();
}
private function errorHandler(e:Event=null):void{
SiteData.allowedSite = <sites></sites>
;
_localSiteDataLoaderFinish = true;
SiteInfo.instance.reInit();
this.delLocalSiteDataLoader();
}
private function delLocalSiteDataLoader():void{
this._localSiteDataLoader.removeEventListener(IOErrorEvent.IO_ERROR, this.errorHandler);
this._localSiteDataLoader.removeEventListener(Event.COMPLETE, this.LocalSiteDataLoaderFinish);
this._localSiteDataLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.errorHandler);
this._localSiteDataLoader = null;
}
public static function get localSiteDataLoaderFinish():Boolean{
return (_localSiteDataLoaderFinish);
}
}
}//package zlong.site
Section 181
//SiteData (zlong.site.SiteData)
package zlong.site {
import zlong.*;
public final class SiteData {
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public static const URL:String = "http://www8.agame.com/games/sitelock/sites.xml";
public static var allowedSite:XML = <sites></sites>
;
}
}//package zlong.site
Section 182
//SiteInfo (zlong.site.SiteInfo)
package zlong.site {
import zlong.*;
import zlong.data.*;
import flash.external.*;
public class SiteInfo {
private var _sites:Array;
private var _link:String;
private var _html:String;
private var _domain:String;
private var _allowed:Boolean;
localComponent_internal static const VERSION:String = "v1.08.201012121509";
private static var _instance:SiteInfo;
public function SiteInfo():void{
super();
this.initSites();
this._link = this.getURL();
this._html = this.getHtml(this._link);
this._domain = this.getDomain(this._link);
this._allowed = this.check(this._domain, this._sites);
}
function reInit():void{
this.initSites();
this._link = this.getURL();
this._html = this.getHtml(this._link);
this._domain = this.getDomain(this._link);
this._allowed = this.check(this._domain, this._sites);
}
public function get allowed():Boolean{
if (GameInfo.cnversion){
return (true);
};
return (this._allowed);
}
public function get link():String{
return (this._link);
}
public function get html():String{
return (this._html);
}
public function get domain():String{
return (this._domain);
}
private function initSites():void{
var siteList:XMLList;
var i:int;
this._sites = new Array();
if (SiteData.allowedSite != null){
siteList = SiteData.allowedSite.child("item");
i = 0;
while (i < siteList.length()) {
this._sites.push(siteList[i]);
i++;
};
};
}
private function getURL():String{
var loc:String;
try {
loc = ExternalInterface.call("window.location.href.toString");
//unresolved jump
var _slot1 = e;
loc = "error";
} finally {
};
if ((((loc == null)) || ((loc == "")))){
loc = "error";
};
if (String(loc).indexOf(".swf") != -1){
loc = "error";
};
return (loc);
}
private function getHtml(str:String):String{
var index:int = str.indexOf("?");
if (index != -1){
return (str);
};
return (str.substr(0, index));
}
private function getDomain(w:String):String{
var temp:String = "";
var j:uint = 7;
while (j < w.length) {
if (w.charAt(j) == "/"){
break;
};
temp = (temp + w.charAt(j));
j++;
};
return (temp);
}
private function check(str:String, arr:Array):Boolean{
var i:uint;
while (i < arr.length) {
if (str == arr[i]){
return (true);
};
i++;
};
return (false);
}
public static function get instance():SiteInfo{
if (_instance == null){
_instance = new (SiteInfo);
};
return (_instance);
}
}
}//package zlong.site
Section 183
//Award_HighScore (zlong.spilSystemTool.Award_HighScore)
package zlong.spilSystemTool {
import flash.events.*;
import flash.display.*;
import com.spilgames.api.*;
import zlong.*;
public class Award_HighScore implements IEventDispatcher {
framework_internal static const VERSION:String = "v1.15.201012131511";
public static const AWORD_HIGHSCORE_TOOL_INITIALIZED_COMPONENT:String = "SPILGAMESSERVICS_INITIALIZED_COMPONENT";
public static const AWORD_HIGHSCORE_TOOL_INITIALIZED_FAILED:String = "SPILGAMESSERVICS_INITIALIZED_FAILED";
static var _instance:Award_HighScore;
public function Award_HighScore(){
super();
}
public function init(gameName:String, container:Sprite, debug:Boolean=false, isLive:Boolean=true):void{
if (!SpilSetting._instance){
SpilSetting.instance.init(container, gameName, debug);
};
if (debug){
container.stage.addEventListener(KeyboardEvent.KEY_DOWN, this.keyBoardSendAwards);
};
}
public function isAwardsServiceAvailable():Boolean{
return (AwardsService.isAvailable());
}
public function isScoreServiceAvailable():Boolean{
return (ScoreService.isAvailable());
}
private function keyBoardSendAwards(event:Event):void{
var e:KeyboardEvent = (event as KeyboardEvent);
if (((((e.ctrlKey) && ((e.keyCode > 48)))) && ((e.keyCode < 58)))){
this.submitAchievement(("award" + String.fromCharCode(e.keyCode)));
};
}
public function requestAchievementList():void{
}
public function requestAchievementInfo(id:int):void{
}
public function requestHighScoreList():void{
}
public function requestUserHighScoreList(target_username:String):void{
}
public function submitScore(score):void{
if (ScoreService.isAvailable()){
ScoreService.submitScore(score);
} else {
Trace("||ZFW||", "No...isAvailable");
};
}
public function submitAchievement(achievement):void{
if (AwardsService.isAvailable()){
AwardsService.submitAward(achievement);
} else {
Trace("||ZFW||", "No...isAvailable");
};
}
public function isComponentInitialized():Boolean{
return (((AwardsService.isAvailable()) && (ScoreService.isAvailable())));
}
public function isDomainAllowed():Boolean{
return (this.isComponentInitialized());
}
public function destroy():void{
}
public function dispatchEvent(event:Event):Boolean{
return (SpilSetting.instance.dispatchEvent(event));
}
public function hasEventListener(type:String):Boolean{
return (SpilSetting.instance.hasEventListener(type));
}
public function willTrigger(type:String):Boolean{
return (SpilSetting.instance.willTrigger(type));
}
public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{
SpilSetting.instance.removeEventListener(type, listener, useCapture);
}
public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{
SpilSetting.instance.addEventListener(type, listener, useCapture, priority, useWeakReference);
}
public static function get instance():Award_HighScore{
if (_instance == null){
_instance = new (Award_HighScore);
};
return (_instance);
}
public static function get initializedFinish():Boolean{
if (SpilSetting._instance){
return (SpilSetting.instance.initSpilGamesServices_finish);
};
return (true);
}
}
}//package zlong.spilSystemTool
Section 184
//GoogleEvent (zlong.spilSystemTool.GoogleEvent)
package zlong.spilSystemTool {
import flash.display.*;
import flash.net.*;
import com.google.analytics.*;
import zlong.utils.*;
public class GoogleEvent {
private var _gaGameName:String;
private var _gaTracker:GATracker;
private var _gaEventArr:Array;
private var _gaSharedObject:SharedObject;
framework_internal static const VERSION:String = "v1.15.201012131511";
private static var _instance:GoogleEvent;
public function GoogleEvent():void{
super();
}
public function init(gameName:String, display:DisplayObject, debug:Boolean):void{
var k:String;
this._gaGameName = gameName;
this._gaTracker = new GATracker(display, "UA-6695967-1", "AS3", debug);
this._gaEventArr = new Array();
this._gaSharedObject = SharedObjectUtil.getLocal("googleEvent");
for (k in this._gaSharedObject.data) {
this._gaEventArr.push(k);
};
}
public function gaTrackEvent(eventName:String, isRepeatedInOneGame:Boolean=false, isRepeatedInOnePC:Boolean=true):void{
var i:int;
if (((!(isRepeatedInOnePC)) || (!(isRepeatedInOneGame)))){
i = 0;
while (i < this._gaEventArr.length) {
if (eventName == this._gaEventArr[i]){
return;
};
i++;
};
if (!isRepeatedInOnePC){
this._gaSharedObject.data[eventName] = 1;
SharedObjectUtil.save(this._gaSharedObject);
};
this._gaEventArr.push(eventName);
};
this._gaTracker.trackEvent(this._gaGameName, eventName, "per session", 0);
}
public static function get instance():GoogleEvent{
if (_instance == null){
_instance = new (GoogleEvent);
};
return (_instance);
}
}
}//package zlong.spilSystemTool
Section 185
//SpilSetting (zlong.spilSystemTool.SpilSetting)
package zlong.spilSystemTool {
import flash.events.*;
import flash.display.*;
import com.spilgames.api.*;
import zlong.*;
import flash.utils.*;
public class SpilSetting implements IEventDispatcher {
private var _isDebug:Boolean;
private var _spilGamesServices:SpilGamesServices;
private var _outTimer:Timer;
framework_internal static const VERSION:String = "v1.15.201012131511";
public static const SPILGAMESSERVICS_INITIALIZED_COMPONENT:String = "SPILGAMESSERVICS_INITIALIZED_COMPONENT";
public static const SPILGAMESSERVICS_INITIALIZED_FAILED:String = "SPILGAMESSERVICS_INITIALIZED_FAILED";
private static const MAX_CONNECT_TIME:int = 15;
private static var _initSpilGamesServices_finish:Boolean = true;
static var _instance:SpilSetting;
public function SpilSetting(){
super();
}
public function init(disObj:Sprite, gameName:String, isDebug:Boolean=false):void{
var disObj = disObj;
var gameName = gameName;
var isDebug = isDebug;
if (this._spilGamesServices){
return;
};
this._isDebug = isDebug;
if (disObj.stage == null){
throw (new ArgumentError("disObj need be added in stage"));
};
this._outTimer = new Timer((MAX_CONNECT_TIME * 1000), 1);
this._outTimer.start();
this._outTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.onTimerend_initSpilGamesServices);
_initSpilGamesServices_finish = false;
this._spilGamesServices = SpilGamesServices.getInstance();
this._spilGamesServices.addEventListener("servicesReady", this.onServicesReady);
this._spilGamesServices.addEventListener("servicesFailed", this.onServicesFailed);
this._spilGamesServices.connect(disObj);
//unresolved jump
var _slot1 = error;
onServicesFailed();
}
private function onTimerend_initSpilGamesServices(event:TimerEvent):void{
Trace("||ZFW||", "10second TimeOut--onTimerend_initSpilGamesServices");
this._spilGamesServices.dispatchEvent(new ErrorEvent("servicesFailed", false, false, ":connect_Timeout"));
}
private function onServicesReady(event:Event):void{
this._outTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, this.onTimerend_initSpilGamesServices);
this._outTimer.stop();
this._outTimer = null;
this._spilGamesServices.removeEventListener("servicesReady", this.onServicesReady);
this._spilGamesServices.removeEventListener("servicesFailed", this.onServicesFailed);
if (this._isDebug){
Trace("||ZFW||", ("SpilSetting_SpilGamesServices_Initialized_Complete::" + event));
};
_initSpilGamesServices_finish = true;
}
private function onServicesFailed(event:ErrorEvent=null):void{
this._outTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, this.onTimerend_initSpilGamesServices);
this._outTimer.stop();
this._outTimer = null;
this._spilGamesServices.removeEventListener("servicesReady", this.onServicesReady);
this._spilGamesServices.removeEventListener("servicesFailed", this.onServicesFailed);
if (this._isDebug){
Trace("||ZFW||", ("SpilSetting_SpilGamesServices_Initialize_Failed:" + event.text));
};
_initSpilGamesServices_finish = true;
}
public function checkUserLogin():Boolean{
if (this._spilGamesServices){
return (!(User.isGuest()));
};
throw (new ArgumentError("SpilSetting didn`t init"));
}
public function get itemId():String{
if (this._spilGamesServices){
return (String(this._spilGamesServices.getItemID()));
};
throw (new ArgumentError("SpilSetting didn`t init"));
}
public function get siteId():String{
if (this._spilGamesServices){
return (String(this._spilGamesServices.getSiteID()));
};
throw (new ArgumentError("SpilSetting didn`t init"));
}
public function get username():String{
if (this._spilGamesServices){
return (User.getUserName());
};
throw (new ArgumentError("SpilSetting didn`t init"));
}
public function get hash():String{
if (this._spilGamesServices){
return (User.getUserHash());
};
throw (new ArgumentError("SpilSetting didn`t init"));
}
public function get initSpilGamesServices_finish():Boolean{
if (this._spilGamesServices){
return (_initSpilGamesServices_finish);
};
throw (new ArgumentError("SpilSetting didn`t init"));
}
public function dispatchEvent(event:Event):Boolean{
if (this._spilGamesServices){
return (this._spilGamesServices.dispatchEvent(event));
};
throw (new ArgumentError("SpilSetting didn`t init"));
}
public function hasEventListener(type:String):Boolean{
if (this._spilGamesServices){
return (this._spilGamesServices.hasEventListener(type));
};
throw (new ArgumentError("SpilSetting didn`t init"));
}
public function willTrigger(type:String):Boolean{
if (this._spilGamesServices){
return (this._spilGamesServices.willTrigger(type));
};
throw (new ArgumentError("SpilSetting didn`t init"));
}
public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{
if (this._spilGamesServices){
this._spilGamesServices.removeEventListener(type, listener);
} else {
throw (new ArgumentError("SpilSetting didn`t init"));
};
}
public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{
if (this._spilGamesServices){
this._spilGamesServices.addEventListener(type, listener);
} else {
throw (new ArgumentError("SpilSetting didn`t init"));
};
}
public static function get instance():SpilSetting{
if (_instance == null){
_instance = new (SpilSetting);
};
return (_instance);
}
}
}//package zlong.spilSystemTool
Section 186
//AbstractLoadingClass (zlong.Template.AbstractLoadingClass)
package zlong.Template {
import flash.display.*;
import flash.utils.*;
public class AbstractLoadingClass {
framework_internal static const VERSION:String = "v1.15.201012131511";
public function AbstractLoadingClass(pmc:Sprite){
super();
if (getQualifiedClassName(this) == "zlong::Template::AbstractLoadingClass"){
throw (new ArgumentError("can't be constructed"));
};
}
public function destroy():void{
throw (new ArgumentError("function destroy must be override"));
}
}
}//package zlong.Template
Section 187
//AbstractMainClass (zlong.Template.AbstractMainClass)
package zlong.Template {
import flash.display.*;
import zlong.spilSystemTool.*;
import flash.utils.*;
import flash.text.*;
import net.hires.debug.*;
import zlong.utils.*;
public class AbstractMainClass {
private var __mainMc:Sprite;
protected var __GameMc:Sprite;
private var _childClass:Class;
framework_internal static const VERSION:String = "v1.15.201012131511";
public function AbstractMainClass(mainMc:Sprite){
super();
if (getQualifiedClassName(this) == "zlong::Template::AbstractMainClass"){
throw (new ArgumentError("can't be constructed"));
};
this._childClass = (getDefinitionByName(getQualifiedClassName(this)) as Class);
this.__mainMc = mainMc;
this.__GameMc = new Sprite();
this.__GameMc.name = "GameMc";
this.__mainMc.addChild(this.__GameMc);
this.initGameSetting();
}
protected function initGameSetting():void{
SpilSetting.instance.init((this.__mainMc.root as Sprite), this.gameNameUnderline, AbstractRootClass.instance._childClass["__debug__"]);
SharedObjectUtil.init(this.gameNameUnderline);
GoogleEvent.instance.init(this.gameNameUnderline, this.__mainMc.root, AbstractRootClass.instance._childClass["__debug__"]);
}
protected function showVersion(v:String):void{
var tempMc:Sprite;
tempMc = new Sprite();
tempMc.name = "VersionMc";
tempMc.mouseEnabled = false;
this.__mainMc.addChild(tempMc);
var _tf:TextField = new TextField();
_tf.selectable = false;
_tf.mouseEnabled = false;
_tf.defaultTextFormat = new TextFormat("_san", 12, 0);
_tf.width = 200;
_tf.height = 50;
_tf.x = 0;
_tf.y = 0;
_tf.text = v;
tempMc.addChild(_tf);
}
protected function showFPS():void{
this.__mainMc.addChild(new Stats());
}
public function get gameNameUnderline():String{
return (AbstractRootClass.cutGameName((AbstractRootClass.instance._childClass["GAME_NAME"] as String)));
}
}
}//package zlong.Template
Section 188
//AbstractRootClass (zlong.Template.AbstractRootClass)
package zlong.Template {
import flash.events.*;
import flash.display.*;
import zlong.spilSystemTool.*;
import zlong.site.*;
import zlong.utils.*;
import zlong.*;
import flash.utils.*;
import flash.geom.*;
public class AbstractRootClass extends MovieClip {
var _childClass:Class;
private var __mainMc:Sprite;
private var _game:Object;
private var _realLoaderUI:Object;
private var _textLoaderUI:TextLoader;
private var _loadingComplete:Boolean;
framework_internal static const VERSION:String = "v1.15.201012131511";
static var instance:AbstractRootClass;
public function AbstractRootClass(){
super();
if (stage){
this.init();
} else {
addEventListener(Event.ADDED_TO_STAGE, this.init);
};
}
private function init(event:Event=null):void{
removeEventListener(Event.ADDED_TO_STAGE, this.init);
instance = this;
this._loadingComplete = false;
this.stop();
if (getQualifiedClassName(this) == "zlong::Template::AbstractRootClass"){
throw (new ArgumentError("can't be constructed"));
};
this._childClass = (getDefinitionByName(getQualifiedClassName(this)) as Class);
if (!(this._childClass["GAME_FRAMERATE"] is int)){
throw (new ArgumentError("Class Root need static const Int 'GAME_FRAMERATE'"));
};
if (!(this._childClass["GAME_NAME"] is String)){
throw (new ArgumentError("Class Root need static const String 'GAME_NAME'"));
};
if (!(this._childClass["STAGE_WIGHT"] is int)){
throw (new ArgumentError("Class Root need static const Int 'STAGE_WIGHT'"));
};
if (!(this._childClass["STAGE_HEIGHT"] is int)){
throw (new ArgumentError("Class Root need static const Int 'STAGE_HEIGHT'"));
};
if (!(this._childClass["PORTAL_TYPE"] is String)){
throw (new ArgumentError("Class Root need static const String 'PORTAL_TYPE'"));
};
if (!(this._childClass["LOADING_CLASS_NAME"] is String)){
throw (new ArgumentError("Class Root need static const String 'LOADING_CLASS_NAME'"));
};
if (!(this._childClass["GAME_CLASS_NAME"] is String)){
throw (new ArgumentError("Class Root need static const String 'GAME_CLASS_NAME'"));
};
if (!(this._childClass["VERSION_NUM"] is String)){
throw (new ArgumentError("Class Root need static const String 'VERSION_NUM'"));
};
if (!(this._childClass["__debug__"] is Boolean)){
throw (new ArgumentError("Class Root need static const Boolean '__debug__'"));
};
stage.frameRate = this._childClass["GAME_FRAMERATE"];
this.__mainMc = new Sprite();
this.__mainMc.name = "__mainMc";
this.addChild(this.__mainMc);
if (!this._childClass["__debug__"]){
this.__mainMc.scrollRect = new Rectangle(0, 0, this._childClass["STAGE_WIGHT"], this._childClass["STAGE_HEIGHT"]);
};
this.addFrameScript(0, this.s0);
this.addFrameScript(1, this.s1);
this.addFrameScript(2, this.s2);
this.checkFPVersion();
HideConsole = ["|ZLC|"];
}
private function checkFPVersion():void{
FPVersionCheck.checkVersion();
}
private function s0():void{
this.script0();
this.stop();
this.initSettingBeforeLoading();
this.initTextloader();
this.initLoading();
}
private function s1():void{
var realLoadingClass:Class;
this.script1();
this.stop();
this._childClass["LOADING_CLASS_NAME"];
realLoadingClass = (getDefinitionByName(this._childClass["LOADING_CLASS_NAME"]) as Class);
//unresolved jump
var _slot1 = e;
throw (new ArgumentError(("can`t found the Loading Class " + _childClass["LOADING_CLASS_NAME"])));
return;
this._realLoaderUI = new realLoadingClass(this.__mainMc);
if (!(this._realLoaderUI is (getDefinitionByName("zlong.Template.AbstractLoadingClass") as Class))){
throw (new ArgumentError("the Loading Class mush extends Class AbstractLoadingClass"));
};
}
private function s2():void{
var mainClass:Class;
this.script2();
this.stop();
mainClass = (getDefinitionByName(this._childClass["GAME_CLASS_NAME"]) as Class);
//unresolved jump
var _slot1 = e;
throw (new ArgumentError(("can`t found the Main Class " + _childClass["GAME_CLASS_NAME"])));
return;
this._game = new mainClass(this.__mainMc);
if (!(this._game is (getDefinitionByName("zlong.Template.AbstractMainClass") as Class))){
throw (new ArgumentError("the Main Class mush extends Class AbstractMainClass"));
};
}
private function initLoading():void{
this.addEventListener(Event.ENTER_FRAME, this.updateLoading);
this.loaderInfo.addEventListener(Event.COMPLETE, this.LoadingComplete);
}
private function LoadingComplete(event:Event):void{
this._loadingComplete = true;
this.loaderInfo.removeEventListener(Event.COMPLETE, this.LoadingComplete);
}
private function updateLoading(event:Event):void{
if (this.framesLoaded == 1){
this._textLoaderUI.update();
};
if ((((this.currentFrame == 1)) && ((this.framesLoaded >= 2)))){
this.realLoaderLoadingFinish();
};
if ((((((((this.currentFrame == 2)) && (((this._loadingComplete) || ((this.totalFrames == this.framesLoaded)))))) && (LocalSiteDataLoader.localSiteDataLoaderFinish))) && (Award_HighScore.initializedFinish))){
this.loadingFinish();
this.delLoading();
};
Trace("||ZFW||", "currentFrame:", currentFrame, "framesLoaded", framesLoaded, "_loadingComplete", this._loadingComplete);
}
private function delLoading():void{
this.removeEventListener(Event.ENTER_FRAME, this.updateLoading);
}
private function initTextloader():void{
this._textLoaderUI = new TextLoader(this.__mainMc, this._childClass["STAGE_WIGHT"], this._childClass["STAGE_HEIGHT"]);
}
protected function delTextLoader():void{
if (this._textLoaderUI){
this._textLoaderUI.del();
this._textLoaderUI = null;
};
}
protected function delRealLoadingUI():void{
if (this._realLoaderUI){
var _local1 = this._realLoaderUI;
_local1["destroy"]();
};
}
protected function initSettingBeforeLoading():void{
new GameSetting(this, false, this._childClass["PORTAL_TYPE"], cutGameName((this._childClass["GAME_NAME"] as String)), (cutGameName((this._childClass["GAME_NAME"] as String), "-", true) + ".html"), this._childClass["STAGE_WIGHT"], this._childClass["STAGE_HEIGHT"]);
Award_HighScore.instance.init(cutGameName((this._childClass["GAME_NAME"] as String)), this, this._childClass["__debug__"], this._childClass["__debug__"]);
}
protected function realLoaderLoadingFinish():void{
this.delTextLoader();
this.gotoAndStop(2);
}
protected function loadingFinish():void{
this.delRealLoadingUI();
this.gotoAndStop(3);
}
protected function script0():void{
}
protected function script1():void{
}
protected function script2():void{
}
public static function cutGameName(gamename:String, delim:String="_", initialToUpperCase:Boolean=false):String{
var re:RegExp = /[-| |_]/;
var gameNamePartArr:Array = gamename.split(re);
var paraName:String = "";
var paraNamePart:String = "";
var i:int;
while (i < gameNamePartArr.length) {
paraNamePart = ((gameNamePartArr[i] as String).toLowerCase() + delim);
if (initialToUpperCase){
paraName = (paraName + (paraNamePart.charAt(0).toUpperCase() + paraNamePart.substr(1)));
} else {
paraName = (paraName + paraNamePart);
};
i++;
};
paraName = paraName.substr(0, (paraName.length - 1));
return (paraName);
}
}
}//package zlong.Template
Section 189
//TextLoader (zlong.Template.TextLoader)
package zlong.Template {
import flash.display.*;
import flash.text.*;
import zlong.*;
public class TextLoader {
private var _tf:TextField;
private var _loaderInfo:LoaderInfo;
private var _width:Number;
private var _height:Number;
private var _pmc:Sprite;
framework_internal static const VERSION:String = "v1.15.201012131511";
public function TextLoader(pmc:Sprite, width:Number, height:Number){
super();
this._pmc = pmc;
this._width = width;
this._height = height;
this._loaderInfo = pmc.root.loaderInfo;
this._tf = new TextField();
this._tf.autoSize = TextFieldAutoSize.LEFT;
this._tf.defaultTextFormat = new TextFormat("_sans", 16, 0, true);
this._tf.height = 30;
this._pmc.addChild(this._tf);
}
function update():void{
this._tf.text = (("Loading... " + Math.floor(((100 * this._loaderInfo.bytesLoaded) / this._loaderInfo.bytesTotal))) + "%");
this._tf.x = ((this._width - this._tf.width) / 2);
this._tf.y = ((this._height - this._tf.height) / 2);
}
function del():void{
this._pmc.removeChild(this._tf);
this._tf = null;
this._loaderInfo = null;
this._pmc = null;
}
}
}//package zlong.Template
Section 190
//FPVersionCheck (zlong.utils.FPVersionCheck)
package zlong.utils {
import zlong.*;
import flash.system.*;
public class FPVersionCheck {
public static const ALLOW_VERSION_MIN:String = "9,0,0,0";
public static function getVersion():String{
return (Capabilities.version);
}
framework_internal static function checkVersion():void{
var i:int;
var __information:String = Capabilities.version;
var __curVersion:Array = (__information.split(" ")[1] as String).split(",");
var __needVersion:Array = ALLOW_VERSION_MIN.split(",");
for (;i < __curVersion.length;i++) {
if (int(__curVersion[i]) > int(__needVersion[i])){
return;
};
if (int(__curVersion[i]) == int(__needVersion[i])){
continue;
} else {
if (int(__curVersion[i]) < int(__needVersion[i])){
Trace(("当前flash player版本为" + __information));
Trace(("游戏允许的最低flash player版本为flash player" + ALLOW_VERSION_MIN));
throw (new VerifyError(("The current Flash Player version is too low,please use the version above Flash Player" + ALLOW_VERSION_MIN)));
};
};
};
}
}
}//package zlong.utils
Section 191
//SharedObjectUtil (zlong.utils.SharedObjectUtil)
package zlong.utils {
import flash.events.*;
import flash.net.*;
public class SharedObjectUtil {
private static const PREFIX:String = "SpilGames";
private static const GLOBAL:String = "global";
private static var gameName:String;
private static var operatedSharedObject:SharedObject;
public static function init(sharedObjectGameName:String):void{
gameName = sharedObjectGameName;
}
public static function getGlobal(name:String):SharedObject{
var so:SharedObject;
var name = name;
so = SharedObject.getLocal(((((PREFIX + "_") + GLOBAL) + "_") + name), "/");
//unresolved jump
var _slot1 = err;
trace("create error");
return (so);
}
public static function getLocal(name:String):SharedObject{
var so:SharedObject;
var name = name;
so = SharedObject.getLocal(((((PREFIX + "_") + gameName) + "_") + name), "/");
//unresolved jump
var _slot1 = err;
trace("create error");
return (so);
}
public static function save(sharedObject:SharedObject):void{
var flushResult:String;
var sharedObject = sharedObject;
operatedSharedObject = sharedObject;
flushResult = operatedSharedObject.flush();
if (flushResult == SharedObjectFlushStatus.PENDING){
operatedSharedObject.addEventListener(NetStatusEvent.NET_STATUS, statusHandler);
} else {
operatedSharedObject = null;
};
//unresolved jump
var _slot1 = err;
}
private static function statusHandler(event:NetStatusEvent):void{
if (event.info.code == "SharedObject.Flush.Failed"){
} else {
if (event.info.code == "SharedObject.Flush.Success"){
trace("save successed");
};
};
operatedSharedObject.removeEventListener(NetStatusEvent.NET_STATUS, statusHandler);
operatedSharedObject = null;
}
}
}//package zlong.utils
Section 192
//framework_internal (zlong.framework_internal)
package zlong {
public namespace framework_internal = "http://www.zlonggames.com/flash/framework/internal";
}//package zlong
Section 193
//GameSetting (zlong.GameSetting)
package zlong {
import flash.display.*;
import zlong.site.*;
import zlong.country.*;
import zlong.data.*;
import zlong.display.*;
public class GameSetting {
private var _XMLLoader:LocalSiteDataLoader;
localComponent_internal static const VERSION:String = "v1.08.201012121509";
public static const PORTAL_TYPE_FAMILY:String = "family";
public static const PORTAL_TYPE_TWEEN:String = "tween";
public static const PORTAL_TYPE_GIRL:String = "girl";
public static const PORTAL_TYPE_TEEN:String = "teen";
public static const PORTAL_TYPE_ZAPAPA:String = "zapapa";
public static const PORTAL_TYPE_HYVES:String = "hyves";
public function GameSetting(displayObject:InteractiveObject, cnversion:Boolean, portal:String, name:String, html:String, width:int, height:int, loadSiteInfoXml:Boolean=true){
super();
GameInfo.cnversion = cnversion;
GameInfo.portal = portal;
GameInfo.name = name;
GameInfo.html = html;
GameInfo.width = width;
GameInfo.height = height;
if (loadSiteInfoXml){
this._XMLLoader = new LocalSiteDataLoader();
};
this.init();
this.initMenu(displayObject);
}
private function init():void{
new CountryCookie();
CountryInfo.instance.portal = GameInfo.portal;
if (CountryCookie.country == null){
CountryInfo.instance.country = "en_us";
} else {
CountryInfo.instance.country = String(CountryCookie.country);
};
}
private function initMenu(p:InteractiveObject):void{
new Menu(p);
}
}
}//package zlong
Section 194
//localComponent_internal (zlong.localComponent_internal)
package zlong {
public namespace localComponent_internal = "http://www.zlonggames.com/flash/localComponent/internal";
}//package zlong
Section 195
//AvoidtheTraffic (AvoidtheTraffic)
package {
import zlong.display.*;
public dynamic class AvoidtheTraffic extends TranText {
}
}//package
Section 196
//back_buttons (back_buttons)
package {
import util.*;
public dynamic class back_buttons extends BindButton {
}
}//package
Section 197
//backs (backs)
package {
import zlong.display.*;
public dynamic class backs extends TranText {
}
}//package
Section 198
//blueColor (blueColor)
package {
import flash.display.*;
public dynamic class blueColor extends MovieClip {
public var back1:MovieClip;
public var back2:MovieClip;
}
}//package
Section 199
//btnback (btnback)
package {
import util.*;
public dynamic class btnback extends BindButton {
}
}//package
Section 200
//button_press_s (button_press_s)
package {
import flash.media.*;
public dynamic class button_press_s extends Sound {
}
}//package
Section 201
//button_touch_s (button_touch_s)
package {
import flash.media.*;
public dynamic class button_touch_s extends Sound {
}
}//package
Section 202
//car1 (car1)
package {
import flash.display.*;
public dynamic class car1 extends MovieClip {
}
}//package
Section 203
//car2 (car2)
package {
import flash.display.*;
public dynamic class car2 extends MovieClip {
}
}//package
Section 204
//car3 (car3)
package {
import flash.display.*;
public dynamic class car3 extends MovieClip {
}
}//package
Section 205
//car4 (car4)
package {
import flash.display.*;
public dynamic class car4 extends MovieClip {
}
}//package
Section 206
//car5 (car5)
package {
import flash.display.*;
public dynamic class car5 extends MovieClip {
}
}//package
Section 207
//car6 (car6)
package {
import flash.display.*;
public dynamic class car6 extends MovieClip {
}
}//package
Section 208
//carDelivery (carDelivery)
package {
import flash.media.*;
public dynamic class carDelivery extends Sound {
}
}//package
Section 209
//Cloud1 (Cloud1)
package {
import flash.display.*;
public dynamic class Cloud1 extends Sprite {
}
}//package
Section 210
//Cloud2 (Cloud2)
package {
import flash.display.*;
public dynamic class Cloud2 extends Sprite {
}
}//package
Section 211
//coin_disappear (coin_disappear)
package {
import flash.display.*;
public dynamic class coin_disappear extends MovieClip {
}
}//package
Section 212
//coins (coins)
package {
import flash.display.*;
public dynamic class coins extends MovieClip {
public var hitting:MovieClip;
}
}//package
Section 213
//coinWords (coinWords)
package {
import flash.display.*;
public dynamic class coinWords extends MovieClip {
}
}//package
Section 214
//Collect_Coins_on_the_Street (Collect_Coins_on_the_Street)
package {
import zlong.display.*;
public dynamic class Collect_Coins_on_the_Street extends TranText {
}
}//package
Section 215
//Collect_extra_Pizza_and_Coins_on_the_Street (Collect_extra_Pizza_and_Coins_on_the_Street)
package {
import zlong.display.*;
public dynamic class Collect_extra_Pizza_and_Coins_on_the_Street extends TranText {
}
}//package
Section 216
//commitScores (commitScores)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class commitScores extends MovieClip {
public var commit:Submit_button;
public var numbers:TextField;
public var credits:creadit;
public var __id4_:Logocopy;
public var moreGames:MoreGamescopy;
public function commitScores(){
__setProp___id4__submit_UI_();
}
function __setProp___id4__submit_UI_(){
try {
__id4_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id4_.alignHorizontal = "Center";
__id4_.alignVertical = "Center";
__id4_.maxHeight = 40;
__id4_.maxWidth = 150;
__id4_.position = "logo_highscore";
try {
__id4_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 217
//complete_m (complete_m)
package {
import flash.media.*;
public dynamic class complete_m extends Sound {
}
}//package
Section 218
//Continue (Continue)
package {
import zlong.display.*;
public dynamic class Continue extends TranText {
}
}//package
Section 219
//Continues (Continues)
package {
import util.*;
public dynamic class Continues extends BindButton {
}
}//package
Section 220
//Copyright (Copyright)
package {
import zlong.display.*;
public dynamic class Copyright extends Copyright {
}
}//package
Section 221
//CountriesBox (CountriesBox)
package {
import flash.display.*;
import zlong.display.*;
public dynamic class CountriesBox extends CountriesBox {
public var countryName:MovieClip;
public var selectbox:MovieClip;
public var popList:MovieClip;
public var flag:MovieClip;
}
}//package
Section 222
//creadit (creadit)
package {
import util.*;
public dynamic class creadit extends BindButton {
}
}//package
Section 223
//Creadits (Creadits)
package {
import zlong.display.*;
public dynamic class Creadits extends TranText {
}
}//package
Section 224
//Credit (Credit)
package {
import flash.display.*;
public dynamic class Credit extends MovieClip {
public var ok_button:MovieClip;
}
}//package
Section 225
//creditsUI (creditsUI)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class creditsUI extends MovieClip {
public var __id3_:Logocopy;
public var btn_back:btnback;
public function creditsUI(){
__setProp___id3__CREDITS_ui_();
}
function __setProp___id3__CREDITS_ui_(){
try {
__id3_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id3_.alignHorizontal = "Center";
__id3_.alignVertical = "Center";
__id3_.maxHeight = 40;
__id3_.maxWidth = 150;
__id3_.position = "logo_credits";
try {
__id3_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 226
//creditsUI_title (creditsUI_title)
package {
import zlong.display.*;
public dynamic class creditsUI_title extends TranText {
}
}//package
Section 227
//Delivery_Complete (Delivery_Complete)
package {
import zlong.display.*;
public dynamic class Delivery_Complete extends TranText {
}
}//package
Section 228
//Delivery_Failed (Delivery_Failed)
package {
import zlong.display.*;
public dynamic class Delivery_Failed extends TranText {
}
}//package
Section 229
//deloverycomplete (deloverycomplete)
package {
import flash.display.*;
public dynamic class deloverycomplete extends MovieClip {
}
}//package
Section 230
//DiffSelect (DiffSelect)
package {
import flash.display.*;
import flash.text.*;
public dynamic class DiffSelect extends MovieClip {
public var easyMode_button:MovieClip;
public var hardMode_button:MovieClip;
public var normalMode_button:MovieClip;
public var back_button:MovieClip;
public var difficult_textField:TextField;
public var ok_button:MovieClip;
}
}//package
Section 231
//DocumentClass (DocumentClass)
package {
import flash.display.*;
public class DocumentClass extends MovieClip {
private var _container:Sprite;
public static const STAGEWIDTH:Number = 600;
public static const STAGEHEIGHT:Number = 450;
public function DocumentClass(){
super();
}
public function sleek():void{
this.gotoAndStop(3);
this.gotoAndStop(1);
}
private function initDis():void{
}
}
}//package
Section 232
//eatCoin (eatCoin)
package {
import flash.media.*;
public dynamic class eatCoin extends Sound {
}
}//package
Section 233
//eatP (eatP)
package {
import flash.media.*;
public dynamic class eatP extends Sound {
}
}//package
Section 234
//export (export)
package {
import flash.display.*;
public dynamic class export extends MovieClip {
}
}//package
Section 235
//failed_m (failed_m)
package {
import flash.media.*;
public dynamic class failed_m extends Sound {
}
}//package
Section 236
//Finishmoreleveltounlock2 (Finishmoreleveltounlock2)
package {
import zlong.display.*;
public dynamic class Finishmoreleveltounlock2 extends TranText {
}
}//package
Section 237
//Finishmoreleveltounlock3 (Finishmoreleveltounlock3)
package {
import zlong.display.*;
public dynamic class Finishmoreleveltounlock3 extends TranText {
}
}//package
Section 238
//Finishmoreleveltounlock4 (Finishmoreleveltounlock4)
package {
import zlong.display.*;
public dynamic class Finishmoreleveltounlock4 extends TranText {
}
}//package
Section 239
//game_lose (game_lose)
package {
import flash.media.*;
public dynamic class game_lose extends Sound {
}
}//package
Section 240
//game_win (game_win)
package {
import flash.media.*;
public dynamic class game_win extends Sound {
}
}//package
Section 241
//GameLost (GameLost)
package {
import flash.display.*;
public dynamic class GameLost extends MovieClip {
public var ok_button:MovieClip;
}
}//package
Section 242
//gameScreen (gameScreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class gameScreen extends MovieClip {
public var diff_textField:TextField;
public var pause_button:MovieClip;
public var level_textField:TextField;
public var lose_button:MovieClip;
public var user_textField:TextField;
public var win_button:MovieClip;
}
}//package
Section 243
//GameWin (GameWin)
package {
import flash.display.*;
public dynamic class GameWin extends MovieClip {
public var ok_button:MovieClip;
}
}//package
Section 244
//getCoinEffect (getCoinEffect)
package {
import flash.display.*;
public dynamic class getCoinEffect extends MovieClip {
public function getCoinEffect(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 245
//getPizzaEffect (getPizzaEffect)
package {
import flash.display.*;
public dynamic class getPizzaEffect extends MovieClip {
}
}//package
Section 246
//Good_Effects (Good_Effects)
package {
import flash.display.*;
public dynamic class Good_Effects extends MovieClip {
}
}//package
Section 247
//greenArea (greenArea)
package {
import flash.display.*;
public dynamic class greenArea extends MovieClip {
}
}//package
Section 248
//Guest (Guest)
package {
import zlong.display.*;
public dynamic class Guest extends TranText {
}
}//package
Section 249
//guest1 (guest1)
package {
import flash.display.*;
public dynamic class guest1 extends MovieClip {
public var wantPizza:MovieClip;
}
}//package
Section 250
//guest2 (guest2)
package {
import flash.display.*;
public dynamic class guest2 extends MovieClip {
public var wantPizza:MovieClip;
}
}//package
Section 251
//guest3 (guest3)
package {
import flash.display.*;
public dynamic class guest3 extends MovieClip {
public var wantPizza:MovieClip;
}
}//package
Section 252
//guest4 (guest4)
package {
import flash.display.*;
public dynamic class guest4 extends MovieClip {
public var wantPizza:MovieClip;
}
}//package
Section 253
//guest5 (guest5)
package {
import flash.display.*;
public dynamic class guest5 extends MovieClip {
public var wantPizza:MovieClip;
}
}//package
Section 254
//guest6 (guest6)
package {
import flash.display.*;
public dynamic class guest6 extends MovieClip {
public var wantPizza:MovieClip;
}
}//package
Section 255
//guest7 (guest7)
package {
import flash.display.*;
public dynamic class guest7 extends MovieClip {
public var wantPizza:MovieClip;
}
}//package
Section 256
//guestGetPizzas (guestGetPizzas)
package {
import flash.display.*;
public dynamic class guestGetPizzas extends MovieClip {
}
}//package
Section 257
//guestGetPizzaWords (guestGetPizzaWords)
package {
import flash.display.*;
public dynamic class guestGetPizzaWords extends MovieClip {
}
}//package
Section 258
//guestGetPSound (guestGetPSound)
package {
import flash.media.*;
public dynamic class guestGetPSound extends Sound {
}
}//package
Section 259
//guestMarks (guestMarks)
package {
import flash.display.*;
public dynamic class guestMarks extends MovieClip {
public function guestMarks(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 260
//HideConsole (HideConsole)
package {
public var HideConsole:Object;
HideConsole = false;
}//package
Section 261
//Hit (Hit)
package {
import zlong.display.*;
public dynamic class Hit extends TranText {
}
}//package
Section 262
//hitCarEffect (hitCarEffect)
package {
import flash.display.*;
public dynamic class hitCarEffect extends MovieClip {
public var star:MovieClip;
}
}//package
Section 263
//houseFour (houseFour)
package {
import flash.display.*;
public dynamic class houseFour extends MovieClip {
}
}//package
Section 264
//houseOne (houseOne)
package {
import flash.display.*;
public dynamic class houseOne extends MovieClip {
}
}//package
Section 265
//houseThree (houseThree)
package {
import flash.display.*;
public dynamic class houseThree extends MovieClip {
}
}//package
Section 266
//houseTwo (houseTwo)
package {
import flash.display.*;
public dynamic class houseTwo extends MovieClip {
}
}//package
Section 267
//How_to_Play3 (How_to_Play3)
package {
import zlong.display.*;
public dynamic class How_to_Play3 extends TranText {
}
}//package
Section 268
//HowtoPlay (HowtoPlay)
package {
import flash.display.*;
public dynamic class HowtoPlay extends MovieClip {
public var ok_button:MovieClip;
}
}//package
Section 269
//Howtoplay (Howtoplay)
package {
import util.*;
public dynamic class Howtoplay extends BindButton {
}
}//package
Section 270
//HowtoPlay_button (HowtoPlay_button)
package {
import util.*;
public dynamic class HowtoPlay_button extends BindButton {
public function HowtoPlay_button(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 271
//HowtoPlay2 (HowtoPlay2)
package {
import zlong.display.*;
public dynamic class HowtoPlay2 extends TranText {
}
}//package
Section 272
//HyvesLoading (HyvesLoading)
package {
import flash.display.*;
import zlong.display.*;
public dynamic class HyvesLoading extends HyvesLoading {
public var logo:Logo;
public var poweredby:MovieClip;
public var hyves:MovieClip;
public var logohyves:Logo;
}
}//package
Section 273
//Keyboard_to_Move_and_Avoid_the_Traffic (Keyboard_to_Move_and_Avoid_the_Traffic)
package {
import zlong.display.*;
public dynamic class Keyboard_to_Move_and_Avoid_the_Traffic extends TranText {
}
}//package
Section 274
//Level_Map (Level_Map)
package {
import zlong.display.*;
public dynamic class Level_Map extends TranText {
}
}//package
Section 275
//LevelLost (LevelLost)
package {
import flash.display.*;
public dynamic class LevelLost extends MovieClip {
public var back_button:MovieClip;
public var retry_button:MovieClip;
}
}//package
Section 276
//levelmap_m (levelmap_m)
package {
import flash.media.*;
public dynamic class levelmap_m extends Sound {
}
}//package
Section 277
//LevelSelect (LevelSelect)
package {
import flash.display.*;
import flash.text.*;
public dynamic class LevelSelect extends MovieClip {
public var levelbutton_2:MovieClip;
public var levelNum_textField:TextField;
public var levelbutton_3:MovieClip;
public var levelbutton_1:MovieClip;
public var levelbutton_4:MovieClip;
public var levelbutton_5:MovieClip;
public var ok_button:MovieClip;
}
}//package
Section 278
//LevelWin (LevelWin)
package {
import flash.display.*;
public dynamic class LevelWin extends MovieClip {
public var nextLevel_button:MovieClip;
}
}//package
Section 279
//Loadings (Loadings)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Loadings extends MovieClip {
public var perText:TextField;
public var bar:MovieClip;
}
}//package
Section 280
//localization (localization)
package {
import flash.display.*;
public dynamic class localization extends MovieClip {
}
}//package
Section 281
//Logo (Logo)
package {
import flash.display.*;
import zlong.display.*;
public dynamic class Logo extends Logo {
public var displayArea_mc:MovieClip;
public var wh:MovieClip;
}
}//package
Section 282
//Logocopy (Logocopy)
package {
import flash.display.*;
import zlong.display.*;
public dynamic class Logocopy extends Logo {
public var displayArea_mc:MovieClip;
public var wh:MovieClip;
}
}//package
Section 283
//Main (Main)
package {
import flash.display.*;
import com.google.analytics.*;
import zlong.Template.*;
import flash.geom.*;
import main.*;
import zlong.breathxue.utils.debug.*;
import nl.demonsters.debugger.*;
public class Main extends AbstractMainClass {
private var _stage:Stage;
public static var AllLevelFinishIsViewed:Boolean = false;
public static var FirstLevelFinishIsViewed:Boolean = false;
public static var mainMenuIsViewed:Boolean = false;
public static var tracker:GATracker;
public function Main(mainMc:Sprite){
super(mainMc);
if (Root.__debug__){
TC.InitTC((__GameMc.root as Sprite));
showFPS();
};
gameStart();
}
private function gameStart():void{
tracker = new GATracker(__GameMc, "UA-6695967-1", "AS3", false);
__GameMc.name = "_container";
__GameMc.scrollRect = new Rectangle(0, 0, 600, 450);
new MonsterDebugger(__GameMc);
_stage = __GameMc.stage;
new Manager(__GameMc);
}
}
}//package
Section 284
//mainmenu_backHouseAsset (mainmenu_backHouseAsset)
package {
import flash.display.*;
public dynamic class mainmenu_backHouseAsset extends MovieClip {
}
}//package
Section 285
//mainmenu_bigHouseAsset (mainmenu_bigHouseAsset)
package {
import flash.display.*;
public dynamic class mainmenu_bigHouseAsset extends MovieClip {
}
}//package
Section 286
//mainmenu_boyAsset (mainmenu_boyAsset)
package {
import flash.display.*;
public dynamic class mainmenu_boyAsset extends MovieClip {
}
}//package
Section 287
//mainmenu_itemAsset (mainmenu_itemAsset)
package {
import flash.display.*;
public dynamic class mainmenu_itemAsset extends MovieClip {
}
}//package
Section 288
//mainmenu_lightAsset (mainmenu_lightAsset)
package {
import flash.display.*;
public dynamic class mainmenu_lightAsset extends MovieClip {
}
}//package
Section 289
//mainmenu_midHouseAsset (mainmenu_midHouseAsset)
package {
import flash.display.*;
public dynamic class mainmenu_midHouseAsset extends MovieClip {
}
}//package
Section 290
//mainmenu_roadAsset (mainmenu_roadAsset)
package {
import flash.display.*;
public dynamic class mainmenu_roadAsset extends MovieClip {
}
}//package
Section 291
//mainmenu_shine (mainmenu_shine)
package {
import flash.display.*;
public dynamic class mainmenu_shine extends MovieClip {
}
}//package
Section 292
//mainmenu_title (mainmenu_title)
package {
import flash.display.*;
public dynamic class mainmenu_title extends MovieClip {
}
}//package
Section 293
//mainmenu_walkAsset (mainmenu_walkAsset)
package {
import flash.display.*;
public dynamic class mainmenu_walkAsset extends MovieClip {
}
}//package
Section 294
//MainMenuRescourse (MainMenuRescourse)
package {
import flash.display.*;
public dynamic class MainMenuRescourse extends MovieClip {
public var graphic_cfg:MovieClip;
public var more_game_anim:MovieClip;
public var start_game_anim:MovieClip;
public var sound_cfg:MovieClip;
public var how_to_play_anim:MovieClip;
}
}//package
Section 295
//mainScreen (mainScreen)
package {
import flash.display.*;
public dynamic class mainScreen extends MovieClip {
public var gameStart_button:MovieClip;
public var btn_googleEvent:MovieClip;
public var music_button:MovieClip;
public var btn_sendpic:MovieClip;
public var btn_sendAwords:MovieClip;
public var sound_button:MovieClip;
public var btn_sendscore:MovieClip;
public var howtoplay_button:MovieClip;
public var btn_sendavatar:MovieClip;
public var quality_button:MovieClip;
public var resume_button:MovieClip;
}
}//package
Section 296
//mainscreen_m (mainscreen_m)
package {
import flash.media.*;
public dynamic class mainscreen_m extends Sound {
}
}//package
Section 297
//map_selects (map_selects)
package {
import flash.media.*;
public dynamic class map_selects extends Sound {
}
}//package
Section 298
//map_touchs (map_touchs)
package {
import flash.media.*;
public dynamic class map_touchs extends Sound {
}
}//package
Section 299
//masks (masks)
package {
import flash.display.*;
public dynamic class masks extends MovieClip {
}
}//package
Section 300
//Mc_UiLoading (Mc_UiLoading)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Mc_UiLoading extends MovieClip {
public var perBar:MovieClip;
public var perText:TextField;
}
}//package
Section 301
//menu_press_s (menu_press_s)
package {
import flash.media.*;
public dynamic class menu_press_s extends Sound {
}
}//package
Section 302
//menu_presss (menu_presss)
package {
import flash.media.*;
public dynamic class menu_presss extends Sound {
}
}//package
Section 303
//menu_touch_s (menu_touch_s)
package {
import flash.media.*;
public dynamic class menu_touch_s extends Sound {
}
}//package
Section 304
//menu_touchs (menu_touchs)
package {
import flash.media.*;
public dynamic class menu_touchs extends Sound {
}
}//package
Section 305
//Menus (Menus)
package {
import zlong.display.*;
public dynamic class Menus extends TranText {
}
}//package
Section 306
//messigebox2 (messigebox2)
package {
import flash.display.*;
public dynamic class messigebox2 extends MovieClip {
public var message_box:MovieClip;
}
}//package
Section 307
//messigebox3 (messigebox3)
package {
import flash.display.*;
public dynamic class messigebox3 extends MovieClip {
public var message_box:MovieClip;
}
}//package
Section 308
//messigebox4 (messigebox4)
package {
import flash.display.*;
public dynamic class messigebox4 extends MovieClip {
public var message_box:MovieClip;
}
}//package
Section 309
//meun_buttons (meun_buttons)
package {
import util.*;
public dynamic class meun_buttons extends BindButton {
}
}//package
Section 310
//MMHow_to_Play (MMHow_to_Play)
package {
import zlong.display.*;
public dynamic class MMHow_to_Play extends TranText {
}
}//package
Section 311
//MMMoreGames_ (MMMoreGames_)
package {
import zlong.display.*;
public dynamic class MMMoreGames_ extends TranText {
}
}//package
Section 312
//MMStart_Game (MMStart_Game)
package {
import zlong.display.*;
public dynamic class MMStart_Game extends TranText {
}
}//package
Section 313
//MoreGamesat (MoreGamesat)
package {
import zlong.display.*;
public dynamic class MoreGamesat extends TranText {
}
}//package
Section 314
//MoreGamescopy (MoreGamescopy)
package {
import zlong.display.*;
public dynamic class MoreGamescopy extends ExtButton {
}
}//package
Section 315
//MoreGamesLogo (MoreGamesLogo)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import zlong.display.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
import flash.desktop.*;
import flash.globalization.*;
import flash.net.drm.*;
import flash.sensors.*;
import flash.text.ime.*;
import flash.text.engine.*;
public dynamic class MoreGamesLogo extends ExtButton {
public var __id1_:Logo;
public function MoreGamesLogo(){
this.__setProp___id1__MoreGamesLogo_Layer4_0();
}
function __setProp___id1__MoreGamesLogo_Layer4_0(){
try {
this.__id1_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
this.__id1_.alignHorizontal = "Center";
this.__id1_.alignVertical = "Down";
this.__id1_.maxHeight = 20;
this.__id1_.maxWidth = 150;
this.__id1_.position = "logo_preloader";
try {
this.__id1_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 316
//moveWords (moveWords)
package {
import flash.display.*;
public dynamic class moveWords extends MovieClip {
}
}//package
Section 317
//npc1 (npc1)
package {
import flash.display.*;
public dynamic class npc1 extends MovieClip {
public var npc:MovieClip;
public var wantPizza:MovieClip;
}
}//package
Section 318
//npc2 (npc2)
package {
import flash.display.*;
public dynamic class npc2 extends MovieClip {
public var npc:MovieClip;
public var wantPizza:MovieClip;
}
}//package
Section 319
//npc3 (npc3)
package {
import flash.display.*;
public dynamic class npc3 extends MovieClip {
public var npc:MovieClip;
public var wantPizza:MovieClip;
}
}//package
Section 320
//npc4 (npc4)
package {
import flash.display.*;
public dynamic class npc4 extends MovieClip {
public var npc:MovieClip;
public var wantPizza:MovieClip;
}
}//package
Section 321
//npc5 (npc5)
package {
import flash.display.*;
public dynamic class npc5 extends MovieClip {
public var npc:MovieClip;
public var wantPizza:MovieClip;
}
}//package
Section 322
//npc6 (npc6)
package {
import flash.display.*;
public dynamic class npc6 extends MovieClip {
public var npc:MovieClip;
public var wantPizza:MovieClip;
}
}//package
Section 323
//npc7 (npc7)
package {
import flash.display.*;
public dynamic class npc7 extends MovieClip {
public var npc:MovieClip;
public var wantPizza:MovieClip;
}
}//package
Section 324
//passCar (passCar)
package {
import flash.media.*;
public dynamic class passCar extends Sound {
}
}//package
Section 325
//passTar (passTar)
package {
import flash.media.*;
public dynamic class passTar extends Sound {
}
}//package
Section 326
//Pause (Pause)
package {
import zlong.display.*;
public dynamic class Pause extends TranText {
}
}//package
Section 327
//Pause_buttons (Pause_buttons)
package {
import util.*;
public dynamic class Pause_buttons extends BindButton {
}
}//package
Section 328
//pause_s (pause_s)
package {
import flash.media.*;
public dynamic class pause_s extends Sound {
}
}//package
Section 329
//pauses (pauses)
package {
import flash.display.*;
public dynamic class pauses extends MovieClip {
public var pause:MovieClip;
public function pauses(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package
Section 330
//Pizza (Pizza)
package {
import zlong.display.*;
public dynamic class Pizza extends TranText {
}
}//package
Section 331
//pizza_disappear (pizza_disappear)
package {
import flash.display.*;
public dynamic class pizza_disappear extends MovieClip {
}
}//package
Section 332
//pizzaBoyUI (pizzaBoyUI)
package {
import flash.display.*;
public dynamic class pizzaBoyUI extends MovieClip {
public var driving:MovieClip;
public var wheel:MovieClip;
public var hitting:MovieClip;
}
}//package
Section 333
//pizzahasbroken (pizzahasbroken)
package {
import flash.display.*;
public dynamic class pizzahasbroken extends MovieClip {
}
}//package
Section 334
//pizzaHitCustomerWords (pizzaHitCustomerWords)
package {
import flash.display.*;
public dynamic class pizzaHitCustomerWords extends MovieClip {
}
}//package
Section 335
//pizzaMarks (pizzaMarks)
package {
import flash.display.*;
public dynamic class pizzaMarks extends MovieClip {
public function pizzaMarks(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 336
//pizzas (pizzas)
package {
import flash.display.*;
public dynamic class pizzas extends MovieClip {
public var hitting:MovieClip;
}
}//package
Section 337
//Play (Play)
package {
import zlong.display.*;
public dynamic class Play extends TranText {
}
}//package
Section 338
//Plays (Plays)
package {
import util.*;
public dynamic class Plays extends BindButton {
}
}//package
Section 339
//pong (pong)
package {
import flash.media.*;
public dynamic class pong extends Sound {
}
}//package
Section 340
//Press (Press)
package {
import zlong.display.*;
public dynamic class Press extends TranText {
}
}//package
Section 341
//Press_Space_to_Continue (Press_Space_to_Continue)
package {
import zlong.display.*;
public dynamic class Press_Space_to_Continue extends TranText {
}
}//package
Section 342
//Press_Space_to_Continue2 (Press_Space_to_Continue2)
package {
import zlong.display.*;
public dynamic class Press_Space_to_Continue2 extends TranText {
}
}//package
Section 343
//Root (Root)
package {
import zlong.Template.*;
import zlong.*;
public class Root extends AbstractRootClass {
public static const STAGE_WIGHT:int = 600;
public static const STAGE_HEIGHT:int = 450;
public static const PORTAL_TYPE:String = "tween";
public static const VERSION_NUM:String = "v. 1.00";
public static const __debug__:Boolean = false;
public static const LOADING_CLASS_NAME:String = "main.Loading";
public static const GAME_NAME:String = "rush rush santa";
public static const GAME_FRAMERATE:int = 30;
public static const GAME_CLASS_NAME:String = "Main";
private static var _instance:Root;
public function Root(){
_instance = this;
super();
}
override protected function initSettingBeforeLoading():void{
new GameSetting(this, false, PORTAL_TYPE, cutGameName(GAME_NAME), (cutGameName(GAME_NAME, "-", true) + ".html"), STAGE_WIGHT, STAGE_HEIGHT);
}
override protected function script0():void{
Trace("script0");
}
override protected function script1():void{
Trace("script1");
}
override protected function script2():void{
Trace("script2");
}
}
}//package
Section 344
//rushrushsanta_map (rushrushsanta_map)
package {
import flash.media.*;
public dynamic class rushrushsanta_map extends Sound {
}
}//package
Section 345
//stantamenu (stantamenu)
package {
import flash.media.*;
public dynamic class stantamenu extends Sound {
}
}//package
Section 346
//Start (Start)
package {
import zlong.display.*;
public dynamic class Start extends TranText {
}
}//package
Section 347
//StartGame_button (StartGame_button)
package {
import util.*;
public dynamic class StartGame_button extends BindButton {
public function StartGame_button(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 348
//starts (starts)
package {
import flash.display.*;
public dynamic class starts extends MovieClip {
}
}//package
Section 349
//Submit_button (Submit_button)
package {
import util.*;
public dynamic class Submit_button extends BindButton {
}
}//package
Section 350
//Submit2 (Submit2)
package {
import zlong.display.*;
public dynamic class Submit2 extends TranText {
}
}//package
Section 351
//Submit3 (Submit3)
package {
import zlong.display.*;
public dynamic class Submit3 extends TranText {
}
}//package
Section 352
//SubmitterProxy (SubmitterProxy)
package {
import flash.display.*;
import flash.events.*;
import com.spilgames.api.*;
import flash.system.*;
public class SubmitterProxy extends MovieClip {
public var m_scoreXMLData:XML;
public var m_achievXMLData:XML;
private var parentObj;
public var m_scoreServerTimeXMLData:XML;
private static var _failed:Boolean = false;
private static var _loading:Boolean = false;
private static var _initialised:Boolean = false;
private static var SpilComp:SpilGamesServices;
public function SubmitterProxy():void{
var cld:*;
super();
Security.allowDomain("*");
parentObj = this.parent;
parentObj.stop();
var i:int = (parentObj.numChildren - 1);
while (i >= 0) {
cld = parentObj.getChildAt(i);
if ((cld is MovieClip)){
cld.visible = false;
} else {
if (cld != null){
parentObj.removeChild(cld);
};
};
i = (i - 1);
};
try {
parentObj["setLoader"] = setLoader;
parentObj["isDomainAllowed"] = isDomainAllowed;
parentObj["hasUserData"] = hasUserData;
parentObj["_O0000Ol01"] = setLoader;
parentObj["_O0Olll0lO"] = isDomainAllowed;
} catch(e:Error) {
trace(e);
};
}
private function SpilConfiguratorFailedToInitialise(_arg1:Event):void{
if (SpilComp){
SpilComp.removeEventListener("servicesReady", SpilConfiguratorReady);
SpilComp.removeEventListener(IOErrorEvent.IO_ERROR, SpilConfiguratorFailedToLoad);
SpilComp.removeEventListener("servicesFailed", SpilConfiguratorFailedToInitialise);
};
_failed = true;
_loading = false;
parentObj.dispatchEvent(new Event("LoadingFailed"));
}
public function SpilCallback(_arg1:int, _arg2:Object):void{
}
private function onLoadDone():void{
parentObj["isSWFReady"] = isSWFReady;
parentObj["setServerSelect"] = setServerSelect;
parentObj["requestScoreServerTime"] = requestScoreServerTime;
parentObj["getScoreServerTime"] = getScoreServerTime;
parentObj["submitScore"] = submitScore;
parentObj["requestHighscoreList"] = requestHighscoreList;
parentObj["requestUserHighscoreList"] = requestUserHighscoreList;
parentObj["submitGrantAward"] = submitGrantAward;
parentObj["requestAwardList"] = requestAwardList;
parentObj["requestAwardInfo"] = requestAwardInfo;
parentObj["destroy"] = destroy;
parentObj["getSpilGamesConnector"] = getSpilGamesConnector;
parentObj["_O0O1l0OO0"] = isSWFReady;
parentObj["_O0lOO010l"] = requestScoreServerTime;
parentObj["_O01Ol1O1O"] = getScoreServerTime;
parentObj["_O01lOO10O"] = submitScore;
parentObj["_O110l10ll"] = requestHighscoreList;
parentObj["_O11lll1OO0"] = requestUserHighscoreList;
parentObj["_O00OOl1Ol"] = submitGrantAward;
parentObj["_O1OlO10OO"] = requestAwardList;
parentObj["_OOlOOOll1"] = requestAwardInfo;
parentObj["_O010ll111"] = destroy;
parentObj["OO00OO1l1l"] = OO00OO1l1l();
}
private function processTimeResults(_arg1:int, _arg2:Object):void{
if (_arg2){
if (_arg2.errorMessage){
} else {
if (_arg2.xml){
m_scoreServerTimeXMLData = _arg2.xml;
};
};
} else {
m_scoreServerTimeXMLData = new XML("<hyscore><time>123456789</time></hyscore>");
};
}
private function isSWFReady():Boolean{
return (((SpilComp) && (SpilComp.isSWFReady())));
}
private function requestAwardList():void{
if (SpilComp){
SpilComp.send("Awards", "getAwardList", processAwardResults, {userName:SpilComp.getUserName(), userHash:SpilComp.getUserHash()});
};
}
public function set O1lll0ll0(_arg1:XML):void{
m_scoreServerTimeXMLData = _arg1;
}
public function OO00OO1l1l():SubmitterProxy{
return (this);
}
private function hasUserData():Boolean{
return (!(SpilComp.hasValidUserData()));
}
public function get O0l00l0O0():XML{
return (m_scoreXMLData);
}
private function destroy():void{
parentObj = null;
m_scoreXMLData = null;
m_achievXMLData = null;
}
private function requestScoreServerTime():void{
if (SpilComp){
SpilComp.send("Score", "checkServerTime", processTimeResults);
};
}
private function requestUserHighscoreList(_arg1:String):void{
if (SpilComp){
SpilComp.send("Score", "getUserRankList", processScoreResults, {targetUserName:_arg1});
};
}
public function get O1OlOO00O():XML{
return (m_achievXMLData);
}
private function submitGrantAward(_arg1:String):void{
if (SpilComp){
SpilComp.send("Awards", "submitAward", processAwardResults, {tag:_arg1, userName:SpilComp.getUserName(), userHash:SpilComp.getUserHash()});
};
}
private function setLoader(_arg1=null, _arg2:String="default", _arg3="", _arg4:int=0, _arg5:String="normal", _arg6:String="", _arg7:int=0, _arg8:int=0, _arg9:int=1, _arg10:Boolean=false, _arg11:int=1):void{
if (!_initialised){
trace("Initialising for the first time");
_initialised = true;
if (_arg1){
SpilComp = SpilGamesServices.getInstance();
SpilComp.addEventListener("servicesReady", SpilConfiguratorReady);
SpilComp.addEventListener(IOErrorEvent.IO_ERROR, SpilConfiguratorFailedToLoad);
SpilComp.addEventListener("servicesFailed", SpilConfiguratorFailedToInitialise);
_loading = true;
SpilComp.connect(_arg1);
} else {
throw (new Error("'container' cannot be null"));
};
} else {
trace("Initialisation called multiple times");
if (!_loading){
trace("Ready with loading");
if (!_failed){
trace("Simulate Submitter complete");
onLoadDone();
parentObj.dispatchEvent(new Event(Event.COMPLETE));
} else {
trace("Simulate Submitter LoadingFailed");
parentObj.dispatchEvent(new Event("LoadingFailed"));
};
} else {
trace("Still loading");
};
};
}
private function requestHighscoreList():void{
if (SpilComp){
SpilComp.send("Score", "getRankingList", processScoreResults, null);
};
}
public function set O0l00l0O0(_arg1:XML):void{
m_scoreXMLData = _arg1;
}
private function setServerSelect(_arg1:int):void{
if (SpilComp){
};
}
private function requestAwardInfo(_arg1:int):void{
if (SpilComp){
SpilComp.send("Awards", "getAward", SpilCallback, {awardID:_arg1});
};
}
public function set O1OlOO00O(_arg1:XML):void{
m_achievXMLData = _arg1;
}
private function processAwardResults(_arg1:int, _arg2:Object):void{
if (_arg2){
m_achievXMLData = _arg2.xml;
} else {
m_achievXMLData = new XML("<hyscor><awardid>147</awardid></hyscor>");
};
}
public function getSpilGamesConnector(){
return (SpilComp);
}
public function get O1lll0ll0():XML{
return (m_scoreServerTimeXMLData);
}
private function processScoreResults(_arg1:int, _arg2:Object):void{
if (_arg2){
m_scoreXMLData = _arg2.xml;
} else {
m_scoreXMLData = <hyscor><resultset>
<group>daily</group>
<result>
<position>1</position>
<timestamp>1271247768</timestamp>
<username>noot</username>
<authenticated>1</authenticated>
<score>2</score>
<gamelevel>0</gamelevel>
<country>NL</country>
</result>
</resultset>
<resultset>
<group>weekly</group>
<result>
<position>1</position>
<timestamp>1271247768</timestamp>
<username>noot</username>
<authenticated>1</authenticated>
<score>2</score>
<gamelevel>0</gamelevel>
<country>NL</country>
</result>
</resultset>
<resultset>
<group>monthly</group>
<result>
<position>1</position>
<timestamp>1271247768</timestamp>
<username>noot</username>
<authenticated>1</authenticated>
<score>2</score>
<gamelevel>0</gamelevel>
<country>NL</country>
</result>
</resultset>
</hyscor>
;
};
}
private function getScoreServerTime():void{
if (SpilComp){
SpilComp.send("Score", "getLatestTimeCheck", processTimeResults);
};
}
private function SpilConfiguratorReady(_arg1:Event):void{
if (SpilComp){
SpilComp.removeEventListener("servicesReady", SpilConfiguratorReady);
SpilComp.removeEventListener(IOErrorEvent.IO_ERROR, SpilConfiguratorFailedToLoad);
SpilComp.removeEventListener("servicesFailed", SpilConfiguratorFailedToInitialise);
};
_loading = false;
onLoadDone();
parentObj.dispatchEvent(new Event(Event.COMPLETE));
}
private function doCommTest():String{
if (SpilComp){
return ("y");
};
return (("FAILED " + SpilComp));
}
private function submitScore(_arg1:int):void{
if (SpilComp){
SpilComp.send("Score", "submitScore", processScoreResults, {score:_arg1, userName:SpilComp.getUserName(), userHash:SpilComp.getUserHash()});
};
}
private function SpilConfiguratorFailedToLoad(_arg1:Event):void{
if (SpilComp){
SpilComp.removeEventListener("servicesReady", SpilConfiguratorReady);
SpilComp.removeEventListener(IOErrorEvent.IO_ERROR, SpilConfiguratorFailedToLoad);
SpilComp.removeEventListener("servicesFailed", SpilConfiguratorFailedToInitialise);
};
trace("SpilConfiguratorFailedToLoad", _arg1.toString());
_failed = true;
_loading = false;
if (parentObj.hasEventListener(IOErrorEvent.IO_ERROR)){
parentObj.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR));
};
}
private function onLegacyEvent(_arg1:Event):void{
dispatchEvent(_arg1);
}
private function isDomainAllowed(_arg1:Boolean=false):Boolean{
return (SpilComp.isDomainAllowed());
}
private function setLoader2(_arg1=null, _arg2:String="default", _arg3:int=1, _arg4="", _arg5:int=0, _arg6:String="normal", _arg7:String="", _arg8:int=0, _arg9:int=0, _arg10:int=1, _arg11:Boolean=false, _arg12:int=1):void{
setLoader(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12);
}
}
}//package
Section 353
//success (success)
package {
import flash.display.*;
public dynamic class success extends MovieClip {
}
}//package
Section 354
//tarMark (tarMark)
package {
import flash.media.*;
public dynamic class tarMark extends Sound {
}
}//package
Section 355
//tars (tars)
package {
import flash.display.*;
public dynamic class tars extends MovieClip {
public var hitting:MovieClip;
public function tars(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package
Section 356
//Throw_Pizza_to_the_Customers (Throw_Pizza_to_the_Customers)
package {
import zlong.display.*;
public dynamic class Throw_Pizza_to_the_Customers extends TranText {
}
}//package
Section 357
//throwPizzas (throwPizzas)
package {
import flash.display.*;
public dynamic class throwPizzas extends MovieClip {
}
}//package
Section 358
//throwPizzaWords (throwPizzaWords)
package {
import flash.display.*;
public dynamic class throwPizzaWords extends MovieClip {
}
}//package
Section 359
//throwPSound (throwPSound)
package {
import flash.media.*;
public dynamic class throwPSound extends Sound {
}
}//package
Section 360
//title (title)
package {
import zlong.display.*;
public dynamic class title extends TranText {
}
}//package
Section 361
//toll_gate_Counts (toll_gate_Counts)
package {
import flash.display.*;
import flash.text.*;
public dynamic class toll_gate_Counts extends MovieClip {
public var pizzaNum:TextField;
public var totalNum:TextField;
public var guestNum:TextField;
public var bar:MovieClip;
public var right3:MovieClip;
public var coinNum:TextField;
}
}//package
Section 362
//tollGateFailed (tollGateFailed)
package {
import flash.display.*;
import flash.text.*;
public dynamic class tollGateFailed extends MovieClip {
public var pizzaNum:TextField;
public var totalNum:TextField;
public var guestNum:TextField;
public var bar:MovieClip;
public var right3:MovieClip;
public var coinNum:TextField;
}
}//package
Section 363
//TOTAL (TOTAL)
package {
import zlong.display.*;
public dynamic class TOTAL extends TranText {
}
}//package
Section 364
//TOTAL2 (TOTAL2)
package {
import zlong.display.*;
public dynamic class TOTAL2 extends TranText {
}
}//package
Section 365
//Trace (Trace)
package {
import flash.utils.*;
import zlong.breathxue.utils.debug.*;
public function Trace(... _args):void{
var i:String;
var TcClass:Class;
var args = _args;
var arg0 = "";
if ((args[0] is String)){
arg0 = args[0];
if ((((((((arg0.charAt(0) == "|")) && ((arg0.charAt(1) == "|")))) && ((arg0.charAt((arg0.length - 2)) == "|")))) && ((arg0.charAt((arg0.length - 1)) == "|")))){
arg0 = arg0.substring(1, (arg0.length - 1));
args.shift();
} else {
arg0 = "";
};
};
var isShowConsole:Boolean;
if (HideConsole == false){
isShowConsole = true;
} else {
if (HideConsole == true){
isShowConsole = false;
} else {
for (i in HideConsole) {
if (HideConsole[i] == arg0){
isShowConsole = false;
break;
};
};
};
};
if (isShowConsole){
trace((arg0 + args.join(" ")));
};
if (TcShow){
TcClass = (getDefinitionByName("zlong.breathxue.utils.debug.TC") as Class);
//unresolved jump
var _slot1 = e;
TcShow = false;
if (TcClass){
var _local3 = TcClass;
_local3["SHOW"](arg0, args);
};
};
}
}//package
Section 366
//trafficWords (trafficWords)
package {
import flash.display.*;
public dynamic class trafficWords extends MovieClip {
}
}//package
Section 367
//TXT_DOYOUWANT (TXT_DOYOUWANT)
package {
import zlong.display.*;
public dynamic class TXT_DOYOUWANT extends TranText {
}
}//package
Section 368
//txt_NO (txt_NO)
package {
import zlong.display.*;
public dynamic class txt_NO extends TranText {
}
}//package
Section 369
//txt_YES (txt_YES)
package {
import zlong.display.*;
public dynamic class txt_YES extends TranText {
}
}//package
Section 370
//UI (UI)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI extends MovieClip {
public var needNum:TextField;
public var level_mc:MovieClip;
public var coin_Num:TextField;
public var __id1_:Logocopy;
public var score_act:MovieClip;
public var pizza_Num:TextField;
public var stop_Button:Pause_buttons;
public function UI(){
__setProp___id1__UI();
}
function __setProp___id1__UI(){
try {
__id1_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id1_.alignHorizontal = "Center";
__id1_.alignVertical = "Center";
__id1_.maxHeight = 40;
__id1_.maxWidth = 150;
__id1_.position = "logo_playingGame";
try {
__id1_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 371
//UICupselect (UICupselect)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UICupselect extends MovieClip {
public var street4_lock:MovieClip;
public var __id0_:Logocopy;
public var street1:MovieClip;
public var cupBack:back_buttons;
public var street2:MovieClip;
public var street3:MovieClip;
public var streetShow:MovieClip;
public var street4:MovieClip;
public var street2_lock:MovieClip;
public var street3_lock:MovieClip;
public function UICupselect(){
__setProp___id0__levelmap();
}
function __setProp___id0__levelmap(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.alignHorizontal = "Center";
__id0_.alignVertical = "Center";
__id0_.maxHeight = 40;
__id0_.maxWidth = 150;
__id0_.position = "logo_levelselect";
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 372
//UIhowtoplay (UIhowtoplay)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UIhowtoplay extends MovieClip {
public var plays:Plays;
public var __id2_:Logocopy;
public function UIhowtoplay(){
__setProp___id2__Howtoplay();
}
function __setProp___id2__Howtoplay(){
try {
__id2_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id2_.alignHorizontal = "Center";
__id2_.alignVertical = "Center";
__id2_.maxHeight = 40;
__id2_.maxWidth = 150;
__id2_.position = "logo_help";
try {
__id2_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 373
//UIpassfilm (UIpassfilm)
package {
import flash.display.*;
public dynamic class UIpassfilm extends MovieClip {
}
}//package
Section 374
//Use_Arrow_Keys_to_move_around (Use_Arrow_Keys_to_move_around)
package {
import zlong.display.*;
public dynamic class Use_Arrow_Keys_to_move_around extends TranText {
}
}//package
Section 375
//Well_Done_Now_Deliver_for_more (Well_Done_Now_Deliver_for_more)
package {
import zlong.display.*;
public dynamic class Well_Done_Now_Deliver_for_more extends TranText {
}
}//package
Section 376
//xd_games (xd_games)
package {
import flash.media.*;
public dynamic class xd_games extends Sound {
}
}//package
Section 377
//xd_maps (xd_maps)
package {
import flash.media.*;
public dynamic class xd_maps extends Sound {
}
}//package
Section 378
//xd_menus (xd_menus)
package {
import flash.media.*;
public dynamic class xd_menus extends Sound {
}
}//package
Section 379
//yeah (yeah)
package {
import flash.media.*;
public dynamic class yeah extends Sound {
}
}//package
Section 380
//Your_score (Your_score)
package {
import zlong.display.*;
public dynamic class Your_score extends TranText {
}
}//package
Section 381
//zebroFour (zebroFour)
package {
import flash.display.*;
public dynamic class zebroFour extends MovieClip {
}
}//package
Section 382
//zebroOne (zebroOne)
package {
import flash.display.*;
public dynamic class zebroOne extends MovieClip {
}
}//package
Section 383
//zebroThree (zebroThree)
package {
import flash.display.*;
public dynamic class zebroThree extends MovieClip {
}
}//package
Section 384
//zebroTwo (zebroTwo)
package {
import flash.display.*;
public dynamic class zebroTwo extends MovieClip {
}
}//package