homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
Forum Library, Charter, Moderators: not2easy

Site Graphics and Multimedia Design Forum

Do swf flash files need relative urls in html code?
Flash ads not clickable when I embed them with absolute urls

5+ Year Member

Msg#: 3930847 posted 11:28 pm on Jun 10, 2009 (gmt 0)

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.



WebmasterWorld Senior Member 10+ Year Member

Msg#: 3930847 posted 8:57 am on Jun 24, 2009 (gmt 0)

Hi Sophie

Welcome to WebmasterWorld [webmasterworld.com] :)

This might solve the issue by looking at it from a different angle—you can (and should) redirect the user from the non www version to the the www version of the domain. You can do this fairly easily with .htaccess.

You might want to look at swfobject for embedding your flash too ;).

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved