You've completed the first of the two major features of the upper half of the Inferno map: the quicktips. Now you'll implement the second major feature, which is a scrolling text area that describes each of the five circles as well as the upper half of the Inferno map itself. You'll create the scrolling text area using the TextArea component.
Flash components are ready-made, customizable features that you can drag and drop into your movies. Flash comes with a number of components, including classic form elements such as the CheckBox and RadioButton components, and other useful components such as the ProgressBar component, which creates progress bars that display the loading progress of movies. In this task, you'll work with the TextArea component, which, as its name implies, creates a multiline scrolling text area whose contents you can dynamically populate via ActionScript.
The best part of using components is that they make otherwise difficult tasks quite easy.
1. | With the Library panel open, and Frame 1 of the text layer selected, press and drag an instance of a TextArea component onto the stage, in the white space on the right side. Use the Free Transform tool in the Tools panel to enlarge the component, as shown in the figure. |
The default instance is quite small, so you'll have to resize it.
2. | In the Property inspector, give the new TextArea an instance name of upperInfo_txt . |
Like other Flash objects, the TextArea has native properties, such as buttons and movie clips. Before you can use any of these objects' properties in ActionScript, you'll have to give the TextArea an instance name.
3. | Still in the Property inspector, switch to the Parameters tab, if necessary, and change the Editable setting to False and th218 setting to True. |
Leaving the Editable setting at the default True would enable users to select the text and even modify it. You only want users to be able to read the text, so the Editable setting should be False.
By making th218 setting True, you enable basic formatting within the text, including line breaks, bolding, and so on.
4. | Give the TextArea some default text by entering the following in the Property inspector's Text field. <b>Directions</b><br><br>Click any label to learn about that region of Hell.<br><br>Roll over any interesting object on the map to learn more about it. |
If you'd rather copy and paste this text, it's available in script_inferno_tex233, under the heading Directions.
5. | Test the movie. When you're satisfied, return to Flash and save the file. |
The default text appears in the text area. No scrollbars appear in the text area, because the entire block of text fits. However, if you put in a longer text string, Flash automatically adds scrollbars.
6. | With Frame 1 of the buttons layer selected, drag out instances of hotspots, placing and resizing them over the six labels on the page (Upper Hell, Limbo, Lust, and so on). Give each an instance name according to its label, as follows: upperHell_btn limbo_btn lust_btn gluttony_btn avarice_btn illTemper_btn |
After the buttons have instance names, they're exposed to ActionScript, and you can write a script that enables the buttons to populate the text area.
Note
Make sure that no two hotspot buttons overlap each other. Overlapping buttons sometimes behave in unexpected ways.