Sound
From ActiveWiki
The sound command attaches a background sound to an object which can be a file in either the WAV, MIDI, or MP3 format.
Active Worlds only plays a single background sound at a time; so if there are multiple background sounds active in a scene the sound of the closest object plays. The volume and left/right panning of the sound are adjusted depending on the distance and direction of the object from the user.
Contents |
[edit] Usage
sound URL [loop OR noloop] [name=name] [overlap] [global]
[edit] Description
[edit] URL
The URL can either be the name of a sound local to that world (i.e. a sound located in the "sound" folder of the world's object path) or it can be an absolute URL to a .wav, .mid, or .mp3 file on the World Wide Web. Note that when linking to absolute URLs, maximum size limits may apply.
[edit] Loop / Noloop
The optional loop and noloop flags indicate whether the sound is played once or loops indefinitely. The default setting for WAV and MP3 files is loop while noloop' is default for MIDI files.
[edit] Name
The optional name argument specifies the name of another nearby object to attach the sound to.
[edit] Overlap
The optional overlap flag indicates what to do when the same sound is triggered repeatedly.
For example, when a sound is used with the activate trigger and the user clicks on the object repeatedly before the previous sound has had a chance to finish. By default, in this case the subsequent sounds are ignored if the previous sound is still playing; however, if overlap is specified, all additional invocations of the same sound will "overlap" simultaneously.
[edit] Global
A command with the Global argument appended will cause the sound to be played for all users who have the object in view. Without the Global parameter, the sound will be played exclusively for the person who activates the trigger (bump, activate, adone).
[edit] Examples
create sound atmos1.mid
- This creates an object which will play the MIDI file "atmos1.mid" whenever a user approaches it. Note that since this is a "local" sound, atmos1.mid must be present in the "sounds" directory of the world's object path as "atmos1.zip" in order to play.
|
|
|
|
Triggers: Create • Bump • Activate • Adone • Collide • Sdone • Enter Zone • Exit Zone Commands: Addforce • Addtorque • Animate • Astart • Astop • Camera • Collider • Colltag • Color • Corona • Envi • Examine • Frame • Group • Light • Link • Lock • Matfx • Media • Midi • Move • Name • Noise • Picture • Rotate • Say • Scale • Seq • Shadow • Sign • Solid • Sound • Tag • Teleport / Teleportx • Texture • URL • Velocity • Visible • Warp • Web |
|
