Name

FlashPlayer.Pan( ): move the viewport of the movie — Flash 2

Synopsis

void Pan(integerdx, integer dy,
         integer mode)

Arguments

dx, dy

The horizontal and vertical amounts to pan.

mode

This argument specifies how to interpret the dx and dy values. If this argument is 0, the other arguments are taken as pixels. If this argument is 1, the others are percentages.

Description

The Flash player defines a viewport through which Flash movies are visible. Typically, the size of the viewport and the size of the movie are the same, but this may not be not the case when SetZoomRect( ) or Zoom( ) have been called: those methods can alter the viewport so that only a portion of the movie shows through.

When the viewport is showing only a portion of the movie, this Pan( ) method moves (or “pans”) the viewport so that a different portion of the movie shows. This method doesn’t allow you to pan beyond the edges of a movie, however.

See Also

FlashPlayer.SetZoomRect( ), FlashPlayer.Zoom( )

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.