capabilities.pixelAspectRatio Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
capabilities.pixelAspectRatio Property Flash 6

the width-to-height ratio of a pixel on the screen read/write
System.capabilities.pixelAspectRatio

Description

The floating-point pixelAspectRatio property indicates the proportions of a single pixel on the screen. It is the ratio of a pixel's width to its height. For example, on screens where pixels are half as wide as they are high, pixelAspectRatio will return .5 (1/2). On most desktop computers, pixels are square, so pixelAspectRatio is 1.

The pixelAspectRatio property lets a movie compensate for potential distortion caused by the aspect ratio of the pixels on the playback device. For example, a circle with a constant radius will appear as an ellipse on devices whose pixel aspect ratio is not 1. On a device with pixels twice as wide as they are high, you might load an alternate movie authored at half of the original width so that the final output displays correctly. At the time of this writing, pixelAspectRatio always returns 1, and the development process for nonsquare pixel devices is not yet determined. Always test on the target device to ensure correct appearance at a nonunity aspect ratio. More information will be provided by Macromedia when it becomes relevant.

The corresponding server string for pixelAspectRatio is AR, with a value of a floating-point number, such as 1.0.

Bugs

Macromedia's documentation for Flash MX incorrectly claims that the server string for pixelAspectRatio is PAR. The correct server string is AR.

See Also

capabilities.screenDPI, capabilities.screenResolutionX, capabilities.screenResolutionY



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net