Introduction to Learning Interactions Tutorial > Modify a Hot Object interaction > Change the color of a selected hot object |
![]() ![]() ![]() |
Change the color of a selected hot object
When the user selects a hot object, the object, by default, changes to light red to let the user know that the object is clicked. You can change the default color in the Actions panel. You'll change the "clicked" color from red to blue.
1 |
In your MyQuiz library, go to 2_Learning Interactions/2_Components, and double-click 2_HotObjects to enter symbol-editing mode. |
2 |
In the 02_HotObjects Timeline, click Frame 1 on the Actions layer. Then open the Actions panel (Window > Actions). |
3 |
If you're not in normal mode, click the options menu control on the right side of the title bar and select Normal Mode. |
4 |
Open the options menu again and select Go to Line. In the dialog box, type 42 and click OK. |
Note: For the correct line to be selected, you must not have auto-format options selected for the Actions panel. If the transform.rb line of ActionScript is not selected, choose Auto Format Options from the Actions panel options menu, and deselect any selected options. |
|
This section of ActionScript lets you select red, green, and blue values for the color object. While you can experiment with the value numbers to specify a color, we've already come up with values that create blue. For more information about what each line of code controls, search for topics on the Color Object and the setTransform Object in Flash Help (Help > Using Flash and Help > ActionScript Dictionary). |
|
5 |
In the Value text box, enter 0. |
If the Expert Mode Warning dialog box appears, click OK, |
|
6 |
Select line 44 and enter 51 in the Value text box. |
7 |
Select line 46 and enter 102 in the Value text box, then close the Actions panel. |
8 |
Choose Edit > Edit Document. |
Tip: As you complete the tutorial, remember to test and save your work frequently. |
![]() ![]() ![]() |