Step 3: Try the NO_BORDER Scale Mode

This contains static consts that can be used to set the scale mode. Let's try NO_BORDER; add this line to your constructor function:

stage.scaleMode = StageScaleMode.NO_BORDER;

Run your SWF and stretch it again:

As the name suggests, NO_BORDER avoids the letterbox effect. The contents stay in proportion but always fill the available area, even if that means cropping the edges.

Step 4: Try the EXACT_FIT Scale Mode

Change the line that sets the scale mode like so:

stage.scaleMode = StageScaleMode.EXACT_FIT;

Try it out:

EXACT_FIT makes the edges of the stage stick to the edges of the available area, leading to distortion if the player is stretched out of proportion.

Step 5: Try the NO_SCALE Scale Mode

To check out the final scale mode, change the line like so:

stage.scaleMode = StageScaleMode.NO_SCALE;

Check it out:

With NO_SCALE, the contents don't change size at all; they stay centered in the player window, even if that means cropping huge amounts of the edges, or leaving massive borders on all sides.

Conclusion

Stage.scaleMode lets you control how your SWF will appear if a website changes the size of the available area. It's also useful for creating AIR apps and full screen Web sites; NO_SCALE is a particularly good choice there, as (when combined with a RESIZE event listener) it allows you to fit the entire content to the window, while maintaining the size and proportions of the individual assets.