STEP 10 setting the rolloff BEHAVIOR
You can now close the Instance Properties dialog and test your code. You can only test movie clips by choosing Control > Test Movie. Notice that although the rollover works fine, the movie clips don't revert when your pointer moves away from the button, as they should. To add the rolloff behavior, follow these steps:
When you're finished, the script should resemble the one shown in figure 04:26.
The final bit of code I include is not necessary for the rollover effect, but is required if I want to use the buttons as navigational devices. Using the same process as described earlier, I add a third On Mouse event: On (Release). This event triggers when a user presses and releases a mouse button. The action taken is Get URL, which opens up a specified web page. The URL can be either absolute (such as http://www.yourURL.com/) or relative (as in products/index.html) and you can also specify the window in which you want it to appear. If you'd like to replace the current page, choose the _self window. Also, if you want the button to navigate within your Flash movie you can add a GoTo action on the release mouse event and simply specify the frame number or label you want to go to.