Question about Flash Detection
#1
Posted 23 June 2005 - 07:45 AM
#2
Posted 25 June 2005 - 03:45 PM
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!
cheers!
#3
Posted 28 June 2005 - 06:33 PM
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.
Example:
<!-- Image Map -->
<MAP NAME="AK"></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"
id="AK">');
//
// 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"
src="http://path/flashtem...
<http://path/flashtem... " quality=high
bgcolor=#FFFFFF ');
document.write(' swLiveConnectúLSE WIDTHU0 HEIGHT35');
document.write(' TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedi...ex.cgi?P1_Prod_
Version=ShockwaveFlash">');
document.write('</EMBED>');
document.write('</OBJECT>');
} 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">
');
}
//-->
</SCRIPT>
// You will need to modify the SRC param as follows
<NOEMBED><IMG
SRC="http://path/flashtem...
<http://path/flashtem... "
ALT="NOEMBED GIF Object Map of Alaska" WIDTHU0 HEIGHT35 usemap="#AK"
BORDER=0></NOEMBED>
// You will need to modify the SRC param as follows
<NOSCRIPT><IMG
SRC="http://path/flashtem...
<http://path/flashtem... "
ALT="NOSCRIPT GIF Object Map of Alaska" WIDTHU0 HEIGHT35 usemap="#AK"
BORDER=0></NOSCRIPT>
Hope I didn't mistype anything, but probably did.
Ron
#4
Posted 28 June 2005 - 06:52 PM
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">
</object>
</div>
This gets rid of the <embed> tags which the w3c.org has deprecated, it sets background to a transparent background and provides plugin info.
Ron
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users