Sound - Overview

The Sound functions allow you to open a sound in a script and then play the sound in your publication. These OpusScript functions are equivalent to using the Play Sound action in the Audio/Video menu of the Actions dialog. To use these functions, you must first use the PlaySound function or the OpenSound function to create a new Sound object in the script.

Hierarchy:

As well as the specific functions listed under the Functions: heading below, you can also use the following OpusScript functions:

image\Script_Button.jpgBasic Object functions

Class Hierarchy:

Sound

image\Hierarchy_Level.jpg Basic Objects

Hierarchy of objects in Opus

Functions:

GetPosition

Get the current position in seconds for a sound object

GetVolume

Get the volume level of a specified device

GetVolume

Get the volume level of a specified sound object

OpenSound

Open a sound file but don’t play it

Play

Play a sound object

PlaySound

Play a sound file using the filename as a parameter

Seek

Reposition the starting point of a sound

Pause

Pauses a Wav sound object at its current position

Resume

Resume a Wav sound object paused using the Pause function.

SetPosition

Set the current position in seconds for a sound object

SetVolume

Set the volume level for a specified device

SetVolume

Set the volume level for a specified sound object

Stop

Stop a sound object