This project is archived and is in readonly mode.

#1240 ✓duplicate
Nic Bell

Flash Minor Version

Reported by Nic Bell | June 8th, 2011 @ 11:38 AM

I recently tried to embed a piece of flash that requires 10.1 the plugin detect code in Mootools looks like this.

Browser.Plugins.Flash = {
version: Number(version[0] || '0.' + version[1]) || 0, build: Number(version[2]) || 0 };

My flash version is 10.1.53.

Which means 10.1 is returned as 10.
The build is returned as 53.

I added the following to my code to fix it.

/ fix to get x.x instead of just x version Version function is copied from Mootools but that is behind a closure. /

var version = (Function.attempt(function () { return navigator.plugins['Shockwave Flash'].description; },
function () { return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version'); }) || '0 r0').match(/\d+/g);

Browser.Plugins.Flash.version = Number(version[0] + '.' + version[1] || '0.' + version[1]) || 0

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Tags

Pages