home *** CD-ROM | disk | FTP | other *** search
/ Hentai Interactivo 52 / HENTAI52.bin / flip2.swf / scripts / __Packages / mx / core / ext / UIComponentExtensions.as next >
Text File  |  2008-09-03  |  2KB  |  46 lines

  1. class mx.core.ext.UIComponentExtensions
  2. {
  3.    static var bExtended = false;
  4.    static var UIComponentExtended = mx.core.ext.UIComponentExtensions.Extensions();
  5.    static var UIComponentDependency = mx.core.UIComponent;
  6.    static var FocusManagerDependency = mx.managers.FocusManager;
  7.    static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
  8.    function UIComponentExtensions()
  9.    {
  10.    }
  11.    static function Extensions()
  12.    {
  13.       if(mx.core.ext.UIComponentExtensions.bExtended == true)
  14.       {
  15.          return true;
  16.       }
  17.       mx.core.ext.UIComponentExtensions.bExtended = true;
  18.       TextField.prototype.setFocus = function()
  19.       {
  20.          Selection.setFocus(this);
  21.       };
  22.       TextField.prototype.onSetFocus = function(oldFocus)
  23.       {
  24.          if(this.tabEnabled != false)
  25.          {
  26.             if(this.getFocusManager().bDrawFocus)
  27.             {
  28.                this.drawFocus(true);
  29.             }
  30.          }
  31.       };
  32.       TextField.prototype.onKillFocus = function(oldFocus)
  33.       {
  34.          if(this.tabEnabled != false)
  35.          {
  36.             this.drawFocus(false);
  37.          }
  38.       };
  39.       TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
  40.       TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
  41.       mx.managers.OverlappedWindows.enableOverlappedWindows();
  42.       mx.styles.CSSSetStyle.enableRunTimeCSS();
  43.       mx.managers.FocusManager.enableFocusManagement();
  44.    }
  45. }
  46.