I want a JPEG banner to appear in place of a flash video on the head banner of a site of mine on computers that don't have flash installed. How do I do this? Can I do it with HTML or do I need a javascript file?
As far as I know this would require javascript to determine the browser and or wether or not they have flash.
That's exactly what the object element is meant to do. Unfortunately IE does not support html4 very well. You might try it anyway. <object type="application/x-shockwave-flash" data="some.swf"> <img src="flashreplacement.jpg" alt="whatever the pic's about"> <p>This sentence is here because your browser did not load either the Flash movie I had for you nor the image I planned as backup</p> </object> Code (markup): If the Flash doesn't load, the jpeg will be the next option. Should images not be supported, then the <p> will be rendered. All in all a very accessible fail through. cheers, gary
Just so I get this right, my HTML for the embedded flash file is: <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0" id="Movie1" width="635" height="150" > <param name="movie" value="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/images/header1.swf"> <param name="bgcolor" value="#000000"> <param name="quality" value="high"> <param name="allowscriptaccess" value="samedomain"> <embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" name="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/images/header1.swf" width="635" height="150" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/images/header1.swf" bgcolor="#000000" quality="high" swliveconnect="true" allowscriptaccess="samedomain" > <noembed> </noembed> </embed> </object> Do I insert the your code after the </object> tag or right before it?
Right after the embed and before the </object>. The <embed> element is an example of failthrough just like the image and then the text in my example. You would do well to make your markup valid html. The invalid method with object is why Moz browsers have to use the embed element, which is itself non-valid. ALA has an article on valid markup for flash. cheers, gary
Thank you. One more question. Is the only way to check if the code works to ununistall flash and see what happens, or is there an alternative?
I don't know of one. I wish the Firefox Flashblock extension acted as if Flash didn't exist. I've just used Lynx to check the failthrough. Got an old machine sitting around? cheers, gary