Providing Dynamic Feedback
You're almost finished with the drag-and-drop functionality. However, snapping into place is hardly sufficient feedback for users. In this task, you'll add the Dynamic Text feedback that tells the user whether they dropped the monster on the correct target.
1. | Select Frame 10 of the text layer in the timeline. Click in the gray area offstage to set the focus back to the Document window rather than the timeline . |
You're preparing to create a new text area. You'll need to specify the frame into which you want to place the text. In order for the Property inspector to display the text settings, you must change the focus back to the Document window after you've selected the correct frame.
2. | Click the Text tool in the Tools panel. In the Property inspector, set the Text Type to Dynamic Text, the Font to Verdana, Size 12, and make the Text (fill) color a dark blue (#000099). Place the cursor below the text area in the Document window, and hold down the Shift key to drag out a text field that is four lines high and about as wide as the text area above it . |
The dynamic text box you create in this step will contain the text feedback for users as they drag and drop monsters in various places.[View full size image]

These settings prepare the text field so it can be used to provide feedback.[View full size image]

4. | Select Frame 10 of the actions layer, and enter the following line of script in the Actions panel, at the end of the existing code: drag_tx233Text="Drag a monster to its designated post."; |
This line gives the drag_txt text field a text string to display when the movie first loads. Again, it uses the

5. | Test the movie to make sure the text loads . |
When you test the movie, the text string should appear in the drag_txt field, in blue.[View full size image]

6. | Return to the main movie and click Frame 10 of the actions layer in the timeline. In the Actions panel, enter the following text, below the this._y=78; line: _root.drag_tx233Text="<b>Correct</b><br>Chiron the Centaur guards the |
TipThis text can be found in the script_infern228.txt file, beneath the Chiron heading .This line causes the drag_txt field to display a message confirming that the user dropped the chiron_mc instance on the correct target. Like the two lines above it, which snap the instance into place, this text is triggered to appear when the hitTest() expression evaluates to true.[View full size image]

7. | Beneath the this._y=342; line, add the following line of code. Then test the movie to make sure it works ._root.drag_tx233Text="<b>Incorrect</b><br>Please Try again!"; |
This line tells users that they placed the monster in an incorrect location.[View full size image]
