Making a scalable "grow box"

I’d like to setup a MC, where I can have a small button area in the bottom right corner to proportionally scale the MC. just liek you can do to any windows in the Mac OS. The thing is I need to constrain the scale proportionally so the drag has to go at a 45º angle. I’ve seen tutorials about scaling, but nothing exactlly like this.

Any suggestions?

when you scale, just scale in both directions to get that 45º angle effect.

example:
btn.onPress = function() {
      var x = this._x;
      var y = this._y;
      this.onMouseMove = function() {
          with (this) _width = _height=x+(_xmouse-x);
      }
  }
  
  btn.onRelease = btn.onReleaseOutside=function () {
      this.onMouseMove = null;
  }

Well, I’ve tested it and it doesn’t really work too well, but it might get you in the right direction.

Good luck anyway!