Chapter 12. Functions
IN THIS CHAPTER
- Creating a Function
- Running the Function
- Using Parameters in Functions
- Functions That Return Values
- Nested Functions
- Function Scope
- Mapping to a Function
- The _global Identifier
- Variables and Functions
- The Arguments Class
- Functions Built In to Flash
So far we have covered some of the basics of ActionScript, including variables, statements, and arrays. Now we'll get into functions.A function is basically a reusable piece of code. After a function is created, it can be used over and over without your rewriting the code. This is very powerful, not only because it can save on file size, but also because it will make your code much more scalable and portable.