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

Chapter 10. Controlling Text > Generating Text Fields Dynamically

Generating Text Fields Dynamically

If you need to have text appear in your movie based on a viewer’s interaction, you have to be able to create a text field during run time. You can generate text fields dynamically with the movie-clip method createTextField(). The method creates a new text field, which you must attach to a movie clip. You can choose the root Timeline as the movie clip to which it is attached, and your text field will be placed on the main Stage. You also must specify the text field’s depth level, its x and y positions, and its width and height in pixels. For example:

_root.createTextField("newTF", 1, 
100,100,200,50) 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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