Solved

FLASH: gif if no plugin installed on IE4.0?

Posted on 1998-12-13
3
250 Views
Last Modified: 2013-12-25
I am a beginner using Macromedia's Flash program.  On my first flash-oriented site, I am having trouble ensuring that a gif image will download to the screen if the viewer doesn't have flash installed on their computer -- IF the viewer is using IE 4.0 on a PC.  On all Netscape browsers, everything seeems OK.  However, if I'm looking at the site from IE 4.0 on a PC and flash is not installed, the browser just hangs.  I'm sure that I missed something, but I can't figure it out.  You can see an example of this by going to http://www.cablenet.org/CN98.  You'll have to use IE 4.0 without flash installed to see the problem I'm having.  However, maybe the source code alone will make it clear what I missed...

Thanks!
0
Comment
Question by:pagedesigns
  • 2
3 Comments
 

Accepted Solution

by:
Tyszka earned 200 total points
ID: 1857187
I have an excellent example of a JavaScript that will solve your problem. Visit http://fenwick.pvt.k12.il.us. If you scroll down to the bottom where there are moving shields, you will see the Flash movie. If you look at the source, you will see a script that checks for the browser version and it also checks if a plug-in is installed. If there is no plug-in or the version does not support Flash, the document.write('') statement prints no HTML and nothing is shown on the webpage. However, if one would want to put a gif on the page, document.write('<img src="yourimage.gif" ') Notice that the document.write statements just writes regular HTML. Just copy and paste the following code into a text editor and then plug in the correct paths of your images and movies

<<<<<<Begin Source Code>>>>>
<script language = "JavaScript"><!--
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);

// Determine which browser is being used.
if (bName == "Netscape" && bVer >= 3) br = "n3";
else if (bName == "Netscape" && bVer == 2) br = "n2";
else if (bName == "Microsoft Internet Explorer") br = "e3";
else br = "n2";

// Display plug-in on page if detected in Netscape 3+.
if (br == "n3" && navigator.mimeTypes["application/x-shockwave-flash"]) {
document.write(' <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"')
document.write(' codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0"')
document.write(' id=fenwickflash width=550 HEIGHT=120> ')
document.write('  <param name=movie value="flash/fenwickflash.swf"> ')
document.write('  <param name=quality value=autohigh> ')
document.write('  <param name=bgcolor value=#ffffff> ')
document.write(' <embed src="flash/fenwickflash.swf" swLiveConnect=false width=550 ')
document.write(' height=120 quality=autohigh bgcolor=#ffffff ')
document.write(' type="application/x-shockwave-flash" ')
document.write(' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> ')
}

// Display page without Flash if plug-in not found.
else if (br == "n3") {
document.write('<hr width=100%>')
document.write('')
}

// Otherwise, display plug-in by default. Will load Flash in IE and other browsers.
else {
document.write(' <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ')
document.write(' codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ')
document.write(' id=fenwickflash WIDTH=550 HEIGHT=120> ')
document.write('  <param name=movie value="flash/fenwickflash.swf"> ')
document.write('  <param name=quality value=autohigh> ')
document.write('  <param name=bgcolor value=#FFFFFF> ')
document.write(' <embed src="flash/fenwickflash.swf" swLiveConnect=false width=550 ')
document.write(' height=120 quality=autohigh bgcolor=#ffffff ')
document.write(' type="application/x-shockwave-flash" ')
document.write(' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> ')
document.write('</embed> ')
document.write(' </noembed> ')
document.write(' </object>')
document.write(' </p> ')
document.write(' </body>')
}
// -->
</script>
<<<<<END SOURCE CODE>>>>>
0
 

Author Comment

by:pagedesigns
ID: 1857188
Thanks!  I will try this out and get right back to you!
0
 

Expert Comment

by:Tyszka
ID: 1857189
So? What kind of luck did you have?
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now