Certified Macromedia Flash MX Designer Study Guide

   

Naming Variables

Flash variables must have unique names. You want your variable names to be as descriptive as possible so you can more easily keep track of them and, more specifically , what type of information they hold. Below are three key factors to remember when naming variables:

  • The name must be unique within its scope.

  • The name must be a valid identifier.

  • The name cannot be a Flash keyword, nor a Boolean keyword.

For example, if you have created a form, and one of the text fields requires the end user 's email address, a good variable name for this input field would be userEmail .


   
Top

Категории