03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Indicates the current scaling of the SWF file within Flash Player. The scaleMode property<br />

forces the SWF file into a specific scaling mode. By default, the SWF file uses the HTML<br />

parameters set in the Publish Settings dialog box.<br />

The scaleMode property can use the values "exactFit", "showAll", "noBorder", <strong>and</strong><br />

"noScale". Any other value sets the scaleMode property to the default "showAll".<br />

■ showAll (Default) makes the entire Flash content visible in the specified area without<br />

distortion while maintaining the original aspect ratio. Borders can appear on two sides of<br />

the application.<br />

■ noBorder scales the Flash content to fill the specified area, without distortion but possibly<br />

with some cropping, while maintaining the original aspect ratio of the application.<br />

■ exactFit makes the entire Flash content visible in the specified area without trying to<br />

preserve the original aspect ratio. Distortion can occur.<br />

■ noScale makes the size of the Flash content fixed, so that it remains unchanged even as<br />

the size of the player window changes. Cropping may occur if the player window is<br />

smaller than the Flash content.<br />

Note: the default setting is showAll, except when in test movie mode, where the default<br />

setting is noScale<br />

Example<br />

The following example demonstrates various scale settings for the SWF file. Add a<br />

ComboBox instance to your document with the instance name scaleMode_cb. Add the<br />

following ActionScript to your FLA or AS file:<br />

var scaleMode_cb:mx.controls.ComboBox;<br />

scaleMode_cb.dataProvider = ["showAll", "exactFit", "noBorder", "noScale"];<br />

var cbListener:Object = new Object();<br />

cbListener.change = function(evt:Object) {<br />

var scaleMode_str:String = evt.target.selectedItem;<br />

Stage.scaleMode = scaleMode_str;<br />

};<br />

scaleMode_cb.addEventListener("change", cbListener);<br />

To view another example, see the stagesize.fla file in the ActionScript samples folder at<br />

www.adobe.com/go/learn_fl_samples_<strong>and</strong>_tutorials. Download <strong>and</strong> decompress the<br />

Samples_<strong>and</strong>_Tutorials .zip file for your Flash Lite version <strong>and</strong> navigate to the ActionScript<br />

folder to access the sample file.<br />

width (Stage.width property)<br />

public static width : Number<br />

590 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!