home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / breakawish.swf / scripts / __Packages / Library / Transition.as < prev   
Encoding:
Text File  |  2007-09-28  |  967 b   |  44 lines

  1. class Library.Transition extends Library.State
  2. {
  3.    var oListener;
  4.    var mcRef;
  5.    static var TRANSITION_SCREEN_COVERED = 1;
  6.    static var TRANSITION_COMPLETE = 2;
  7.    function Transition(__mcRef)
  8.    {
  9.       super(__mcRef);
  10.       this.setState("Hidden");
  11.    }
  12.    function doStart()
  13.    {
  14.       this.setState("In");
  15.    }
  16.    function doDestroy()
  17.    {
  18.    }
  19.    function doIn()
  20.    {
  21.       if(this.isStateComplete())
  22.       {
  23.          this.oListener.onTransitionEvent(Library.Transition.TRANSITION_SCREEN_COVERED,this);
  24.          this.setState("Out");
  25.       }
  26.    }
  27.    function doOut()
  28.    {
  29.       if(this.isStateComplete())
  30.       {
  31.          this.oListener.onTransitionEvent(Library.Transition.TRANSITION_COMPLETE,this);
  32.          this.setState("Hidden");
  33.       }
  34.    }
  35.    function set Listener(_o)
  36.    {
  37.       this.oListener = _o;
  38.    }
  39.    function doLoadStateAction()
  40.    {
  41.       this.mcRef.mcState.btnBlock.useHandCursor = false;
  42.    }
  43. }
  44.