Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Video

LOADVIDEO · PAUSEVIDEO · PLAYVIDEO · RESUMEVIDEO · SEEKVIDEO · STOPVIDEO · WAITVIDEO


LOADVIDEO

Load a video from the game’s files under a name.

LOADVIDEO filename, name
loadvideo(filename, name)

Parameters

  • filename AS STRING - The file (MP4 or WebM).
  • name AS STRING - The name it is played by.

Example

SCREEN 320, 240
LOADVIDEO "clip.mp4", "intro"
PLAYVIDEO "intro", 1

Notes

It’s also the function loadvideo, for when you want what it gives back.

PAUSEVIDEO

Pause a video.

PAUSEVIDEO name
pausevideo(name)

Parameters

  • name AS STRING - The video.

Example

SCREEN 320, 240
LOADVIDEO "clip.mp4", "intro"
PLAYVIDEO "intro", 1
PAUSEVIDEO "intro"
RESUMEVIDEO "intro"

Notes

It’s also the function pausevideo, for when you want what it gives back.

PLAYVIDEO

Play a loaded video on a layer.

PLAYVIDEO name [, layer]
playvideo(name [, layer])

Also documents: loop, mute

Parameters

  • name AS STRING - The video.
  • layer AS NUMBER = NULL - The layer it plays on.

After !!

  • loop(on = TRUE) - Loop it.
  • mute(on = TRUE) - Without its sound.

Example

SCREEN 320, 240
LOADVIDEO "clip.mp4", "intro"
PLAYVIDEO "intro", 1 !! loop mute

Notes

It’s also the function playvideo, for when you want what it gives back.

RESUMEVIDEO

Resume a paused video.

RESUMEVIDEO name
resumevideo(name)

Parameters

  • name AS STRING - The video.

Example

SCREEN 320, 240
LOADVIDEO "clip.mp4", "intro"
PLAYVIDEO "intro", 1
PAUSEVIDEO "intro"
RESUMEVIDEO "intro"

Notes

It’s also the function resumevideo, for when you want what it gives back.

SEEKVIDEO

Move a video to seconds.

SEEKVIDEO name, seconds
seekvideo(name, seconds)

Parameters

  • name AS STRING - The video.
  • seconds AS NUMBER - Where.

Example

SCREEN 320, 240
LOADVIDEO "clip.mp4", "intro"
PLAYVIDEO "intro", 1
SEEKVIDEO "intro", 0.5

Notes

It’s also the function seekvideo, for when you want what it gives back.

STOPVIDEO

Stop a video.

STOPVIDEO name
stopvideo(name)

Parameters

  • name AS STRING - The video.

Example

SCREEN 320, 240
LOADVIDEO "clip.mp4", "intro"
PLAYVIDEO "intro", 1
STOPVIDEO "intro"

Notes

It’s also the function stopvideo, for when you want what it gives back.

WAITVIDEO

Wait until a video has finished.

WAITVIDEO name
waitvideo(name)

Parameters

  • name AS STRING - The video.

Example

SCREEN 320, 240
LOADVIDEO "clip.mp4", "intro"
PLAYVIDEO "intro", 1
WAITVIDEO "intro"
PRINT "the intro is over"

Notes

It’s also the function waitvideo, for when you want what it gives back.