Matt Elhotiby
Matt Elhotiby

Reputation: 44066

Why is the relative path not finding the swf

I have this url and in the middle I have this embed link

<embed base="http://dev.posnation.com/images/" height="345" align="middle" width="743" type="application/x-shockwave-flash" salign="" allowscriptaccess="sameDomain" 
allowfullscreen="false" menu="true" name="banner" bgcolor="#ffffff" devicefont="false" 
wmode="window" scale="showall" loop="true" play="true" 
pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="banner.swf">

But for some reason the flash doesnt pull up. I have the banner.swf in the /images folder as you can see with this link what am i missing

Upvotes: 2

Views: 1913

Answers (2)

afaf12
afaf12

Reputation: 5426

I think I know what the problem is.

You've specified base="http://dev.posnation.com/images/" and src="banner.swf", and you think that banner.swf will be searched in the images folder. I think it does not work that way.

Movie will still be searched in http://dev.posnation.com/. All the graphics for the movie will be searched in location specified by the base, while banner.swf will be searched in the location specified by src.

Source

Upvotes: 4

Stefan
Stefan

Reputation: 352

woops ignore my previous answer. i see the problem. I used chrome's developer tools and your website throws an error Uncaught TypeError: Cannot set property 'src' of null

to expand on awerti's suggestion this is how i embed from a different folder

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="240" height="138" id="flashdemo" align="middle" />
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="/content/flashdemo.swf" />
<param name="quality" value="high" />
<param name="wmode" VALUE="transparent">
<param name="bgcolor" value="#ffffff" />
<param name="base" VALUE="/content/">
<embed src="/content/flashdemo.swf" base="/content/" quality="high" bgcolor="#ffffff" wmode="transparent" width="240" height="138" name="flashdemo" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />

Upvotes: 1

Related Questions