|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
|
Flash Tutorials: Changing Links Using Flash To make modifications to your Flash template's buttons and links using Macromedia Flash you must first launch Flash and open the .fla file. (Start>Programs>Macromedia, then File>Open from Flash's top toolbar. When the fla file opens in Flash, locate the button(s) that you wish to change. To do this, drag the Playhead (the small pink rectangle) at the top of the Timeline until you see the buttons on the stage. Select it on the stage by clicking once on it with the black arrow tool from the Tools bar.
Note: Since most templates' Flash movies are using a .txt file to display words on the buttons, you will not actually see the text in the .fla screen, as shown above. The text areas are defined by dotted borders. Also, in most cases, the actual button (the clickable area in your Flash movie) is not the text area, but an invisible button - denoted in the picture above by the light blue rectangle. Invisible buttons appear this color in the .fla screen, but are not visible at all in the .swf movie displayed in your web pages.
A thin blue border appears around the object
when it is selected, and Properties panel will display what type of symbol
it is: If the Properties panel appears as pictured above,
then you are ready to edit the button. If, however, the Properties Panel displays
something other than the word Button, such as Movie Clip, then you
must go further inside the symbol to edit the button.
In the sample above the Layer holding the button (the clickable area) is named
'invis' for invisible button. Unlock the Layer if necessary. Click once on
one of the light blue rectangles on the stage and the Properties panel should
read Button as the selected symbol's type. With the Button still selected, open the Actions panel if it isn't already open. (F9 key, or from the top menu, Window>Actions.) Make sure the Actions panel says Actions - Button at the top. The scripting for the button may have a single script, on(release) { getURL... , or it read similar to this below (includes any roll-over effects that have also been assigned to this button): on (release) { } } } The getURL script is what you will modify for your link. The remaining code should most likely be left alone, in order to keep roll-over effects intact. In the Action panel's scripting select the getURL line of code and replace the /:url1 with a URL of your own. Your modified link scripting could read like this: on (release) { Important: Be sure the entire URL is enclosed in quotation marks " " as well as parentheses ( ) or your link will not function.
MORE LINKING OPTIONS The getURL function accepts more than a link's URL. You may also specify Window type and Variables send method.
With Window: you may direct where the new URL will be opened.
If the field is left empty (as pictured above) the new URL will open in
the same browser window, replacing what came before. getURL("http://yoursite.com/yourpage.html", "_blank");
getURL("http://yoursite.com/yourpage.html", "mainFrame");
Variables send method can be used if you are parsing variables through a string. Available options are GET and POST. For example if you wish to call a products page to open in the same browser window, with "item" as variable and "2" as value, using the GET method, your script would read similar to this: on (release) { getURL("http://yoursite.com/products.php?item=2", "_self", "GET"); } For more information on how to set up Flash actionscripts to process data commonly found in html forms check out the Actionscipt.org website. A good example is Converting Basic HTML Forms to Flash If you are modifying links in a Flash intro template, there will most likely be a link at the end to automatically take your viewers to your website after the Flash intro movie has finished playing. This type of link is not a Button action, it is a Frame action - meaning that no clicking-on-a-button is needed; with frame actions, the script performs its action automatically when the movie reaches that frame. Frame actions are denoted in the Timeline with a small 'a'.
To change the scripting for this frame action, click once on the frame where the 'a' is to select it. Press the F9 key on your keyboard to open the Actions panel. Make sure the Actions panel says Actions - Frame at the top. The scripting for this frame action may read similar to this: stop(); Just as with a Button link, you can modify a frame's getURL script to go to your own website's page, so it reads: getURL("http://yoursite.com/yourpage.html");
| ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
Copyright © 2001-2004 Big Resources, Inc. All Rights Reserved |