home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Multimedija / shufflr.air / ShufflrClient.swf / scripts / com / althea / client / shufflr / view / components / CreditsView.as < prev    next >
Encoding:
Text File  |  2010-06-23  |  24.3 KB  |  607 lines

  1. package com.althea.client.shufflr.view.components
  2. {
  3.    import com.gradientcomponents.GradientCanvas;
  4.    import flash.accessibility.*;
  5.    import flash.data.*;
  6.    import flash.debugger.*;
  7.    import flash.desktop.*;
  8.    import flash.display.*;
  9.    import flash.errors.*;
  10.    import flash.events.*;
  11.    import flash.external.*;
  12.    import flash.filesystem.*;
  13.    import flash.filters.*;
  14.    import flash.geom.*;
  15.    import flash.html.*;
  16.    import flash.html.script.*;
  17.    import flash.media.*;
  18.    import flash.net.*;
  19.    import flash.printing.*;
  20.    import flash.profiler.*;
  21.    import flash.system.*;
  22.    import flash.text.*;
  23.    import flash.ui.*;
  24.    import flash.utils.*;
  25.    import flash.xml.*;
  26.    import mx.binding.*;
  27.    import mx.containers.Canvas;
  28.    import mx.containers.VBox;
  29.    import mx.controls.Image;
  30.    import mx.controls.Label;
  31.    import mx.controls.SWFLoader;
  32.    import mx.controls.Spacer;
  33.    import mx.controls.Text;
  34.    import mx.core.UIComponentDescriptor;
  35.    import mx.core.mx_internal;
  36.    import mx.events.PropertyChangeEvent;
  37.    import mx.styles.*;
  38.    
  39.    use namespace mx_internal;
  40.    
  41.    public class CreditsView extends Canvas
  42.    {
  43.       mx_internal static var _CreditsView_StylesInit_done:Boolean = false;
  44.       
  45.       private var _249865681wCancel:Canvas;
  46.       
  47.       private var _documentDescriptor_:UIComponentDescriptor;
  48.       
  49.       public function CreditsView()
  50.       {
  51.          this._documentDescriptor_ = new UIComponentDescriptor({
  52.             "type":Canvas,
  53.             "propertiesFactory":function():Object
  54.             {
  55.                return {"childDescriptors":[new UIComponentDescriptor({
  56.                   "type":GradientCanvas,
  57.                   "stylesFactory":function():void
  58.                   {
  59.                      this.cornerRadius = 5;
  60.                      this.paddingBottom = 10;
  61.                      this.paddingTop = 10;
  62.                      this.paddingLeft = 10;
  63.                      this.paddingRight = 10;
  64.                      this.verticalCenter = "0";
  65.                      this.horizontalCenter = "0";
  66.                   },
  67.                   "propertiesFactory":function():Object
  68.                   {
  69.                      return {
  70.                         "styleName":"windowCanvas",
  71.                         "width":800,
  72.                         "height":600,
  73.                         "verticalScrollPolicy":"off",
  74.                         "horizontalScrollPolicy":"off",
  75.                         "childDescriptors":[new UIComponentDescriptor({
  76.                            "type":Label,
  77.                            "stylesFactory":function():void
  78.                            {
  79.                               this.horizontalCenter = "0";
  80.                               this.textAlign = "center";
  81.                               this.color = 8632129;
  82.                               this.fontSize = 24;
  83.                               this.fontFamily = "shufflrFont4";
  84.                               this.top = "20";
  85.                            },
  86.                            "propertiesFactory":function():Object
  87.                            {
  88.                               return {"text":"Credits"};
  89.                            }
  90.                         }),new UIComponentDescriptor({
  91.                            "type":SWFLoader,
  92.                            "stylesFactory":function():void
  93.                            {
  94.                               this.verticalCenter = "0";
  95.                               this.horizontalCenter = "0";
  96.                               this.verticalAlign = "middle";
  97.                               this.horizontalAlign = "center";
  98.                            },
  99.                            "propertiesFactory":function():Object
  100.                            {
  101.                               return {
  102.                                  "source":"assets/swf/fireworks.swf",
  103.                                  "maintainAspectRatio":true,
  104.                                  "percentWidth":100,
  105.                                  "percentHeight":100
  106.                               };
  107.                            }
  108.                         }),new UIComponentDescriptor({
  109.                            "type":VBox,
  110.                            "stylesFactory":function():void
  111.                            {
  112.                               this.horizontalCenter = "0";
  113.                               this.verticalCenter = "0";
  114.                               this.horizontalAlign = "right";
  115.                               this.verticalAlign = "middle";
  116.                               this.backgroundAlpha = 0;
  117.                               this.backgroundColor = 0;
  118.                            },
  119.                            "propertiesFactory":function():Object
  120.                            {
  121.                               return {"childDescriptors":[new UIComponentDescriptor({
  122.                                  "type":Text,
  123.                                  "stylesFactory":function():void
  124.                                  {
  125.                                     this.fontFamily = "shufflrFont4";
  126.                                     this.fontSize = 14;
  127.                                     this.color = 12632256;
  128.                                  },
  129.                                  "propertiesFactory":function():Object
  130.                                  {
  131.                                     return {"text":"Late nights, coffee, tons of coding and then ..."};
  132.                                  }
  133.                               }),new UIComponentDescriptor({
  134.                                  "type":Text,
  135.                                  "stylesFactory":function():void
  136.                                  {
  137.                                     this.fontFamily = "shufflrFont4";
  138.                                     this.fontSize = 14;
  139.                                     this.color = 12632256;
  140.                                  },
  141.                                  "propertiesFactory":function():Object
  142.                                  {
  143.                                     return {"text":"... these stunning libraries"};
  144.                                  }
  145.                               }),new UIComponentDescriptor({"type":Spacer}),new UIComponentDescriptor({"type":Spacer}),new UIComponentDescriptor({
  146.                                  "type":Label,
  147.                                  "stylesFactory":function():void
  148.                                  {
  149.                                     this.fontFamily = "shufflrFont4";
  150.                                     this.fontSize = 14;
  151.                                     this.color = 8421504;
  152.                                     this.themeColor = 12031727;
  153.                                  },
  154.                                  "propertiesFactory":function():Object
  155.                                  {
  156.                                     return {"text":"Pure MVC"};
  157.                                  }
  158.                               }),new UIComponentDescriptor({
  159.                                  "type":Label,
  160.                                  "stylesFactory":function():void
  161.                                  {
  162.                                     this.fontFamily = "shufflrFont4";
  163.                                     this.fontSize = 14;
  164.                                     this.color = 8421504;
  165.                                     this.themeColor = 12031727;
  166.                                  },
  167.                                  "propertiesFactory":function():Object
  168.                                  {
  169.                                     return {"text":"Gradient Canvas"};
  170.                                  }
  171.                               }),new UIComponentDescriptor({
  172.                                  "type":Label,
  173.                                  "stylesFactory":function():void
  174.                                  {
  175.                                     this.fontFamily = "shufflrFont4";
  176.                                     this.fontSize = 14;
  177.                                     this.color = 8421504;
  178.                                     this.themeColor = 12031727;
  179.                                  },
  180.                                  "propertiesFactory":function():Object
  181.                                  {
  182.                                     return {"text":"Caurina"};
  183.                                  }
  184.                               }),new UIComponentDescriptor({
  185.                                  "type":Label,
  186.                                  "stylesFactory":function():void
  187.                                  {
  188.                                     this.fontFamily = "shufflrFont4";
  189.                                     this.fontSize = 14;
  190.                                     this.color = 8421504;
  191.                                     this.themeColor = 12031727;
  192.                                  },
  193.                                  "propertiesFactory":function():Object
  194.                                  {
  195.                                     return {"text":"Fisheye Component (Ely Greenfield)"};
  196.                                  }
  197.                               }),new UIComponentDescriptor({
  198.                                  "type":Label,
  199.                                  "stylesFactory":function():void
  200.                                  {
  201.                                     this.fontFamily = "shufflrFont4";
  202.                                     this.fontSize = 14;
  203.                                     this.color = 8421504;
  204.                                     this.themeColor = 12031727;
  205.                                  },
  206.                                  "propertiesFactory":function():Object
  207.                                  {
  208.                                     return {"text":"Papervision3D"};
  209.                                  }
  210.                               }),new UIComponentDescriptor({
  211.                                  "type":Label,
  212.                                  "stylesFactory":function():void
  213.                                  {
  214.                                     this.fontFamily = "shufflrFont4";
  215.                                     this.fontSize = 14;
  216.                                     this.color = 8421504;
  217.                                     this.themeColor = 12031727;
  218.                                  },
  219.                                  "propertiesFactory":function():Object
  220.                                  {
  221.                                     return {"text":"Rating Component"};
  222.                                  }
  223.                               }),new UIComponentDescriptor({
  224.                                  "type":Label,
  225.                                  "stylesFactory":function():void
  226.                                  {
  227.                                     this.fontFamily = "shufflrFont4";
  228.                                     this.fontSize = 14;
  229.                                     this.color = 8421504;
  230.                                     this.themeColor = 12031727;
  231.                                  },
  232.                                  "propertiesFactory":function():Object
  233.                                  {
  234.                                     return {"text":"Efflex ViewStack Effects"};
  235.                                  }
  236.                               }),new UIComponentDescriptor({
  237.                                  "type":Label,
  238.                                  "stylesFactory":function():void
  239.                                  {
  240.                                     this.fontFamily = "shufflrFont4";
  241.                                     this.fontSize = 14;
  242.                                     this.color = 8421504;
  243.                                     this.themeColor = 12031727;
  244.                                  },
  245.                                  "propertiesFactory":function():Object
  246.                                  {
  247.                                     return {"text":"Facebook Actionscript API"};
  248.                                  }
  249.                               }),new UIComponentDescriptor({
  250.                                  "type":Label,
  251.                                  "stylesFactory":function():void
  252.                                  {
  253.                                     this.fontFamily = "shufflrFont4";
  254.                                     this.fontSize = 14;
  255.                                     this.color = 8421504;
  256.                                     this.themeColor = 12031727;
  257.                                  },
  258.                                  "propertiesFactory":function():Object
  259.                                  {
  260.                                     return {"text":"Amara Software"};
  261.                                  }
  262.                               })]};
  263.                            }
  264.                         })]
  265.                      };
  266.                   }
  267.                }),new UIComponentDescriptor({
  268.                   "type":Canvas,
  269.                   "id":"wCancel",
  270.                   "events":{
  271.                      "rollOver":"__wCancel_rollOver",
  272.                      "rollOut":"__wCancel_rollOut"
  273.                   },
  274.                   "stylesFactory":function():void
  275.                   {
  276.                      this.horizontalCenter = "400";
  277.                      this.verticalCenter = "-299";
  278.                   },
  279.                   "propertiesFactory":function():Object
  280.                   {
  281.                      return {
  282.                         "enabled":true,
  283.                         "toolTip":"close",
  284.                         "useHandCursor":true,
  285.                         "buttonMode":true,
  286.                         "mouseChildren":false,
  287.                         "childDescriptors":[new UIComponentDescriptor({
  288.                            "type":Image,
  289.                            "propertiesFactory":function():Object
  290.                            {
  291.                               return {
  292.                                  "source":"assets/images/icons/cross.png",
  293.                                  "alpha":0.7
  294.                               };
  295.                            }
  296.                         })]
  297.                      };
  298.                   }
  299.                })]};
  300.             }
  301.          });
  302.          super();
  303.          mx_internal::_document = this;
  304.          if(!this.styleDeclaration)
  305.          {
  306.             this.styleDeclaration = new CSSStyleDeclaration();
  307.          }
  308.          this.styleDeclaration.defaultFactory = function():void
  309.          {
  310.             this.backgroundColor = 0;
  311.             this.backgroundAlpha = 0.7;
  312.          };
  313.          mx_internal::_CreditsView_StylesInit();
  314.          this.percentWidth = 100;
  315.          this.percentHeight = 100;
  316.          this.verticalScrollPolicy = "off";
  317.          this.horizontalScrollPolicy = "off";
  318.       }
  319.       
  320.       public function __wCancel_rollOut(param1:MouseEvent) : void
  321.       {
  322.          param1.target.alpha = 0.7;
  323.       }
  324.       
  325.       public function handlelink(param1:TextEvent) : void
  326.       {
  327.          navigateToURL(new URLRequest(param1.text),"_blank");
  328.       }
  329.       
  330.       override public function initialize() : void
  331.       {
  332.          mx_internal::setDocumentDescriptor(this._documentDescriptor_);
  333.          super.initialize();
  334.       }
  335.       
  336.       mx_internal function _CreditsView_StylesInit() : void
  337.       {
  338.          var style:CSSStyleDeclaration = null;
  339.          var effects:Array = null;
  340.          if(mx_internal::_CreditsView_StylesInit_done)
  341.          {
  342.             return;
  343.          }
  344.          mx_internal::_CreditsView_StylesInit_done = true;
  345.          style = StyleManager.getStyleDeclaration(".windowCanvas");
  346.          if(!style)
  347.          {
  348.             style = new CSSStyleDeclaration();
  349.             StyleManager.setStyleDeclaration(".windowCanvas",style,false);
  350.          }
  351.          if(style.factory == null)
  352.          {
  353.             style.factory = function():void
  354.             {
  355.                this.gradientRatio = [0,255];
  356.                this.fillAlphas = [0.9,0.9];
  357.                this.gradientType = "linear";
  358.                this.borderColors = [3355443,1118481];
  359.                this.fillColors = [1118481,0];
  360.                this.angle = 90;
  361.                this.colorsConfiguration = 2;
  362.                this.borderThickness = 2;
  363.                this.bordergradientRatio = [0,255];
  364.                this.borderAngle = 90;
  365.                this.borderAlphas = [1,1];
  366.             };
  367.          }
  368.          style = StyleManager.getStyleDeclaration(".floatingText");
  369.          if(!style)
  370.          {
  371.             style = new CSSStyleDeclaration();
  372.             StyleManager.setStyleDeclaration(".floatingText",style,false);
  373.          }
  374.          if(style.factory == null)
  375.          {
  376.             style.factory = function():void
  377.             {
  378.                this.textAlign = "left";
  379.                this.color = 13421772;
  380.                this.fontSize = 14;
  381.                this.fontFamily = "shufflrFont4";
  382.             };
  383.          }
  384.          style = StyleManager.getStyleDeclaration(".friendsViewItem");
  385.          if(!style)
  386.          {
  387.             style = new CSSStyleDeclaration();
  388.             StyleManager.setStyleDeclaration(".friendsViewItem",style,false);
  389.          }
  390.          if(style.factory == null)
  391.          {
  392.             style.factory = function():void
  393.             {
  394.                this.gradientRatio = [0,255];
  395.                this.fillAlphas = [1,1];
  396.                this.cornerRadius = 5;
  397.                this.gradientType = "linear";
  398.                this.borderColors = [4473924,2236962];
  399.                this.fillColors = [2236962,0];
  400.                this.angle = 90;
  401.                this.colorsConfiguration = 2;
  402.                this.borderThickness = 0;
  403.                this.bordergradientRatio = [0,255];
  404.                this.borderAngle = 90;
  405.                this.borderAlphas = [0.8,0.8];
  406.             };
  407.          }
  408.          style = StyleManager.getStyleDeclaration(".videoHListCanvas");
  409.          if(!style)
  410.          {
  411.             style = new CSSStyleDeclaration();
  412.             StyleManager.setStyleDeclaration(".videoHListCanvas",style,false);
  413.          }
  414.          if(style.factory == null)
  415.          {
  416.             style.factory = function():void
  417.             {
  418.                this.fillAlphas = 1;
  419.                this.borderColors = [4473924,2236962];
  420.                this.fillColors = 0;
  421.                this.colorsConfiguration = 1;
  422.                this.borderThickness = 2;
  423.                this.bordergradientRatio = [0,255];
  424.                this.borderAngle = 90;
  425.                this.borderAlphas = [0.8,0.8];
  426.             };
  427.          }
  428.          style = StyleManager.getStyleDeclaration(".friendsViewItemHover");
  429.          if(!style)
  430.          {
  431.             style = new CSSStyleDeclaration();
  432.             StyleManager.setStyleDeclaration(".friendsViewItemHover",style,false);
  433.          }
  434.          if(style.factory == null)
  435.          {
  436.             style.factory = function():void
  437.             {
  438.                this.gradientRatio = [0,255];
  439.                this.fillAlphas = [1,1];
  440.                this.cornerRadius = 5;
  441.                this.gradientType = "linear";
  442.                this.borderColors = [4473924,2236962];
  443.                this.fillColors = [1523284,397590];
  444.                this.angle = 90;
  445.                this.colorsConfiguration = 2;
  446.                this.borderThickness = 0;
  447.                this.bordergradientRatio = [0,255];
  448.                this.borderAngle = 90;
  449.                this.borderAlphas = [0.8,0.8];
  450.             };
  451.          }
  452.          style = StyleManager.getStyleDeclaration(".profileText");
  453.          if(!style)
  454.          {
  455.             style = new CSSStyleDeclaration();
  456.             StyleManager.setStyleDeclaration(".profileText",style,false);
  457.          }
  458.          if(style.factory == null)
  459.          {
  460.             style.factory = function():void
  461.             {
  462.                this.borderColor = 4473924;
  463.                this.color = 13421772;
  464.                this.cornerRadius = 5;
  465.                this.textDecoration = "none";
  466.                this.backgroundAlpha = 0.8;
  467.                this.borderThickness = 0;
  468.                this.borderStyle = "solid";
  469.                this.backgroundColor = 0;
  470.                this.fontFamily = "Helvetica";
  471.             };
  472.          }
  473.          style = StyleManager.getStyleDeclaration(".WhiteText");
  474.          if(!style)
  475.          {
  476.             style = new CSSStyleDeclaration();
  477.             StyleManager.setStyleDeclaration(".WhiteText",style,false);
  478.          }
  479.          if(style.factory == null)
  480.          {
  481.             style.factory = function():void
  482.             {
  483.                this.color = 13421772;
  484.                this.fontFamily = "shufflrFont4";
  485.             };
  486.          }
  487.          style = StyleManager.getStyleDeclaration(".popupViewPanel");
  488.          if(!style)
  489.          {
  490.             style = new CSSStyleDeclaration();
  491.             StyleManager.setStyleDeclaration(".popupViewPanel",style,false);
  492.          }
  493.          if(style.factory == null)
  494.          {
  495.             style.factory = function():void
  496.             {
  497.                this.fillAlphas = 0.9;
  498.                this.topLeftRadius = 30;
  499.                this.topRightRadius = 30;
  500.                this.fillColors = 1118481;
  501.                this.colorsConfiguration = 1;
  502.                this.borderThickness = 0;
  503.                this.bottomLeftRadius = 30;
  504.                this.bottomRightRadius = 30;
  505.             };
  506.          }
  507.          style = StyleManager.getStyleDeclaration(".myzoneHeaderText");
  508.          if(!style)
  509.          {
  510.             style = new CSSStyleDeclaration();
  511.             StyleManager.setStyleDeclaration(".myzoneHeaderText",style,false);
  512.          }
  513.          if(style.factory == null)
  514.          {
  515.             style.factory = function():void
  516.             {
  517.                this.color = 16777215;
  518.                this.cornerRadius = 5;
  519.                this.fontSize = 16;
  520.                this.backgroundAlpha = 0.5;
  521.                this.borderThickness = 2;
  522.                this.backgroundColor = 0;
  523.                this.fontFamily = "shufflrFont4";
  524.             };
  525.          }
  526.          style = StyleManager.getStyleDeclaration(".whiteTextOnTransparent");
  527.          if(!style)
  528.          {
  529.             style = new CSSStyleDeclaration();
  530.             StyleManager.setStyleDeclaration(".whiteTextOnTransparent",style,false);
  531.          }
  532.          if(style.factory == null)
  533.          {
  534.             style.factory = function():void
  535.             {
  536.                this.color = 13421772;
  537.                this.backgroundAlpha = 0;
  538.                this.borderThickness = 0;
  539.                this.fontFamily = "shufflrFont4";
  540.             };
  541.          }
  542.          style = StyleManager.getStyleDeclaration(".textContainerCanvas");
  543.          if(!style)
  544.          {
  545.             style = new CSSStyleDeclaration();
  546.             StyleManager.setStyleDeclaration(".textContainerCanvas",style,false);
  547.          }
  548.          if(style.factory == null)
  549.          {
  550.             style.factory = function():void
  551.             {
  552.                this.fillAlphas = 0.5;
  553.                this.borderColors = [0,2236962];
  554.                this.fillColors = 0;
  555.                this.colorsConfiguration = 1;
  556.                this.borderThickness = 1;
  557.                this.bordergradientRatio = [0,255];
  558.                this.borderAngle = 90;
  559.                this.borderAlphas = [1,1];
  560.             };
  561.          }
  562.          style = StyleManager.getStyleDeclaration(".textContainerCanvasLight");
  563.          if(!style)
  564.          {
  565.             style = new CSSStyleDeclaration();
  566.             StyleManager.setStyleDeclaration(".textContainerCanvasLight",style,false);
  567.          }
  568.          if(style.factory == null)
  569.          {
  570.             style.factory = function():void
  571.             {
  572.                this.fillAlphas = 0.5;
  573.                this.borderColors = [2236962,4473924];
  574.                this.fillColors = 1118481;
  575.                this.colorsConfiguration = 1;
  576.                this.borderThickness = 1;
  577.                this.bordergradientRatio = [64,255];
  578.                this.borderAngle = 90;
  579.                this.borderAlphas = [1,1];
  580.             };
  581.          }
  582.       }
  583.       
  584.       [Bindable(event="propertyChange")]
  585.       public function get wCancel() : Canvas
  586.       {
  587.          return this._249865681wCancel;
  588.       }
  589.       
  590.       public function set wCancel(param1:Canvas) : void
  591.       {
  592.          var _loc2_:Object = this._249865681wCancel;
  593.          if(_loc2_ !== param1)
  594.          {
  595.             this._249865681wCancel = param1;
  596.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"wCancel",_loc2_,param1));
  597.          }
  598.       }
  599.       
  600.       public function __wCancel_rollOver(param1:MouseEvent) : void
  601.       {
  602.          param1.target.alpha = 1;
  603.       }
  604.    }
  605. }
  606.  
  607.