Scaling a dynamic movie clip help

Hi Guys,

Basically, I have two movie clips; Square_mc, which is the object I want to scale and scaleTransform_mc which acts as my free transform edit point. What I’d like to happen, is when you click on and drag Transform_mc (The edit point), the correpsonding Square_mc movie clip’s _xscale and _yscale change in proportion. I.e. Similar to the free transform tool in Flash. I hope this makes sense. Below is the code exert of what I’ve done:

scaleTransform_mc.onPress = function(){
    scaleTransform_mc.startDrag();
    //
    this.onMouseMove = function() {
        var xmouse = this._x;
        var ymouse = this._y;
        //
        trace(xmouse);
        trace(ymouse);
        
        Square_mc._width  += xmouse;
        Square_mc._height += Square_mc + ymouse;
    }
}

scaleTransform_mc.onRelease = function() {
    scaleTransform_mc.stopDrag()
}

Please find attached a copy of my source code.

Many thanks guys

TAJ