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.

If autoSize is set to "left" or true, then the text is treated as left-justified text, meaning the<br />

left side of the text field will remain fixed <strong>and</strong> any resizing of a single line text field will be on<br />

the right side. If the text includes a line break (for example, "\n" or "\r"), then the bottom<br />

side will also be resized to fit the next line of text. If wordWrap is also set to true, then only<br />

the bottom side of the text field will be resized <strong>and</strong> the right side will remain fixed.<br />

If autoSize is set to "right", then the text is treated as right-justified text, me(ning the right<br />

side of the text field will remain fixed <strong>and</strong> any resizing of a single line text field will be on the<br />

left side. If the text includes a line break (for example, "\n" or "\r"), then the bottom side<br />

will also be resized to fit the next line of text. If wordWrap is also set to true, then only the<br />

bottom side of the text field will be resized <strong>and</strong> the left side will remain fixed.<br />

If autoSize is set to "center", then the text is treated as center-justified text, meaning any<br />

resizing of a single line text field will be equally distributed to both the right <strong>and</strong> left sides. If<br />

the text includes a line break (for example, "\n" or "\r"), then the bottom side will also be<br />

resized to fit the next line of text. If wordWrap is also set to true, then only the bottom side of<br />

the text field will be resized <strong>and</strong> the left <strong>and</strong> right sides will remain fixed.<br />

Example<br />

You can use the following code <strong>and</strong> enter different values for autoSize to see how the field<br />

resizes when these values change. A mouse click while the SWF file is playing will replace each<br />

text field's "short text" string with longer text using several different settings for<br />

autoSize.<br />

this.createTextField("left_txt", 997, 10, 10, 70, 30);<br />

this.createTextField("center_txt", 998, 10, 50, 70, 30);<br />

this.createTextField("right_txt", 999, 10, 100, 70, 30);<br />

this.createTextField("true_txt", 1000, 10, 150, 70, 30);<br />

this.createTextField("false_txt", 1001, 10, 200, 70, 30);<br />

left_txt.text = "short text";<br />

left_txt.border = true;<br />

center_txt.text = "short text";<br />

center_txt.border = true;<br />

right_txt.text = "short text";<br />

right_txt.border = true;<br />

true_txt.text = "short text";<br />

true_txt.border = true;<br />

false_txt.text = "short text";<br />

false_txt.border = true;<br />

// create a mouse listener object to detect mouse clicks<br />

616 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!