Making the Remaining Monsters Draggable
You're done working with Chiron. Its functionality is complete. You now need to apply this script to the remaining three monsters. You can copy and paste the script, because almost all of the script is the same for each of the remaining monsters, with the exception of a few particulars. In this task, you'll copy and paste the script for the remaining three monsters, and customize each script as appropriate.
1. | Select Frame 10 of the monster targets layer. Drag out three new instances of monsterTarget. Using the Property inspector, place one at X 27, Y 0, and give it an instance name of fury_targ_mc . Place another at X 372, Y 168, and give it an instance name of geryon_targ_mc . Place the third at X 247, Y 345, and give it an instance name of lucifer_targ_mc . |
Before you can do the other monsters' hit tests, you need to create and position the targets and give them all instance names.[View full size image]

2. | Select Frame 10 of the actions layer, open the Actions panel, drag to select the entire Chiron script, and copy it to the Clipboard. Position the cursor just below the end of the Chiron block and paste in the code . |
[View full size image]

3. | In this code block, change all instances of chiron_mc to lucifer_mc, and likewise change chiron_targ_mc to lucifer_targ_mc. Change the first set of X, Y positions to _x=251 and _y=347. Change the second and third set of X, Y positions to x=608 and y=344. Finally, change the text-feedback code in the line that begins _root.dragtex233Text= to the following: _root.drag_tx233Text="<b>Correct!</b><br>Lucifer is entombed upside-down in |
These are all the changes necessary to customize this movie clip to the monster Lucifer. The hitTest() action now looks for the correct target; the positioning is adjusted so it snaps to the correct position; and the feedback text is updated to show the appropriate feedback.[View full size image]

4. | Repeat Steps 2 and 3 for the monster Geryon (the lizard-man). Change the instance name to geryon_mc . The first hitTest() should specify geryon_targ_mc. Change the first set of X, Y coordinates to x=375 and y=172. Change the other two sets of X, Y coordinates to x=656 and y=349. Finally, the text-feedback line should be as follows: _root.drag_tx233Text="<b>Correct!</b><br>Geryon is the vehicle of choice |
In this step, you're customizing the script for the monster Geryon.[View full size image]

5. | Repeat Steps 2 and 3 for the monster Fury (the snake-haired woman). Change the instance name to fury_mc. The first hitTest() should specify fury_targ_mc. Change the first set of X, Y coordinates to x=29 and y=2. Change the other two sets of X, Y coordinates to x=706 and y=344. The text-feedback line should be as follows :_root.drag_tx233Text="<b>Correct!</b><br>The snake-headed Furies guard the |
In this step, you'll customize the fourth and final monster, the Fury.[View full size image]

6. | Test the movie and try dropping each monster on its target, on an incorrect target, and on the start area. In all three cases, the monster should snap into position and the proper text feedback should appear in the drag_txt text field . |
Each monster should have three unique responses, depending on where it's dropped. In addition, each should respond appropriately to its own target. If something went wrong, go back and compare your scripts with those in the directions and figures.NoteDo not skip this step! in a moment you'll switch to Dreamweaver and insert the Flash movie into it232 document. By testing the movie, you generate a SWF from the completed version of the file. If you skip this step, you'll wind up inserting an unfinished copy of the SWF file .[View full size image]

7. | Save the FLA and close Flash . |