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

Chapter 5. Working with Text > Creating Dynamic Text and Input Text

Creating Dynamic Text and Input Text

When you create text fields in Flash they default to static fields. This means that it is for display only and is hard-coded in the .swf and cannot be changed unless you return to the Flash development environment, edit it, and re-export the file. If you need your text to be updatable from an outside source, such as a text document on a server or if you need the user to input text for you to retrieve and process with ActionScript, you can set your text field to enable this functionality. Setting your text field to dynamic text turns it into an ActionScript object that can be given an instance name or turned into a variable that can be populated from some other source outside of the .swf. This is great when you need to update content on the fly and would rather not have to deal directly with Flash for each update. If you require the user to enter a string of text, such as in a form, you can set a text field to input text. This enables the user to enter information in the text field that can be retrieved and processed.

Set a Text Field to be Dynamic

Select the text field on the Stage you want to be a dynamic field.

Click the Text Type popup in the Property Inspector, and then click Dynamic Text.

Select from the following properties:

  • Instance Name. Gives the text field an instance name so it can be controlled with ActionScript.

  • Character Position. Changes character position on a line.

  • Render Text As HTML. Preserves Rich Text Formatting, allowing you to include hyperlinks and HTML tags.

  • Show Border. Displays a border around the text field in the exported movie.

  • Variable Name. Gives the text field a variable name for use with ActionScript.

  • Character Options. Allows you to choose which characters you want to embed in the text.



Not a subscriber?

Start A Free Trial

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