| In the last tutorial, we discussed two ways to include ActionScript in your FlashR movie. These methods had the drawback that at least some ActionScript was added to the Timeline. In an effort to move closer toward the OOP programming convention of modular code in an external file, we will now take a look at a third way to include ActionScript into your Flash movie using the Document class. As a quick review, in the previous tutorial, we were using ActionScript to draw a red circle on the stage. We had placed this code in an external file and added an include statement on the Timeline to tell Flash to call in the external code. With this next method of associating our ActionScript with our Flash movie, we will remove all code from the Timeline and use the Properties Inspector to declare a Document class which will connect our Flash movie to the external code. (A Document class is a top level class or top level object that is created when your Flash movie is loaded into the Flash Player.) Our first step is to remove the include statement from the Timeline.
| |

