The following elements are action elements.
Play
Starts playing content at the current position
| Attribute | Description |
|---|---|
| Speed | The playback speed, where 100 is normal speed |
Pause
Stops all playing, buttons still respond for 60 seconds, if no duration value is set. If a duration value is set, play will resume after that many milliseconds.
| Attribute | Description |
|---|---|
| Duration | The duration after which playing should resume |
Stop
Starts playing content at the current position
Goto
Moves to the specified location. It does not affect whether content is playing or not playing.
This element must have either a Location or PopStack child element.
Actions following a Goto element are not executed, unless PopStack is used when no locations are on the stack.
Examples
Jump ahead 10 seconds:
<Goto> <Location Offset=”10000”/> </Goto>
Jump to the beginning of the next container whose Class attribute equals ”Chapter”
<Goto> <Location Target=”Next” Class=”Chapter”/> </Goto>
Jump to the beginning of the container whose ID attribute equals ”Introduction”
<Goto> <Location Ref=”Introduction”/> </Goto>
Return to the last position on the stack.
<Goto> <PopStack/> </Goto>
Location
Identifies a position within the audio content. It is used within the Goto or PushStack elements.
| Attribute | Description |
|---|---|
| Ref | The ID value of another container. By default, this will go to the beginning of the container, unless another value for target is specified |
| Class | If a target of "Next", "Previous", "Beginning", or "End" is chosen the target will be relative to the parent container with the same Class value. |
| Target | One of the following values * Beginning : The beginning of a container * End : The end of a container * Previous : The beginning of the previous container * Next : The end of the next container |
| Offset | The offset in milliseconds from the location specified by the combination of the Target, Class, and Ref attributes |
Resolving the location attributes to an audio position begins with using the current audio position as the context. The attributes are then evaluated in the following order:
- Ref, if present, moves the context to the beginning of the container with a matching ID
- Class, if present, moves the context to the beginning of the parent container with a matching Class attribute
- Target, if present, moves the context to a relative position based on the boundaries of the current container
- Offset, if present, moves the context to a relative position based on the specified number of milliseconds
Examples are shown with the Goto element.
PopStack
Used within the Goto element to Pop and goes to the most recent loction on the stack.
Examples are shown with the Goto element.
PushStack
Pushes the specified location onto the stack. This is used to return to a location in the audio cotent after listening to a hyperlink.
Location is a required child element.
Example
The example shows two files. The first file is the main content. If the user presses the Option1 button while listening to IHaveADream.mp3, the bio.mp3 file will play, and then return to the previous position in IHaveADream.mp3.
<File Href="IHaveADream.mp3"> <OnButton Button="Option1" Action="Release"> <ActionSet> <PushStack> <Location> <!-- With no attributes specified, defaults to current location --> </PushStack> <Goto> <Location Ref="BiographicalNote"/> </Goto> </ActionSet> </OnButton> </File> ... <File Href="bio.mp3" ID="BiographicalNote"> <OnFinish> <ActionSet> <Goto> <PopStack/> </Goto> </ActionSet> <OnFinish> </File>
ClearStack
Clears the location stack of all entries. The location stack is used by the PushStack and PopStack elements.
SetFlag
Sets a flag to be true or false. If the flag does not exist, it is created. Flags can be used to support multi-button actions and record user responses.
| Attribute | Description |
|---|---|
| Flag | The unique identifier of the flag. These IDs are scoped within the Package container. |
| Value | A true or false value |
Example
The following example is a Block that contains the correct answer to a multiple choice question. If the user clicks the Option button during the playback of this choice, the "CorrectChoice" flag will record that they answered correctly.
<Block Offset="45000" Length="8000"> <OnButton Button="Option1" Action="Release"> <ActionSet> <SetFlag Flag="CorrectChoice" Value="true"/> </ActionSet> <OnButton> </Block>
SetLight
Sets the display of lights on the player.
| Attribute | Description |
|---|---|
| Light | Indicates which lights are to be affected. Possible values are "Red" and "Green" |
| Mode | Indicates the light setting. Possible values are "Off", "On", "SlowBlink", and "FastBlink" |
Example
The following example sets the light to alternate slowly between Green and Yellow.
<SetLight Light="Red" Mode="SlowBlink"/> <SetLight Light="Green" Mode="On"/>
SetVolume
Sets the player volume.
| Attribute | Description |
|---|---|
| Level | The new volume level. Volume ranges from 0 to 100. |
| Relative | If true, the value of the Level attribute is added to the current volume level. |
Show
Sends XHTML to the viewer if available.
| Attribute | Description |
|---|---|
| Append | If “true”, the XHTML is appended to the XHTML in the viewer. Otherwise, the content in the viewer is replaced. |
| (inner xml) | XHTML to be sent to the viewer |
Example
<Show> <p>We must forever conduct our struggle on the high plane of <u>dignity and discipline</u>.</p> <p>We must not allow our creative protest to degenerate into physical violence.</p> <p>Again and again, we must rise to the majestic heights of meeting physical force with <u>soul force</u>.</p> </Show>





