Using code hints

Code hints are enabled by default. By setting preferences, you can disable code hints or determine how quickly they appear. When code hints are disabled in preferences, you can still display a code hint for a specific command.

To specify settings for automatic code hints, do one of the following:

If you enable code hints, you can also specify a delay in seconds before the code hints should appear. For example, if you are new to ActionScript, you might prefer no delay so that code hints always appear immediately. However, if you usually know what you want to type and only need hints when you use unfamiliar language elements, you can specify a delay so that code hints don't appear when you don't plan to use them.

To work with tooltip-style code hints:

  1. Display the code hint by typing an open parenthesis [(] after an element that requires parentheses, such as a method name, a command such as if or do while, and so on.

    The code hint appears.

    Note: If a code hint doesn't appear, make sure you haven't disabled code hints on the ActionScript tab. If you want to display code hints for a variable or object you created, make sure that you have named your variable or object correctly (see Using suffixes to trigger code hints) or that you have strictly typed your variable or object (see Strictly typing objects to trigger code hints).

  2. Enter a value for the parameter. If there is more than one parameter, separate the values with commas.

    Overloaded commands such as gotoAndPlay() or for (that is, functions or methods that can be invoked with different sets of parameters) display an indicator that allows you to select the parameter you want to set. Click the small arrow buttons or press Control+Left Arrow and Control+Right Arrow to select the parameter.

  3. To dismiss the code hint, do one of the following:
    • Type a closing parenthesis [)].
    • Click outside the statement.
    • Press Escape.

To work with menu-style code hints:

  1. Display the code hint by typing a period after the variable or object name.

    The code hint menu appears.

    Note: If a code hint doesn't appear, make sure you haven't disabled code hints on the ActionScript tab. If you want to display code hints for a variable or object you created, make sure that you have named your variable or object correctly (see Using suffixes to trigger code hints) or that you have strictly typed your variable or object (see Strictly typing objects to trigger code hints).

  2. To navigate through the code hints, use the Up and Down Arrow keys.
  3. To select an item in the menu, press Return or Tab, or double-click the item.
  4. To dismiss the code hint, do one of the following:
    • Select one of the menu items.
    • Click outside the statement.
    • Type a closing parenthesis [)] if you've already typed an open parenthesis.
    • Press Escape.

To manually display a code hint:

  1. Click in a code location where code hints can appear. Here are some examples:
    • After the dot following a statement or command, where a property or method must be entered
    • Between parentheses in a method name
  2. Do one of the following:
    • Click the Show Code Hint button above the Script pane.
    • Press Control+Spacebar (Windows) or Command+Spacebar (Macintosh).
    • If you are working in the Actions panel, open the pop-up menu (at the right side of the title bar), and select Show Code Hint.