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.

Defines the vertical position of text in a text field. The scroll property is useful for directing<br />

users to a specific paragraph in a long passage, or creating scrolling text fields. This property<br />

can be retrieved <strong>and</strong> modified.<br />

The units of horizontal scrolling are pixels, while the units of vertical scrolling are lines.<br />

Horizontal scrolling is measured in pixels because most fonts you typically use are<br />

proportionally spaced; meaning, the characters can have different widths. Flash performs<br />

vertical scrolling by line because users usually want to see a line of text in its entirety, as<br />

opposed to seeing a partial line. Even if there are multiple fonts on a line, the height of the<br />

line adjusts to fit the largest font in use.<br />

Example<br />

The following example sets the maximum value for the scrolling text field my_txt. Create two<br />

buttons, scrollUp_btn <strong>and</strong> scrollDown_btn, to scroll the text field. Add the following<br />

ActionScript to your FLA or ActionScript file.<br />

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

20);<br />

this.createTextField("my_txt", this.getNextHighestDepth(), 10, 30, 320,<br />

240);<br />

my_txt.multiline = true;<br />

my_txt.wordWrap = true;<br />

for (var i = 0; i

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

Saved successfully!

Ooh no, something went wrong!