EssaysForStudent.com - Free Essays, Term Papers & Book Notes
Search

Flash Action Script

By:   •  Essay  •  278 Words  •  March 11, 2010  •  754 Views

Page 1 of 2

Flash Action Script

Recipe 2.5 Scaling the Movie

2.5.1 Problem

You want to control how a movie fits in the Player, including the scaling.

2.5.2 Solution

Use the Stage.scaleMode property.

2.5.3 Discussion

The Flash Player defaults to a scale mode of "showAll" (except the test Player, which defaults to "noScale"). In "showAll" mode, the Flash movie scales to fit the Player while maintaining the movie's original aspect ratio. The result is that the movie can have borders on the sides if the Player aspect ratio does not match the movie aspect ratio. You can set a movie to "showAll" mode, as follows:

Stage.scaleMode = "showAll";

The "noBorder" mode scales a movie to fit the Player while maintaining the original aspect ratio, but it forces the Player to display no borders around the Stage. If the aspect ratio of the Player does not match that of the movie, some of the movie will be cut off around the edges. You can set a movie to "noBorder" mode, as follows:

Stage.scaleMode = "noBorder";

The

Continue for 1 more page »  •  Join now to read essay Flash Action Script
Download as (for upgraded members)
txt
pdf