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

Chapter 9. Creating Menu Effects > Creating and Attaching Clips

Creating and Attaching Clips

The createEmptyMovieClip() method is great for creating movie clips while the SWF file plays. It not only means that you can avoid creating each movie clip manually, you can even control what kind of movie clip that you create in the SWF file depending on user interaction. In the case of this project, though, it means that you can create a series of movie clips automatically that are exactly the same as each other, differing only in what text appears on the face of the button. You can also make sure that each button executes in a specific way when the user clicks it.

After you create the movie clip at runtime, you will attach it to the Stage at a specific location. You also specify an instance name so you can control the movie clip any way you want by using code (such as giving it the button functionality). In Exercise 4, you attach the buttons to the Stage. First, you create the text fields that will create menu buttons in Exercise 3; then you attach and position them on the Stage.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint