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

Chapter 11. Working with Movie Clips > Calling multiple methods on a single mov...

Calling multiple methods on a single movie clip

You can use the with statement to address a movie clip once and then execute a series of methods on that clip. The with statement works on all ActionScript objects (for example, Array, Color, and Sound)—not only movie clips.

The with statement takes a movie clip as a parameter. The object you specify is added to the end of the current target path. All actions nested inside a with statement are carried out inside the new target path, or scope. For example, in the following script, the donut.hole object passes to the with statement to change the properties of hole:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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