Drag and Drop
InfernoYou already know from Lesson 11, Nonlinear Flash Interactions , how the Lower Hell portion of the movie functions. In this quick review, pay close attention to each of the events and what triggers them. Understanding the intended functionality in detail makes scripting much easier.
1. | Open dante_complete.swf in this lesson's Start/dante/flash folder. Navigate to Lower Hell by clicking the Down button . |
Once again, this is the completed version as it will appear when you've finished this lesson.To begin with, notice the second set of directions (in blue) that appear at the right side of the screen. When the document first loads, this text reads, "Drag a monster to its designated post."[View full size image]

2. | Drag Chiron the centaur to the center of the lake of ice at the bottom of Lower Hell and release the mouse button . |
This is the incorrect target for the centaur. When you release the mouse button, two things happen. First, the centaur is snapped back to its original location. Second, the drag-and-drop directions now read, "Incorrect. Please try again!"

3. | Drag the centaur to the second target from the top, beside the river of blood . |
This is the correct target for the centaur. Note that the centaur stuck to its targetin fact, he snapped to his targetand the correct-target feedback now appears where the drag-and-drop directions started.[View full size image]

4. | Drag the centaur back to its original position . |
The centaur snaps back into place and the directions text is reset to "Drag a monster to its designated post."There are three possibilities for the drag-and-drop object: it can be dropped in the correct position, an incorrect position, or its original position. In all three cases, the object snaps into position and the text directions are updated.
5. | Close the SWF . |
Now that you've seen a detailed description of how the different user actions work, it's much easier to envision the scripts required to make these actions happen.