Forum Moderators: open
I am using the following code ( I chopped it down to save some space):
<param name="movie" value="flash_detection.swf?flashContentURL=bdclogo.swf&altContentURL=bdclogo.jpg">
<embed src="flash_detection.swf?flashContentURL=bdclogo.swf&altContentURL=bdclogo.jpg" loop="false" quality="high" bgcolor="#ffffff" width="310" height="80" name="bdclogo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
The problem I am having is with flash_detection.swf. When I use it, it creates a new window for my bdc.logo.swf instead of simply displaying the file inside of the html page I have the object embedded in. I am simply using the stock flash_detection.swf file available from MM under the HTML Flash Detection method.
How do I modify this file to keep a new window from opening (BTW when this new window opens, the .swf file fills the window whereas it is supposed to only be 300x80 pixels) or the above code to keep it from opening in a new window and messing up my page? Thanks!
flash_detection.swf?flashContentURL=bdclogo.swf&altContentURL=bdclogo.jpg
In both the param and the embed, this error occurs and needs to be corrected.
You need to point to an HTML file that has the object tag that defines the width and height of the flash movie, otherwise any SWF file directly linked will fill the browser screen (or sometimes download and be opened in Flash Player).
[edited for accidentally leaving bit of paragraph I had deleted]
You can do flash detection on the same page as the flash movie, but you'll need to find a different way than using the built in method. :(
There are some javascript snippets out there that do a decent job. Plus, you could skip detection and rely on the browser to suggest it on it's own while providing a static gif alternative in the <object> code.
<!--[if!IE]><-->
<object type="application/x-shockwave-flash" data="/pathto/flash.swf">
<param name="quality" value="high" />
<img src="/images/backup.jpg" alt="" />
</object>
<!--><![endif]-->
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="/pathto/flash.swf" />
<param name="quality" value="high" />
<img src="/images/backup.jpg" alt="" />
</object>
<![endif]-->
The only problem browser seems to be IE5.2 under OSX, which doesn't display anything. IE5.0 under OS9 works fine!
Edit: With the dimensions of the <object> element set in CSS.
Edit: Should be a space between the 'if' and the exclamation mark. WebmasterWorld editor seems to think otherwise!