admin管理员组文章数量:1187530
I have downloaded SWFObject, and included it in my website. Now I want to simply get a true
or false
value based on whether or not Flash is installed in the users browser when they visit my site.
How can I do this?
I have downloaded SWFObject, and included it in my website. Now I want to simply get a true
or false
value based on whether or not Flash is installed in the users browser when they visit my site.
How can I do this?
Share Improve this question edited Apr 19, 2011 at 13:34 andynormancx 13.7k6 gold badges38 silver badges52 bronze badges asked Apr 19, 2011 at 13:24 MazatecMazatec 11.6k23 gold badges74 silver badges108 bronze badges 4- 1 I don't think that's what swfobject is for. – crimson_penguin Commented Apr 19, 2011 at 13:29
- 2 I think that's exactly what SWFObject is for... – Mazatec Commented Apr 19, 2011 at 13:33
- OK, I guess I'm wrong. I was going from the fact that the main use of it is just to embed Flash in a page, given a minimum version. But I guess it has detection features you can access directly as well. – crimson_penguin Commented Apr 19, 2011 at 13:42
- version detection is automatic with SWFObject. swfobject.embedSWF() function has version control and will display alternate content for a flash player installer if you set it up correctly. – The_asMan Commented Apr 19, 2011 at 19:55
2 Answers
Reset to default 27if (swfobject.hasFlashPlayerVersion("9.0.18")) {
// has Flash
}
else {
// no Flash
}
or replace "9.0.18"
with the minimum version you require
If You use jQuery SWFObject you could use:
if (!$.flash.hasVersion('9')) {
//has Flash
}
else {
//no_flash
}
本文标签: javascripthow to detect flash using SWFObjectStack Overflow
版权声明:本文标题:javascript - how to detect flash using SWFObject - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738368153a2081989.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论