home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / breakawish.swf / scripts / __Packages / TitleCard.as < prev    next >
Encoding:
Text File  |  2007-09-28  |  789 b   |  37 lines

  1. class TitleCard extends Library.State
  2. {
  3.    var mcRef;
  4.    static var sSTATE_IN = "In";
  5.    static var sSTATE_IDLE = "Idle";
  6.    static var sSTATE_OUT = "Out";
  7.    function TitleCard(_mcRef)
  8.    {
  9.       super(_mcRef);
  10.       this.setState(TitleCard.sSTATE_IN);
  11.       Main.Instance.doAddListener(this);
  12.    }
  13.    function doIn()
  14.    {
  15.       if(this.isStateComplete())
  16.       {
  17.          this.setState(TitleCard.sSTATE_IDLE);
  18.       }
  19.    }
  20.    function doIdle()
  21.    {
  22.       if(this.isStateComplete())
  23.       {
  24.          this.setState(TitleCard.sSTATE_OUT);
  25.       }
  26.    }
  27.    function doOut()
  28.    {
  29.       if(this.isStateComplete())
  30.       {
  31.          Main.Instance.onTitleCardComplete();
  32.          Main.Instance.doRemoveListener(this);
  33.          delete this.mcRef;
  34.       }
  35.    }
  36. }
  37.