Moving movieclips with mouse and hitTest

Flash tutorial that shows how to allow the user to move a movieclip with their mouse, and detect when it hits another movieclip using hitTest method in Flash.

Editor’s Review:

Short, easy tutorial to show how to move a movie clip with the mouse in Flash. Also talks briefly about the how to detect when a clip touches another clip using the hitTest() method in Flash. While this tutorial isn’t meant to show you how to create or draw the clips used for the example, the way it explains how to set up the clips is a little confusing. However, if you know enough about Flash to draw and create symbols, then this is an easy tutorial to show you how to add a little interactivity to your Flash projects. One important note about hitTest (aka collision detection). The “hit” area is the bounding box of your symbol. So, in the case of this tutorial, the hitTest applies even when VISUALLY the objects are not touching (since the tutorial uses circular shapes as it’s symbols). While the tutorial is still relevant, and is still a good lesson on hitTest, I think its important to point that out to avoid users thinking they might have made a mistake

View Tutorial: Interactivity in Flash using hitTest() method

Additional Info
Level:
Beginner
Version: 5 and up
ActionScript: 2.0
Online example: Yes
Source files available: No
Video Tutorial: No


About this entry