Stops movie playback and resets to beginning (sets playing=false, paused=false, finished=false, currentFrame=-1).
Takes handle (movie handle from b2dLoadMovie, integer).
Returns nothing.
2D Overlay
Parameters & Returns
Parameters
handleInt
Returns
Void
Quick Summary
Stops movie playback and resets to beginning (sets playing=false, paused=false, finished=false, currentFrame=-1).
Takes handle (movie handle from b2dLoadMovie, integer).
Returns nothing.
Technical Exegesis...
Stops movie playback and resets to beginning (sets playing=false, paused=false, finished=false, currentFrame=-1). Takes handle (movie handle from b2dLoadMovie, integer). Returns nothing. Sets playing=false (stop active playback), sets paused=false (clear any paused state), sets finished=false (allow replay with b2dPlayMovie), resets currentFrame=-1 (next play starts from frame 0), clears g_activeMovieHandle if this movie (if g_activeMovieHandle==handle, resets to 0).
Stops movie playback and resets to beginning (sets playing=false, paused=false, finished=false, currentFrame=-1). Takes handle (movie handle from b2dLoadMovie, integer). Returns nothing. Sets playing=false (stop active playback), sets paused=false (clear any paused state), sets finished=false (allow replay with b2dPlayMovie), resets currentFrame=-1 (next play starts from frame 0), clears g_activeMovieHandle if this movie (if g_activeMovieHandle==handle, resets to 0). Use to stop playback early (end cutscene before completion), reset movie to beginning (prepare for replay), or cleanup active state (stop before freeing or switching movies). Stop vs Pause: stop resets to beginning (currentFrame=-1, ready for fresh b2dPlayMovie), pause keeps position (currentFrame preserved, use b2dResumeMovie to continue), stop clears all state (playing=false, paused=false, finished=false), pause only sets paused=true (movie still considered "playing" by b2dMoviePlaying). Use cases: (1) Skip cutscene (If KeyHit(KEY_ESC) Then b2dStopMovie(cutscene) user skip), (2) End playback early (b2dStopMovie(movie): transition to gameplay), (3) Reset for replay (b2dStopMovie(movie): later b2dPlayMovie(movie) restart from beginning), (4) Cleanup before free (b2dStopMovie(movie): b2dFreeMovie(movie) clean shutdown). Common patterns: stop = b2dStopMovie(movie) immediate stop; conditional stop = If not needed Then b2dStopMovie(movie); stop then replay = b2dStopMovie(movie): b2dPlayMovie(movie) restart. State reset: playing flag cleared (movie no longer advancing frames), paused flag cleared (movie not in paused state), finished flag cleared (important for replay, b2dPlayMovie checks finished flag), currentFrame reset (next frame will be 0 when replayed), active handle cleared (only if this movie was active, allows other movies to become active). Performance: cost zero (only sets state variables, no GPU/IO operations), immediate (no frame cleanup, texture remains valid until next play), lightweight (safe to call even if not playing, idempotent behavior). Validation: silently ignores if handle<=0 or not found (negative, zero, or invalid handle), safe to call multiple times (idempotent, no error if already stopped), safe to call while paused (clears paused state, resets to beginning). Related: b2dPlayMovie starts playback (use after stop to replay from beginning), b2dPauseMovie pauses playback (alternative to stop, preserves position), b2dResumeMovie resumes playback (use after pause, not after stop), b2dMoviePlaying queries state (returns 0 after stop, 1 while playing or paused), b2dFreeMovie releases resources (can call without stop, but recommended to stop first).