arcticPigs release V1.0 helpefiles |
![]() |
It is possible to integrate sound with your 3D web content. The possibilities range from simply playing a wav or mp3 file to using 3D sound effects. For 3D sound you use a cone which defines the origin of the sound and the direction in which the volume is loudest. By connecting the cone to a bone in your model, your sound effects will automatically be linked to your animations. These features will only work for sound devices (software or hardware based) which support Direct 3DSound. If these are not present, the sound will simply play at a constant volume.
You load the sound through a call to arcticDocument::loadSound. You can then create a sound-sequence object through a call to script::addSound. You then need to initialise this object.
Name | Type | Description |
---|---|---|
pause | ![]() | Adds a pause event to the sequence. This will pause the sound at the specified time. void pause(float time) |
restart | ![]() | Adds a restart event to the sequence. Does not have any effect if the sound is currently playing. void restart(float time) |
start | ![]() | Adds a start event to the sequence. This will start the playing of the wave file. time start(float time) |
stop | ![]() | Adds a stop event to the sequence. This event will stop the sound playing. void stop(float time) |
distanceScale (float) | ![]() | Sets or retrieves the distance scale factor. |
events | ![]() | Returns an events collection object containing all the event objects belonging to this sequence. |
innerAngle (float) | ![]() | Sets or retrieves the angle of the inner cone. |
name (String) | ![]() | The name of this sequence event |
outerAngle (float) | ![]() | Sets or retrieves the angle of the outer cone. |
outerVolume (float) | ![]() | Sets or retrieves the ambient volume. |
repeatCount (long) | ![]() | Sets or retrieves the repeat count for this sound fragment |
type (int) | ![]() | Returns SQ_SOUND ( 1 ) |
volume (float) | ![]() | Sets or retrieves the value for the volume of this sound. |
Last Updated: 06/22/02 |