home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Puzzle / casual_gameplay_escape.swf / scripts / DefineSprite_572_sodabutton / frame_1 / DoAction.as
Text File  |  2008-09-05  |  966b  |  48 lines

  1. this._alpha = 50;
  2. this.lit = false;
  3. this.onEnterFrame = function()
  4. {
  5.    if(this.lit == false && this._alpha > 50)
  6.    {
  7.       if(this.slow)
  8.       {
  9.          this._alpha -= 0.5;
  10.       }
  11.       else
  12.       {
  13.          this._alpha -= 2;
  14.       }
  15.    }
  16.    else if(this.lit == false)
  17.    {
  18.       this.slow = false;
  19.    }
  20.    if(this.lit == true && this._alpha < 100)
  21.    {
  22.       this.slow = false;
  23.       this._alpha += 2;
  24.       if(this._alpha > 100)
  25.       {
  26.          this._alpha = 100;
  27.       }
  28.    }
  29. };
  30. this.onRelease = function()
  31. {
  32.    this.slow = false;
  33.    this._parent._parent._parent["w" + this.wvalue].releaseup();
  34.    if(this.lit && this._parent.sweeping != true)
  35.    {
  36.       this.lit = false;
  37.    }
  38.    else if(this.lit != true && this._parent.sweeping != true)
  39.    {
  40.       this.lit = true;
  41.    }
  42. };
  43. this.onReleaseOutside = this.onRelease;
  44. this.onPress = function()
  45. {
  46.    this._parent._parent._parent["w" + this.wvalue].pressdown();
  47. };
  48.