Interactivity
75
Inspired XPress - Programming Guide
7. The commands supported by the playback.svg file are:
PLAY [time]
PAUS E [time]
TOGGLE [time] (this command allows you to switch between PLAY and PAUSE)
The [time] variable is optional, but allows you to set either a relative time (in percentages) or an absolute (in
minutes and seconds) to each command.
8. Click on the Send Updates field under Optional reports and select On from the dropdown menu. The updates must
be enabled for proper function of the playback.svg file.
Controlling the Media
The PLAY and PAUSE modes can be controlled with several options:
Using the menu_button.svg file.
Using keystrokes through the keystroke.svg file.
Using the network API, via a shared variable modified through the network.
Playback Position
The actual playback position may be controlled using the slider.svg file. When added to a project, the slider can show the
progress of a media file, and it can also control the position in time in that media file by moving it back and forth. The
slider.svg file may also be used on text boxes (for particularly long text boxes) and for various custom media.
Example: Media player
For this exercise, you will gather together four different elements:
Playback control with a media file.
A menu for the control buttons.
A slider to show the media file progress.
Keystroke mapping for keyboard shortcuts.
To begin:
1. In the Playback project, double-click on the playback.svg file to open it (FIG.98).
FIG. 97 Optional Reports section