home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / breakawish.swf / scripts / __Packages / Library / BasicPopUp.as next >
Encoding:
Text File  |  2007-09-28  |  1.5 KB  |  75 lines

  1. class Library.BasicPopUp extends Library.State
  2. {
  3.    var bComplexAnim;
  4.    var oListener;
  5.    var mcRef;
  6.    static var NEED_UPDATE = 1;
  7.    function BasicPopUp(__mcRef, __bComplexAnim)
  8.    {
  9.       super(__mcRef);
  10.       if(__bComplexAnim == undefined)
  11.       {
  12.          __bComplexAnim = false;
  13.       }
  14.       this.bComplexAnim = __bComplexAnim;
  15.       this.setState("Hidden");
  16.    }
  17.    function doHide()
  18.    {
  19.       this.setState("Hidden");
  20.    }
  21.    function doClose()
  22.    {
  23.       if(this.CurrentState == "Idle")
  24.       {
  25.          this.setState("Out");
  26.       }
  27.    }
  28.    function doOpen()
  29.    {
  30.       this.setState("In");
  31.    }
  32.    function doDestroy()
  33.    {
  34.       delete this.oListener;
  35.       delete this.mcRef;
  36.    }
  37.    function get Ref()
  38.    {
  39.       if(this.bComplexAnim)
  40.       {
  41.          return this.mcRef.mcState;
  42.       }
  43.       return this.mcRef.mcState.mcBox;
  44.    }
  45.    function set Listener(__o)
  46.    {
  47.       this.oListener = __o;
  48.    }
  49.    function doIn()
  50.    {
  51.       if(this.isStateComplete())
  52.       {
  53.          this.setState("Idle");
  54.       }
  55.    }
  56.    function doOut()
  57.    {
  58.       if(this.isStateComplete())
  59.       {
  60.          this.setState("Hidden");
  61.       }
  62.    }
  63.    function doLoadStateAction()
  64.    {
  65.       this.mcRef.mcState.btnBlock.onRelease = function()
  66.       {
  67.       };
  68.       this.mcRef.mcState.btnBlock.useHandCursor = false;
  69.       if(this.CurrentState != "Hidden")
  70.       {
  71.          this.oListener.onPopUpEvent(Library.BasicPopUp.NEED_UPDATE,this);
  72.       }
  73.    }
  74. }
  75.