A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Broken Link when in another dir

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Location
    UGA
    Posts
    14

    Broken Link when in another dir

    Currently I am making a flash website.
    I link the flash content by opening up my .html file in notepad and supply the right link address to the flash content.

    Universally I have a navigation bar which appears on every page. I call it navbar.swf

    Until recently everything on my website was working until I made a seperate directory for organization.

    It went from being linked in the first directory to being linked to a whole diff folder.
    For exp: In my new directory I have to link using "../../navbar.swf instead of doing "navbar.swf"

    On the navbar I have a link to "index.html" however when I click on that link using the "../../navbar.swf" code it says that "index.html" cannot be found.

    How do I fix this problem without changing the link to a "www.website.com"

    Any ideas?
    check out Jokurland at www.jokurland.tk

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    Unless you modify it (using the base parameter), relative links inside a sWF file are relative to the html file that embed it.

    If you want to make links relative to the root directory, use slash in the beginning of the links, e.g.: "/index.html" or "/some-folder/some-file.html".

    You could also have relative links, e.g.: "../../index.html" but these will no longer work if the SWF file is embedded an html file in a different directory.

Tags for this Thread

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