• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 9. Setting Text Dynamically

Lesson 9. Setting Text Dynamically

One of the advantages of multimedia is that you can pack a lot more information in the same amount of space as a traditional printed page. In the project you will begin in this lesson, an interactive map of Dante's Inferno, the script is three pages, single spaced, and yet all of the text appears in only two Flash keyframe pages, using about 20 percent of the space on each. This efficiency is possible because only a certain portion of the text—the text that the user actually needs—is showing at one time.

Determining which pieces of text the user needs is easy. When she or he clicks on an object, the descriptive text for that object should appear. Before the user clicks on an object, a generic set of directions appears instead, telling her or him what to click, roll over, or drag.

Both the text in the Swamp pop-up window and the main text in the scrollbar box are set dynamically, depending on what the user is doing.

Making the movie this responsive to the user by changing the text on the fly, depending on the user's actions, is made possible with dynamic text. To create a dynamic text region, you set up a text field, just as you would for static text, but you designate it as dynamic text in the Property inspector. You create an ID for the text field, just as you give a movie clip instance an ID. You then dynamically change the text through ActionScript, much as you can dynamically change the visibility of a movie clip. Some of the specific details and capabilities are different, but the main procedure is similar. In this lesson, you will explore many of the possibilities of one of the instructional developer's best tricks: user-controlled dynamic text.


In this lesson, you will:

  • Create dynamic text fields and change their contents via ActionScript

  • Create scrollable dynamic text fields

  • Format dynamic text with HTML tags

  • Create a tool tip using dynamic text

  • Use rollOver and rollOut event handlers and the with() action


This lesson takes approximately 1 hour to complete.


Media Files:





Starting Files:


Completed Files:


Bonus Files:




Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint