![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 6; the ability to attach audio from Flash Video (FLV) files was added in Flash Player 7.
my_mc
.attachAudio(source
)
source
The object containing the audio to play. Valid values are a Microphone object, a NetStream object that is playing an FLV file, and false
(stops playing the audio).
Nothing.
Method; specifies the audio source to be played. To stop playing the audio source, pass false
for source
.
The following code attaches a microphone to a movie clip.
my_mic = Microphone.get(); this.attachAudio(my_mic);
The following example shows how you can use a Sound object to control the sound associated with an FLV file.
// Clip is the instance name of the movie clip // that contains the video object "my_video". _root.Clip.my_video.attachVideo(_root.myNetStream); _root.Clip.attachAudio(_root.myNetStream); var snd = new Sound("_root.Clip"); //To adjust the audio: _root.snd.setVolume(100);
Microphone class, NetStream.play()
, Sound class, Video.attachVideo()
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |