Chapter 3. Working with Functions and Methods
Functions and methods in ActionScript, for the most part, are one and the same. They are containers of functionality that execute only when called. Functions and methods can calculate, process, and return data, or they can perform certain tasks. Just like a variable, a function can be written (or invoked) once and can be called (or reused) many times. A single function or method can perform the same tasks but with different values (or arguments) that are passed to it, yielding different results each time.
This chapter addresses the key differences between methods and functions. It begins by discussing methods of classes and providing you with an opportunity to work with them. You’ll then have the chance ...
Get ActionScript 3.0: Visual QuickStart Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.