How to detect flash plugin with javascript?
if flash plugin is not there then i want to show the image.
glenngv
12-19-2002, 07:31 AM
I've downloaded it somewhere a long time ago but I haven't used it. Pls see attachment.
I tried with this file but it's giving me error on line 32 unterminated string on that line they incude one more script tag for vb
function detectIE(ClassID,name) { result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCRIPT>\n'); if (result) return name+','; else return ''; }
Skyzyx
12-19-2002, 04:42 PM
I got this from Flash MX, and modified it. With this, you can check not only for Flash, but for specific Flash versions, 3.0-9.0. I know 7, 8, and 9 aren't out yet, but assuming they follow the same information, this will pick them up with no updating.
You'd use it like this...
if (plugin.flash6up)
{
// Do this Flash 6 thing, that works in 6, 7, 8, or 9
}
else if (plugin.flash5up)
{
// Do this Flash 5 thing that works in 5, 6, 7, 8, or 9
}
else if (plugin.flash4)
{
// This will only work in Flash 4.0 -- that's it.
}
else document.write(plugin.flashversion); // This will write out the version of the Flash plugin installed.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.