Creating your First Code Snippet
If you tested this movie now (Control > Test Movie > Test), there would be no interactivity in the file, and nothing would happen when you clicked on the various objects. The first code snippet you will add will allow the user to navigate to each of the three movie clips that have tabbed pages. You will do this with a code snippet called “Bring Object to Front,” which will bring any object to the front of the Flash display list when it is clicked.
- In the Code Snippets panel, open the directory named Actions (Figure 2).
- Double-click on the code snippet named “Bring Object to Front.” Notice that an Actions layer was added to your timeline and that quite a bit of ActionScript was written in the Actions panel. This is the code that will make any selected object come to the foreground.
- Test the movie (Control > Test Movie > Test), and click on each of the tabs sequentially. The movie clip that is selected should appear in front of the others.
- Close the codesnippets_start.swf file to leave the Flash testing environment and return to the authoring environment.