Do swf flash files need relative urls in html code?

Discussion in 'Graphics & Multimedia' started by mcdeere02, Aug 5, 2009.

Thread Status:
Not open for further replies.
  1. #1
    I've added a flash ad to my website, in .swf format. I don't know much about flash (as I will probably prove in a sec!) and the advert wasn't created by me.

    This is the code I'm using:

    <object width="160" height="600">
    <param name="movie" value="images/advert.swf">
    <embed src="images/advert.swf" width="160" height="600"></embed></object>

    This code seems to work fine. However, previously I was using absolute urls in the code, eg: http://www.example.com/images/advert.swf, and when I did that the file was not clickable on any page of my site that did not have the 'www'. So, if you went to example.com and tried to click the flash ad, it didn't work; if you went to www.example.com and clicked the flash ad it worked fine.

    Does anyone know why this would be? Is it a setting in the formatting of the flash ad? I just feel like I would like to know for any future flash ads I set up. Thanks for any help.
     
    mcdeere02, Aug 5, 2009 IP
  2. osmasters

    osmasters Well-Known Member

    Messages:
    453
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    100
    #2
    Yes, there are problem like this in ad software because of url in configuration file (dont know exact about your ad script). Even sometimes if you give ip of website then it will work for ip only not with site name even both are same.

    try to give only http://example.com/images/advert.swf . I hope it works for all cases.
     
    osmasters, Aug 5, 2009 IP
  3. john.peter

    john.peter Well-Known Member

    Messages:
    307
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    138
    #3
    Yep, this problem happens with many website's flash contents.
    I dont know clearly its problem with adobe flash player or what.
    But, you have fix to solve this issue. to fix this problem you should edit your .htaccess file in the root folder of your server/ftp files (create on with the same name if it not there in the root folder) and write ReWrite Engine code to redirect example.com to www.example.com. This is one of the way to fix this problem and i have used this one few months before.

    Regards
    - John
     
    john.peter, Aug 6, 2009 IP
  4. ViolentAJ

    ViolentAJ Well-Known Member

    Messages:
    581
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    128
    #4
    You can give relative URLs or direct URLs. I typically give the full URL (http and all).
     
    ViolentAJ, Aug 6, 2009 IP
Thread Status:
Not open for further replies.