Flash CS3 Documentation |
|||
| Learning ActionScript 2.0 in Adobe Flash > Classes > About working with custom classes in an application > About using the this keyword in classes | |||
Use the this keyword as a prefix within your classes for methods and member variables. Although it is not necessary, the this keyword makes it easy to tell that a property or method belongs to a class when it has a prefix; without the keyword, you cannot tell whether the property or method belongs to the superclass.
You can also use a class name prefix for static variables and methods, even within a class. This helps qualify the references you make, which makes code readable. Depending on the coding environment you use, adding prefixes might also trigger code hints.
|
NOTE |
|
You do not have to add these prefixes, and some developers feel it is unnecessary. Adobe recommends adding the |
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/00000788.html