|
|
![]() |
|||
|
WELCOME > STEP 2: ASSIGNING LINKS |
|||
|
Select the button element by clicking it with the Select tool on the Layout panel, or by selecting it from the Outline or Timeline panels. When the appropriate button item is selected you should switch to the Script panel. To open the Script panel you can select “ Panels/Script ” from the top menu. If this button item has the rollover effect already, you can see the following script in the actions panel: on (rollOver) {
Script Panel PREMIUM SWISH WEBSITE TEMPLATES
If you want to connect this button with an external URL you can use the getURL() script function. If you're assigning this function to the button you should use the on (release) event. So the rollover script with added link will look like this: on (rollOver) { If you don't use any rollover effects, you can use the on (release) event without the previous two events: on (release) { Let's check the getURL() function closer. The first attribute is the absolute or relative URL of the file to load. The second attribute is the Window. You can specify the target frame name to which you will load the file. Or you can use some of the default window options:
Let's check some examples of the getURL() function: getURL("images/myphoto.jpg","_blank") This will open the photo.jpg file located in the images folder in the popup window. getURL(“http://www.myfriendswebsite.com”) This will open the http://www.myfriendswebsite.com in the same window. getURL("http://www.mywebsite.com/mail.php","_self","GET") This will call the mail.php script located at the http://www.mywebsite.com/mail.php and will transfer the variables info using the GET method. If you want to connect a button with the JavaScript code, you can use the following function: on (release) { Quoted javascript() function argument should be the javascript code. The example above will execute the alert() javascript function. If you want to connect your button with an e-mail address, you can use the mailto() function. This function is similar to the mailto link option in the HTML. The following example will call the default mail agent and fill the address and subject fields: on (release) { Step 3: Changing Images |
|||
![]() ![]() |
|||
|
|
|||