Go Back   djbosak.com forums > Tutorial Forums > Template Tutorials : > Working With Swish :
Reply
 
Thread Tools Display Modes

Assigning links in your Swish movie...
Old 04-29-2006, 01:22 PM   #1
djbosak
Administrator
 
djbosak is offline
Join Date: Apr 2006
Posts: 112
Default Assigning links in your Swish movie...

During the customization of your SWiSH movie you may need to assign links to the button elements. These links can open new pop pages, surf through the pages of your website, open the image preview or send the contact letter. All these features can be established by assigning an appropriate script to the button element.

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 the "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) {
gotoAndPlay(2);
playSound("But.wav");
}
on (rollOut) {
gotoAndPlay(18);
}




Fig 11.3 Script Panel

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) {
gotoAndPlay(2);
playSound("But.wav");
}
on (rollOut) {
gotoAndPlay(18);
}
on (release) {
getURL("http://www.mywebsite.com","_self","GET");
}

If you don't use any rollover effects, you can use the on (release) event without the previous two events:

on (release) {
getURL("http://www.mywebsite.com","_self","GET");
}

Let's look at 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:
  • _self - this will open the file in the same frame or window. Note that you’ll get the same effect if you just skip the Window option;
  • _blank - this will open a new browser window;
  • _parent - this will open the link in the same browser window regardless of frame settings;
  • _top - this will open the link in the top level frame.
Let's check some examples of the getURL() function:

getURL("http://www.djbosak.com/forums/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) {
javascript(“alert(‘this is test’)”);
}

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) {
mailTo("support@company.com","","This is the support question","");
}
  Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating one way non-reciprocal links... djbosak Link Exchange Articles : 0 05-07-2006 12:25 PM
The Most Productive Ways To Build Links As Fast As Possible... djbosak Link Exchange Articles : 0 05-05-2006 12:44 AM
Should You Buy Links, Get Links For Free, Or... Do Both? djbosak Link Exchange Articles : 0 05-05-2006 12:39 AM
Editing text in your Swish movie... djbosak Working With Swish : 0 04-29-2006 01:24 PM
Assigning links in your Flash movie... djbosak Template Tuning Using Flash : 0 04-26-2006 10:04 AM



All times are GMT -4. The time now is 03:54 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.