Chapter 8. Working with Dynamic Text


In Chapter 7, you had a chance to read extensively about static textthe sort of text that you can create and change only at authoring time. Static text can be useful in many situations, but it also has its limitations. Frequently applications require that you be able to display text dynamically to the user. For example, if you are creating an application that displays catalog contents, you need to be able to display the information dynamically, based on what the user selects. Sometimes using dynamic text is not so much a necessity as a matter of convenience. If you manage the content for a small Flash web site, you may want to update the information on the web site frequently. If you use static text, you have to open the .fla, change the text, re export the .swf file, and upload it to the server. And perhaps someone else at the company is responsible for actually creating the updated content, but they don't know how to use Flash. So you are then responsible for assisting someone each time the content needs to be updated. Your job is simplified greatly if you can set up your .swf file to load the text from an external text file. Then, anyone who can edit a text file can make changes to the content without having to have specialized Flash knowledge.

There are several other limitations of static text. Static text cannot scroll. If you use static text, make sure you have allotted enough space within your Flash movie to display all the text that you want the viewer to see. If you have a large amount of text, that can be somewhat difficult. Additionally, static text cannot accept user input. With static text alone, you cannot prompt the user for a username and password, comments, email address, or any other text-based information.

In this chapter, you will read about how to use dynamic text to both display text and accept user input. You'll also see how to scroll text, use HTML within Flash, apply formatting, and much more.




Flash 8 Cookbook
Flash 8 Cookbook (Cookbooks (OReilly))
ISBN: 0596102402
EAN: 2147483647
Year: 2007
Pages: 336
Authors: Joey Lott

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net