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

  1. class GameCheckPoint extends GameNode
  2. {
  3.    var sound;
  4.    var target;
  5.    var linkageID = "BirdLine";
  6.    var value = 0;
  7.    function GameCheckPoint(value)
  8.    {
  9.       super();
  10.       this.value = value;
  11.    }
  12.    function onAddToWorld()
  13.    {
  14.       this.sound = this.attachSound("Checkpoint",_root);
  15.    }
  16.    function onAddToScene()
  17.    {
  18.       this.target.gotoAndStop("checkpoint");
  19.       this.radius = 10000;
  20.    }
  21.    function onCross(obj)
  22.    {
  23.       if(obj.keepTrackOfTime)
  24.       {
  25.          obj.timeRemaining += this.value;
  26.          this.sound.start();
  27.       }
  28.    }
  29. }
  30.