EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Example: Creating Scrolling Text

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Example: Creating scrolling text 449
About making hypertext links out of embedded media
To make a hypertext link out of an embedded image file, SWF file, or movie clip, enclose the
<img> tag in an <a> tag:
textField_txt.htmlText = "Click the image to return home<a
href='home.htm'><img src='home.jpg'></a>";
When the mouse pointer is over an image, SWF file, or movie clip that is enclosed by <a>
tags, the mouse pointer turns into apointing hand” icon, the same as it does with standard
hypertext links. Interactivity, such as mouse clicks and keypresses, does not register in SWF
files and movie clips that are enclosed by
<a> tags.
For information on embedding media, see About making hypertext links out of embedded
media” on page 449.
Example: Creating scrolling text
You can use several methods to create scrolling text in Flash. You can make dynamic and input
text fields scrollable by selecting the Scrollable option from the Text menu or the context
menu, or by pressing Shift and double-clicking the text field handle.
You can use the
scroll and maxscroll properties of the TextField object to control vertical
scrolling and the
hscroll and maxhscroll properties to control horizontal scrolling in a text
field. The
scroll and hscroll properties specify the current vertical and horizontal scrolling
positions, respectively; you can read and write these properties. The
maxscroll and
maxhscroll properties specify the maximum vertical and horizontal scrolling positions,
respectively; you can only read these properties.
The TextArea component provides an easy way to create scrolling text fields with a minimum
amount of scripting. For more information, see “TextArea component” in the Components
Language Reference.
To create a scrollable dynamic text field:
Do one of the following:
Shift-double-click the handle on the dynamic text field.
Select the dynamic text field with the Selection tool, and select Text > Scrollable.
Select the dynamic text field with the Selection tool. Right-click (Windows) or Control-
click (Macintosh) the dynamic text field, and select Text > Scrollable.

Table of Contents

Related product manuals