home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import air.update.ApplicationUpdaterUI;
- import air.update.events.UpdateEvent;
- import com.althea.client.shufflr.ApplicationFacade;
- import com.althea.client.shufflr.view.components.MainView;
- import com.gskinner.utils.FramerateThrottler;
- 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 mx.binding.*;
- import mx.core.Application;
- import mx.core.ClassFactory;
- import mx.core.UIComponentDescriptor;
- import mx.core.WindowedApplication;
- import mx.core.mx_internal;
- import mx.effects.Fade;
- import mx.events.EffectEvent;
- import mx.events.FlexEvent;
- import mx.events.PropertyChangeEvent;
- import mx.styles.*;
-
- use namespace mx_internal;
-
- public class ShufflrClient extends WindowedApplication implements IBindingClient
- {
- private static var _watcherSetupUtil:IWatcherSetupUtil;
-
- mx_internal static var _ShufflrClient_StylesInit_done:Boolean = false;
-
- private var updateXMLURL:String = "http://shufflr.s3.amazonaws.com/app/downloads/update.xml";
-
- private var _1282133823fadeIn:Fade;
-
- private var isMaximized:Boolean = true;
-
- private var _embed__font_shufflrFont4_medium_normal_978541877:Class;
-
- mx_internal var _watchers:Array;
-
- private var _8376322mainView:MainView;
-
- private var _embed__font_shufflrFont3_medium_normal_385585873:Class;
-
- private var facade:ApplicationFacade;
-
- private const MIN_SCREENRESOLUTION_X:Number = 1024;
-
- private const MIN_SCREENRESOLUTION_Y:Number = 768;
-
- private var _1091436750fadeOut:Fade;
-
- public var _ShufflrClient_ClassFactory1:ClassFactory;
-
- public var splashScreen:SplashScreen;
-
- private var errSplashScreen:ErrorSplashScreen;
-
- private var _embed__font_shufflrFont1_medium_normal_1132676213:Class;
-
- private var _embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489:Class;
-
- public const EXIT_EFFECT_END:String = "exitEffectEnd";
-
- mx_internal var _bindingsBeginWithWord:Object;
-
- public var _ShufflrClient_ClassFactory2:ClassFactory;
-
- mx_internal var _bindingsByDestination:Object;
-
- private var _embed_css_assets_images_button_skins_button_50_30_disabled_png_1169499053:Class;
-
- private var _263745457exitEffect:Fade;
-
- private const errTimer:Timer;
-
- private var appUpdater:ApplicationUpdaterUI;
-
- private var _embed__font_shufflrFont2_medium_normal_1007006707:Class;
-
- mx_internal var _bindings:Array;
-
- private var _documentDescriptor_:UIComponentDescriptor;
-
- private var _embed_css_assets_images_button_skins_button_50_30_click_png_564862689:Class;
-
- private var _embed_css_assets_images_button_skins_button_50_30_hover_png_2058081769:Class;
-
- private var isMinimized:Boolean = false;
-
- public function ShufflrClient()
- {
- this._documentDescriptor_ = new UIComponentDescriptor({
- "type":WindowedApplication,
- "propertiesFactory":function():Object
- {
- return {"childDescriptors":[new UIComponentDescriptor({
- "type":MainView,
- "id":"mainView",
- "propertiesFactory":function():Object
- {
- return {
- "percentWidth":100,
- "percentHeight":100
- };
- }
- })]};
- }
- });
- this.facade = ApplicationFacade.getInstance("MainKey");
- this.errTimer = new Timer(5000);
- this.appUpdater = new ApplicationUpdaterUI();
- this._embed__font_shufflrFont1_medium_normal_1132676213 = ShufflrClient__embed__font_shufflrFont1_medium_normal_1132676213;
- this._embed__font_shufflrFont2_medium_normal_1007006707 = ShufflrClient__embed__font_shufflrFont2_medium_normal_1007006707;
- this._embed__font_shufflrFont3_medium_normal_385585873 = ShufflrClient__embed__font_shufflrFont3_medium_normal_385585873;
- this._embed__font_shufflrFont4_medium_normal_978541877 = ShufflrClient__embed__font_shufflrFont4_medium_normal_978541877;
- this._embed_css_assets_images_button_skins_button_50_30_click_png_564862689 = ShufflrClient__embed_css_assets_images_button_skins_button_50_30_click_png_564862689;
- this._embed_css_assets_images_button_skins_button_50_30_disabled_png_1169499053 = ShufflrClient__embed_css_assets_images_button_skins_button_50_30_disabled_png_1169499053;
- this._embed_css_assets_images_button_skins_button_50_30_hover_png_2058081769 = ShufflrClient__embed_css_assets_images_button_skins_button_50_30_hover_png_2058081769;
- this._embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489 = ShufflrClient__embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489;
- this.mx_internal::_bindings = [];
- this.mx_internal::_watchers = [];
- this.mx_internal::_bindingsByDestination = {};
- this.mx_internal::_bindingsBeginWithWord = {};
- super();
- mx_internal::_document = this;
- if(!this.styleDeclaration)
- {
- this.styleDeclaration = new CSSStyleDeclaration();
- }
- this.styleDeclaration.defaultFactory = function():void
- {
- this.showFlexChrome = false;
- this.borderStyle = "none";
- this.backgroundAlpha = 0;
- this.backgroundColor = 0;
- };
- mx_internal::_ShufflrClient_StylesInit();
- this.layout = "absolute";
- this.showTitleBar = false;
- this.showStatusBar = false;
- this.showGripper = false;
- this._ShufflrClient_ClassFactory1_i();
- this._ShufflrClient_ClassFactory2_i();
- this._ShufflrClient_Fade3_i();
- this._ShufflrClient_Fade1_i();
- this._ShufflrClient_Fade2_i();
- this.addEventListener("creationComplete",this.___ShufflrClient_WindowedApplication1_creationComplete);
- this.addEventListener("applicationComplete",this.___ShufflrClient_WindowedApplication1_applicationComplete);
- }
-
- public static function set watcherSetupUtil(param1:IWatcherSetupUtil) : void
- {
- ShufflrClient._watcherSetupUtil = param1;
- }
-
- [Bindable(event="propertyChange")]
- public function get mainView() : MainView
- {
- return this._8376322mainView;
- }
-
- public function ___ShufflrClient_WindowedApplication1_applicationComplete(param1:FlexEvent) : void
- {
- this.onApplicationComplete();
- }
-
- private function onUpdate(param1:UpdateEvent) : void
- {
- this.appUpdater.checkNow();
- }
-
- public function set fadeIn(param1:Fade) : void
- {
- var _loc2_:Object = this._1282133823fadeIn;
- if(_loc2_ !== param1)
- {
- this._1282133823fadeIn = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"fadeIn",_loc2_,param1));
- }
- }
-
- public function set mainView(param1:MainView) : void
- {
- var _loc2_:Object = this._8376322mainView;
- if(_loc2_ !== param1)
- {
- this._8376322mainView = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"mainView",_loc2_,param1));
- }
- }
-
- override public function initialize() : void
- {
- var bindings:Array;
- var watchers:Array;
- var i:uint;
- var target:ShufflrClient = null;
- var watcherSetupUtilClass:Object = null;
- mx_internal::setDocumentDescriptor(this._documentDescriptor_);
- bindings = this._ShufflrClient_bindingsSetup();
- watchers = [];
- target = this;
- if(_watcherSetupUtil == null)
- {
- watcherSetupUtilClass = getDefinitionByName("_ShufflrClientWatcherSetupUtil");
- watcherSetupUtilClass["init"](null);
- }
- _watcherSetupUtil.setup(this,function(param1:String):*
- {
- return target[param1];
- },bindings,watchers);
- i = 0;
- while(i < bindings.length)
- {
- Binding(bindings[i]).execute();
- i++;
- }
- mx_internal::_bindings = mx_internal::_bindings.concat(bindings);
- mx_internal::_watchers = mx_internal::_watchers.concat(watchers);
- super.initialize();
- }
-
- public function set fadeOut(param1:Fade) : void
- {
- var _loc2_:Object = this._1091436750fadeOut;
- if(_loc2_ !== param1)
- {
- this._1091436750fadeOut = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"fadeOut",_loc2_,param1));
- }
- }
-
- private function _ShufflrClient_Fade2_i() : Fade
- {
- var _loc1_:Fade = new Fade();
- this.fadeOut = _loc1_;
- _loc1_.alphaFrom = 1;
- _loc1_.alphaTo = 0;
- _loc1_.duration = 1000;
- return _loc1_;
- }
-
- public function set exitEffect(param1:Fade) : void
- {
- var _loc2_:Object = this._263745457exitEffect;
- if(_loc2_ !== param1)
- {
- this._263745457exitEffect = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"exitEffect",_loc2_,param1));
- }
- }
-
- public function ___ShufflrClient_WindowedApplication1_creationComplete(param1:FlexEvent) : void
- {
- this.dockSupportInit();
- this.facade.startup(this);
- }
-
- private function _ShufflrClient_ClassFactory1_i() : ClassFactory
- {
- var _loc1_:ClassFactory = new ClassFactory();
- this._ShufflrClient_ClassFactory1 = _loc1_;
- _loc1_.generator = SplashScreen;
- _loc1_.properties = {"outerDocument":this};
- return _loc1_;
- }
-
- mx_internal function _ShufflrClient_StylesInit() : void
- {
- var style:CSSStyleDeclaration = null;
- var effects:Array = null;
- if(mx_internal::_ShufflrClient_StylesInit_done)
- {
- return;
- }
- mx_internal::_ShufflrClient_StylesInit_done = true;
- style = StyleManager.getStyleDeclaration(".windowCanvas");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".windowCanvas",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.gradientRatio = [0,255];
- this.fillAlphas = [0.9,0.9];
- this.gradientType = "linear";
- this.borderColors = [3355443,1118481];
- this.fillColors = [1118481,0];
- this.angle = 90;
- this.colorsConfiguration = 2;
- this.borderThickness = 2;
- this.bordergradientRatio = [0,255];
- this.borderAngle = 90;
- this.borderAlphas = [1,1];
- };
- }
- style = StyleManager.getStyleDeclaration(".floatingText");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".floatingText",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.textAlign = "left";
- this.color = 13421772;
- this.fontSize = 14;
- this.fontFamily = "shufflrFont4";
- };
- }
- style = StyleManager.getStyleDeclaration("ToolTip");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration("ToolTip",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.borderColor = 6710886;
- this.color = 13421772;
- this.fontWeight = "normal";
- this.cornerRadius = 2;
- this.fontSize = 12;
- this.backgroundAlpha = 0.7;
- this.borderThickness = 1;
- this.backgroundColor = 394758;
- this.fontFamily = "shufflrFont4";
- };
- }
- style = StyleManager.getStyleDeclaration(".friendsViewItem");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".friendsViewItem",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.gradientRatio = [0,255];
- this.fillAlphas = [1,1];
- this.cornerRadius = 5;
- this.gradientType = "linear";
- this.borderColors = [4473924,2236962];
- this.fillColors = [2236962,0];
- this.angle = 90;
- this.colorsConfiguration = 2;
- this.borderThickness = 0;
- this.bordergradientRatio = [0,255];
- this.borderAngle = 90;
- this.borderAlphas = [0.8,0.8];
- };
- }
- style = StyleManager.getStyleDeclaration(".outerCanvas");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".outerCanvas",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.borderColor = 6316128;
- this.cornerRadius = 20;
- this.dropShadowEnabled = false;
- this.horizontalCenter = 0;
- this.dropShadowColor = 0;
- this.borderThickness = 2;
- this.borderStyle = "solid";
- this.verticalCenter = 0;
- this.backgroundColor = 0;
- };
- }
- style = StyleManager.getStyleDeclaration(".friendsViewItemHover");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".friendsViewItemHover",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.gradientRatio = [0,255];
- this.fillAlphas = [1,1];
- this.cornerRadius = 5;
- this.gradientType = "linear";
- this.borderColors = [4473924,2236962];
- this.fillColors = [1523284,397590];
- this.angle = 90;
- this.colorsConfiguration = 2;
- this.borderThickness = 0;
- this.bordergradientRatio = [0,255];
- this.borderAngle = 90;
- this.borderAlphas = [0.8,0.8];
- };
- }
- style = StyleManager.getStyleDeclaration("Alert");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration("Alert",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.borderColor = 5592405;
- this.roundedBottomCorners = true;
- this.messageStyleName = "messageStyle";
- this.backgroundAlpha = 0.8;
- this.borderStyle = "solid";
- this.borderAlpha = 0.9;
- this.highlightAlphas = [0.46,0.19];
- this.titleStyleName = "alertTitle";
- this.cornerRadius = 7;
- this.headerColors = [16777215,16777215];
- this.headerHeight = 0;
- this.borderThickness = 1;
- this.buttonStyleName = "AlertButtons";
- this.backgroundColor = 2105376;
- };
- }
- style = StyleManager.getStyleDeclaration(".WhiteText");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".WhiteText",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.color = 13421772;
- this.fontFamily = "shufflrFont4";
- };
- }
- style = StyleManager.getStyleDeclaration(".popupViewPanel");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".popupViewPanel",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.fillAlphas = 0.9;
- this.topLeftRadius = 30;
- this.topRightRadius = 30;
- this.fillColors = 1118481;
- this.colorsConfiguration = 1;
- this.borderThickness = 0;
- this.bottomLeftRadius = 30;
- this.bottomRightRadius = 30;
- };
- }
- style = StyleManager.getStyleDeclaration(".blackStyle");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".blackStyle",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.backgroundGradientAlphas = [1,1];
- this.backgroundGradientColors = [0,0];
- this.backgroundAlpha = 1;
- this.backgroundColor = 0;
- this.fontFamily = "myraidFont";
- };
- }
- style = StyleManager.getStyleDeclaration(".textContainerCanvas");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".textContainerCanvas",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.fillAlphas = 0.5;
- this.borderColors = [0,2236962];
- this.fillColors = 0;
- this.colorsConfiguration = 1;
- this.borderThickness = 1;
- this.bordergradientRatio = [0,255];
- this.borderAngle = 90;
- this.borderAlphas = [1,1];
- };
- }
- style = StyleManager.getStyleDeclaration(".AlertButtons");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".AlertButtons",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.width = 50;
- this.textRollOverColor = 2236962;
- this.upSkin = _embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489;
- this.fontSize = 12;
- this.overSkin = _embed_css_assets_images_button_skins_button_50_30_hover_png_2058081769;
- this.focusAlpha = 0.2;
- this.diabledColor = 0;
- this.fontFamily = "Helvetica";
- this.color = 3355443;
- this.selectedDownSkin = _embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489;
- this.selectedUpSkin = _embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489;
- this.height = 30;
- this.selectedOverSkin = _embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489;
- this.downSkin = _embed_css_assets_images_button_skins_button_50_30_click_png_564862689;
- this.disabledSkin = _embed_css_assets_images_button_skins_button_50_30_disabled_png_1169499053;
- this.textSelectedColor = 2236962;
- };
- }
- style = StyleManager.getStyleDeclaration(".textContainerCanvasLight");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".textContainerCanvasLight",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.fillAlphas = 0.5;
- this.borderColors = [2236962,4473924];
- this.fillColors = 1118481;
- this.colorsConfiguration = 1;
- this.borderThickness = 1;
- this.bordergradientRatio = [64,255];
- this.borderAngle = 90;
- this.borderAlphas = [1,1];
- };
- }
- style = StyleManager.getStyleDeclaration(".messageStyle");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".messageStyle",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.textAlign = "left";
- this.color = 13421772;
- this.fontWeight = "normal";
- this.fontSize = 14;
- this.letterSpacing = 0;
- this.fontFamily = "shufflrFont2";
- };
- }
- style = StyleManager.getStyleDeclaration(".videoHListCanvas");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".videoHListCanvas",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.fillAlphas = 1;
- this.borderColors = [4473924,2236962];
- this.fillColors = 0;
- this.colorsConfiguration = 1;
- this.borderThickness = 2;
- this.bordergradientRatio = [0,255];
- this.borderAngle = 90;
- this.borderAlphas = [0.8,0.8];
- };
- }
- style = StyleManager.getStyleDeclaration(".profileText");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".profileText",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.borderColor = 4473924;
- this.color = 13421772;
- this.cornerRadius = 5;
- this.textDecoration = "none";
- this.backgroundAlpha = 0.8;
- this.borderThickness = 0;
- this.borderStyle = "solid";
- this.backgroundColor = 0;
- this.fontFamily = "Helvetica";
- };
- }
- style = StyleManager.getStyleDeclaration(".myzoneHeaderText");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".myzoneHeaderText",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.color = 16777215;
- this.cornerRadius = 5;
- this.fontSize = 16;
- this.backgroundAlpha = 0.5;
- this.borderThickness = 2;
- this.backgroundColor = 0;
- this.fontFamily = "shufflrFont4";
- };
- }
- style = StyleManager.getStyleDeclaration(".whiteTextOnTransparent");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".whiteTextOnTransparent",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.color = 13421772;
- this.backgroundAlpha = 0;
- this.borderThickness = 0;
- this.fontFamily = "shufflrFont4";
- };
- }
- style = StyleManager.getStyleDeclaration(".alertTitle");
- if(!style)
- {
- style = new CSSStyleDeclaration();
- StyleManager.setStyleDeclaration(".alertTitle",style,false);
- }
- if(style.factory == null)
- {
- style.factory = function():void
- {
- this.color = 13421772;
- this.fontWeight = "bold";
- this.fontSize = 16;
- this.fontFamily = "shufflrFont2";
- };
- }
- StyleManager.mx_internal::initProtoChainRoots();
- }
-
- private function onIOError(param1:IOErrorEvent) : void
- {
- trace("IO error: App auto update failed");
- }
-
- [Bindable(event="propertyChange")]
- public function get fadeIn() : Fade
- {
- return this._1282133823fadeIn;
- }
-
- private function checkForUpdate(param1:Event) : void
- {
- var _loc3_:XML = new XML(param1.target.data);
- var _loc4_:String = _loc3_.force;
- var _loc5_:String = _loc3_.invisibleUpdate;
- this.appUpdater.updateURL = this.updateXMLURL;
- this.appUpdater.isCheckForUpdateVisible = false;
- if(_loc4_.toLowerCase() == "yes")
- {
- this.appUpdater.isDownloadUpdateVisible = false;
- this.appUpdater.isInstallUpdateVisible = false;
- }
- if(_loc5_.toLowerCase() == "yes")
- {
- this.appUpdater.isDownloadProgressVisible = false;
- }
- this.appUpdater.addEventListener(UpdateEvent.INITIALIZED,this.onUpdate);
- this.appUpdater.addEventListener(ErrorEvent.ERROR,this.onError);
- this.appUpdater.initialize();
- }
-
- private function dockSupportInit() : void
- {
- if(NativeApplication.supportsDockIcon)
- {
- NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE,this.onDockIconClick);
- }
- this.addEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGING,this.onChanging);
- this.preCheckForUpdate();
- }
-
- private function preCheckForUpdate() : void
- {
- var _loc1_:URLLoader = new URLLoader();
- _loc1_.addEventListener(Event.COMPLETE,this.checkForUpdate);
- _loc1_.addEventListener(IOErrorEvent.IO_ERROR,this.onIOError);
- _loc1_.addEventListener(IOErrorEvent.NETWORK_ERROR,this.onIOError);
- _loc1_.load(new URLRequest(this.updateXMLURL));
- }
-
- [Bindable(event="propertyChange")]
- public function get exitEffect() : Fade
- {
- return this._263745457exitEffect;
- }
-
- private function onApplicationComplete() : void
- {
- if(Capabilities.screenResolutionX < this.MIN_SCREENRESOLUTION_X || Capabilities.screenResolutionY < this.MIN_SCREENRESOLUTION_Y)
- {
- this.errSplashScreen = new ErrorSplashScreen();
- this.errSplashScreen.width = 500;
- this.errSplashScreen.height = 160;
- this.errSplashScreen.type = NativeWindowType.LIGHTWEIGHT;
- this.errSplashScreen.systemChrome = NativeWindowSystemChrome.NONE;
- this.errSplashScreen.setStyle("showFlexChrome",false);
- this.errSplashScreen.transparent = true;
- this.errSplashScreen.open();
- this.errSplashScreen.nativeWindow.x = (Capabilities.screenResolutionX - this.errSplashScreen.width) / 2;
- this.errSplashScreen.nativeWindow.y = (Capabilities.screenResolutionY - this.errSplashScreen.height) / 2;
- this.errTimer.addEventListener(TimerEvent.TIMER,this.onTimerExpire);
- this.errTimer.start();
- return;
- }
- if(Capabilities.os.substr(0,3) == "Mac")
- {
- trace("Mac detected: Changing screen resolution to accomodate Mac menubar");
- nativeWindow.width = Capabilities.screenResolutionX;
- nativeWindow.height = Capabilities.screenResolutionY - 20;
- }
- else
- {
- nativeWindow.width = Capabilities.screenResolutionX;
- nativeWindow.height = Capabilities.screenResolutionY;
- }
- this.splashScreen = new SplashScreen();
- this.splashScreen.width = 800;
- this.splashScreen.height = 380;
- this.splashScreen.type = NativeWindowType.LIGHTWEIGHT;
- this.splashScreen.systemChrome = NativeWindowSystemChrome.NONE;
- this.splashScreen.setStyle("showFlexChrome",false);
- this.splashScreen.transparent = true;
- this.splashScreen.open();
- this.splashScreen.nativeWindow.x = (Capabilities.screenResolutionX - this.splashScreen.width) / 2;
- this.splashScreen.nativeWindow.y = (Capabilities.screenResolutionY - this.splashScreen.height) / 2;
- }
-
- private function _ShufflrClient_Fade1_i() : Fade
- {
- var _loc1_:Fade = new Fade();
- this.fadeIn = _loc1_;
- _loc1_.alphaFrom = 0;
- _loc1_.alphaTo = 1;
- _loc1_.duration = 1000;
- return _loc1_;
- }
-
- private function _ShufflrClient_Fade3_i() : Fade
- {
- var _loc1_:Fade = new Fade();
- this.exitEffect = _loc1_;
- _loc1_.alphaFrom = 1;
- _loc1_.alphaTo = 0;
- _loc1_.duration = 1000;
- _loc1_.addEventListener("effectEnd",this.__exitEffect_effectEnd);
- BindingManager.executeBindings(this,"exitEffect",this.exitEffect);
- return _loc1_;
- }
-
- public function onInitDataReceived() : void
- {
- if(this.errSplashScreen)
- {
- return;
- }
- if(Capabilities.os.substr(0,3) == "Mac")
- {
- trace("Mac detected: Applying app Y position correction for MAC menu bar");
- nativeWindow.x = 0;
- nativeWindow.y = 20;
- }
- else
- {
- nativeWindow.x = 0;
- nativeWindow.y = 0;
- }
- this.splashScreen.close();
- FramerateThrottler.initialize(1);
- }
-
- private function _ShufflrClient_bindingsSetup() : Array
- {
- var binding:Binding = null;
- var result:Array = [];
- binding = new Binding(this,function():Object
- {
- return mainView;
- },function(param1:Object):void
- {
- exitEffect.target = param1;
- },"exitEffect.target");
- result[0] = binding;
- return result;
- }
-
- private function onTimerExpire(param1:TimerEvent) : void
- {
- this.errTimer.stop();
- this.errTimer.removeEventListener(TimerEvent.TIMER,this.onTimerExpire);
- this.errSplashScreen.close();
- Application.application.exit();
- }
-
- private function onError(param1:ErrorEvent) : void
- {
- trace("App auto update failed");
- }
-
- [Bindable(event="propertyChange")]
- public function get fadeOut() : Fade
- {
- return this._1091436750fadeOut;
- }
-
- private function onExitEffectEnd(param1:EffectEvent) : void
- {
- this.dispatchEvent(new Event(this.EXIT_EFFECT_END));
- }
-
- private function onChanging(param1:NativeWindowDisplayStateEvent) : void
- {
- switch(param1.afterDisplayState)
- {
- case "minimized":
- this.isMaximized = false;
- this.isMinimized = true;
- break;
- case "maximized":
- this.isMaximized = true;
- this.isMinimized = false;
- }
- param1.stopPropagation();
- }
-
- public function __exitEffect_effectEnd(param1:EffectEvent) : void
- {
- this.onExitEffectEnd(param1);
- }
-
- private function onDockIconClick(param1:InvokeEvent) : void
- {
- if(this.isMinimized)
- {
- stage.nativeWindow.restore();
- this.isMaximized = true;
- this.isMinimized = false;
- }
- }
-
- private function _ShufflrClient_bindingExprs() : void
- {
- var _loc1_:* = undefined;
- _loc1_ = this.mainView;
- }
-
- private function _ShufflrClient_ClassFactory2_i() : ClassFactory
- {
- var _loc1_:ClassFactory = new ClassFactory();
- this._ShufflrClient_ClassFactory2 = _loc1_;
- _loc1_.generator = ErrorSplashScreen;
- _loc1_.properties = {"outerDocument":this};
- return _loc1_;
- }
- }
- }
-
-