Lingo Dictionary > O-R > play done |  |

play done

Syntax

    play done

Description

Command; ends the sequence started with the most recent `play` command. The `play done` command returns the playback head to the frame immediately after the frame where the calling sequence initiated the `play` command. If `play` is issued from a frame script, the playback head returns to the next frame; if `play` is issued from a sprite script, the playback head returns to the same frame.

Each `play` command needs a matching `play done` command to avoid using up memory if the original calling script isn't returned to. To avoid this memory consumption, you can use a global variable to record where the movie should return to.

The `play done` command has no effect in a movie that is playing in a window.

Example

This handler returns the playback head to the frame of the movie that was playing before the current movie started:

    on exitFrame
    	play done
    end

See also

`play`