attachMovie funtion

Hi guys,

Is there anyway to disable a button once it has run the function? I have an mC that is being attached to a container mc on the stage via a button release. But each time the button is pressed it runs the function. Included in the function is a alpha tween so you can imagine that each time the button is pressed, the alpha fade starts again. Any suggestions on how to stop this so that the alpha fade completes once? ?

Much appreciated & thanks in advance.

My code:

import mx.transitions.Tween;
import mx.transitions.easing.*;

attachBtn.onRelease = function() {
attachImg();
}

function attachImg() {
container.attachMovie(“img01”, “amanda”, 1);
var myTween:Object = new Tween(container, “_alpha”, Strong.easeOut, 0, 100, 10, true);
}