Scale with actionscript

how to scale an object using actionscript?as you know scaling using motion tween is not as smooth as using as.

<objectname>._xscale = <value>;
<objectname>._yscale = <value>;

or

<objectname>._width = <value>;
<objectname>._height = <value>;

that will change the size. But there are so many ways to implement this, it’s hard to know where to start.

as a quick example, here is a prototype that will shrink an item, and remove it once it’s <1% of it’s original size:

MovieClip.prototype.shrinker = function() {
 this.onEnterFrame = function() {
  if (this._xscale>1) {
   this._xscale--;
  } else {
   this.removeMovieClip();
  }
 }
}

I just slapped this up, so it might not work, but it looks okay.

then just call it with

<movieclip>.shrinker();