ActionScript
As you will learn very quickly, the guts behind any game is the scripting engine called ActionScript (see Figure 10).
Figure 10 A bouncing ball is created and managed in Flash MX.
ActionScript is based on the Document Object Model (DOM) language, the programming language endorsed by the World Wide Web Consortium Group (W3C). A version of DOM is JavaScript. You will see a lot of similarities between JavaScript and ActionScript, and a JavaScript developer will have no problems migrating to ActionScript.
The first word of caution about ActionScript is that it is intended to be a programming language. This means that you need to rest the right side of your brain and warm up your left side.
A script is used to provide enhanced functionality. This can be as simple as telling the Flash movie to stop on a specific frame, or as complex as redrawing a movie. You need to remember a number of do's and don'ts when working with ActionScript. For instance, Scripts can be placed only on the timeline, buttons, or movies. Graphics cannot have scripts added to them.