Peachpit, Written by Kris Hadlock
With unlimited, optional parameters, ActionScript 3 functions provide flexibility for unexpected additions. You can also control the access to the functions you create with new attribute keywords. If you have ever used the static keyword to create a pseudoconstant in ActionScript 2, you are a resourceful developer, but you’ll be happy to know that you can now create true constants.
In this chapter you’ll learn the differences between function arguments and the new …(rest) keyword, attribute keywords such as public and private, and the new protected keyword, as well as how to define constants.