M > MovieClip.attachAudio

 

MovieClip.attachAudio

MovieClip.attachAudio, attachAudio, audio, sound

Communications/MovieClip/Methods/attachAudio

Availability

Flash Player 6.

Usage

anyMovieClip.attachAudio(source)

Parameters

source The object containing the audio to play. Valid values are a Microphone object and false (stops playing the audio).

Returns

Nothing.

Description

Method; specifies the audio source to be played locally (Microphone object). To stop playing the audio source, pass false for source.

To play local audio, pass a Microphone object as source. This captures and plays local audio from the microphone hardware.

Example

The following code attaches a microphone to a movie clip.

myMic = Microphone.get();
this.attachAudio(myMic);

See also

Microphone (object), Sound (object)