Detect Flash Issue

one last flash issue... jeez

Page 1 of 1

2 Replies - 2178 Views - Last Post: 29 July 2008 - 11:41 PM

#1 BrainStew  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 154
  • Joined: 02-August 07

Detect Flash Issue

Posted 28 July 2008 - 10:48 PM

I can't get my detection code to work for flash:

www.kore-teckx.com

it should load banner.jpg instead of the flash file but no go.

thanks in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: Detect Flash Issue

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1167
  • View blog
  • Posts: 7,207
  • Joined: 07-September 06

Re: Detect Flash Issue

Posted 29 July 2008 - 06:54 AM

Adobe has actually released a whole kit on how to detect flash with various things. Here is a link:
http://www.adobe.com.../detection_kit/

Download the "Download Flash Player Detection Kit"
Unzip it
Double Click "Client-Side Detection"
Upload a copy of "AC_OETags.js" to your server
Open "ClientSideDetection.html"


Translate this code to fit your needs (It is placed where you want the flash object to be placed):

<script language="Javascript" type="text/javascript">
<!--
// Version check based upon the values entered above in "Globals"
var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

// Check to see if the version meets the requirements for playback
if (hasReqestedVersion) {
	// if we've detected an acceptable version
	// embed the Flash Content SWF when all tests are passed
	AC_FL_RunContent(
				"src", "example",
				"width", "550",
				"height", "200",
				"align", "middle",
				"id", "detectionExample",
				"quality", "high",
				"bgcolor", "#FFFFFF",
				"name", "detectionExample",
				"allowScriptAccess","sameDomain",
				"type", "application/x-shockwave-flash",
				'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
				"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
} else {  // flash is too old or we can't detect the plugin
	var alternateContent = 'Alternate HTML content should be placed here.<BR>'
	+ 'This content requires the Adobe Flash Player. '
	+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
	document.write(alternateContent);  // insert non-flash content
}
// -->
</script>
<noscript>
	Provide alternate content for browsers that do not support scripting
	or for those that have scripting disabled.
	  Alternate HTML content should be placed here.
	  This content requires the Adobe Flash Player and a browser with Javascript enabled.
	  <a href="http://www.adobe.com/go/getflash/">Get Flash</a>
</noscript>


Add this code to the head of your document:

<script src="AC_OETags.js" language="javascript"></script>
<script language="Javascript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 8;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// -----------------------------------------------------------------------------
// -->
</script>


And I believe that is all.

Hope that helps.
Was This Post Helpful? 1
  • +
  • -

#3 BrainStew  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 154
  • Joined: 02-August 07

Re: Detect Flash Issue

Posted 29 July 2008 - 11:41 PM

perfect, my out of date code sucks. Thanks for the help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1