O'Reilly logo

Adobe® Flash® CS3 Professional Bible by Snow Dowd, Robert Reinhardt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 27. Interacting with Movie Clips

IN THIS CHAPTER

  • Defining collisions

  • Using the hitTest() method

  • Using the ColorTransform class

  • Accessing the Sound class

  • Controlling the volume and balance of a sound

  • Printing Flash content with the PrintJob class

This chapter continues your exploration of the MovieClip class in ActionScript. You explore the ins and outs of collision detection for MovieClip objects and learn how to control the visibility of the mouse pointer or to attach a custom cursor to the mouse pointer. You look at other ActionScript elements such as ColorTransform and Sound objects that work with MovieClip objects to create visual and audio effects, respectively.

Tip

Flash Player 8 introduced the ColorTransform class, which enables you to more easily apply color effects to your MovieClip objects. You can continue to use this class in ActionScript 2 targeted for Flash Player 9.

You will also learn how to print Flash content with the PrintJob class, introduced with Flash Player 7. The Flash Player creates high-quality output for hard copy artwork.

Movie Clip Collision Detection

Have you ever wanted to detect the intersection of two elements in a Flash movie? If two Movie Clip instances overlap on the Stage, how would you know? How would you tell ActionScript to look for an overlap? In ActionScript, there are two primary types of intersections (or collisions):

  • User-initiated collisions: This type of intersection occurs when you click and drag an object (a MovieClip object) and overlap ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required