Game Development Reference
In-Depth Information
4
//COMMENTS FTW!
CHAPTER OUTLINE
Fair Warning
36
Part 1: Classes
36
Packages 37
Classes as Files
37
Constructors 38
Constants, Variables, and Methods
38
Getter and Setter Methods
40
Class Identifiers 42
Inheritance and Polymorphism 42
Interfaces 44
Linking Classes to Assets in Flash
47
Class versus Base Class 48
Using Exported Symbols with No Class File
49
getDefinitionByName and Casting
51
Part 2: Events 52
dispatchEvent 52
addEventListener, removeEventListener, and Event Phases
53
Event Propagation and Cancellation
56
Custom Events
57
Part 3: Errors 58
try, catch, finally 59
Throwing Your Own Errors 60
Part 4: Data Structures and Lists
61
Objects 62
Arrays 63
Vectors 65
Dictionaries 65
ByteArrays 66
So What Should I Use For My Lists?
66
Custom Data Structures 67
Part 5: Keep Your Comments to Everyone Else!
67
The Bottom Line
68
 
 
Search Nedrilad ::




Custom Search