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:
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