Making hypertext links out of embedded media
To make a hypertext link out of an embedded JPEG file, SWF file, or movie clip, enclose the
tag in an
<img>
textField.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
the pointer turns into a "pointing 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
Creating scrolling text
There are several ways to create scrolling text in Flash. You can make dynamic and input text
fields scrollable by selecting the Scrollable option in the Text menu or the context menu, or by
Shift-double-clicking the text field handle.
You can use the
scrolling and the
block. The
scroll
positions, respectively; you can read and write these properties. The
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 class" in Using Components.
To create a scrollable dynamic text block:
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.
To use the scroll property to create scrolling text:
Do one of the following:
1.
Use the Text tool to drag a text field on the Stage. Assign the text field the instance name
textField_txt
Use ActionScript to create a text field dynamically with the
MovieClip.createTextField()
textField_txt
Note: If you are not dynamically loading text into the SWF file, select Text > Scrollable from the
main menu.
244
Chapter 9: Working with Text
tag:
<a>
tags.
<a>
and
scroll
maxscroll
and
hscroll
maxhscroll
and
properties specify the current vertical and horizontal scrolling
hscroll
in the Property inspector.
as a parameter of the method.
properties of the TextField object to control vertical
properties to control horizontal scrolling in a text
method. Assign the text field the instance name
<a>
and
maxscroll
maxhscroll
tags,
Need help?
Do you have a question about the FLASH MX 2004-USING ACTIONSCRIPT IN FLASH and is the answer not in the manual?