# Scale Down and then Back Up

**URL:** <https://forum.kirupa.com/t/scale-down-and-then-back-up/309790>\
**Category:** flash\
**Created:** [May 25, 2010, 3:25am UTC](https://forum.kirupa.com/t/scale-down-and-then-back-up/309790 "2010-05-25T03:25:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcambron](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tcambron](https://forum.kirupa.com/u/tcambron)\
**Post date:** [May 25, 2010, 3:25am UTC](https://forum.kirupa.com/t/scale-down-and-then-back-up/309790/1 "2010-05-25T03:25:47Z")

</div>

Greetings,

Using the following function

function scaleFromCenter(ob:\*, sx:Number, sy:Number, ptScalePoint:Point) {  
var m:Matrix=ob.transform.matrix;  
m.tx -= ptScalePoint.x;  
m.ty -= ptScalePoint.y;  
m.scale(sx, sy);  
m.tx += ptScalePoint.x;  
m.ty += ptScalePoint.y;  
ob.transform.matrix = m;  
}

I can scale a movie clip down when moving the slider component thumb to the left by passing the value from the slider component (slider.value) into the sx and sy variables.

Can anyone tell me how to scale back up again when I move the slider to the right?

Thanks!
