Naming Variables

   

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


Certified Macromedia Flash MX Designer Study Guide
Certified Macromedia Flash MX Designer Study Guide
ISBN: 0321126955
EAN: 2147483647
Year: 2001
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net