function checkButton(buttonHit:MovieClip) {
if (buttonActive == true) {
buttonHit.onPress = function() {
this.originalX = this._x;
this.originalY = this._y;
moveit = new Tween(buttonHit, "_x", Strong.easeInOut, buttonHit._x, detailX, 0.5, true);
new Tween(buttonHit, "_y", Strong.easeInOut, buttonHit._y, detailY, 0.5, true);
new Tween(btnHolder, "_alpha", Regular.easeInOut, 100, 0, 0.5, true);
clearInterval(buttonCheck);
buttonActive = false;
for ($i=0; $i<=numItems; $i++) {
if (positionArray[$i] != buttonHit) {
new Tween(positionArray[$i], "_alpha", Regular.easeOut, 100, 0, 0.3, true);
}
}
trace(buttonHit);
focusActive = true;
};
}
}
Alright, I’ve built a carousel that moves a set amount with button presses, and when the movement stops the item at the front of the carousel enlarges and becomes a button. However, when the carousel is moved to the next item, the previous still stays behaves like a button.
Is there any way to remove the event handler from the movieclip?