How to Create a Click Through on Flash 8
Buttons and other types of links or “hot spots” in Flash are sometimes called “click throughs.” A click through is a clickable object or spot in the Flash movie that, when clicked, jumps the user to a specific frame, scene, or external URL. In Flash 8, you can create a click through with a button symbol and ActionScript's "On Release" mouse-button function. Depending on the the target destination of the click through, On Release ActionScripts are created in either the Behaviors or Actions panel.
Instructions
-
Creating the Click Through to a URL
-
1
Open an existing Flash 8 FLA movie file or create a new one.
-
2
Select a button symbol on the stage or drag one from the Library to the stage. (You can convert nearly any object in Flash to a button symbol. Right click the object and choose “Convert to Symbol from the fly-out menu. This displays the Convert to Symbol dialog box. Name the symbol in the “Name” field, and then click the “Button” radio button under “Type.” Click “OK.”)
-
-
3
Click the “Window” menu and choose “Behaviors” to open the Behaviors panel. Click the “Add Behavior” button (the plus sign icon). Choose “Web” from the fly-out menu, and then choose “Go to Web Page” from the Web fly-out menu. This displays the Go to URL dialog box.
-
4
Type the URL in the “URL” field (this must be the precise address). Click the “Open in” drop-down and choose where you want to URL to open. The “_self” option, for example, opens the URL in the same window as the Flash movie, replacing the movie in the browser window. The “_blank” option opens a new browser window, leaving the Flash movie open in its existing browser window. For external URLs, most often you would choose “_blank”.
-
5
Click “OK” to return to the Behaviors panel. Click the first field in the “Event” column, and then click the drop-down arrow and choose “On Release.” This tells Flash Player to open the external URL when the user releases the mouse button during a mouse click.
-
6
Test the movie to see if your button works.
Creating a Click Through to a Specific Frame
-
7
Open an existing Flash 8 FLA movie file or create a new one.
-
8
Select a button symbol on the stage or drag one from the Library to the stage. (You can convert nearly any object in Flash to a button symbol. Right-click the object and choose “Convert to Symbol" from the fly-out menu. This displays the Convert to Symbol dialog box. Name the symbol in the “Name” field, and then click the “Button” radio button under “Type.” Click “OK.”)
-
9
Write the following script in the right pane of the Actions panel:
on(release){
gotoAndPlay(1)
} -
10
Change the number between the parenthesis after "gotoAndPlay" in the script to the frame number where you want the movie to continue playing when the button is clicked.
-
11
Test the movie to see if your button works
-
1
Tips & Warnings
You can also use the "gotoAndStop();" action, rather than gotoAndPlay(); to jump the movie to a specific frame and then pause the movie.
You can also use this technique to create click throughs from movie clip symbols.
Paths, URLs and file names must be exact or your click through won’t work.
ActionScript 3.0 in later versions of Flash does not support Behaviors.
References
- Photo Credit Ciaran Griffin/Lifesize/Getty Images