home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Multimedija / shufflr.air / ShufflrClient.swf / scripts / ShufflrClient.as < prev    next >
Encoding:
Text File  |  2010-06-23  |  33.1 KB  |  911 lines

  1. package
  2. {
  3.    import air.update.ApplicationUpdaterUI;
  4.    import air.update.events.UpdateEvent;
  5.    import com.althea.client.shufflr.ApplicationFacade;
  6.    import com.althea.client.shufflr.view.components.MainView;
  7.    import com.gskinner.utils.FramerateThrottler;
  8.    import flash.accessibility.*;
  9.    import flash.data.*;
  10.    import flash.debugger.*;
  11.    import flash.desktop.*;
  12.    import flash.display.*;
  13.    import flash.errors.*;
  14.    import flash.events.*;
  15.    import flash.external.*;
  16.    import flash.filesystem.*;
  17.    import flash.filters.*;
  18.    import flash.geom.*;
  19.    import flash.html.*;
  20.    import flash.html.script.*;
  21.    import flash.media.*;
  22.    import flash.net.*;
  23.    import flash.printing.*;
  24.    import flash.profiler.*;
  25.    import flash.system.*;
  26.    import flash.text.*;
  27.    import flash.ui.*;
  28.    import flash.utils.*;
  29.    import flash.xml.*;
  30.    import mx.binding.*;
  31.    import mx.core.Application;
  32.    import mx.core.ClassFactory;
  33.    import mx.core.UIComponentDescriptor;
  34.    import mx.core.WindowedApplication;
  35.    import mx.core.mx_internal;
  36.    import mx.effects.Fade;
  37.    import mx.events.EffectEvent;
  38.    import mx.events.FlexEvent;
  39.    import mx.events.PropertyChangeEvent;
  40.    import mx.styles.*;
  41.    
  42.    use namespace mx_internal;
  43.    
  44.    public class ShufflrClient extends WindowedApplication implements IBindingClient
  45.    {
  46.       private static var _watcherSetupUtil:IWatcherSetupUtil;
  47.       
  48.       mx_internal static var _ShufflrClient_StylesInit_done:Boolean = false;
  49.       
  50.       private var updateXMLURL:String = "http://shufflr.s3.amazonaws.com/app/downloads/update.xml";
  51.       
  52.       private var _1282133823fadeIn:Fade;
  53.       
  54.       private var isMaximized:Boolean = true;
  55.       
  56.       private var _embed__font_shufflrFont4_medium_normal_978541877:Class;
  57.       
  58.       mx_internal var _watchers:Array;
  59.       
  60.       private var _8376322mainView:MainView;
  61.       
  62.       private var _embed__font_shufflrFont3_medium_normal_385585873:Class;
  63.       
  64.       private var facade:ApplicationFacade;
  65.       
  66.       private const MIN_SCREENRESOLUTION_X:Number = 1024;
  67.       
  68.       private const MIN_SCREENRESOLUTION_Y:Number = 768;
  69.       
  70.       private var _1091436750fadeOut:Fade;
  71.       
  72.       public var _ShufflrClient_ClassFactory1:ClassFactory;
  73.       
  74.       public var splashScreen:SplashScreen;
  75.       
  76.       private var errSplashScreen:ErrorSplashScreen;
  77.       
  78.       private var _embed__font_shufflrFont1_medium_normal_1132676213:Class;
  79.       
  80.       private var _embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489:Class;
  81.       
  82.       public const EXIT_EFFECT_END:String = "exitEffectEnd";
  83.       
  84.       mx_internal var _bindingsBeginWithWord:Object;
  85.       
  86.       public var _ShufflrClient_ClassFactory2:ClassFactory;
  87.       
  88.       mx_internal var _bindingsByDestination:Object;
  89.       
  90.       private var _embed_css_assets_images_button_skins_button_50_30_disabled_png_1169499053:Class;
  91.       
  92.       private var _263745457exitEffect:Fade;
  93.       
  94.       private const errTimer:Timer;
  95.       
  96.       private var appUpdater:ApplicationUpdaterUI;
  97.       
  98.       private var _embed__font_shufflrFont2_medium_normal_1007006707:Class;
  99.       
  100.       mx_internal var _bindings:Array;
  101.       
  102.       private var _documentDescriptor_:UIComponentDescriptor;
  103.       
  104.       private var _embed_css_assets_images_button_skins_button_50_30_click_png_564862689:Class;
  105.       
  106.       private var _embed_css_assets_images_button_skins_button_50_30_hover_png_2058081769:Class;
  107.       
  108.       private var isMinimized:Boolean = false;
  109.       
  110.       public function ShufflrClient()
  111.       {
  112.          this._documentDescriptor_ = new UIComponentDescriptor({
  113.             "type":WindowedApplication,
  114.             "propertiesFactory":function():Object
  115.             {
  116.                return {"childDescriptors":[new UIComponentDescriptor({
  117.                   "type":MainView,
  118.                   "id":"mainView",
  119.                   "propertiesFactory":function():Object
  120.                   {
  121.                      return {
  122.                         "percentWidth":100,
  123.                         "percentHeight":100
  124.                      };
  125.                   }
  126.                })]};
  127.             }
  128.          });
  129.          this.facade = ApplicationFacade.getInstance("MainKey");
  130.          this.errTimer = new Timer(5000);
  131.          this.appUpdater = new ApplicationUpdaterUI();
  132.          this._embed__font_shufflrFont1_medium_normal_1132676213 = ShufflrClient__embed__font_shufflrFont1_medium_normal_1132676213;
  133.          this._embed__font_shufflrFont2_medium_normal_1007006707 = ShufflrClient__embed__font_shufflrFont2_medium_normal_1007006707;
  134.          this._embed__font_shufflrFont3_medium_normal_385585873 = ShufflrClient__embed__font_shufflrFont3_medium_normal_385585873;
  135.          this._embed__font_shufflrFont4_medium_normal_978541877 = ShufflrClient__embed__font_shufflrFont4_medium_normal_978541877;
  136.          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;
  137.          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;
  138.          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;
  139.          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;
  140.          this.mx_internal::_bindings = [];
  141.          this.mx_internal::_watchers = [];
  142.          this.mx_internal::_bindingsByDestination = {};
  143.          this.mx_internal::_bindingsBeginWithWord = {};
  144.          super();
  145.          mx_internal::_document = this;
  146.          if(!this.styleDeclaration)
  147.          {
  148.             this.styleDeclaration = new CSSStyleDeclaration();
  149.          }
  150.          this.styleDeclaration.defaultFactory = function():void
  151.          {
  152.             this.showFlexChrome = false;
  153.             this.borderStyle = "none";
  154.             this.backgroundAlpha = 0;
  155.             this.backgroundColor = 0;
  156.          };
  157.          mx_internal::_ShufflrClient_StylesInit();
  158.          this.layout = "absolute";
  159.          this.showTitleBar = false;
  160.          this.showStatusBar = false;
  161.          this.showGripper = false;
  162.          this._ShufflrClient_ClassFactory1_i();
  163.          this._ShufflrClient_ClassFactory2_i();
  164.          this._ShufflrClient_Fade3_i();
  165.          this._ShufflrClient_Fade1_i();
  166.          this._ShufflrClient_Fade2_i();
  167.          this.addEventListener("creationComplete",this.___ShufflrClient_WindowedApplication1_creationComplete);
  168.          this.addEventListener("applicationComplete",this.___ShufflrClient_WindowedApplication1_applicationComplete);
  169.       }
  170.       
  171.       public static function set watcherSetupUtil(param1:IWatcherSetupUtil) : void
  172.       {
  173.          ShufflrClient._watcherSetupUtil = param1;
  174.       }
  175.       
  176.       [Bindable(event="propertyChange")]
  177.       public function get mainView() : MainView
  178.       {
  179.          return this._8376322mainView;
  180.       }
  181.       
  182.       public function ___ShufflrClient_WindowedApplication1_applicationComplete(param1:FlexEvent) : void
  183.       {
  184.          this.onApplicationComplete();
  185.       }
  186.       
  187.       private function onUpdate(param1:UpdateEvent) : void
  188.       {
  189.          this.appUpdater.checkNow();
  190.       }
  191.       
  192.       public function set fadeIn(param1:Fade) : void
  193.       {
  194.          var _loc2_:Object = this._1282133823fadeIn;
  195.          if(_loc2_ !== param1)
  196.          {
  197.             this._1282133823fadeIn = param1;
  198.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"fadeIn",_loc2_,param1));
  199.          }
  200.       }
  201.       
  202.       public function set mainView(param1:MainView) : void
  203.       {
  204.          var _loc2_:Object = this._8376322mainView;
  205.          if(_loc2_ !== param1)
  206.          {
  207.             this._8376322mainView = param1;
  208.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"mainView",_loc2_,param1));
  209.          }
  210.       }
  211.       
  212.       override public function initialize() : void
  213.       {
  214.          var bindings:Array;
  215.          var watchers:Array;
  216.          var i:uint;
  217.          var target:ShufflrClient = null;
  218.          var watcherSetupUtilClass:Object = null;
  219.          mx_internal::setDocumentDescriptor(this._documentDescriptor_);
  220.          bindings = this._ShufflrClient_bindingsSetup();
  221.          watchers = [];
  222.          target = this;
  223.          if(_watcherSetupUtil == null)
  224.          {
  225.             watcherSetupUtilClass = getDefinitionByName("_ShufflrClientWatcherSetupUtil");
  226.             watcherSetupUtilClass["init"](null);
  227.          }
  228.          _watcherSetupUtil.setup(this,function(param1:String):*
  229.          {
  230.             return target[param1];
  231.          },bindings,watchers);
  232.          i = 0;
  233.          while(i < bindings.length)
  234.          {
  235.             Binding(bindings[i]).execute();
  236.             i++;
  237.          }
  238.          mx_internal::_bindings = mx_internal::_bindings.concat(bindings);
  239.          mx_internal::_watchers = mx_internal::_watchers.concat(watchers);
  240.          super.initialize();
  241.       }
  242.       
  243.       public function set fadeOut(param1:Fade) : void
  244.       {
  245.          var _loc2_:Object = this._1091436750fadeOut;
  246.          if(_loc2_ !== param1)
  247.          {
  248.             this._1091436750fadeOut = param1;
  249.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"fadeOut",_loc2_,param1));
  250.          }
  251.       }
  252.       
  253.       private function _ShufflrClient_Fade2_i() : Fade
  254.       {
  255.          var _loc1_:Fade = new Fade();
  256.          this.fadeOut = _loc1_;
  257.          _loc1_.alphaFrom = 1;
  258.          _loc1_.alphaTo = 0;
  259.          _loc1_.duration = 1000;
  260.          return _loc1_;
  261.       }
  262.       
  263.       public function set exitEffect(param1:Fade) : void
  264.       {
  265.          var _loc2_:Object = this._263745457exitEffect;
  266.          if(_loc2_ !== param1)
  267.          {
  268.             this._263745457exitEffect = param1;
  269.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"exitEffect",_loc2_,param1));
  270.          }
  271.       }
  272.       
  273.       public function ___ShufflrClient_WindowedApplication1_creationComplete(param1:FlexEvent) : void
  274.       {
  275.          this.dockSupportInit();
  276.          this.facade.startup(this);
  277.       }
  278.       
  279.       private function _ShufflrClient_ClassFactory1_i() : ClassFactory
  280.       {
  281.          var _loc1_:ClassFactory = new ClassFactory();
  282.          this._ShufflrClient_ClassFactory1 = _loc1_;
  283.          _loc1_.generator = SplashScreen;
  284.          _loc1_.properties = {"outerDocument":this};
  285.          return _loc1_;
  286.       }
  287.       
  288.       mx_internal function _ShufflrClient_StylesInit() : void
  289.       {
  290.          var style:CSSStyleDeclaration = null;
  291.          var effects:Array = null;
  292.          if(mx_internal::_ShufflrClient_StylesInit_done)
  293.          {
  294.             return;
  295.          }
  296.          mx_internal::_ShufflrClient_StylesInit_done = true;
  297.          style = StyleManager.getStyleDeclaration(".windowCanvas");
  298.          if(!style)
  299.          {
  300.             style = new CSSStyleDeclaration();
  301.             StyleManager.setStyleDeclaration(".windowCanvas",style,false);
  302.          }
  303.          if(style.factory == null)
  304.          {
  305.             style.factory = function():void
  306.             {
  307.                this.gradientRatio = [0,255];
  308.                this.fillAlphas = [0.9,0.9];
  309.                this.gradientType = "linear";
  310.                this.borderColors = [3355443,1118481];
  311.                this.fillColors = [1118481,0];
  312.                this.angle = 90;
  313.                this.colorsConfiguration = 2;
  314.                this.borderThickness = 2;
  315.                this.bordergradientRatio = [0,255];
  316.                this.borderAngle = 90;
  317.                this.borderAlphas = [1,1];
  318.             };
  319.          }
  320.          style = StyleManager.getStyleDeclaration(".floatingText");
  321.          if(!style)
  322.          {
  323.             style = new CSSStyleDeclaration();
  324.             StyleManager.setStyleDeclaration(".floatingText",style,false);
  325.          }
  326.          if(style.factory == null)
  327.          {
  328.             style.factory = function():void
  329.             {
  330.                this.textAlign = "left";
  331.                this.color = 13421772;
  332.                this.fontSize = 14;
  333.                this.fontFamily = "shufflrFont4";
  334.             };
  335.          }
  336.          style = StyleManager.getStyleDeclaration("ToolTip");
  337.          if(!style)
  338.          {
  339.             style = new CSSStyleDeclaration();
  340.             StyleManager.setStyleDeclaration("ToolTip",style,false);
  341.          }
  342.          if(style.factory == null)
  343.          {
  344.             style.factory = function():void
  345.             {
  346.                this.borderColor = 6710886;
  347.                this.color = 13421772;
  348.                this.fontWeight = "normal";
  349.                this.cornerRadius = 2;
  350.                this.fontSize = 12;
  351.                this.backgroundAlpha = 0.7;
  352.                this.borderThickness = 1;
  353.                this.backgroundColor = 394758;
  354.                this.fontFamily = "shufflrFont4";
  355.             };
  356.          }
  357.          style = StyleManager.getStyleDeclaration(".friendsViewItem");
  358.          if(!style)
  359.          {
  360.             style = new CSSStyleDeclaration();
  361.             StyleManager.setStyleDeclaration(".friendsViewItem",style,false);
  362.          }
  363.          if(style.factory == null)
  364.          {
  365.             style.factory = function():void
  366.             {
  367.                this.gradientRatio = [0,255];
  368.                this.fillAlphas = [1,1];
  369.                this.cornerRadius = 5;
  370.                this.gradientType = "linear";
  371.                this.borderColors = [4473924,2236962];
  372.                this.fillColors = [2236962,0];
  373.                this.angle = 90;
  374.                this.colorsConfiguration = 2;
  375.                this.borderThickness = 0;
  376.                this.bordergradientRatio = [0,255];
  377.                this.borderAngle = 90;
  378.                this.borderAlphas = [0.8,0.8];
  379.             };
  380.          }
  381.          style = StyleManager.getStyleDeclaration(".outerCanvas");
  382.          if(!style)
  383.          {
  384.             style = new CSSStyleDeclaration();
  385.             StyleManager.setStyleDeclaration(".outerCanvas",style,false);
  386.          }
  387.          if(style.factory == null)
  388.          {
  389.             style.factory = function():void
  390.             {
  391.                this.borderColor = 6316128;
  392.                this.cornerRadius = 20;
  393.                this.dropShadowEnabled = false;
  394.                this.horizontalCenter = 0;
  395.                this.dropShadowColor = 0;
  396.                this.borderThickness = 2;
  397.                this.borderStyle = "solid";
  398.                this.verticalCenter = 0;
  399.                this.backgroundColor = 0;
  400.             };
  401.          }
  402.          style = StyleManager.getStyleDeclaration(".friendsViewItemHover");
  403.          if(!style)
  404.          {
  405.             style = new CSSStyleDeclaration();
  406.             StyleManager.setStyleDeclaration(".friendsViewItemHover",style,false);
  407.          }
  408.          if(style.factory == null)
  409.          {
  410.             style.factory = function():void
  411.             {
  412.                this.gradientRatio = [0,255];
  413.                this.fillAlphas = [1,1];
  414.                this.cornerRadius = 5;
  415.                this.gradientType = "linear";
  416.                this.borderColors = [4473924,2236962];
  417.                this.fillColors = [1523284,397590];
  418.                this.angle = 90;
  419.                this.colorsConfiguration = 2;
  420.                this.borderThickness = 0;
  421.                this.bordergradientRatio = [0,255];
  422.                this.borderAngle = 90;
  423.                this.borderAlphas = [0.8,0.8];
  424.             };
  425.          }
  426.          style = StyleManager.getStyleDeclaration("Alert");
  427.          if(!style)
  428.          {
  429.             style = new CSSStyleDeclaration();
  430.             StyleManager.setStyleDeclaration("Alert",style,false);
  431.          }
  432.          if(style.factory == null)
  433.          {
  434.             style.factory = function():void
  435.             {
  436.                this.borderColor = 5592405;
  437.                this.roundedBottomCorners = true;
  438.                this.messageStyleName = "messageStyle";
  439.                this.backgroundAlpha = 0.8;
  440.                this.borderStyle = "solid";
  441.                this.borderAlpha = 0.9;
  442.                this.highlightAlphas = [0.46,0.19];
  443.                this.titleStyleName = "alertTitle";
  444.                this.cornerRadius = 7;
  445.                this.headerColors = [16777215,16777215];
  446.                this.headerHeight = 0;
  447.                this.borderThickness = 1;
  448.                this.buttonStyleName = "AlertButtons";
  449.                this.backgroundColor = 2105376;
  450.             };
  451.          }
  452.          style = StyleManager.getStyleDeclaration(".WhiteText");
  453.          if(!style)
  454.          {
  455.             style = new CSSStyleDeclaration();
  456.             StyleManager.setStyleDeclaration(".WhiteText",style,false);
  457.          }
  458.          if(style.factory == null)
  459.          {
  460.             style.factory = function():void
  461.             {
  462.                this.color = 13421772;
  463.                this.fontFamily = "shufflrFont4";
  464.             };
  465.          }
  466.          style = StyleManager.getStyleDeclaration(".popupViewPanel");
  467.          if(!style)
  468.          {
  469.             style = new CSSStyleDeclaration();
  470.             StyleManager.setStyleDeclaration(".popupViewPanel",style,false);
  471.          }
  472.          if(style.factory == null)
  473.          {
  474.             style.factory = function():void
  475.             {
  476.                this.fillAlphas = 0.9;
  477.                this.topLeftRadius = 30;
  478.                this.topRightRadius = 30;
  479.                this.fillColors = 1118481;
  480.                this.colorsConfiguration = 1;
  481.                this.borderThickness = 0;
  482.                this.bottomLeftRadius = 30;
  483.                this.bottomRightRadius = 30;
  484.             };
  485.          }
  486.          style = StyleManager.getStyleDeclaration(".blackStyle");
  487.          if(!style)
  488.          {
  489.             style = new CSSStyleDeclaration();
  490.             StyleManager.setStyleDeclaration(".blackStyle",style,false);
  491.          }
  492.          if(style.factory == null)
  493.          {
  494.             style.factory = function():void
  495.             {
  496.                this.backgroundGradientAlphas = [1,1];
  497.                this.backgroundGradientColors = [0,0];
  498.                this.backgroundAlpha = 1;
  499.                this.backgroundColor = 0;
  500.                this.fontFamily = "myraidFont";
  501.             };
  502.          }
  503.          style = StyleManager.getStyleDeclaration(".textContainerCanvas");
  504.          if(!style)
  505.          {
  506.             style = new CSSStyleDeclaration();
  507.             StyleManager.setStyleDeclaration(".textContainerCanvas",style,false);
  508.          }
  509.          if(style.factory == null)
  510.          {
  511.             style.factory = function():void
  512.             {
  513.                this.fillAlphas = 0.5;
  514.                this.borderColors = [0,2236962];
  515.                this.fillColors = 0;
  516.                this.colorsConfiguration = 1;
  517.                this.borderThickness = 1;
  518.                this.bordergradientRatio = [0,255];
  519.                this.borderAngle = 90;
  520.                this.borderAlphas = [1,1];
  521.             };
  522.          }
  523.          style = StyleManager.getStyleDeclaration(".AlertButtons");
  524.          if(!style)
  525.          {
  526.             style = new CSSStyleDeclaration();
  527.             StyleManager.setStyleDeclaration(".AlertButtons",style,false);
  528.          }
  529.          if(style.factory == null)
  530.          {
  531.             style.factory = function():void
  532.             {
  533.                this.width = 50;
  534.                this.textRollOverColor = 2236962;
  535.                this.upSkin = _embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489;
  536.                this.fontSize = 12;
  537.                this.overSkin = _embed_css_assets_images_button_skins_button_50_30_hover_png_2058081769;
  538.                this.focusAlpha = 0.2;
  539.                this.diabledColor = 0;
  540.                this.fontFamily = "Helvetica";
  541.                this.color = 3355443;
  542.                this.selectedDownSkin = _embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489;
  543.                this.selectedUpSkin = _embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489;
  544.                this.height = 30;
  545.                this.selectedOverSkin = _embed_css_assets_images_button_skins_button_50_30_normal_png_1612561489;
  546.                this.downSkin = _embed_css_assets_images_button_skins_button_50_30_click_png_564862689;
  547.                this.disabledSkin = _embed_css_assets_images_button_skins_button_50_30_disabled_png_1169499053;
  548.                this.textSelectedColor = 2236962;
  549.             };
  550.          }
  551.          style = StyleManager.getStyleDeclaration(".textContainerCanvasLight");
  552.          if(!style)
  553.          {
  554.             style = new CSSStyleDeclaration();
  555.             StyleManager.setStyleDeclaration(".textContainerCanvasLight",style,false);
  556.          }
  557.          if(style.factory == null)
  558.          {
  559.             style.factory = function():void
  560.             {
  561.                this.fillAlphas = 0.5;
  562.                this.borderColors = [2236962,4473924];
  563.                this.fillColors = 1118481;
  564.                this.colorsConfiguration = 1;
  565.                this.borderThickness = 1;
  566.                this.bordergradientRatio = [64,255];
  567.                this.borderAngle = 90;
  568.                this.borderAlphas = [1,1];
  569.             };
  570.          }
  571.          style = StyleManager.getStyleDeclaration(".messageStyle");
  572.          if(!style)
  573.          {
  574.             style = new CSSStyleDeclaration();
  575.             StyleManager.setStyleDeclaration(".messageStyle",style,false);
  576.          }
  577.          if(style.factory == null)
  578.          {
  579.             style.factory = function():void
  580.             {
  581.                this.textAlign = "left";
  582.                this.color = 13421772;
  583.                this.fontWeight = "normal";
  584.                this.fontSize = 14;
  585.                this.letterSpacing = 0;
  586.                this.fontFamily = "shufflrFont2";
  587.             };
  588.          }
  589.          style = StyleManager.getStyleDeclaration(".videoHListCanvas");
  590.          if(!style)
  591.          {
  592.             style = new CSSStyleDeclaration();
  593.             StyleManager.setStyleDeclaration(".videoHListCanvas",style,false);
  594.          }
  595.          if(style.factory == null)
  596.          {
  597.             style.factory = function():void
  598.             {
  599.                this.fillAlphas = 1;
  600.                this.borderColors = [4473924,2236962];
  601.                this.fillColors = 0;
  602.                this.colorsConfiguration = 1;
  603.                this.borderThickness = 2;
  604.                this.bordergradientRatio = [0,255];
  605.                this.borderAngle = 90;
  606.                this.borderAlphas = [0.8,0.8];
  607.             };
  608.          }
  609.          style = StyleManager.getStyleDeclaration(".profileText");
  610.          if(!style)
  611.          {
  612.             style = new CSSStyleDeclaration();
  613.             StyleManager.setStyleDeclaration(".profileText",style,false);
  614.          }
  615.          if(style.factory == null)
  616.          {
  617.             style.factory = function():void
  618.             {
  619.                this.borderColor = 4473924;
  620.                this.color = 13421772;
  621.                this.cornerRadius = 5;
  622.                this.textDecoration = "none";
  623.                this.backgroundAlpha = 0.8;
  624.                this.borderThickness = 0;
  625.                this.borderStyle = "solid";
  626.                this.backgroundColor = 0;
  627.                this.fontFamily = "Helvetica";
  628.             };
  629.          }
  630.          style = StyleManager.getStyleDeclaration(".myzoneHeaderText");
  631.          if(!style)
  632.          {
  633.             style = new CSSStyleDeclaration();
  634.             StyleManager.setStyleDeclaration(".myzoneHeaderText",style,false);
  635.          }
  636.          if(style.factory == null)
  637.          {
  638.             style.factory = function():void
  639.             {
  640.                this.color = 16777215;
  641.                this.cornerRadius = 5;
  642.                this.fontSize = 16;
  643.                this.backgroundAlpha = 0.5;
  644.                this.borderThickness = 2;
  645.                this.backgroundColor = 0;
  646.                this.fontFamily = "shufflrFont4";
  647.             };
  648.          }
  649.          style = StyleManager.getStyleDeclaration(".whiteTextOnTransparent");
  650.          if(!style)
  651.          {
  652.             style = new CSSStyleDeclaration();
  653.             StyleManager.setStyleDeclaration(".whiteTextOnTransparent",style,false);
  654.          }
  655.          if(style.factory == null)
  656.          {
  657.             style.factory = function():void
  658.             {
  659.                this.color = 13421772;
  660.                this.backgroundAlpha = 0;
  661.                this.borderThickness = 0;
  662.                this.fontFamily = "shufflrFont4";
  663.             };
  664.          }
  665.          style = StyleManager.getStyleDeclaration(".alertTitle");
  666.          if(!style)
  667.          {
  668.             style = new CSSStyleDeclaration();
  669.             StyleManager.setStyleDeclaration(".alertTitle",style,false);
  670.          }
  671.          if(style.factory == null)
  672.          {
  673.             style.factory = function():void
  674.             {
  675.                this.color = 13421772;
  676.                this.fontWeight = "bold";
  677.                this.fontSize = 16;
  678.                this.fontFamily = "shufflrFont2";
  679.             };
  680.          }
  681.          StyleManager.mx_internal::initProtoChainRoots();
  682.       }
  683.       
  684.       private function onIOError(param1:IOErrorEvent) : void
  685.       {
  686.          trace("IO error: App auto update failed");
  687.       }
  688.       
  689.       [Bindable(event="propertyChange")]
  690.       public function get fadeIn() : Fade
  691.       {
  692.          return this._1282133823fadeIn;
  693.       }
  694.       
  695.       private function checkForUpdate(param1:Event) : void
  696.       {
  697.          var _loc3_:XML = new XML(param1.target.data);
  698.          var _loc4_:String = _loc3_.force;
  699.          var _loc5_:String = _loc3_.invisibleUpdate;
  700.          this.appUpdater.updateURL = this.updateXMLURL;
  701.          this.appUpdater.isCheckForUpdateVisible = false;
  702.          if(_loc4_.toLowerCase() == "yes")
  703.          {
  704.             this.appUpdater.isDownloadUpdateVisible = false;
  705.             this.appUpdater.isInstallUpdateVisible = false;
  706.          }
  707.          if(_loc5_.toLowerCase() == "yes")
  708.          {
  709.             this.appUpdater.isDownloadProgressVisible = false;
  710.          }
  711.          this.appUpdater.addEventListener(UpdateEvent.INITIALIZED,this.onUpdate);
  712.          this.appUpdater.addEventListener(ErrorEvent.ERROR,this.onError);
  713.          this.appUpdater.initialize();
  714.       }
  715.       
  716.       private function dockSupportInit() : void
  717.       {
  718.          if(NativeApplication.supportsDockIcon)
  719.          {
  720.             NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE,this.onDockIconClick);
  721.          }
  722.          this.addEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGING,this.onChanging);
  723.          this.preCheckForUpdate();
  724.       }
  725.       
  726.       private function preCheckForUpdate() : void
  727.       {
  728.          var _loc1_:URLLoader = new URLLoader();
  729.          _loc1_.addEventListener(Event.COMPLETE,this.checkForUpdate);
  730.          _loc1_.addEventListener(IOErrorEvent.IO_ERROR,this.onIOError);
  731.          _loc1_.addEventListener(IOErrorEvent.NETWORK_ERROR,this.onIOError);
  732.          _loc1_.load(new URLRequest(this.updateXMLURL));
  733.       }
  734.       
  735.       [Bindable(event="propertyChange")]
  736.       public function get exitEffect() : Fade
  737.       {
  738.          return this._263745457exitEffect;
  739.       }
  740.       
  741.       private function onApplicationComplete() : void
  742.       {
  743.          if(Capabilities.screenResolutionX < this.MIN_SCREENRESOLUTION_X || Capabilities.screenResolutionY < this.MIN_SCREENRESOLUTION_Y)
  744.          {
  745.             this.errSplashScreen = new ErrorSplashScreen();
  746.             this.errSplashScreen.width = 500;
  747.             this.errSplashScreen.height = 160;
  748.             this.errSplashScreen.type = NativeWindowType.LIGHTWEIGHT;
  749.             this.errSplashScreen.systemChrome = NativeWindowSystemChrome.NONE;
  750.             this.errSplashScreen.setStyle("showFlexChrome",false);
  751.             this.errSplashScreen.transparent = true;
  752.             this.errSplashScreen.open();
  753.             this.errSplashScreen.nativeWindow.x = (Capabilities.screenResolutionX - this.errSplashScreen.width) / 2;
  754.             this.errSplashScreen.nativeWindow.y = (Capabilities.screenResolutionY - this.errSplashScreen.height) / 2;
  755.             this.errTimer.addEventListener(TimerEvent.TIMER,this.onTimerExpire);
  756.             this.errTimer.start();
  757.             return;
  758.          }
  759.          if(Capabilities.os.substr(0,3) == "Mac")
  760.          {
  761.             trace("Mac detected: Changing screen resolution to accomodate Mac menubar");
  762.             nativeWindow.width = Capabilities.screenResolutionX;
  763.             nativeWindow.height = Capabilities.screenResolutionY - 20;
  764.          }
  765.          else
  766.          {
  767.             nativeWindow.width = Capabilities.screenResolutionX;
  768.             nativeWindow.height = Capabilities.screenResolutionY;
  769.          }
  770.          this.splashScreen = new SplashScreen();
  771.          this.splashScreen.width = 800;
  772.          this.splashScreen.height = 380;
  773.          this.splashScreen.type = NativeWindowType.LIGHTWEIGHT;
  774.          this.splashScreen.systemChrome = NativeWindowSystemChrome.NONE;
  775.          this.splashScreen.setStyle("showFlexChrome",false);
  776.          this.splashScreen.transparent = true;
  777.          this.splashScreen.open();
  778.          this.splashScreen.nativeWindow.x = (Capabilities.screenResolutionX - this.splashScreen.width) / 2;
  779.          this.splashScreen.nativeWindow.y = (Capabilities.screenResolutionY - this.splashScreen.height) / 2;
  780.       }
  781.       
  782.       private function _ShufflrClient_Fade1_i() : Fade
  783.       {
  784.          var _loc1_:Fade = new Fade();
  785.          this.fadeIn = _loc1_;
  786.          _loc1_.alphaFrom = 0;
  787.          _loc1_.alphaTo = 1;
  788.          _loc1_.duration = 1000;
  789.          return _loc1_;
  790.       }
  791.       
  792.       private function _ShufflrClient_Fade3_i() : Fade
  793.       {
  794.          var _loc1_:Fade = new Fade();
  795.          this.exitEffect = _loc1_;
  796.          _loc1_.alphaFrom = 1;
  797.          _loc1_.alphaTo = 0;
  798.          _loc1_.duration = 1000;
  799.          _loc1_.addEventListener("effectEnd",this.__exitEffect_effectEnd);
  800.          BindingManager.executeBindings(this,"exitEffect",this.exitEffect);
  801.          return _loc1_;
  802.       }
  803.       
  804.       public function onInitDataReceived() : void
  805.       {
  806.          if(this.errSplashScreen)
  807.          {
  808.             return;
  809.          }
  810.          if(Capabilities.os.substr(0,3) == "Mac")
  811.          {
  812.             trace("Mac detected: Applying app Y position correction for MAC menu bar");
  813.             nativeWindow.x = 0;
  814.             nativeWindow.y = 20;
  815.          }
  816.          else
  817.          {
  818.             nativeWindow.x = 0;
  819.             nativeWindow.y = 0;
  820.          }
  821.          this.splashScreen.close();
  822.          FramerateThrottler.initialize(1);
  823.       }
  824.       
  825.       private function _ShufflrClient_bindingsSetup() : Array
  826.       {
  827.          var binding:Binding = null;
  828.          var result:Array = [];
  829.          binding = new Binding(this,function():Object
  830.          {
  831.             return mainView;
  832.          },function(param1:Object):void
  833.          {
  834.             exitEffect.target = param1;
  835.          },"exitEffect.target");
  836.          result[0] = binding;
  837.          return result;
  838.       }
  839.       
  840.       private function onTimerExpire(param1:TimerEvent) : void
  841.       {
  842.          this.errTimer.stop();
  843.          this.errTimer.removeEventListener(TimerEvent.TIMER,this.onTimerExpire);
  844.          this.errSplashScreen.close();
  845.          Application.application.exit();
  846.       }
  847.       
  848.       private function onError(param1:ErrorEvent) : void
  849.       {
  850.          trace("App auto update failed");
  851.       }
  852.       
  853.       [Bindable(event="propertyChange")]
  854.       public function get fadeOut() : Fade
  855.       {
  856.          return this._1091436750fadeOut;
  857.       }
  858.       
  859.       private function onExitEffectEnd(param1:EffectEvent) : void
  860.       {
  861.          this.dispatchEvent(new Event(this.EXIT_EFFECT_END));
  862.       }
  863.       
  864.       private function onChanging(param1:NativeWindowDisplayStateEvent) : void
  865.       {
  866.          switch(param1.afterDisplayState)
  867.          {
  868.             case "minimized":
  869.                this.isMaximized = false;
  870.                this.isMinimized = true;
  871.                break;
  872.             case "maximized":
  873.                this.isMaximized = true;
  874.                this.isMinimized = false;
  875.          }
  876.          param1.stopPropagation();
  877.       }
  878.       
  879.       public function __exitEffect_effectEnd(param1:EffectEvent) : void
  880.       {
  881.          this.onExitEffectEnd(param1);
  882.       }
  883.       
  884.       private function onDockIconClick(param1:InvokeEvent) : void
  885.       {
  886.          if(this.isMinimized)
  887.          {
  888.             stage.nativeWindow.restore();
  889.             this.isMaximized = true;
  890.             this.isMinimized = false;
  891.          }
  892.       }
  893.       
  894.       private function _ShufflrClient_bindingExprs() : void
  895.       {
  896.          var _loc1_:* = undefined;
  897.          _loc1_ = this.mainView;
  898.       }
  899.       
  900.       private function _ShufflrClient_ClassFactory2_i() : ClassFactory
  901.       {
  902.          var _loc1_:ClassFactory = new ClassFactory();
  903.          this._ShufflrClient_ClassFactory2 = _loc1_;
  904.          _loc1_.generator = ErrorSplashScreen;
  905.          _loc1_.properties = {"outerDocument":this};
  906.          return _loc1_;
  907.       }
  908.    }
  909. }
  910.  
  911.