Information Technology Reference
In-Depth Information
button. We will use this as a guide for laying a hit box over the artwork.
The hit state is invisible on the stage, but is quite important. It outlines the
boundaries for the mouse actions. This means that when the mouse enters
anywhere into the hit state region, the button will execute its ActionScript
functions. The hit state is a hot spot for making the button interactive.
5.
Turn on onion skinning. Make sure that your are in frame four, the hit
state, and you have deleted the artwork from frame four. Now turn on
onion skinning and then make a rectangle or square tightly around the
shown onion skinned logoart. Change the color of the box to a bright
green. I do this to remind me that this is the hit box. I use green because
it corresponds with the slice color in Fireworks.
6.
Turn off onion skinning by clicking the icon below the timeline again. Click
out to Scene one and the main stage.
7.
Place the logo_btn on the stage. Align it center to stage. Save the Flash
file to your hard drive in the root directory folder. Test the movie by
clicking CTRL+ENTER. In the Flash Player, roll over the button and see
the fade effect. Our last step is to add some interactivity with ActionScript.
We need to link to our index_2.htm page.
8.
Click on the button and go to the ActionScript panel. Go to the left side
of the panel to the Action Topics . They allow you to begin the ActionScript
code by using simple drop down menus. The Action topics still require
you to plug in information and values that ActionScript needs to execute
the function. For the ActionScript we are applying ( getUrl) we need to
provide the URL address (Web address) of the location we want the
browser to go to when the button is clicked. The address we need is an
easy, relative address . We want the button to bring the user to our main
navigation page, index2.htm. To do this we need to program ActionScript
to get the url index2.htm on mouse click.
9.
In the Action panel we must add the event that will trigger getting the url.
The event is on (press) . We need to add this to ActionScript panel before
we can place the getUrl action in the script. We need to do this because
the button is an object and we are applying the ActionScript to the object.
In other cases we could apply the ActionScript to the frame. In this case,
when the playback head reaches the frame, it executes the getUrl action.
We want the action triggered by the object so we must add the object
specific event.
Search WWH ::




Custom Search