2 Replies Latest reply on Mar 19, 2007 6:14 AM by mclem

    Make Dynamic text non-clickable

    Non-nelson Level 1
      Hi Guys,

      I need to learn how to make dynamic text non-clickable, like those in loaders. Any Ideas...?

      Thanks in Advance
        • 1. Re: Make Dynamic text non-clickable
          mclem Level 1
          Select your text element and in the property window this is a button that has an Ab on it and the be is grey with a black background, if you mouse over it says 'Selectable' click that to unselect it and then the user can not select the text in this field.
          • 2. Re: Make Dynamic text non-clickable
            mclem Level 1
            you can see a picture of the Icon in this article, figure 2 http://www.adobe.com/devnet/dreamweaver/articles/flash_buttons.html

            also you can set the selectable property via code. for some reason the live docs page does not come up so i'll comment an excerpt from the actionscript language reference that is part of the flash help.

            [QUOTE]
            TextField.selectable
            Availability
            Flash Player 6.

            Usage
            my_txt.selectable:Boolean

            Description
            Property; a Boolean value that indicates whether the text field is selectable. The value true indicates that the text is selectable. The selectable property controls whether a text field is selectable, and not whether a text field is editable. A dynamic text field can be selectable even if it's not editable. If a dynamic text field is not selectable, that means you cannot select its text.

            If selectable is set to false, the text in the text field does not respond to selection commands from the mouse or keyboard, and the text cannot be copied using the Copy command. If selectable is set to true, the text in the text field can be selected using the mouse or keyboard. You can select text this way even if the text field is a dynamic text field instead of an input text field. The text can be copied using the Copy command.

            Example
            The following example creates a selectable text field that constantly updates with the current date and time.

            this.createTextField("date_txt", this.getNextHighestDepth(), 10, 10, 100, 22);
            date_txt.autoSize = true;
            date_txt.selectable = false;

            var date_interval:Number = setInterval(updateTime, 500, date_txt);
            function updateTime(my_txt:TextField) {
            my_txt.text = new Date().toString();
            }

            [END QUOTE]