I'm trying to detect flash support, and I'm trying to proceed like in this answer: Cross Browser Flash Detection in Javascript
My code is the following, but I always get the same error: swfobject is not defined. I shouldn't get that because I'm trying it in browsers that do support flash (chrome and firefox).
if(swfobject){
console.log("you have swfobject.");
if(swfobject.hasFlashPlayerVersion("1")){
console.log("You have flash!");
}
else{
console.log("You do not flash :(");
}
}else{
console.log("you don't have swfobject");
}
Is this a problem with newest browsers? Is there any other way to detect it?