# Naming a variable

A variable's name must follow these rules:

- It must be an identifier (see Terminology).
- It cannot be a keyword or an ActionScript literal such as `true`, `false`, `null`, or `undefined`.
- It must be unique within its scope (see Scoping and declaring variables).

The Actions panel and external editor both support code hinting for built-in objects and for variables based on these objects. If you want Flash to provide code hints for a particular object type on which you have based a variable, you can name the variable using a specific suffix.

For example, in the Actions panel or the external editor, suppose you type the following:

    my_array.

As soon as you type the period, Flash displays a list of methods and properties available for Array objects, because it assumes that any variable ending in _array is an Array object. You can cycle through the choices, and when you choose one, Flash prompts you to enter the required parameters. The following table lists the suffixes required for support of automatic code hinting.

Object type | Variable suffix
--- | ---
Array | _array
Button | _btn
Camera | _cam
Color | _color
ContextMenu | _cm
ContextMenuItem | _cmi
Date | _date
Error | _err
LocalConnection | _lc
Microphone | _mic
MovieClip | _mc
MovieClipLoader | _mcl
PrintJob | _pj
NetConnection | _nc
NetStream | _ns
SharedObject | _so
Sound | _sound
String | _str
TextField | _txt
TextFormat | _fmt
Video | _video
XML | _xml
XMLSocket | _xmlsocket