Search code examples
actionscript-3flashembedswfobject

Detecting if flash is installed using SWFObject


I was googling for about half an hour and I couldnt find any useful information to do this, I only found out that expressInstall.swf applies when you have a lower version of flash, but at least you have one installed.

So, long story short, how do I do to detect if I have Flash installed on my PC using SWFObject.embedSwf ?, and what I want to do is, that if I dont have it installed, to show me some custom content.

Is this possible using SWFObject?

Thanks.


Solution

  • Yes this is exactly what swfObject is for, head over to their docs page and read all about it. Its pretty much what everyone uses these days.

    It allows you to have html content which will be replaced by your swf, so if the swf isn't replaced, i.e. flash not installed or Javascript switched off, you see your alternative content.

    swfObject documentation