7.11. Making Text Nonselectable

Problem

You want to prevent users from selecting text in a text field when viewing the movie.

Solution

Choose the text field on the stage, and toggle off the Selectable button in the Property inspector (so that it is not selected).

Discussion

By default, Flash text is selectable. Users can use their mouse to highlight and copy text in the movie. This is a feature you may want in many cases. But in other cases, it may not be what you want. For example, if you use text to label a button, you don’t want the text to be selectable, because it will interfere with the button functionality. Also, by making text nonselectable, you can make sure that users cannot copy and paste it—which may be something you want to ensure in some cases.

Making text selectable or not is a fairly quick process. You need only to choose the text field on the stage, and then make sure that the Selectable option is toggled to the off position in the Property inspector. The Selectable option is located to the immediate right of the Line type menu in the Property inspector.

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.