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

Chapter 17. Text: Add Text to a Document > Create a dynamic text field

Create a dynamic text field

Dynamic text can display text from external sources at runtime. Next, you’ll create a dynamic text field that links to an external text file. The external text file you’ll use is named safetyFeatures.txt. It is in the same folder as the lesson FLA file. The FLA file already contains ActionScript that displays the text when you test or publish the document.

In the Timeline, select the Dynamic Text layer. Use the Selection tool to click in the workspace, and to deselect any objects.

Select the Text tool in the Tools panel.

In the text Property inspector, set the following options:

  • Select Dynamic Text from the Text Type pop-up menu.

  • For Text Attributes, set Verdana as the text type, with a font size of 6.

  • For Line Type, select Multiline to ensure the text wraps correctly.

  • Click the text color box and select a dark shade of gray.

  • Select Align Left as a paragraph attribute, if it isn’t already selected.

On the Stage, drag to create a text field in the area between the two horizontal rules.

In the Instance Name text box of the Property inspector, name the dynamic text field newFeatures_txt.

The ActionScript in this document loads an external text file, which is in the same folder as your document. The ActionScript is set up to load the text into a field named newFeatures_txt.



Not a subscriber?

Start A Free Trial

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