home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / germ_roundup.swf / scripts / __Packages / smashing / Renderable.as < prev    next >
Encoding:
Text File  |  2007-03-20  |  1016 b   |  43 lines

  1. class smashing.Renderable extends MovieClip
  2. {
  3.    var mpX = 16777215;
  4.    var mpY = 16777215;
  5.    var mpZ = 16777215;
  6.    var mpScale = 16777215;
  7.    var mScale = 100;
  8.    var changed = true;
  9.    var scaleMod = 1;
  10.    function Renderable()
  11.    {
  12.       super();
  13.    }
  14.    function set scale(n)
  15.    {
  16.       var _loc1_ = this;
  17.       _loc1_._xscale = n;
  18.       _loc1_._yscale = n;
  19.    }
  20.    function render()
  21.    {
  22.       var _loc3_ = this;
  23.       var _loc1_ = smashing.Viewport.getPos(_loc3_);
  24.       if(_loc1_ != undefined)
  25.       {
  26.          var _loc2_ = _loc1_.scale;
  27.          if(_loc1_.x != undefined)
  28.          {
  29.             _loc3_._x = _loc1_.x * _loc2_ + smashing.Viewport.centerX;
  30.          }
  31.          if(_loc1_.y != undefined)
  32.          {
  33.             _loc3_._y = _loc1_.y * _loc2_ + smashing.Viewport.centerY;
  34.          }
  35.          if(_loc2_ != _loc3_.mpScale)
  36.          {
  37.             _loc3_.mpScale = _loc2_;
  38.             _loc3_.scale = _loc2_ / _loc3_.scaleMod * 100;
  39.          }
  40.       }
  41.    }
  42. }
  43.