This section explores the way full-screen mode works and discusses the changes that occur once you install Flash Player 9 Update 3.
Assuming that Flash Player 9 Update 3 has been applied, the
prerequisites are met, and the FLVPlayback.fullScreenTakeOver property is set to true, which is the default setting, Flash Player uses hardware acceleration
to scale the video file, rather than scaling it through software.
If the FLVPlayback component runs in an earlier version of Flash Player—or if the prerequisites for hardware acceleration are not met—Flash Player scales up the video itself. This is the primary difference, as all versions prior to Flash Player 9 rely on Flash Player for full-screen mode scaling.
To take advantage of hardware acceleration for full-screen support, your computer must have a DirectX 7–compatible video card with 4 MB or more of VRAM (video RAM). This hardware support is available in Windows 2000 or Mac OS X 10.2, and later versions of these operating systems. DirectX provides APIs that serve as an interface between software and the video hardware to accelerate three-dimensional and two-dimensional graphics, among other things.
To take advantage of hardware acceleration mode, you must invoke full-screen mode in one of the following ways:
Note: If you invoke full-screen mode by setting the Stage.displayState property to StageDisplayState.FULLSCREEN, FLVPlayback does not use
hardware acceleration, even if the video hardware and memory are available on
the system.
One consequence of using hardware acceleration for full-screen mode is that the FLVPlayback component's skins are scaled along with the video player and the FLV file. The following image shows the result of using full-screen mode on a 15-inch monitor at a resolution of 1280 x 1024 with a video file that has a width of 320 pixels and a height of 240 pixels, the default FLVPlayback component's dimensions (see Figure 1).
Figure 1. FLVPlayback component skin scaled for full-screen mode using hardware acceleration
The distortion effect of the scaled skin is more pronounced on FLV files with smaller dimensions or when FLV files are viewed on a larger monitor. Conversely, the distortion effect is less pronounced on larger FLV files or when the video is viewed on smaller monitors. For example, changing from 640 x 480 to 1600 x 1200 still increases the size of the skin but distorts the skin less.
The FLVPlayback component includes the skinScaleMaximum property, which enables you to limit the scaling of the FLVPlayback skin when
hardware acceleration is used. You may choose to limit the scaling based on the
specific content that is being scaled and your aesthetic tastes regarding the
appearance of large skins. Limiting the scaling of the skin, however, requires
a combination of hardware and software to scale the video. In some cases,
limiting the scaling of the skin can adversely affect performance on videos
with large dimensions that are encoded at a high bit rate. If the video is
large (640 pixels wide or more, 480 pixels tall or more, for example), you
should avoid setting skinScaleMaximum to a small value—because it
could cause performance problems on large display monitors. Figure 2 shows the
same skin as shown in Figure 1, except before taking this screenshot the skinScaleMaximum was set to a value of 2 (see
Figure 2). In this case, the FLVPlayback component rendered the video (but not
the skin) at 640 x 512, a little more than twice its original size, and
hardware acceleration did the remainder of the scaling (640 x 2 = 1280 and 512
x 2 = 1024) for both the video and the skin.
Figure 2. Setting the skinScaleMaximum property to specify the largest multiple used to scale up the skin of the FLVPlayback component in full-screen mode
You can also invoke full-screen mode with ActionScript 3.0
by calling the enterFullScreenDisplayState()method, as shown in the
following code example:
function handleClick(e:MouseEvent):void {
myFLVPlybk.enterFullScreenDisplayState();
}
myButton.addEventListener(MouseEvent.CLICK, handleClick);
In this example, full-screen mode is not invoked by clicking
the full-screen toggle button on an FLVPlayback skin but, rather, by clicking
an ordinary button (MyButton) on the Stage. Clicking the button
triggers the handleClick event handler, which calls the enterFullScreenDisplayState() method.
The enterFullScreenDisplayState() method sets the Stage.displayState property to StageDisplayState.FULL_SCREEN, and therefore carries the
same restrictions as the displayState property. Generally, this means that you must call it from an event handler for the MouseEvent.CLICK event. For more information on
using the enterFullScreenDisplayState() method and the Stage.displayState property, see the online ActionScript
3.0 Language and Components Reference.
To exit full-screen mode, click the full-screen button again or press the Escape key.
Setting the following properties can cause layout changes
that cause the FLVPLayback component to exit full-screen mode: height, registrationHeight, registrationWidth, registrationX, registrationY, scaleX, scaleY, width, x, y.
Calling the following methods also cause the FLVPlayback component to exit
full-screen mode: setScale(), setSize().
If you set the align or scaleMode properties,
the FLVPlayback component sets them to center and maintains the aspect ratio
for the content (maintainAspectRatio) until the user exits full-screen mode.
Changing the value of the fullScreenTakeOver property from true to false when you are using full-screen mode also
causes Flash to exit full-screen mode.