# Scaling a dynamic movie clip help

**URL:** https://forum.kirupa.com/t/scaling-a-dynamic-movie-clip-help/222169
**Category:** flash
**Created:** [April 11, 2007, 11:38am UTC](https://forum.kirupa.com/t/scaling-a-dynamic-movie-clip-help/222169 "2007-04-11T11:38:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![PrinceTaj](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@PrinceTaj](https://forum.kirupa.com/u/PrinceTaj)
#### Post date: [April 11, 2007, 11:38am UTC](https://forum.kirupa.com/t/scaling-a-dynamic-movie-clip-help/222169/1 "2007-04-11T11:38:52Z")

</div>

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:

```auto
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
