Pause a function

Hello,

This is something that I’ve seen people elude to being able to do, but I’ve not found any code.

I am using fades to remove and add content to the stage. What I need to do is pause code execution during the fading out then resume when the fade is completed. I’ve seen people post about using loops to test for a specific frame, but every attempt I made did not work, then I saw that during loops, Flash animation stops.

thanks,
lee