Plugin To Detect Flash in SiteCatalyst

I was reading a post earlier today on the Omniture Industry Insights site about Flash version detection. In the post, Technical Writer extraordinaire Ben Gaines explains a few methods on how to ‘detecting the version of Adobe Flash Player that visitors have installed in their browsers’. He states there are many methods readily available by doing a simple search, and there are. If you don’t have the skills or patience to hunt around for a way to grab the flash version, let me serve on right up on a silver platter for you. Behold, the Flash Detection plugin.

In your s_code file, add the following call to populate the sprop or evar of your choice


Then down in the plugin’s section, add the following code

 * Plugin: Flash Detection 0.6 - Detect Flash version number
s.detectFlash=new Function("cn","mfv","vr",""
+"var s=this,fv=-1,dwi=0,r,w,mt=s.n.mimeTypes,fk=s.c_r(cn),k=s.c_w('s"
+"l['Shockwave Flash 2.0'])fv=2;['Shockwave Flash'];if(x){fv=0;"
+"z=x.description;if(z)fv=z.substring(16,z.indexOf('.'));}}else if(mt"
+"sie&&w&&execScript){result=false;for(var i=mfv;i>=3&&result!=true;i"
+"--){execScript('on error resume next: result = IsObject(CreateObjec"
+"v==-1?'flash not detected':fv==0?'flash enabled (no version)':'flas"
+"h '+fv;s.c_w(cn,r,0);return 'true';}else return '';");
s.getFlash=new Function("cn",""
+"var s=this;if(cn&&s.c_r(cn))return s.c_r(cn);");
s.returnFlash=new Function("cn","vr","to",""
+"setTimeout(\"var cn,vr,to,s_dfv=s_gi(s_account);s_dfv.linkTrackVars"
+"=vr,s_dfv.vr=s.getFlash();,'o','Flash Version Detectio"

If you have the SiteCatalyst debugger, go ahead and fire it up right now and you will see that I have this plugin enabled here populating s.prop9.


Leave a Reply