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

  1. class Intro extends Library.State
  2. {
  3.    var mcRef;
  4.    static var sSTATE_FIRST = "First";
  5.    static var sSTATE_SECOND = "Second";
  6.    function Intro(_mcRef)
  7.    {
  8.       super(_mcRef);
  9.       this.setState(Intro.sSTATE_FIRST);
  10.       Main.Instance.doAddListener(this);
  11.    }
  12.    function doFirst()
  13.    {
  14.       if(this.isStateComplete())
  15.       {
  16.          Main.Instance.onIntroFirstPartOver();
  17.          this.setState(Intro.sSTATE_SECOND);
  18.       }
  19.    }
  20.    function doSecond()
  21.    {
  22.       if(this.isStateComplete())
  23.       {
  24.          this.mcRef.mcState.stop();
  25.          Main.Instance.doRemoveListener(this);
  26.       }
  27.    }
  28. }
  29.