[AS2]disable button till animation is finished

I’m trying to make a script that will disable leftarrow till the animation is finished. I made a crude attempt myself but it doesn’t work :/.

Any ideas?

[AS]import mx.transitions.Tween;
allowChanging = true;
if (allowChanging == true) {
this.leftarrow.onRelease = function() {
var myTween:Tween = new mx.transitions.Tween(_root.images.imagemove, “_x”, mx.transitions.easing.Regular.easeOut, _root.images.imagemove._x, _root.images.imagemove._x+700, 10);
allowChanging = false;
myTween.onMotionFinished = function() {
allowChanging = true;
};
};
}
[/AS]

thanks!