Chapter 26. Interacting with Movie Clips
This chapter continues your exploration of the MovieClip class in ActionScript 3.0. 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.
You also learn how to print Flash content with the PrintJob class. 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
MovieClipobject) and overlap anotherMovieClipobject as you drag or release. You can also consider the mouse pointer an "object" that can intersect with another object. For example, if you move the mouse pointer over aMovieClipobject, you can detect ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access