Property
Video.smoothing
Video.width
Video.attachVideo()
Availability
Flash Player 6; the ability to work with Flash Video (FLV) files was added in Flash Player 7.
Usage
my_video.attachVideo(source)
Parameters
A Camera object that is capturing video data or a NetStream object. To drop the
source
connection to the Video object, pass
Returns
Nothing.
Description
Method; specifies a video stream (
object on the Stage. The video stream is either an FLV file being displayed by means of the
NetStream.play()
command, a Camera object, or
within the Video object.
You don't have to use this method if the FLV file contains only audio; the audio portion of an
FLV files is played automatically when the
If you want to control the audio associated with an FLV file, you can use
MovieClip.attachAudio()
object to control some aspects of the audio. For more information, see
MovieClip.attachAudio()
Example
The following example plays live video locally.
my_cam = Camera.get();
my_video.attachVideo(my_cam); // my_video is a Video object on the Stage
The following example plays a previously recorded file named myVideo.flv that is stored in the
same directory as the SWF file.
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(my_nc);
my_video.attachVideo(ns); // my_video is a Video object on the Stage
ns.play("myVideo.flv");
See also
Camera
class,
NetStream class
Description
Specifies whether the video should be smoothed (interpolated) when it
is scaled.
Read-only; the width of the video stream, in pixels.
for
null
) to be displayed within the boundaries of the Video
source
NetStream.play()
to route the audio to a movie clip; you can then create a Sound
.
.
source
. If
is
null
source
null
command is issued.
, video is no longer played
Video.attachVideo()
745
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?