home *** CD-ROM | disk | FTP | other *** search
Text File | 2009-05-06 | 43.3 KB | 1,260 lines |
- package
- {
- import com.flex.*;
- import com.tools.Browser.SiteViewer;
- import com.ui.AppBackground;
- import com.ui.AppMainMenu;
- import com.ui.AppTopMenu;
- import com.ui.ToolsManager;
- import com.util.*;
- import flash.accessibility.*;
- import flash.data.*;
- import flash.debugger.*;
- import flash.desktop.*;
- import flash.display.*;
- import flash.errors.*;
- import flash.events.*;
- import flash.external.*;
- import flash.filesystem.*;
- import flash.filters.*;
- import flash.geom.*;
- import flash.html.*;
- import flash.html.script.*;
- import flash.media.*;
- import flash.net.*;
- import flash.printing.*;
- import flash.profiler.*;
- import flash.system.*;
- import flash.text.*;
- import flash.ui.*;
- import flash.utils.*;
- import flash.xml.*;
- import gs.TweenMax;
- import mx.binding.*;
- import mx.containers.Canvas;
- import mx.containers.HBox;
- import mx.controls.TextArea;
- import mx.core.UIComponentDescriptor;
- import mx.core.WindowedApplication;
- import mx.core.mx_internal;
- import mx.events.FlexEvent;
- import mx.events.PropertyChangeEvent;
- import mx.events.ResizeEvent;
- import mx.managers.PopUpManager;
- import mx.resources.*;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
- import mx.rpc.soap.mxml.Operation;
- import mx.rpc.soap.mxml.WebService;
- import mx.styles.*;
-
- use namespace mx_internal;
-
- public class kidoz extends WindowedApplication
- {
- mx_internal static var _kidoz_StylesInit_done:Boolean = false;
-
- private var _552310138locationUrl:TextArea;
-
- private var _embed__font_Arial_Unicode_MS_medium_normal_403044905:Class;
-
- private var _embed_css_png_leftArrow_up_png_1201750067:Class;
-
- private var _embed_css_png_btn_down_png_307255565:Class;
-
- public var topLeft:TopLeft;
-
- public var updateProgress:int;
-
- public var userInfo:Object;
-
- private var _1411084428appTop:Canvas;
-
- public var appWidth:int;
-
- public var usageTimer:UsageTimer;
-
- private var _379923513siteViewer:SiteViewer;
-
- private var _645375758currentErrorMsg:String;
-
- private var _1140090796topMenu:AppTopMenu;
-
- private var _embed__font_Arial_Unicode_MS_bold_normal_1139689196:Class;
-
- private var _embed_css_png_btn_up_png_723172121:Class;
-
- private var favoritesAlert:FavoritesAlert;
-
- private var _embed_css_png_leftArrow_over_png_1290443763:Class;
-
- public var loggedIn:Boolean;
-
- private var _93027910appBg:AppBackground;
-
- private var _embed_css_png_small_btn_over_png_1466500185:Class;
-
- private var parentalControl:ParentalControl;
-
- public var favorites:FavoritesManager;
-
- private var _embed_css_png_btn_exit_up_png_1137972161:Class;
-
- private var _732490988appMenuHolder:Canvas;
-
- public var parentsLoginOpen:Boolean;
-
- private var _embed_css_png_small_btn_down_png_1544154083:Class;
-
- private var _816631278viewer:Canvas;
-
- public var parentsLoginUrl:String;
-
- private var regForm:RegForm;
-
- private var testTime:Number;
-
- private var loadingAlert:LoadingAlert;
-
- public var loadingAlertOn:Boolean;
-
- private var _1643539006userInfoXML:XML;
-
- public var _settingsUrl:String = "http://kidoz.net/air/settings_standard.xml";
-
- private var _embed_css_png_btn_exit_over_png_805226735:Class;
-
- private var _embed_css_png_rightArrow_over_png_796846993:Class;
-
- public var appHeight:int;
-
- private var _embed_css_png_btn_exit_down_png_677240895:Class;
-
- private var _embed_css_png_rightArrow_up_png_1813949471:Class;
-
- public var logger:Logger;
-
- private var _embed_css_png_leftArrow_down_png_120521785:Class;
-
- private var _embed_css_png_btn_over_png_363930871:Class;
-
- private var _93027878appBG:Canvas;
-
- private var _1870114760topLeftHolder:HBox;
-
- private var _1014488750toolsManager:ToolsManager;
-
- private var _embed_css_png_rightArrow_down_png_440985553:Class;
-
- private var _642554749systemInfo:Object;
-
- private var parentsLogin:ParentsLogin;
-
- private var _3804ws:WebService;
-
- private var _embed_css_png_small_btn_up_png_530801655:Class;
-
- private var cursorID:Number = 0;
-
- private var _embed_css_png_btn_disable_png_2387183:Class;
-
- private var _documentDescriptor_:UIComponentDescriptor;
-
- public var appMainMenu:AppMainMenu;
-
- public var _referral:String = "KIDOZ";
-
- public function kidoz()
- {
- this._documentDescriptor_ = new UIComponentDescriptor({
- "type":WindowedApplication,
- "propertiesFactory":function():Object
- {
- return {"childDescriptors":[new UIComponentDescriptor({
- "type":Canvas,
- "id":"appBG",
- "events":{"resize":"__appBG_resize"},
- "propertiesFactory":function():Object
- {
- return {
- "percentWidth":100,
- "percentHeight":100,
- "x":0,
- "y":0,
- "verticalScrollPolicy":"off",
- "horizontalScrollPolicy":"off",
- "childDescriptors":[new UIComponentDescriptor({
- "type":AppBackground,
- "id":"appBg",
- "events":{"creationComplete":"__appBg_creationComplete"}
- })]
- };
- }
- }),new UIComponentDescriptor({
- "type":Canvas,
- "id":"appTop",
- "stylesFactory":function():void
- {
- this.top = "0";
- },
- "propertiesFactory":function():Object
- {
- return {
- "percentWidth":100,
- "height":100,
- "x":0,
- "verticalScrollPolicy":"off",
- "horizontalScrollPolicy":"off",
- "childDescriptors":[new UIComponentDescriptor({
- "type":AppTopMenu,
- "id":"topMenu",
- "events":{"creationComplete":"__topMenu_creationComplete"}
- })]
- };
- }
- }),new UIComponentDescriptor({
- "type":ToolsManager,
- "id":"toolsManager",
- "propertiesFactory":function():Object
- {
- return {
- "x":0,
- "y":0
- };
- }
- }),new UIComponentDescriptor({
- "type":Canvas,
- "id":"appMenuHolder",
- "stylesFactory":function():void
- {
- this.bottom = "0";
- },
- "propertiesFactory":function():Object
- {
- return {
- "percentWidth":100,
- "height":180,
- "x":0,
- "verticalScrollPolicy":"off",
- "horizontalScrollPolicy":"off"
- };
- }
- }),new UIComponentDescriptor({
- "type":HBox,
- "id":"topLeftHolder",
- "propertiesFactory":function():Object
- {
- return {
- "y":15,
- "x":10
- };
- }
- }),new UIComponentDescriptor({
- "type":Canvas,
- "id":"viewer",
- "stylesFactory":function():void
- {
- this.top = "0";
- },
- "propertiesFactory":function():Object
- {
- return {
- "percentWidth":100,
- "percentHeight":100,
- "x":0,
- "verticalScrollPolicy":"off",
- "horizontalScrollPolicy":"off",
- "childDescriptors":[new UIComponentDescriptor({
- "type":SiteViewer,
- "id":"siteViewer",
- "events":{"creationComplete":"__siteViewer_creationComplete"}
- }),new UIComponentDescriptor({
- "type":TextArea,
- "id":"locationUrl",
- "effects":["showEffect","hideEffect"],
- "stylesFactory":function():void
- {
- this.textAlign = "center";
- this.horizontalCenter = "0";
- this.color = 5417446;
- this.cornerRadius = 13;
- this.borderColor = 12246260;
- this.backgroundColor = 15792894;
- this.paddingTop = 5;
- this.showEffect = "fade";
- this.hideEffect = "fade";
- },
- "propertiesFactory":function():Object
- {
- return {
- "visible":false,
- "width":520,
- "y":17,
- "height":30,
- "editable":false
- };
- }
- })]
- };
- }
- })]};
- }
- });
- this._642554749systemInfo = new Object();
- this.userInfo = new Object();
- this._embed__font_Arial_Unicode_MS_bold_normal_1139689196 = kidoz__embed__font_Arial_Unicode_MS_bold_normal_1139689196;
- this._embed__font_Arial_Unicode_MS_medium_normal_403044905 = kidoz__embed__font_Arial_Unicode_MS_medium_normal_403044905;
- this._embed_css_png_btn_disable_png_2387183 = kidoz__embed_css_png_btn_disable_png_2387183;
- this._embed_css_png_btn_down_png_307255565 = kidoz__embed_css_png_btn_down_png_307255565;
- this._embed_css_png_btn_exit_down_png_677240895 = kidoz__embed_css_png_btn_exit_down_png_677240895;
- this._embed_css_png_btn_exit_over_png_805226735 = kidoz__embed_css_png_btn_exit_over_png_805226735;
- this._embed_css_png_btn_exit_up_png_1137972161 = kidoz__embed_css_png_btn_exit_up_png_1137972161;
- this._embed_css_png_btn_over_png_363930871 = kidoz__embed_css_png_btn_over_png_363930871;
- this._embed_css_png_btn_up_png_723172121 = kidoz__embed_css_png_btn_up_png_723172121;
- this._embed_css_png_leftArrow_down_png_120521785 = kidoz__embed_css_png_leftArrow_down_png_120521785;
- this._embed_css_png_leftArrow_over_png_1290443763 = kidoz__embed_css_png_leftArrow_over_png_1290443763;
- this._embed_css_png_leftArrow_up_png_1201750067 = kidoz__embed_css_png_leftArrow_up_png_1201750067;
- this._embed_css_png_rightArrow_down_png_440985553 = kidoz__embed_css_png_rightArrow_down_png_440985553;
- this._embed_css_png_rightArrow_over_png_796846993 = kidoz__embed_css_png_rightArrow_over_png_796846993;
- this._embed_css_png_rightArrow_up_png_1813949471 = kidoz__embed_css_png_rightArrow_up_png_1813949471;
- this._embed_css_png_small_btn_down_png_1544154083 = kidoz__embed_css_png_small_btn_down_png_1544154083;
- this._embed_css_png_small_btn_over_png_1466500185 = kidoz__embed_css_png_small_btn_over_png_1466500185;
- this._embed_css_png_small_btn_up_png_530801655 = kidoz__embed_css_png_small_btn_up_png_530801655;
- super();
- mx_internal::_document = this;
- if(!this.styleDeclaration)
- {
- this.styleDeclaration = new CSSStyleDeclaration();
- }
- this.styleDeclaration.defaultFactory = function():void
- {
- this.showFlexChrome = false;
- this.modalTransparency = 0.8;
- this.modalTransparencyColor = 682660;
- this.modalTransparencyDuration = 200;
- this.modalTransparencyBlur = 0;
- };
- mx_internal::_kidoz_StylesInit();
- this.layout = "absolute";
- this.percentWidth = 100;
- this.percentHeight = 100;
- this.verticalScrollPolicy = "off";
- this.horizontalScrollPolicy = "off";
- this._kidoz_WebService1_i();
- this.addEventListener("creationComplete",this.___kidoz_WindowedApplication1_creationComplete);
- }
-
- public function ___kidoz_WindowedApplication1_creationComplete(param1:FlexEvent) : void
- {
- this.init();
- }
-
- private function localize() : void
- {
- var _loc4_:Object = null;
- var _loc1_:String = this.userInfoXML.USERINFO.@kidMainLang;
- var _loc2_:localesList = new localesList();
- var _loc3_:String = "";
- for each(_loc4_ in _loc2_.list)
- {
- if(_loc4_.data == _loc1_)
- {
- _loc3_ = _loc1_;
- break;
- }
- }
- if(_loc3_ == "")
- {
- _loc3_ = "en";
- }
- trace("main user language=" + _loc1_ + "\n set application interface to:" + _loc3_);
- resourceManager.localeChain = [_loc3_];
- this.topMenu.localize();
- var _loc5_:SharedObject = SharedObject.getLocal("kidozData");
- _loc5_.data.locale = _loc3_;
- }
-
- public function showError(param1:String) : void
- {
- trace(">>> ERROR: " + param1);
- this.currentErrorMsg = param1;
- this.hideLoadingAlert();
- var _loc2_:ErrorAlert = new ErrorAlert();
- PopUpManager.addPopUp(_loc2_,this,true);
- }
-
- private function _kidoz_WebService1_i() : WebService
- {
- var _loc1_:WebService = new WebService();
- this.ws = _loc1_;
- _loc1_.operations = {
- "UserLogin":this._kidoz_Operation1_c(),
- "GetSitesList":this._kidoz_Operation2_c()
- };
- _loc1_.addEventListener("fault",this.__ws_fault);
- _loc1_.initialized(this,"ws");
- return _loc1_;
- }
-
- public function restart() : void
- {
- this.appMainMenu.dactivate();
- this.topLeftHolder.removeChild(this.topLeft);
- this.appMenuHolder.removeChild(this.appMainMenu);
- this.toolsManager.reset();
- this.login();
- }
-
- public function init() : void
- {
- Stage["displayState"] = "fullScreen";
- this.testTime = getTimer();
- this.getCurrentAppVersion();
- this.setAppWindow();
- var _loc1_:InternetConnectionMonitor = new InternetConnectionMonitor();
- var _loc2_:SharedObject = SharedObject.getLocal("kidozData");
- trace("locale: " + _loc2_.data.locale);
- if(_loc2_.data.locale)
- {
- resourceManager.localeChain = [_loc2_.data.locale];
- }
- else
- {
- resourceManager.localeChain = ["en"];
- _loc2_.data.locale = "en";
- }
- this.topMenu.localize();
- }
-
- public function set appMenuHolder(param1:Canvas) : void
- {
- var _loc2_:Object = this._732490988appMenuHolder;
- if(_loc2_ !== param1)
- {
- this._732490988appMenuHolder = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"appMenuHolder",_loc2_,param1));
- }
- }
-
- public function __appBg_creationComplete(param1:FlexEvent) : void
- {
- this.appBg.init();
- }
-
- private function _kidoz_Operation1_c() : Operation
- {
- var _loc1_:Operation = new Operation();
- _loc1_.name = "UserLogin";
- _loc1_.resultFormat = "object";
- _loc1_.addEventListener("result",this.___kidoz_Operation1_result);
- _loc1_.addEventListener("fault",this.___kidoz_Operation1_fault);
- return _loc1_;
- }
-
- public function set systemInfo(param1:Object) : void
- {
- var _loc2_:Object = this._642554749systemInfo;
- if(_loc2_ !== param1)
- {
- this._642554749systemInfo = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"systemInfo",_loc2_,param1));
- }
- }
-
- public function showLoadingAlert() : void
- {
- if(!this.loadingAlertOn)
- {
- this.loadingAlert = new LoadingAlert();
- PopUpManager.addPopUp(this.loadingAlert,this,false);
- this.loadingAlertOn = true;
- }
- }
-
- [Bindable(event="propertyChange")]
- public function get currentErrorMsg() : String
- {
- return this._645375758currentErrorMsg;
- }
-
- private function getCurrentAppVersion() : void
- {
- var _loc1_:XML = NativeApplication.nativeApplication.applicationDescriptor;
- var _loc2_:Namespace = _loc1_.namespaceDeclarations()[0];
- this.systemInfo.currentVersion = _loc1_._loc2_::version;
- }
-
- public function hideFavoritesAlert() : void
- {
- PopUpManager.removePopUp(this.favoritesAlert);
- }
-
- [Bindable(event="propertyChange")]
- public function get viewer() : Canvas
- {
- return this._816631278viewer;
- }
-
- [Bindable(event="propertyChange")]
- public function get appBG() : Canvas
- {
- return this._93027878appBG;
- }
-
- public function getAppSettings() : void
- {
- this.showLoadingAlert();
- var _loc1_:SettingsLoader = new SettingsLoader();
- }
-
- private function setAppWindow() : void
- {
- this.nativeWindow.alwaysInFront = true;
- this.nativeWindow.x = 0;
- this.nativeWindow.y = 0;
- this.appWidth = Capabilities.screenResolutionX;
- this.appHeight = Capabilities.screenResolutionY;
- this.nativeWindow.width = this.appWidth;
- this.nativeWindow.height = this.appHeight;
- }
-
- public function set currentErrorMsg(param1:String) : void
- {
- var _loc2_:Object = this._645375758currentErrorMsg;
- if(_loc2_ !== param1)
- {
- this._645375758currentErrorMsg = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"currentErrorMsg",_loc2_,param1));
- }
- }
-
- [Bindable(event="propertyChange")]
- public function get siteViewer() : SiteViewer
- {
- return this._379923513siteViewer;
- }
-
- public function ___kidoz_Operation2_result(param1:ResultEvent) : void
- {
- this.onLoginResult(param1);
- }
-
- public function closeParentsZone() : void
- {
- this.removeChild(this.parentalControl);
- this.restart();
- }
-
- public function closeParentsLogin() : void
- {
- this.parentsLogin.timer.stop();
- this.parentsLoginOpen = false;
- this.removeChild(this.parentsLogin);
- }
-
- public function ___kidoz_Operation2_fault(param1:FaultEvent) : void
- {
- this.showError(param1.fault.faultString);
- }
-
- [Bindable(event="propertyChange")]
- public function get appBg() : AppBackground
- {
- return this._93027910appBg;
- }
-
- [Bindable(event="propertyChange")]
- public function get toolsManager() : ToolsManager
- {
- return this._1014488750toolsManager;
- }
-
- public function set appBG(param1:Canvas) : void
- {
- var _loc2_:Object = this._93027878appBG;
- if(_loc2_ !== param1)
- {
- this._93027878appBG = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"appBG",_loc2_,param1));
- }
- }
-
- public function ___kidoz_Operation1_result(param1:ResultEvent) : void
- {
- this.onLoginResult(param1);
- }
-
- public function showTestTimer() : void
- {
- trace("time: " + (getTimer() - this.testTime));
- }
-
- public function openParentsLogin() : void
- {
- this.parentsLogin = new ParentsLogin();
- this.parentsLogin.x = this.topLeft.getParentlLinkX();
- this.parentsLogin.y = 40;
- this.addChild(this.parentsLogin);
- this.parentsLoginOpen = true;
- }
-
- [Bindable(event="propertyChange")]
- public function get topMenu() : AppTopMenu
- {
- return this._1140090796topMenu;
- }
-
- public function set viewer(param1:Canvas) : void
- {
- var _loc2_:Object = this._816631278viewer;
- if(_loc2_ !== param1)
- {
- this._816631278viewer = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"viewer",_loc2_,param1));
- }
- }
-
- public function openTimeAlert() : void
- {
- var _loc1_:TimeAlert = new TimeAlert();
- PopUpManager.addPopUp(_loc1_,this,true);
- }
-
- mx_internal function _kidoz_StylesInit() : void
- {
- var style:CSSStyleDeclaration = null;
- var effects:Array = null;
- if(mx_internal::_kidoz_StylesInit_done)
- {
- return;
- }
- mx_internal::_kidoz_StylesInit_done = true;
- style = StyleManager.getStyleDeclaration(".policy");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".policy",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.color = 26265;
- this.backgroundAlpha = 0.5;
- this.fontSize = 11;
- };
- }
- style = StyleManager.getStyleDeclaration(".btn");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".btn",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.borderColor = 738694;
- this.paddingLeft = 20;
- this.textRollOverColor = 16777215;
- this.fontSize = 20;
- this.paddingBottom = 7;
- this.themeColor = 1429225;
- this.fontFamily = "Arial Unicode MS";
- this.paddingTop = 7;
- this.color = 16777215;
- this.fillAlphas = [1,1];
- this.cornerRadius = 12;
- this.paddingRight = 20;
- this.fillColors = [756670,13158,756670,822];
- this.textSelectedColor = 735323;
- };
- }
- style = StyleManager.getStyleDeclaration(".smallBtn");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".smallBtn",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.color = 16777215;
- this.textRollOverColor = 16777215;
- this.upSkin = _embed_css_png_small_btn_up_png_530801655;
- this.fontSize = 12;
- this.downSkin = _embed_css_png_small_btn_down_png_1544154083;
- this.overSkin = _embed_css_png_small_btn_over_png_1466500185;
- this.textSelectedColor = 16777215;
- this.fontFamily = "Arial Unicode MS";
- };
- }
- style = StyleManager.getStyleDeclaration(".rightArrow");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".rightArrow",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.upSkin = _embed_css_png_rightArrow_up_png_1813949471;
- this.downSkin = _embed_css_png_rightArrow_down_png_440985553;
- this.overSkin = _embed_css_png_rightArrow_over_png_796846993;
- };
- }
- style = StyleManager.getStyleDeclaration(".checkBox");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".checkBox",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.fillAlphas = [1,1,1,1];
- this.fillColors = [16777215,13557995];
- };
- }
- style = StyleManager.getStyleDeclaration(".title");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".title",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.paddingTop = 20;
- this.color = 80986;
- this.fontWeight = "bold";
- this.fontSize = 26;
- this.fontFamily = "Arial Unicode MS";
- };
- }
- style = StyleManager.getStyleDeclaration(".linkBtn");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".linkBtn",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.selectionColor = 12180008;
- this.color = 14700;
- this.rollOverColor = 12180008;
- this.fontSize = 14;
- this.themeColor = 12180008;
- this.fontFamily = "Arial Unicode MS";
- };
- }
- style = StyleManager.getStyleDeclaration(".subTitle");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".subTitle",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.paddingTop = -10;
- this.color = 80986;
- this.fontWeight = "bold";
- this.fontSize = 16;
- this.fontFamily = "Arial Unicode MS";
- };
- }
- style = StyleManager.getStyleDeclaration(".inputBox");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".inputBox",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.borderColor = 8883818;
- this.paddingLeft = 5;
- this.width = 306;
- this.fontWeight = "bold";
- this.fontSize = 18;
- this.paddingBottom = 3;
- this.borderStyle = "solid";
- this.focusThickness = 5;
- this.themeColor = 16776960;
- this.fontFamily = "Arial Unicode MS";
- this.paddingTop = 3;
- this.color = 26265;
- this.cornerRadius = 10;
- this.height = 36;
- this.borderThickness = 1;
- this.backgroundColor = 16777215;
- };
- }
- style = StyleManager.getStyleDeclaration(".exitBtn");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".exitBtn",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.color = 16777215;
- this.upSkin = _embed_css_png_btn_exit_up_png_1137972161;
- this.fontSize = 10;
- this.downSkin = _embed_css_png_btn_exit_down_png_677240895;
- this.overSkin = _embed_css_png_btn_exit_over_png_805226735;
- this.textSelectedColor = 16777215;
- this.fontFamily = "Arial Unicode MS";
- };
- }
- style = StyleManager.getStyleDeclaration(".txt");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".txt",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.color = 80986;
- this.fontSize = 14;
- this.fontFamily = "Arial Unicode MS";
- };
- }
- style = StyleManager.getStyleDeclaration(".txt12");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".txt12",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.color = 80986;
- this.fontSize = 12;
- this.fontFamily = "Arial Unicode MS";
- };
- }
- style = StyleManager.getStyleDeclaration(".selectBox");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".selectBox",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.borderColor = 8883818;
- this.paddingLeft = 7;
- this.leading = 3;
- this.fontSize = 16;
- this.backgroundAlpha = 0;
- this.paddingBottom = 1;
- this.borderStyle = "solid";
- this.focusThickness = 5;
- this.themeColor = 13557995;
- this.fontFamily = "Arial Unicode MS";
- this.paddingTop = 3;
- this.fillAlphas = [1,1,1,1];
- this.color = 26265;
- this.cornerRadius = 10;
- this.fillColors = [16777215,13557995];
- this.borderThickness = 1;
- this.dropdownStyleName = "comboBoxDropdown";
- this.backgroundColor = 16777215;
- };
- }
- style = StyleManager.getStyleDeclaration(".btnReg");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".btnReg",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.color = 16777215;
- this.textRollOverColor = 16777215;
- this.upSkin = _embed_css_png_btn_up_png_723172121;
- this.fontSize = 16;
- this.downSkin = _embed_css_png_btn_down_png_307255565;
- this.overSkin = _embed_css_png_btn_over_png_363930871;
- this.disabledSkin = _embed_css_png_btn_disable_png_2387183;
- this.textSelectedColor = 16777215;
- this.fontFamily = "Arial Unicode MS";
- };
- }
- style = StyleManager.getStyleDeclaration(".leftArrow");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".leftArrow",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.upSkin = _embed_css_png_leftArrow_up_png_1201750067;
- this.downSkin = _embed_css_png_leftArrow_down_png_120521785;
- this.overSkin = _embed_css_png_leftArrow_over_png_1290443763;
- };
- }
- style = StyleManager.getStyleDeclaration(".selectBoxLang");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".selectBoxLang",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.borderColor = 8883818;
- this.paddingLeft = 7;
- this.width = 240;
- this.leading = 3;
- this.fontSize = 12;
- this.backgroundAlpha = 0;
- this.paddingBottom = 1;
- this.borderStyle = "solid";
- this.focusThickness = 5;
- this.themeColor = 13557995;
- this.fontFamily = "Arial Unicode MS";
- this.paddingTop = 3;
- this.fillAlphas = [1,1,1,1];
- this.color = 26265;
- this.cornerRadius = 10;
- this.fillColors = [16777215,13557995];
- this.borderThickness = 1;
- this.dropdownStyleName = "comboBoxDropdown";
- this.backgroundColor = 16777215;
- };
- }
- style = StyleManager.getStyleDeclaration(".inputTitle");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".inputTitle",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.paddingTop = 10;
- this.paddingLeft = 10;
- this.color = 26265;
- this.fontSize = 14;
- this.fontFamily = "Arial Unicode MS";
- };
- }
- StyleManager.mx_internal::initProtoChainRoots();
- }
-
- public function login() : void
- {
- var _loc1_:SharedObject = SharedObject.getLocal("kidozData");
- trace(">>> start login");
- this.showLoadingAlert();
- var _loc2_:SharedObject = SharedObject.getLocal("kidozData");
- this.ws.loadWSDL(this.systemInfo.webServiceUrl);
- this.ws.UserLogin(_loc2_.data.parentEmail,_loc2_.data.parentPassword,_loc2_.data.locale);
- }
-
- [Bindable(event="propertyChange")]
- public function get userInfoXML() : XML
- {
- return this._1643539006userInfoXML;
- }
-
- public function set siteViewer(param1:SiteViewer) : void
- {
- var _loc2_:Object = this._379923513siteViewer;
- if(_loc2_ !== param1)
- {
- this._379923513siteViewer = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"siteViewer",_loc2_,param1));
- }
- }
-
- [Bindable(event="propertyChange")]
- public function get appTop() : Canvas
- {
- return this._1411084428appTop;
- }
-
- [Bindable(event="propertyChange")]
- public function get locationUrl() : TextArea
- {
- return this._552310138locationUrl;
- }
-
- private function relocateItems() : void
- {
- this.appBg.setItemPosition();
- this.topMenu.setItemPosition();
- if(this.appMainMenu)
- {
- this.appMainMenu.setItemPosition();
- }
- if(this.getChildByName("regForm") != null)
- {
- this.regForm.setItemPosition();
- }
- this.toolsManager.setItemPosition();
- }
-
- public function set userInfoXML(param1:XML) : void
- {
- var _loc2_:Object = this._1643539006userInfoXML;
- if(_loc2_ !== param1)
- {
- this._1643539006userInfoXML = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"userInfoXML",_loc2_,param1));
- }
- }
-
- [Bindable(event="propertyChange")]
- public function get systemInfo() : Object
- {
- return this._642554749systemInfo;
- }
-
- override public function initialize() : void
- {
- mx_internal::setDocumentDescriptor(this._documentDescriptor_);
- super.initialize();
- }
-
- public function set appBg(param1:AppBackground) : void
- {
- var _loc2_:Object = this._93027910appBg;
- if(_loc2_ !== param1)
- {
- this._93027910appBg = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"appBg",_loc2_,param1));
- }
- }
-
- private function onLoginResult(param1:ResultEvent) : void
- {
- trace(param1.result);
- var _loc2_:XML = new XML(param1.result.toString());
- if(_loc2_.@success == "true")
- {
- trace(">>> user loged in");
- this.userInfoXML = _loc2_;
- this.localize();
- this.appMainMenu = new AppMainMenu();
- this.appMenuHolder.addChild(this.appMainMenu);
- this.topLeft = new TopLeft();
- this.topLeft.alpha = 0;
- this.topLeftHolder.addChild(this.topLeft);
- TweenMax.to(this.topLeft,1,{"alpha":1});
- this.toolsManager.openBrowserTool();
- this.showTestTimer();
- if(!this.loggedIn)
- {
- this.usageTimer = new UsageTimer();
- this.loggedIn = true;
- }
- }
- else
- {
- this.showError(_loc2_.@errorMessage);
- this.regForm = new RegForm();
- this.regForm.currentState = "login";
- this.appBG.addChild(this.regForm);
- }
- }
-
- public function __siteViewer_creationComplete(param1:FlexEvent) : void
- {
- this.siteViewer.init();
- }
-
- public function __topMenu_creationComplete(param1:FlexEvent) : void
- {
- this.topMenu.init();
- }
-
- public function set toolsManager(param1:ToolsManager) : void
- {
- var _loc2_:Object = this._1014488750toolsManager;
- if(_loc2_ !== param1)
- {
- this._1014488750toolsManager = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"toolsManager",_loc2_,param1));
- }
- }
-
- public function showFavoritesAlert() : void
- {
- this.favoritesAlert = new FavoritesAlert();
- PopUpManager.addPopUp(this.favoritesAlert,this,false);
- }
-
- public function openParentsZone() : void
- {
- this.toolsManager.activateTool("Clear");
- this.parentalControl = new ParentalControl();
- this.addChild(this.parentalControl);
- }
-
- public function set topMenu(param1:AppTopMenu) : void
- {
- var _loc2_:Object = this._1140090796topMenu;
- if(_loc2_ !== param1)
- {
- this._1140090796topMenu = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"topMenu",_loc2_,param1));
- }
- }
-
- public function set ws(param1:WebService) : void
- {
- var _loc2_:Object = this._3804ws;
- if(_loc2_ !== param1)
- {
- this._3804ws = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"ws",_loc2_,param1));
- }
- }
-
- public function showUpdatingAlert() : void
- {
- var _loc1_:UpdatingAlert = new UpdatingAlert();
- PopUpManager.addPopUp(_loc1_,this,false);
- }
-
- public function set topLeftHolder(param1:HBox) : void
- {
- var _loc2_:Object = this._1870114760topLeftHolder;
- if(_loc2_ !== param1)
- {
- this._1870114760topLeftHolder = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"topLeftHolder",_loc2_,param1));
- }
- }
-
- public function onSettingsLoaded() : void
- {
- trace(">>> settings loaded");
- this.logger = new Logger();
- this.favorites = new FavoritesManager();
- this.getLocalData();
- }
-
- public function __appBG_resize(param1:ResizeEvent) : void
- {
- this.relocateItems();
- }
-
- [Bindable(event="propertyChange")]
- public function get topLeftHolder() : HBox
- {
- return this._1870114760topLeftHolder;
- }
-
- public function closeRegistration() : void
- {
- this.login();
- this.appBG.removeChild(this.regForm);
- }
-
- private function _kidoz_Operation2_c() : Operation
- {
- var _loc1_:Operation = new Operation();
- _loc1_.name = "GetSitesList";
- _loc1_.resultFormat = "object";
- _loc1_.addEventListener("result",this.___kidoz_Operation2_result);
- _loc1_.addEventListener("fault",this.___kidoz_Operation2_fault);
- return _loc1_;
- }
-
- public function __ws_fault(param1:FaultEvent) : void
- {
- this.showError(param1.fault.faultDetail);
- }
-
- [Bindable(event="propertyChange")]
- public function get ws() : WebService
- {
- return this._3804ws;
- }
-
- public function set appTop(param1:Canvas) : void
- {
- var _loc2_:Object = this._1411084428appTop;
- if(_loc2_ !== param1)
- {
- this._1411084428appTop = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"appTop",_loc2_,param1));
- }
- }
-
- public function hideLoadingAlert() : void
- {
- this.loadingAlertOn = false;
- PopUpManager.removePopUp(this.loadingAlert);
- }
-
- [Bindable(event="propertyChange")]
- public function get appMenuHolder() : Canvas
- {
- return this._732490988appMenuHolder;
- }
-
- public function ___kidoz_Operation1_fault(param1:FaultEvent) : void
- {
- this.showError(param1.fault.faultString);
- }
-
- public function set locationUrl(param1:TextArea) : void
- {
- var _loc2_:Object = this._552310138locationUrl;
- if(_loc2_ !== param1)
- {
- this._552310138locationUrl = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"locationUrl",_loc2_,param1));
- }
- }
-
- public function getLocalData() : void
- {
- var _loc1_:SharedObject = SharedObject.getLocal("kidozData");
- if(_loc1_.data.parentEmail != null && _loc1_.data.parentPassword != null)
- {
- this.login();
- }
- else if(_loc1_.data.email != null)
- {
- this.hideLoadingAlert();
- this.regForm = new RegForm();
- this.appBG.addChild(this.regForm);
- }
- else
- {
- this.hideLoadingAlert();
- this.regForm = new RegForm();
- this.appBG.addChild(this.regForm);
- }
- }
- }
- }
-
-