Writing good comments

Using comments consistently in your ActionScript 2.0 code allows you to describe complex areas of code or important interactions that are not otherwise clear. Comments must clearly explain the intent of the code and not just translate the code. If something is not readily obvious in the code, add comments to it.

If you use the Auto Format tool with your code, you will notice that trailing comments (see Trailing comments) move to the next line. You can add these comments after you format your code, or you must modify the comment's new placement after you use the Auto Format tool.

For information on using comments in classes, see Adding comments to classes.

Use the following guidelines when you add comments to your code: