A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: HTML link within Flash Movie

  1. #1
    Member
    Join Date
    Dec 2002
    Location
    Halifax, Canada
    Posts
    82

    HTML link within Flash Movie

    Hey,

    I need to make a link to a URL from within a Flash movie.

    For the life of me, i cant seem to do it!

    I am using Flash and Dreamweaver MX, if that is of any significance.

    Thanks
    newbie_geek

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    Code:
    getURL("http://www.flashkit.com");
    or, in a new window:
    Code:
    getURL("http://www.flashkit.com", "_blank");

  3. #3
    Member
    Join Date
    Dec 2002
    Location
    Halifax, Canada
    Posts
    82

    But wait....

    what if i am building my web page in dreamweaver, and I dont know what the final URL will be?

    Do i just "getURL" the path of the .htm file in my local drive?

    Or do i have to leave the link until it is up in the server?

  4. #4
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    If the link you're using is to another page of yours, you can always have a relative/local path, in your computer and in you domain. So use the local path.

  5. #5
    Member
    Join Date
    Dec 2002
    Location
    Halifax, Canada
    Posts
    82
    Okay, so if I have the htm document in c:\webpage\index\home.htm

    I just tell flash "getURL c:\webpage\index\html", is that right?

  6. #6
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    A least I can't use a global path in my computer...
    I think you have to use relative paths...

  7. #7
    Member
    Join Date
    Dec 2002
    Location
    Halifax, Canada
    Posts
    82
    And what exactly is the difference between global and relative paths?

    Again, i apologize for my very powerful ignorance, but we all gotta start somewhere.

  8. #8
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    An absolute or global path is when you spell everything out:

    "C:\Windows\Desktop\myfile.html"

    A relative path is when you do it "relative" to where the file you're linking from is. For instance, if you're linking to "myfile2.html", and it's in the same folder as the file you're linking from, you only put:

    "myfile2.html"

    Or for example, it's in a subfolder called "html":

    "html/myfile2.html"

    And so on. Using relative paths means you can transfer the files to any other computer (or server) and the links will still work.

  9. #9
    Member
    Join Date
    Dec 2002
    Location
    Halifax, Canada
    Posts
    82
    Thats great, thanks guys.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center