// replace with your own image or use the following
holder_mc.image_mc.loadMovie("http://www.macromedia.com/devnet/mx/blueprint/
articles/nielsen/spotlight_jnielsen.jpg");
holder_mc.onRollOver = function() {
this._alpha = 50;
};
holder_mc.onRollOut = function() {
this._alpha = 100;
};
See also
TextField._alpha,
MovieClip.attachAudio()
Availability
Flash Player 6; the ability to attach audio from Flash Video (FLV) files was added in Flash
Player 7.
Usage
my_mc.attachAudio(source:Object) : Void
Parameters
The object containing the audio to play. Valid values are a Microphone object, a
source
NetStream object that is playing an FLV file, and
Returns
Nothing.
Description
Method; specifies the audio source to be played. To stop playing the audio source, pass
for
.
source
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Example
The following code creates a new NetStream connection. Add a new Video symbol by opening
the Library panel and selecting New Video from the Library options menu. Give it the instance
name
. Dynamically load the FLV video at runtime. Use the
my_video
attach the audio from the FLV file to a movie clip on the Stage. Then you can control the audio in
the movie clip using the Sound class and two buttons called
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
my_video.attachVideo(my_ns);
my_ns.play("yourVideo.flv");
this.createEmptyMovieClip("flv_mc", this.getNextHighestDepth());
flv_mc.attachAudio(my_ns);
var audio_sound:Sound = new Sound(flv_mc);
// add volume buttons
MovieClip._visible
(stops playing the audio).
false
attachAudio()
volUp_btn
MovieClip.attachAudio()
false
method to
and
:
volDown_btn
559
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?