How do I Disable ActionScript on Button Click?

How do I make it so that when I click a button, it disables a certain piece of ActionScript? And how do I make it enable again on a certain frame?

THANK YOU! :love_heart:

Please explain thoroughly because I’m an amateur at this. :slight_smile: