# Stop zoom

**URL:** <https://forum.kirupa.com/t/stop-zoom/311712>\
**Category:** flash\
**Created:** [July 14, 2010, 3:59pm UTC](https://forum.kirupa.com/t/stop-zoom/311712 "2010-07-14T15:59:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imcabee](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@imcabee](https://forum.kirupa.com/u/imcabee)\
**Post date:** [July 14, 2010, 3:59pm UTC](https://forum.kirupa.com/t/stop-zoom/311712/1 "2010-07-14T15:59:23Z")

</div>

I want to stop the zooming function after the zoom in button has been clicked once. How can I achieve this?

Here is my code:

```auto
controller.target = image;
image.stop();

import mx.transitions.*;
import mx.transitions.easing.*;
function zoom(what,startSize, endSize) {
    var ease = Strong.easeOut;
    var myTween = new Tween(what, "_yscale", ease, startSize, endSize, 1, true);
    var myTween = new Tween(what, "_xscale", ease, startSize, endSize, 1, true);
}
    

zoomIn.onPress=function(){
zoom(image,100,350); 
}

zoomOut.onPress=function(){
zoom(image,350,100); 
}

image.onPress = function(){
this.startDrag();
}
image.onRelease = function(){
this.stopDrag();
}

```

Any help would really be appreciated! Thanks 🙂
