Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change flash into image if browser doesn't support flash

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Can anyone check my code and tell me whats wrong with it??
goto to see it (the one of the building) I need to change that to an image if a browser doesn't support flash, the code below is the code I have but I think it has some problems! If anyone could help me out I would appriciate it!!! Thanks!!



<object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;279&quot; height=&quot;157&quot;>
<param name=movie value=&quot;buildsnow.swf&quot;>
<param name=quality value=high>
<embed src=&quot;buildsnow.swf&quot; quality=high width=&quot;279&quot; height=&quot;157&quot;>
</embed>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!-hide contents from old browsers

//If this browser understands the mimeTypes property and recognizes the MIME Type //&quot;application/x-shockwave-flash&quot;...
if (navigator.mimeTypes && navigator.mimeTypes[&quot;application/x-shockwave-flash&quot;]){

//...write out the following <EMBED> tag into the document.
document.write('<EMBED SRC=&quot;buildsnow.swf&quot; WIDTH=&quot;279&quot; HEIGHT=&quot;157&quot; LOOP=&quot;true&quot; QUALITY=&quot;high&quot;>');
}

//Otherwise,...
else {

//...write out the following <IMG> tag into the document. The image need
//not be the same size as the Flash Player movie, but it may help you lay out the
/page if you can predict the size of the object reliably.
document.write('<IMG SRC=&quot;images/xmasbuild.jpg&quot; WIDTH=&quot;279&quot; HEIGHT=&quot;157&quot; ALT=&quot;Non-Shockwave Welcome&quot;>');
}

//Done hiding from old browsers. -->
</SCRIPT>
</object>
 
try to view source after the page is loaded, and tell us if it has actually written what you expected to
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top