home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / starisland.swf / scripts / __Packages / illusoft / Gate.as < prev    next >
Encoding:
Text File  |  2007-12-10  |  554 b   |  31 lines

  1. class illusoft.Gate
  2. {
  3.    var dmc;
  4.    var rec;
  5.    var buttonSwitch;
  6.    var isOpen = false;
  7.    function Gate(mc, rec)
  8.    {
  9.       this.dmc = mc;
  10.       this.rec = rec;
  11.    }
  12.    function SetSwitch(buttonSwitch)
  13.    {
  14.       this.buttonSwitch = buttonSwitch;
  15.    }
  16.    function GetSwitch()
  17.    {
  18.       return this.buttonSwitch;
  19.    }
  20.    function Open()
  21.    {
  22.       if(!this.isOpen)
  23.       {
  24.          this.rec.setActiveState(false);
  25.          this.rec.setVisible(false);
  26.          this.dmc.play();
  27.          this.isOpen = true;
  28.       }
  29.    }
  30. }
  31.