• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Adding a Text Input

The TextInput component works with the ActionScript TextField object. Once a TextInput component is added to the Stage, you can use styles to customize font, size, and color. In addition, a TextInput component can be formatted using HTML, or even as a password field that disguises the text. When a TextInput field has focus, the visitor can use the arrow keys to move through information in the field, and they can use the tab key to move the focus to the next object, or Shift+Tab to move to the previous object. TextInput fields can be used to hold information. For example, you could use a group of TextInput components as the basis for creating an interactive form for fields such as: name, address, city, state, and zip code.

Add a TextInput Component

Open the Components panel.

Click the UI Components Expand triangle.

Drag the TextInput component onto the Stage, and then select the component.

Open the Component Inspector panel, and then select the Parameters tab.

Select from the following Text Input parameters:

  • editable. When you click the value field, and select true, the field can be edited. If you select false, the field can be selected but not edited.

  • password. When you click the value field, and select true, text entered into the field appears as dots. If you select false, text typed into the field appears as typed.

  • text. Click the value field, and then enter the text that will appear in the field when the Flash document opens.

  • maxChars. Click the value field, and then enter a numerical value indicating the max characters allowed in the TextInput field.

  • restrict. Click the value field, and then enter any characters that cannot be entered into the TextInput field.

  • enabled. When you select true, the field can be edited. If you select false, the field appears grayed out and is not selectable, or editable.

  • visible. When you click the value field, and select true, the field can be viewed. If you select false, the field is invisible.

  • minHeight. Click the value field, and then enter a minimum height for the TextInput box.

  • minWidth. Click the value field, and then enter a minimum width for the TextInput box.

Click the Control menu, and then click Test Movie.

IMPORTANT Although you can change the size of any component using the Free Transform tool, since the TextInput component is a single-line component, changing its height does not impact how many lines of text you can type.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint