Authorware Help Sprite Functions

The following spritel functions can be called from scripting to control playback of DirectMediaXtra sprites.

CallSprite(@"IconName", #videoplay) - Used to start or resume playback of a Media file. Playback is usually started automatically when the sprite is loaded, unless the "Paused at Start" option is checked.
Example: CallSprite(@"DirectMediaXtra ", #videoplay)

CallSprite(@"IconName", #videopause) - Used to pause playback of a Media file.
Example: CallSprite(@"DirectMediaXtra ", #videopause)

CallSprite(@"IconName", #videoseek, time) - Seeks the video to a different time in the Media file, and pauses the video. Time should be expressed in milliseconds.
Example: CallSprite(@"DirectMediaXtra ", #videoseek, 1500)

CallSprite(@"IconName", #videoplaysegment , starttime, endtime) - Plays a segment of the Media file. Please note that using this option actually limits access to the times of the stream that falls outside the playback segment boundaries. You should use another videoplaysegment() command to seek to a different time on the stream.
Example: CallSprite(@"DirectMediaXtra ", #videoplaysegment, 10000, 20000)

CallSprite(@"IconName", #isPastCuePoint , cuepointindex) - Returns TRUE if the cue point indicated has already passed, FALSE otherwise. DirectMediaXtra only supports this function used with cuepoint indexes, not names.
Example:result:=CallSprite(@"DirectMediaXtra ", #isPastCuePoint, 2)
Trace(result)
-- 1

CallSprite(@"IconName", #setvolume, volume) - Sets the volume of audio playback during the current sprite span. Valid volumes are in the range of -100 to 0 dB.
Example: CallSprite(@"DirectMediaXtra ", #setvolume , 0)

CallSprite(@"IconName", #getvolume) - Returns the current volume of audio playback, in dB.
Example: result:=CallSprite(@"DirectMediaXtra ", #getvolume)
Trace(result)
-- -20

CallSprite(@"IconName", #setbalance, balance) - Sets the balance of audio playback during the current sprite span. Valid values are in the range of -100 to 100 dB.
Example: CallSprite(@"DirectMediaXtra ", #setvolume , 0)

CallSprite(@"IconName", #getbalance) - Returns the current balance of audio playback, in dB.
Example: result:=CallSprite(@"DirectMediaXtra ", #getbalance)
Trace(result)
-- -100

CallSprite(@"IconName", #setrate , rate) - Sets the rate of playback during the current sprite span. Valid values are in the range of 0 to 200 %.
Example: CallSprite(@"DirectMediaXtra ", #setrate , 80)

CallSprite(@"IconName", #getrate) - Returns the current playback rate, in %.
Example: result:=CallSprite(@"DirectMediaXtra ", #getrate)
Trace(result)
-- 100

CallSprite(@"IconName", #setfullscreen) - This function will trigger the ActiveMovie/DirectShow full-screen video renderer. The DirectMediaXtra sprite will be promoted to full-screen playback and a new video surface will be created. The full-screen renderer works independently from the authoring application, and it will be full-screen even if the presentation window does not fill the whole monitor. Mouse event detection and keypresses are NOT passed to the authoring application, so you should use this function in conjunction with cuepoints to return control to the authoring application. Remember to call RemoveFullScreen() when you are done with playback. On most applications it is better to simply stretch the DirectMediaXtra sprite to cover the whole presentation window area: you will still benefit from any video driver acceleration and interactivity control will be retained.
Example: CallSprite(@"DirectMediaXtra ", #setfullscreen)

CallSprite(@"IconName", #removefullscreen) - This function will disable the ActiveMovie/DirectShow full-screen video renderer. The DirectMediaXtra sprite will return to its original window on the presentation window in Authorware.
Example: CallSprite(@"DirectMediaXtra ", #removefullscreen 1)

DirectMediaXtra Help