Video.height - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Video.height

Availability
Flash Player 6.
Usage
my_video.height:Number
Description
Property (read-only); an integer specifying the height of the video stream, in pixels. For live
streams, this value is the same as the
capturing the video stream. For FLV files, this value is the height of the file that was exported
as FLV.
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
Usage 1: 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
property of
NetStream.Buffer.Full
NetStream.Play.Start
yet have the height and width of the loaded FLV file.
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
my_mc.my_video.attachVideo(my_ns);
my_ns.play("video1.flv");
my_ns.onStatus = function(infoObject:Object) {
switch (infoObject.code) {
case 'NetStream.Buffer.Full' :
my_mc._width = my_mc.my_video.width;
my_mc._height = my_mc.my_video.height;
break;
}
};
Usage 2: 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 to be the same as the height and width at which the
video stream was captured.
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
my_mc.my_video.attachVideo(my_ns);
my_ns.play("video1.flv");
resize_btn.onRelease = function() {
my_mc._width = my_mc.my_video.width;
1000
Chapter 2: ActionScript Language Reference
Camera.height
. If you call it when the
, the height and width values will be 0, because the Video object doesn't
property of the Camera object that is
NetStream.onStatus
property is
code
is invoked with a
code

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash mx

Table of Contents