Remove an onRelease Handler
In ActionScript 2, event handlers like onRelease are assigned as properties on movie clips. Removing them isn’t immediately obvious if you haven’t done it before.
After creating an onRelease handler like this:
myMovieClip.onRelease = function() { doWhatever(); }
..you then want to remove the handler for whatever reason. You can remove it like this:
delete myMovieClip.onRelease;
The delete keyword removes the property entirely from the object, so the movie clip will no longer respond to click/release events. This is useful when you need to temporarily disable interactivity — for example, after a button has been clicked and you’re waiting for an animation or server response to complete.
Setting it to null or undefined also works, but delete is the cleanest approach since it fully removes the property rather than leaving it with an empty value.