Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

Question about Flash Detection

  • Please log in to reply




  • Member
  • PipPip
  • 76 posts
I want to make a site but its got a flash menu. I've seen business pages do this... how do I have the viewer's computer checked for the flash to run the menu... so that it'll load the flash menu if the computer has it but loads a normal html menu if they don't?
  • 0





  • Member
  • PipPipPip
  • 258 posts
hi there!!

the browser on the viewers comp automatically checks for flash plugin, and i don't think yu can do an autodetect - but yu can definitely set the Flash version as the default version of the page, and then provide a link that says -"click here for HTML or non-flash version" and link to the other page. ;)

easiest way to do it!


  • 0

Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
This is oneway :

Providing alternative images

It is possible to determine (via Javascript) if the user has installed the Flash plug-in, and provide an alternative image if they have not. The following code is derived from code that was automatically generated by Flash 4. It is modified to merely trigger on the presence of the Flash plug-in.


<!-- Image Map -->
<script LANGUAGE=JavaScript>
var UseFlash = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ) {
// Check for Flash version 3 or greater in Netscape
var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=3
UseFlash = 1;
} else if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
// Assume any Windows IE except for Windows 3.1 supports the
// OBJECT tag UseFlash = 1;
if ( UseFlash ) {
// Use Flash player
// Although these alt tags do not apparently seem to be supported with the plug-in,
// they are included on the chance they are supported in an upgrade
document.write('<object width="400" height="400" alt="Object Map
of Alaska" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
document.write(' ');
document.write(' WIDTHU0 HEIGHT35
codebase="http://active.macrom...b#version=4,0,0 ,0"
// the next 'document.write' line will need to be modified to point to your
// file and to use your params
document.write('<param name="movie" value="http://path/flashtem...
val2 "><PARAM
NAME=quality VALUE=high> <param name="bgcolor" value="#FFFFFF"> ');
// the next 'document.write' line will need to be modified to point to your
// file and to use your params
document.write('<EMBED ALT="Embed Map of Alaska"
<http://path/flashtem... " quality=high
bgcolor=#FFFFFF ');
document.write(' swLiveConnect˙LSE WIDTHU0 HEIGHT35');
document.write(' TYPE="application/x-shockwave-flash"
} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0
&& navigator.appVersion.indexOf("2.")>=0)) {
// Netscape 2 will display the IMG tag below so don't write an extra one
// You will need to modify the SRC param
document.write('<img src="http://path/flashtem...
val2<http://path/flashtem... " alt="GIF
Object Map of Alaska" WIDTHU0 HEIGHT35 border="0">
// You will need to modify the SRC param as follows
<http://path/flashtem... "
ALT="NOEMBED GIF Object Map of Alaska" WIDTHU0 HEIGHT35 usemap="#AK"
// You will need to modify the SRC param as follows
<http://path/flashtem... "
ALT="NOSCRIPT GIF Object Map of Alaska" WIDTHU0 HEIGHT35 usemap="#AK"

Hope I didn't mistype anything, but probably did. :tazz:

  • 0

Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
Here's a neat online tool for generating the necessary code according to your parameters :

Generating HTML Code to View Flash

From site :

Generating HTML Code to View Flash

There are two questions that get asked of me the most: How do I publish a Flash animation? How can I make my animation transparent? After having spent more than 10 hours in Flash, I created a small program/animation that allows you to enter the various values for an animation. Best of all, after you enter your values for the movie, the HTML code gets generated automatically. Copy the HTML code into your Web page, and your animation will work.

Use the following animation to aid you in your goal of publishing an animation. The file is only 12k in size:

or you can use this with modifications :

<div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macr...ersion=5,0,0,0" width="490" height="60" pluginspage="http://www.macromedi...hockwaveFlash">
<param name="movie" value="img/your_flash_file.swf">
<param name="quality" value="best">
<param name="wmode" value="transparent">
<param name="bgcolor" value="#ffffff">
This gets rid of the <embed> tags which the w3c.org has deprecated, it sets background to a transparent background and provides plugin info.

  • 0

Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP