8.13. Entering International and Nonstandard Characters

Problem

You want to enter international and/or nonstandard characters into text fields, text inputs, or text areas.

Solution

For text fields you can use the Alt-sequences to enter the characters at authoring time. Or, you can copy and paste from another application.

For text fields, text areas, and text inputs, use the Unicode escape sequences to add these characters at runtime.

Discussion

Flash uses Unicode for character encoding, so that it can support a wide range of languages and special characters. And because of this support, Flash movies can display any character as long as the user’s computer has the appropriate font.

If you are using characters available on a standard keyboard, you can enter those characters without any special considerations. However, if you want to enter other characters, there are two different ways to do this: you can enter the values at authoring time (for text fields) or you can use ActionScript to add the values at runtime.

When you enter Unicode values to a text field at authoring time, you can either copy and paste the characters from another application or you can enter them using the Alt-sequences. For example, you can enter Alt-0169 (Windows) or Option-G (Macintosh) to add the copyright symbol (©) to a text field at authoring time.

If you want to use ActionScript to display any of these nonstandard characters in a dynamic (or input) text field at runtime, you can use the Unicode escape sequences ...

Get Flash 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.