Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Video | |||
Object
|
+-Video
public class Video
extends Object
The Video class enables you to display live streaming video on the Stage without embedding it in your SWF file. You capture the video by using Camera.get(). In files published for Flash Player 7 and later, you can also use the Video class to play back Flash Video (FLV) files over HTTP or from the local file system. For more information, see the NetConnection class and NetStream class entries.
Flash Player 7 supports Flash video (FLV) encoded with the Sorenson Spark video codec. Flash Player 8 supports Flash video (FLV) encoded with either the Sorenson or the On2 VP6 codec and also supports an alpha channel. The On2 VP6 video codec uses less bandwidth than older technologies, and offers additional deblocking and deringing filters.
If your Flash content dynamically loads Flash video (using either progressive download or Flash Media Server), you can use On2 VP6 video without having to republish your SWF for Flash Player 8, as long as users view your content through Flash Player 8. By streaming or downloading On2 VP6 video into Flash SWF version 6 or 7, and playing the content using Flash Player 8, you avoid having to recreate your SWF files for use with Flash Player 8.
Flash Player 9 Update 3 and later versions support files derived from the standard MPEG-4 container format including F4V, MP4, M4A, MOV, MP4V, 3GP, and 3G2 if they contain H.264 video and/or HEAAC v2 encoded audio. H.264 delivers higher quality video at lower bitrates when compared to the same encoding profile in Sorenson or On2. HE-AAC v2 is an extension of AAC (a standard audio format defined in the MPEG-4 video standard) that uses Spectral Band Replication (SBR) and Parametric Stereo (PS) techniques to increase coding efficiency at low bitrates. To learn more about H.264 encoding, see Exploring Flash Player support for high-definition H.264 video and AAC audio. [Added 10/25/2007]
|
Codec |
Content (SWF) Version(publish version) |
Flash Player Version(version required for playback) |
|---|---|---|
|
Sorenson Spark |
6 |
6, 7, 8 |
|
|
7 |
7, 8 |
|
On2 VP6 |
6 |
8* |
|
|
7 |
8 |
|
|
8 |
8 |
| H.264 | 9 Update 3 | 9 Update 3 [Added 10/25/2007] |
* If your Flash content dynamically loads Flash video (FLV), you can use On2 VP6 video without having to republish your SWF for Flash Player 8, as long as users use Flash Player 8 or later to view your content. Only Flash Player 8 and later supports both publish and playback of On2 VP6 video.
A Video object can be used like a movie clip. As with other objects you place on the Stage, you can control various properties of Video objects. For example, you can move the Video object around on the Stage by using its _x and _y properties, you can change its size using its _height and _width properties, and so on.
To display the video stream, first place a Video object on the Stage. Then use Video.attachVideo() to attach the video stream to the Video object.
my_video. (Do not name it Video.)Availability: ActionScript 1.0; Flash Player 6 - The ability to play Flash Video (FLV) files was added in Flash Player 7. The ability to use the On2 VP6 codec and to use an alpha channel was added in Flash Player 8.
|
Modifiers |
Property |
Description |
|---|---|---|
|
|
Indicates the alpha transparency value of the Video object specified. |
|
|
|
Indicates the type of deblocking filter applied to decoded video as part of postprocessing. |
|
|
|
Indicates the height of the Video object, in pixels. |
|
|
|
An integer specifying the height of the video stream, in pixels. |
|
|
|
Indicates the instance name of the Video object specified. |
|
|
|
Indicates the movie clip or object that contains the current Video object. |
|
|
|
Indicates the rotation of the Video object, in degrees, from its original orientation. |
|
|
|
Specifies whether the video should be smoothed (interpolated) when it is scaled. |
|
|
|
Indicates whether the Video object specified by my_video is visible. |
|
|
|
Indicates the width of the Video object, in pixels. |
|
|
|
An integer specifying the width of the video stream, in pixels. |
|
|
|
Indicates the x coordinate of a Video object relative to the local coordinates of the parent movie clip. |
|
|
|
Indicates the x coordinate of the mouse position. |
|
|
|
Indicates the horizontal scale (percentage) of the Video object as applied from the registration point of the Video object. |
|
|
|
Indicates the y coordinate of a Video object relative to the local coordinates of the parent movie clip. |
|
|
|
Indicates the y coordinate of the mouse position. |
|
|
|
Indicates the vertical scale (percentage) of the Video object as applied from the registration point of the Video object. |
Properties inherited from class Object constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)
|
Modifiers |
Signature |
Description |
|---|---|---|
|
|
attachVideo |
Specifies a video stream (source) to be displayed within the boundaries of the Video object on the Stage. |
|
|
clear |
Clears the image currently displayed in the Video object. |
Methods inherited from class Object
Flash CS3