Free Flash Tutorials

Home Food Mates • Members Tutorials Forum Buy Templates Contact Us 

 


Flash Tutorials

   

Flash Tutorial - Hyperlinks

 

Free Flash Tutorial


Page 3     <<   Previous    1   2   3  4     Next   >>       >>   Webwasp Mates

 

Step Three: Adding the ActionScript URL

  1. Right click (Mac: Ctrl Click) on the button and select: Actions
  2. The Actions panel has two modes: Normal and Expert. Make sure it is in Normal. You do this by clicking on the side menu button ( ) which is just under the cross on the top right hand side of the panel. Select Normal
  3. Click on the: Plus sign > Actions > Browser/Network > GetURL
    URL simply means web address (Uniform Resource Locator - for those who like jargon)
  4. In the top section of the Actions panel you will see URL. Type the web address in here. I typed: http://www.webwasp.co.uk

    Web Address: Absolute

    The web address can be either absolute or relative. Absolute means that you put the full URL of the page. This page is:

    http://www.webwasp.co.uk/tutorials/a15-hyperlink/hyperlink.htm

    The absolute URL of the webwasp home page is:

    http://www.webwasp.co.uk

    When you are linking to a web page on a site other than your own use the full web address or in the jargon: Absolute URL

    Note: In Step three, Point 4 above, I typed in an absolute address. I did this so that the link will still work when you download the file to your computer. If I typed a relative address it would work on this page, but not when you down loaded the file.

    Web Address: Relative

    A relative address is where you don't put the full URL, just the file name. The relative address of this page would be:

    hyperlink.htm

    If I used this in my Flash example above, it would open this page, but only if the Flash movie is in the same location as the page you are trying to open. If you don't specify the full URL, just the name of the HTML page, the browser will look for it in the same directory (folder) and at the same address as the one you are currently viewing.

    You use relative links to pages on your own site. There are two reasons for this.

    One: When you test you work on your hard drive a relative link will find the relative file on your hard drive. If you place the full URL the browser will look on-line for the page, which gets confusing, and may give you incorrect results.

    Two: You can move your entire site from one server to another or to an Intranet or local hard drive or even to a CD or Floppy disk and the site will still work. If you don't do this you would have to up-date every link and that's no fun!

Relative Links: Folders

For a relative link to work you do not have to have all your files in the same folder. The location of this page is:

http://www.webwasp.co.uk/ - The root directory for the site.
tutorials/ - The folder for all the tutorials on this site.
a15-hyperlink/ - The folder for all the files for this tutorial.
03.php - This HTML file that is this web page.

    Note: I do not use index.html or index.htm but index.php The reason is not important to this tutorial and in truth they are all very similar. They are all web page files. If you wish to learn about PHP see the tutorial: PHP

If I want to link from the Home page to this page, the relative link would be:

tutorials/a15-hyperlink/MX/03.php

The other way around - a link from this page to the home page would be:

../../../index.php

../ makes the page go up hill or to the folder one level up. The home page is three levels from this point. Remember the location of this file is:

tutorials / a15-hyperlink / MX

Thus the home page is up three levels. After this there is no where to go as you will be in the root directory and that is the end of a relative links possibility.

If you find this folder business confusing just place all your files in one folder or location. Relative links will then work.

         

Page 3     <<   Previous    1   2   3  4     Next   >>       >>   Webwasp Mates


Webwasp Community: Webwasp Mates & Dates

Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates

65608 visitors to this page since Jan 04

 Top of Page Home Food Mates Members Tutorials Forum Buy Templates Contact Us 
 All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.