How do you ensure an enterFrame listener to be called at the end of all enterFrame listeners?

Thanks for reading.

I have a display object that can be destroyed at any time by a button. However an enterFrame listener would access this display object.

I can remove this event listening and then destroy this display object. However, this display object may be destroyed by the button independently while the event listener function is being called. Removal of listening would not stop a currently running listener. Thus, this would lead to error if the running event listener then accesses this destroyed display object.

What I want to do is to make a destroy function call to batch destroy all objects that should be destroyed after all enterFrame listeners are called in each enterFrame cycle. How would you do this?

Thanks. [import]uid: 12769 topic_id: 8009 reply_id: 308009[/import]