Delete on leave frame

lets say i have a bunch of AS in a frame and i want to delete all of it when you leave that frame or change frame
how would i do that ?