Skip to Content
The ActionScript 3.0 Quick Reference Guide
book

The ActionScript 3.0 Quick Reference Guide

by Jen deHaan, David Stiller, Darren Richardson, Rich Shupe
October 2008
Beginner to intermediate
491 pages
12h 20m
English
O'Reilly Media, Inc.
Content preview from The ActionScript 3.0 Quick Reference Guide

Chapter 15. How Do I Work with Text?

15.0 Introduction

This chapter will cover the basics of creating, formatting, and interacting with text fields and the text therein. Focusing on the mechanics of using text fields, rather than on string manipulations, this chapter will bring you up to speed with the essentials you need to add text to any project.

Flash uses three different kinds of text fields: static, dynamic, and input. The latter two types can be created and affected by ActionScript; they’re the focus of this chapter. Whenever you wish to exert ActionScript control over text, you turn to a dynamic text field. However, if you require user input, including anything from entering a user name and password to completing an essay, then you need to graduate to an input text field—essentially, dynamic fields with added user input features.

You’ll see in the first recipe of this chapter that you can very easily create a text field, and setting it to behave as a dynamic or input field is simply a matter of using a single property. This capability also means that you can switch between these two types, if the need arises.

The third text type, static, is accessible via ActionScript to a very limited degree, but only the Flash interface can create static text fields. You can retrieve text from a static text field, using the StaticText or TextSnapshot classes, but you must walk through the display list to find the desired field. Additionally, the Flash interface may break your text into multiple ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

ActionScript 3.0: Visual QuickStart Guide

ActionScript 3.0: Visual QuickStart Guide

Derrick Ypenburg
ActionScript 3.0 Bible

ActionScript 3.0 Bible

Roger Braunstein

Publisher Resources

ISBN: 9780596155247Errata Page