Application Development Tips and Tricks > Coding conventions > Naming variables to support code hinting

 

Naming variables to support code hinting

The Macromedia Flash MX ActionScript editor has built-in code hinting support. To take advantage of this, variables must be named in a specific format. The default format is to add a suffix to the variable name that indicates the variable type. Below is a table of supported suffix strings.

Object type

Suffix string

Example

Camera

_cam

my_cam

Video

_video

small_video

Microphone

_mic

the_mic

NetConnection

_nc

my_nc

NetStream

_ns

a_ns

SharedObject

_so

myRemote_so