Chapter12.Functions


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.

This chapter covers the topics of creating and using functions, as well as using functions as methods and objects. Instead of just talking about functions, let's jump right in and create one.




Macromedia Flash Professional 8 Unleashed
Macromedia Flash Professional 8 Unleashed
ISBN: 0672327619
EAN: 2147483647
Year: 2005
Pages: 319

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net