User Guide
Video class 145
Description
Property (read-only); an integer specifying the height of the video stream, in pixels. This value
is the same as the
Camera.height property of the Camera object that is capturing (or
previously captured) the video stream. You may want to use this property, for example, to
ensure that the user is seeing the video at the same size at which it was captured, regardless of
the actual size of the Video object on the Stage.
Example
The following example sets the height and width values of the Video object to match the
values of an FLV file. You should call this code after
NetStream.onStatus is invoked with a
code property of NetStream.Buffer.Full. If you call it when the code property is
NetStream.Play.Start, the height and width values will be 0, because the Video object
doesn’t yet have the height and width of the loaded FLV file.
/* Clip is the instance name of the movie clip
that contains the Video object "my_video". */
_root.Clip._width = _root.Clip.my_video.width;
_root.Clip._height = _root.Clip.my_video.height;
The following example lets the user press a button to set the height and width of a video
stream being displayed in the Flash Player. The height and width is set to be the same as the
height and width at which the video stream was captured.
/* First attach the stream to the Video object
my_video.attachVideo(videoSource).Then attach code like the following to
a button. */
on (release) {
_root.my_video._width = _root.my_video.width
_root.my_video._height = _root.my_video.height
}
See also
Video.width
Video.smoothing
Availability
■ Flash Player 6.
■ Flash Media Server (not required).
Usage
public smoothing : Boolean