Candy Logo Copyright © 2025-2026 Candy Arts

Stopping
A Media_Stop command stops one or more media players, at once or at a scheduled point of their playback, and the Dialogue stops waiting for them. Every key is described in Media Stop. What Remains on Screen Stop_Frame decides the state the player is left in:
  • Clear (the default): the file is unloaded, a video or image player is hidden, and the dialogue UI returns to its default z index.
  • 0: the player stops on the current frame, and a video or image remains on screen, with the dialogue UI where it is.
  • -1 or a frame number: the player stops on the last frame, or on that frame, counted from 1.
A video or image stopped on a frame remains displayed until a Media_Play replaces it or a Media_Stop clears it; a Media_Resume doesn't restart it. Audio has no frames to display: on an audio player, any number stops the playback and leaves the file loaded. A playback that ends by itself, once its loops and duration are over, stops on the Stop_Frame of the Line that started it (see Playing Media). Scheduled Stops With a Loops or a Duration, the Media_Stop command schedules the stop instead of stopping at once, and the Dialogue continues. The two keys are counted from the start of the playback, as on the Media_Play command, and replace that Line's own Loops and Duration: a Music player started with Loops set to -1, then stopped with Loops set to 3, stops at the end of its third loop. The playback then stops on the Media_Stop command's Stop_Frame.
  • A point already passed stops the playback at once, where it is.
  • A player that isn't playing (held on its first frame, finished or already stopped) stops at once. A still image has no loops: only the Duration counts, from the moment the image was displayed.
  • A later Media_Stop replaces the scheduled stop, and so does a Media_Play that starts a new playback. A pause delays it, as it delays the playback.
Stopping with the Dialogue When a Dialogue ends, the Engine stops the Private players it owns, and the Public players it holds when end_held_media says so (see Shared Players). The player's x_playback_finished() hook reports a stopped playback with "ended" false, and a playback that reached its end with true (see Media Players).