home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / bug.swf / scripts / DefineSprite_47_tree / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-28  |  775 b   |  39 lines

  1. function renderTree()
  2. {
  3.    var _loc2_ = undefined;
  4.    var _loc3_ = undefined;
  5.    var _loc1_ = undefined;
  6.    var y1;
  7.    var d = 100;
  8.    z += 5;
  9.    this.swapDepths(5000 + z);
  10.    _loc3_ = d / (d + z);
  11.    _X = x * _loc3_;
  12.    _Y = y * _loc3_;
  13.    y1 = (y + 130) * _loc3_;
  14.    _xscale = _yscale = (_Y - y1) * 300 / h;
  15.    _loc2_ = this.getBounds(_parent);
  16.    if(_loc2_.yMin > 200 || _loc2_.xMin > 300 || _loc2_.xMax < -300)
  17.    {
  18.       this.removeMovieClip();
  19.    }
  20.    _loc1_ = int(_Y * _totalframes / 300);
  21.    if(_loc1_ < 1)
  22.    {
  23.       _loc1_ = 1;
  24.    }
  25.    if(_loc1_ > _totalframes)
  26.    {
  27.       _loc1_ = _totalframes;
  28.    }
  29.    this.gotoAndStop(_loc1_);
  30.    first = 1;
  31. }
  32. if(Number(first) == 0)
  33. {
  34.    h = _height;
  35.    y = -300;
  36.    renderTree();
  37. }
  38. stop();
  39.