home *** CD-ROM | disk | FTP | other *** search
/ Clickx 47 / Clickx 47.iso / assets / swf / start.swf / scripts / __Packages / clickx / ui / UISoftwarePanel.as < prev   
Encoding:
Text File  |  2008-01-01  |  12.7 KB  |  326 lines

  1. var ┬º\x01┬º = 723;
  2. while(true)
  3. {
  4.    if(eval("\x01") == 723)
  5.    {
  6.       set("\x01",eval("\x01") - 191);
  7.       ┬º┬ºpush(true);
  8.    }
  9.    else if(eval("\x01") == 39)
  10.    {
  11.       set("\x01",eval("\x01") - 25);
  12.       if(┬º┬ºpop())
  13.       {
  14.          set("\x01",eval("\x01") + 692);
  15.       }
  16.    }
  17.    else if(eval("\x01") == 223)
  18.    {
  19.       set("\x01",eval("\x01") + 678);
  20.       if(┬º┬ºpop())
  21.       {
  22.          set("\x01",eval("\x01") - 699);
  23.       }
  24.    }
  25.    else
  26.    {
  27.       if(eval("\x01") == 14)
  28.       {
  29.          set("\x01",eval("\x01") + 692);
  30.          break;
  31.       }
  32.       if(eval("\x01") == 202)
  33.       {
  34.          set("\x01",eval("\x01") - 163);
  35.          ┬º┬ºpush(true);
  36.       }
  37.       else
  38.       {
  39.          if(eval("\x01") == 706)
  40.          {
  41.             set("\x01",eval("\x01") + 119);
  42.             if(!_global.clickx)
  43.             {
  44.                _global.clickx = new Object();
  45.             }
  46.             ┬º┬ºpop();
  47.             if(!_global.clickx.ui)
  48.             {
  49.                _global.clickx.ui = new Object();
  50.             }
  51.             ┬º┬ºpop();
  52.             if(!_global.clickx.ui.UISoftwarePanel)
  53.             {
  54.                clickx.ui.UISoftwarePanel extends MovieClip;
  55.                var _loc2_ = clickx.ui.UISoftwarePanel = function()
  56.                {
  57.                   super();
  58.                   mx.events.EventDispatcher.initialize(this);
  59.                }.prototype;
  60.                _loc2_.slideIn = function()
  61.                {
  62.                   var _loc2_ = (18 - this._x) / 2;
  63.                   if(Math.abs(_loc2_) < 0.2)
  64.                   {
  65.                      this._x = 18;
  66.                      if(this.validImage)
  67.                      {
  68.                         this.softImage_mc.image_mc.onEnterFrame = mx.utils.Delegate.create(this,this.handleImageLoading);
  69.                      }
  70.                      this.installBtn_mc._visible = true;
  71.                      this.installBtn_mc._alpha = 0;
  72.                      this.installBtn_mc.onEnterFrame = function()
  73.                      {
  74.                         this._alpha += 10;
  75.                         if(this._alpha >= 100)
  76.                         {
  77.                            delete this.onEnterFrame;
  78.                         }
  79.                      };
  80.                      delete this.onEnterFrame;
  81.                   }
  82.                   else
  83.                   {
  84.                      this._x += _loc2_;
  85.                   }
  86.                };
  87.                _loc2_.slideOut = function()
  88.                {
  89.                   var _loc2_ = (-235 - this._x) / 2;
  90.                   if(Math.abs(_loc2_) < 0.2)
  91.                   {
  92.                      this._x = -495;
  93.                      delete this.onEnterFrame;
  94.                      if(this.softToLoad_ID != "")
  95.                      {
  96.                         this.renderDetail(this.softToLoad_GID,this.softToLoad_ID);
  97.                         this.softToLoad_ID = "";
  98.                         this.softToLoad_GID = "";
  99.                         this.onEnterFrame = mx.utils.Delegate.create(this,this.slideIn);
  100.                      }
  101.                   }
  102.                   else
  103.                   {
  104.                      this._x += _loc2_;
  105.                   }
  106.                };
  107.                _loc2_.slideOutCB = function()
  108.                {
  109.                   var _loc2_ = (-235 - this._x) / 2;
  110.                   if(Math.abs(_loc2_) < 0.2)
  111.                   {
  112.                      this._x = -495;
  113.                      this.dispatchEvent({type:"onSoftwarePanelHidden"});
  114.                      delete this.onEnterFrame;
  115.                   }
  116.                   else
  117.                   {
  118.                      this._x += _loc2_;
  119.                   }
  120.                };
  121.                _loc2_.handleImageLoading = function()
  122.                {
  123.                   var _loc2_ = this.softImage_mc.image_mc.container_mc.getBytesLoaded() / this.softImage_mc.image_mc.container_mc.getBytesTotal() * 100;
  124.                   if(_loc2_ == 100)
  125.                   {
  126.                      this.softImage_mc.image_mc.onEnterFrame = mx.utils.Delegate.create(this,this.fadeInSoftImage);
  127.                   }
  128.                };
  129.                _loc2_.fadeInSoftImage = function()
  130.                {
  131.                   var _loc2_ = (- this.maskPosY) / 4;
  132.                   this.maskPosY += _loc2_;
  133.                   this.softImage_mc.mask_mc.clear();
  134.                   clickx.util.DrawingUtil.drawRectangle(this.softImage_mc.mask_mc,0,1,0,0,Math.round(this.maskPosY),200,109);
  135.                   if(this.maskPosY <= 0)
  136.                   {
  137.                      delete this.softImage_mc.image_mc.onEnterFrame;
  138.                   }
  139.                };
  140.                _loc2_.openLink = function()
  141.                {
  142.                   clickx.shell.Shell.getInstance().launchURL(this.link);
  143.                };
  144.                _loc2_.renderDetail = function(groupId, softId)
  145.                {
  146.                   this.installBtn_mc._visible = false;
  147.                   var _loc2_ = clickx.data.DataProvider.getInstance().getSoftware(groupId,softId);
  148.                   var _loc4_ = _loc2_.title;
  149.                   var _loc5_ = undefined;
  150.                   _loc5_ = this.titel_txt.getNewTextFormat();
  151.                   var _loc7_ = _loc5_.getTextExtent(_loc4_);
  152.                   this.titel_txt.autoSize = "left";
  153.                   this.titel_txt.text = _loc4_;
  154.                   this.type_txt.text = "Type: " + _loc2_.type;
  155.                   this.type_txt._y = this.titel_txt._y + this.titel_txt.textHeight + 5;
  156.                   this.prijs_txt._y = this.type_txt._y + 17;
  157.                   this.auteur_txt._y = this.prijs_txt._y + 17;
  158.                   this.platform_mc._y = this.auteur_txt._y + 16;
  159.                   this.platform_txt._y = this.auteur_txt._y + 22;
  160.                   this.content_txt._y = this.auteur_txt._y + 48;
  161.                   this.content_txt._height = 117 - (this.auteur_txt._y + 48 - 221);
  162.                   this.scroller_mc.scrollUp_mc._y = this.auteur_txt._y + 49 - 222;
  163.                   this.scroller_mc.slideArea_mc._y = this.scroller_mc.scrollUp_mc._y + 6;
  164.                   this.scroller_mc.slideArea_mc._height = 105 - (this.scroller_mc.scrollUp_mc._y - 1);
  165.                   this.scroller_mc.init(this.scroller_mc.scrollUp_mc._y + 19,91);
  166.                   this.prijs_txt.text = "Prijs: " + _loc2_.price;
  167.                   this.auteur_txt.text = "Auteur: " + _loc2_.author;
  168.                   this.platform_txt.text = _loc2_.platforms;
  169.                   this.content_txt.htmlText = _loc2_.text;
  170.                   this.content_txt.scroll = 0;
  171.                   if(this.content_txt.scroll < this.content_txt.maxscroll)
  172.                   {
  173.                      this.scroller_mc._visible = true;
  174.                   }
  175.                   else
  176.                   {
  177.                      this.scroller_mc._visible = false;
  178.                   }
  179.                   var _loc3_ = _loc2_.url;
  180.                   this.softwareLink = _loc2_.link;
  181.                   if(_loc3_.length > 45)
  182.                   {
  183.                      _loc3_ = _loc3_.substr(0,45) + "...";
  184.                   }
  185.                   this.link_txt.text = _loc3_;
  186.                   this.link_txt.autoSize = "left";
  187.                   this.link_btn.onPress = mx.utils.Delegate.create(this,this.openLink);
  188.                   this.link_btn._width = this.link_txt.textWidth;
  189.                   this.installBtn_mc.buttonText_txt.text = _loc2_.buttontext;
  190.                   this.link = _loc2_.url;
  191.                   this.linkType = _loc2_.buttontype;
  192.                   if(this.softImage_mc.image_mc != undefined)
  193.                   {
  194.                      this.softImage_mc.image_mc.removeMovieClip();
  195.                   }
  196.                   this.softImage_mc.createEmptyMovieClip("image_mc",1);
  197.                   this.softImage_mc.image_mc._y = 7;
  198.                   this.softImage_mc.image_mc.createEmptyMovieClip("container_mc",1);
  199.                   if(_loc2_.image != undefined && _loc2_.image != "undefined" && _loc2_.image != "")
  200.                   {
  201.                      if(clickx.util.PlatformUtil.getPlatform() == "pc")
  202.                      {
  203.                         this.softImage_mc.image_mc.container_mc.loadMovie(clickx.Application.getAppPath() + _loc2_.image);
  204.                      }
  205.                      else
  206.                      {
  207.                         this.softImage_mc.image_mc.container_mc.loadMovie(_loc2_.image);
  208.                      }
  209.                      this.validImage = true;
  210.                   }
  211.                   else
  212.                   {
  213.                      this.validImage = false;
  214.                   }
  215.                   this.softImage_mc.createEmptyMovieClip("mask_mc",2);
  216.                   this.maskPosY = 109;
  217.                   clickx.util.DrawingUtil.drawRectangle(this.softImage_mc.mask_mc,0,1,0,0,this.maskPosY,200,109);
  218.                   this.softImage_mc.image_mc.setMask(this.softImage_mc.mask_mc);
  219.                };
  220.                _loc2_.installSoftware = function()
  221.                {
  222.                   var _loc2_ = "";
  223.                   if(clickx.util.PlatformUtil.getPlatform() == "mac")
  224.                   {
  225.                      _loc2_ = clickx.Application.getAppPath(true) + "assets:software:";
  226.                   }
  227.                   else
  228.                   {
  229.                      _loc2_ = clickx.Application.getAppPath(true) + "assets\\software\\";
  230.                   }
  231.                   if(this.linkType == "url")
  232.                   {
  233.                      clickx.shell.Shell.getInstance().launchURL(this.softwareLink);
  234.                   }
  235.                   else if(this.linkType == "install")
  236.                   {
  237.                      clickx.shell.Shell.getInstance().launchFile(_loc2_ + this.softwareLink);
  238.                   }
  239.                   else
  240.                   {
  241.                      clickx.shell.Shell.getInstance().execute(_loc2_ + this.softwareLink);
  242.                   }
  243.                };
  244.                _loc2_.loadSoftwareInfo = function(groupId, softId)
  245.                {
  246.                   if(this._x > -495)
  247.                   {
  248.                      this.softToLoad_ID = softId;
  249.                      this.softToLoad_GID = groupId;
  250.                      this.installBtn_mc._visible = false;
  251.                      this.onEnterFrame = mx.utils.Delegate.create(this,this.slideOut);
  252.                   }
  253.                   else
  254.                   {
  255.                      this.renderDetail(groupId,softId);
  256.                      this.onEnterFrame = mx.utils.Delegate.create(this,this.slideIn);
  257.                   }
  258.                };
  259.                _loc2_.isOpen = function()
  260.                {
  261.                   return this._x <= -495 ? false : true;
  262.                };
  263.                _loc2_.slideOutAndDoCallBack = function()
  264.                {
  265.                   this.installBtn_mc._visible = false;
  266.                   this.onEnterFrame = mx.utils.Delegate.create(this,this.slideOutCB);
  267.                };
  268.                _loc2_.scrollTextTo = function(percent)
  269.                {
  270.                   this.content_txt.scroll = Math.round(this.content_txt.maxscroll / 100 * percent);
  271.                };
  272.                _loc2_.onLoad = function()
  273.                {
  274.                   this._x = -495;
  275.                   clickx.util.ButtonUtil.makeFrame_R_O_Effect(this.installBtn_mc,5);
  276.                   this.installBtn_mc.onPress = mx.utils.Delegate.create(this,this.installSoftware);
  277.                   this.installBtn_mc._visible = false;
  278.                   this.scroller_mc.addEventListener("onScrollBarChanged",this);
  279.                };
  280.                _loc2_.onScrollBarChanged = function(eventObject)
  281.                {
  282.                   this.scrollTextTo(eventObject.scrollTo);
  283.                };
  284.                _loc2_.softToLoad_ID = "";
  285.                _loc2_.softToLoad_GID = "";
  286.                _loc2_.maskPosY = 146;
  287.                _loc2_.link = "";
  288.                _loc2_.linkType = "";
  289.                _loc2_.validImage = false;
  290.                _loc2_.softwareLink = "";
  291.                ┬º┬ºpush(ASSetPropFlags(clickx.ui.UISoftwarePanel.prototype,null,1));
  292.             }
  293.             ┬º┬ºpop();
  294.             break;
  295.          }
  296.          if(eval("\x01") == 532)
  297.          {
  298.             set("\x01",eval("\x01") - 270);
  299.             if(┬º┬ºpop())
  300.             {
  301.                set("\x01",eval("\x01") - 230);
  302.             }
  303.          }
  304.          else
  305.          {
  306.             if(eval("\x01") == 901)
  307.             {
  308.                set("\x01",eval("\x01") - 699);
  309.                break;
  310.             }
  311.             if(eval("\x01") == 262)
  312.             {
  313.                set("\x01",eval("\x01") - 230);
  314.                break;
  315.             }
  316.             if(eval("\x01") != 32)
  317.             {
  318.                break;
  319.             }
  320.             set("\x01",eval("\x01") + 191);
  321.             ┬º┬ºpush(true);
  322.          }
  323.       }
  324.    }
  325. }
  326.