In This Chapter
Data typing in ActionScript
Strict typing in ActionScript 2.0
Using functions in ActionScript
Adding arrays to manage data
Creating dynamic menus
Now that you've had some practice applying ActionScript to MovieClip objects, you can start to explore the programming concepts behind subroutines and arrays. In this chapter, we introduce you to data types, subroutines, arrays, and complex uses of functions.
In previous chapters, you may have found yourself repeating the same actions (or type of actions) in several event handlers within a movie. Functions enable you to group actions into code blocks, referred to by custom names. Arrays are a different kind of grouping mechanism — instead of grouping actions, an array is used to group multiple items of data. Before we can discuss functions and arrays, however, you need to understand the types of data that are available in ActionScript.