Director Help

sound()

Usage

-- Lingo syntax
sound(intSoundChannel)

// JavaScript syntax
sound(intSoundChannel);

Description

Top level function; returns a reference to a specified sound channel.

The functionality of this method is identical to the Sound object’s channel() method.

Parameters

intSoundChannel Required. An integer that specifies the sound channel to reference.

Example

The following example assigns sound channel 1 to a variable music and plays a sound.

-- Lingo syntax
music = sound(1)
music.play(member("waltz1"))

// JavaScript syntax
var music = sound(1);
music.play(member("waltz1"));

See also

channel() (Sound), Sound Channel