January 2013
Beginner
312 pages
7h 11m
English
Functions are used to assemble statements into meaningful, logical functional units — hence the name, Function. Even simple applications can have a large number of individual statements. Without functions, code would be unruly and unreadable.
ActionScript 2 code exists primarily in the form of classes. The methods of classes are functions. As explained in Chapters 5–7, classes take the idea of modular, reusable code to the next level and provide a way to group functions and variables together into logical units.
Whether they are part of a class or simply defined on a timeline, functions are constructed in the same way. A function definition has three main elements:
Read now
Unlock full access