I need help with some actionscript coding

Hey all. Nice forums. I’m having some trouble with actionscript. I need to be able to have an on press or on release event for a button that deletes or removes all object instances but I don’t know the code to do that.

Example: 4 frames.
frame1 contains my variables with counters and functions to randomly generate a number of 2 different object instances.
Frame2 calls those functions and generates instances.
Frame 3 has some basic if else statements.
Frame 4 has a button that will erase the existing instances and go to frame 2 to repeat the generation. This is the problem, I cant figure out what code to use to erase the instances with the button.

Any advice or suggestions would really help me out. If you want to see my code, reply and I will post it.
I’m using mx pro 2004 ver 7.0

Thanks all.

edit sorry, I missed the actionscript forum. my bad.