| ||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| BoxedArt > Template Tutorial > Intermediate Template Customizations in Flash > How to Add or Change Links in a Flash Template using Adobe Flash |
||||||||||||||||||||||||||||||||||||||
The BoxedArt Guide to Using Website TemplatesHow to Add or Change Links in a Flash Template using Adobe FlashLaunch Flash and go to File > Open from the top toolbar. Navigate to the "fla" folder in your template package and select the .fla file you want to open. 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 the button on the stage by clicking once on it with the black arrow tool from the Tools bar.
Note: The Flash movies in these templates (not Full Flash sites) 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 box, 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 (the F9 key on your keyboard, 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 may 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");
You may customize the .html page name and the width and height in the above script; the centering of the pop-up window can be adjusted as well - just enter different numbers in the script where it says left = 200,top = 20 until you get the position you want.
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 keyframe 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"); You may also change the font, color or size of the text for your buttons, even though the actual words that will display in your .swf movie are coming from an external .txt file.
In the picture above, the text is in the layer beneath
the "invis" button and a locked layer, named "txt" To change or add links in a Full Flash site (one that does not use an external .txt file), the process is very much the same as described above - except that you will see any actual text on the screen, not just a dotted text box. You will still need to go inside Movie Clip symbols to reach the Button symbols in many cases, but once the Properties panel indicates that you are selecting a Button symbol, then you may open the Actions panel and add or change the Actionscript the same way as described above. See also:
|
||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
|
Copyright ©
2007 Big Resources, Inc. All Rights
Reserved |