Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Writing Functions > Write a Function

5.1. Write a Function

A function is nothing more than a reusable block of code. Functions are primarily designed to let you save development time. Rather than rewrite and retest similar code over and over, you can encapsulate the code into a function and then simply call it whenever you need its capabilities.

ActionScript includes a set of global functions to perform certain common tasks. Global functions are written into the core ActionScript code and can be accessed directly in your code.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial