home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Book HomeActionScript: The Definitive GuideSearch this book

Chapter 18. On-Screen Text Fields

Because Flash is fundamentally a visual environment, movies often present on-screen information to users. Similarly, because Flash is an interactive environment, movies often retrieve information from users through a GUI. To display the value of a variable on screen or to allow a user to type data into a Flash movie, we use text fields.

Text fields provide a means of both setting and retrieving the values of variables that have a visual representation. Text fields come in two varieties -- dynamic text fields, which we use to display information to the user, and user-input text fields, which we use to retrieve information from the user.

18.1. Dynamic Text Fields

A dynamic text field is like a variable viewport -- it displays the value of a specified variable as a text string. Dynamic text fields are created using the Text tool in Flash. However, unlike regular static text, the content of a dynamic text field is connected to a variable and can be changed or retrieved via ActionScript.

By retrieving a text field's value, we can capture on-screen information for use in a script. By setting a text field's value, we cause that value to display on screen.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.











??????????????@Mail.ru