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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

align (Stage.align property)<br />

public static align : String<br />

Indicates the current alignment of the SWF file in the player or browser.<br />

The following table lists the values for the align property. Any value not listed here centers<br />

the SWF file in Flash player or browser area, which is the default setting.<br />

Value Vertical Horizontal<br />

"T" top center<br />

"B" bottom center<br />

"L" center left<br />

"R" center right<br />

"TL" top left<br />

"TR" top right<br />

"BL" bottom left<br />

"BR" bottom right<br />

Example<br />

The following example demonstrates different alignments of the SWF file. Add a ComboBox<br />

instance to your document with the instance name stageAlign_cb. Add the following<br />

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

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

stageAlign_cb.dataProvider = ['T', 'B', 'L', 'R', 'TL', 'TR', 'BL', 'BR'];<br />

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

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

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

Stage.align = align;<br />

};<br />

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

Stage.scaleMode = "noScale";<br />

Select different alignment settings from the ComboBox.<br />

height (Stage.height property)<br />

public static height : Number<br />

Property (read-only); indicates the current height, in pixels, of the Stage. When the value of<br />

Stage.scaleMode is noScale, the height property represents the height of Flash Player. When<br />

the value of Stage.scaleMode is not noScale, height represents the height of the SWF file.<br />

Stage 587

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

Saved successfully!

Ooh no, something went wrong!