Naming functions

Function names should start with a lowercase letter. Your function names should describe the value the function returns, if any. For example, if the function returns the title of a song, you might name it getCurrentSong().

Establish a standard for grouping similar functions (functions that relate to each other based on functionality), because ActionScript does not permit overloading. In the context of object-oriented programming (OOP), overloading refers to the ability to make your functions behave differently depending on what data types are passed into them.

As with variables, you cannot use special characters, and the method name cannot start with a number. For more information, see Naming conventions. For information on naming methods, see Naming methods.


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00000756.html