03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

An integer specifying the height of the video stream, in pixels. For live streams, this value is<br />

the same as the Camera.height property of the Camera object that is capturing the video<br />

stream. For FLV files, this value is the height of the file that was exported as FLV.<br />

You may want to use this property, for example, to ensure that the user is seeing the video at<br />

the same size at which it was captured, regardless of the actual size of the Video object on the<br />

Stage.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6<br />

Example<br />

The following example sets the _height <strong>and</strong> _width properties of the Video Symbol instance<br />

equal to the height <strong>and</strong> width of the loaded FLV file.<br />

To use this example, first create a new Video symbol with an instance name of "myVideo" <strong>and</strong><br />

place it in the same context as this script. The height <strong>and</strong> width properties will be zero when<br />

the NetStream.Play.Start status code is triggered. By resizing the video when the status of<br />

NetStream.Buffer.Full is received you make sure that its size is correct before the first<br />

frame of video is shown.<br />

var netConn:NetConnection = new NetConnection();<br />

netConn.connect(null);<br />

var netStrm:NetStream = new NetStream(netConn);<br />

myVideo.attachVideo(netStrm);<br />

netStrm.play("Video.flv");<br />

netStrm.onStatus = function(infoObject:Object) {<br />

switch (infoObject.code) {<br />

case 'NetStream.Play.Start' :<br />

case 'NetStream.Buffer.Full' :<br />

myVideo._width = myVideo.width;<br />

myVideo._height = myVideo.height;<br />

break;<br />

}<br />

}<br />

See also<br />

_height (MovieClip._height property), width (Video.width property)<br />

_name (Video._name property)<br />

public _name : String<br />

Indicates the instance name of the Video object specified.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 8<br />

Video 1301

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!