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.

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

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

This means that Stage.width will vary as you resize the player window. When the value of<br />

Stage.scaleMode is not "noScale", width represents the width of the SWF file as set at<br />

author-time in the Document Properties dialog box. This means that the value of width will<br />

stay constant as you resize the player window.<br />

Example<br />

This example creates a new listener object called stageListener. It then uses<br />

stageListener to call onResize <strong>and</strong> define a function that will be called when onResize is<br />

triggered. Finally, the code adds the stageListener object to the callback list of the Stage<br />

object. Listener objects allow multiple objects to listen for resize notifications.<br />

this.createTextField("stageSize_txt", this.getNextHighestDepth(), 10, 10,<br />

100, 22);<br />

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

stageListener.onResize = function() {<br />

stageSize_txt.text = "w:"+Stage.width+", h:"+Stage.height;<br />

};<br />

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

Stage.addListener(stageListener);<br />

See also<br />

align (Stage.align property), height (Stage.height property), scaleMode<br />

(Stage.scaleMode property)<br />

String<br />

Object<br />

|<br />

+-String<br />

public class String<br />

extends Object<br />

The String class is a wrapper for the string primitive data type, <strong>and</strong> provides methods <strong>and</strong><br />

properties that let you manipulate primitive string value types. You can convert the value of<br />

any object into a string using the String() function.<br />

All the methods of the String class, except for concat(), fromCharCode(), slice(), <strong>and</strong><br />

substr(), are generic, which means the methods call toString() before performing their<br />

operations, <strong>and</strong> you can use these methods with other non-String objects.<br />

String 591

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

Saved successfully!

Ooh no, something went wrong!