Actionscript for linking to a URL

topic posted Fri, September 25, 2009 - 5:43 PM by  Unsubscribed
Share/Save/Bookmark
Advertisement
I am still using Flash 8 professional. Currently am trying to use the getURL action on a button. However I notice a big difference in how it behaves when the button is object embedded onto the website.

If you visit www.losttrekker.com, the button (located on the right) takes you to the link (google.com is the current link for example purposes)

BUT

If you visit losttrekker.com, than the button's link does not work.

Any idea why this would be?
posted by:
Unsubscribed
Advertisement
Advertisement
  • Re: Actionscript for linking to a URL

    Fri, September 25, 2009 - 6:01 PM
    Someone else please correct me if I'm wrong, but looking at the code and how the files are linked, I believe this is happening because absolute linking is being used instead of relative linking. I'm imagining that the ActionScript is pointing to a URL with www.losttrekker.com in it, as opposed to losttrekker.com, thus causing it not to function as intended.
    • Unsu...
       

      Re: Actionscript for linking to a URL

      Fri, September 25, 2009 - 8:29 PM
      Since the file that I want that banner to link to is hosted on this website, I did try relative linking, both using
      on (release) {

      getURL("/thailandtour.shtml","_self");

      }

      or

      on (release) {

      getURL("thailandtour.shtml","_self");

      }

      and the same problem happened. It just doesnt want to serve anyone the thailandtours page if they come in on losttrekker.com rather than www.losttrekker.com
      • Unsu...
         

        Re: Actionscript for linking to a URL

        Sat, September 26, 2009 - 2:57 PM
        Addendum:

        Looks like it has a problem if I tell it to open it up in "self" or even the parent window. Only solution for the www vs non-www problem is to tell it to open up in a blank window. Strange....very strange.
        • Re: Actionscript for linking to a URL

          Sat, September 26, 2009 - 3:02 PM
          Not sure what you're trying to do realy.

          Where is the page that the swf is embedded in, in relation to the file that you want to link?
          Are they in the same folder?
          • Unsu...
             

            Re: Actionscript for linking to a URL

            Sat, September 26, 2009 - 4:53 PM
            Well the swf is in the wordpress theme's image folder. The place that the button links to is in the root directory of the site. Howev,er it still doesnt explain why the link only works when i tell it to open in a blank window.

Recent topics in "Web Design"

Topic Author Replies Last Post
RSS News aggregator JAKEYERBOOTY 3 October 23, 2009
How to make floated divs height equal SMSapphire 2 October 19, 2009
32-bit integer to RGB hex conversion Jesse 1 September 11, 2009
Entire Site In Flash? Unsubscribed 3 September 11, 2009
Quality website templates Eyesys 4 September 11, 2009