Monday 22 September 2008

BBC and Flash 10

Many Cbeebies flash games don’t work on with flash 10 due to bogus flash version detection for mozilla browsers.

The flash detection code is credited thus:

<!-- Flash Detect SSITool (Multi-clip pt1 of 2) v2.2 – do not copy, see http://intracat/ssi/ for usage -->

I can’t find any current references to SSITool any more, but looking into the java script it’s easy to see that this sample expression shows that the author wasn’t planning to cope with flash version numbers of more than one digit:


A better expression would be:

(ssit_NavY.split('.')[0]).split(' ').pop()

So I installed filterproxy on my ubuntu machine, and because the edit UI seems buggy I had to edit the /etc/filterproxy.conf file by hand to add this fragment:

      'Rewrite' => {
        'filters' => [          'FLASHVER: rewrite regex /ssit_NavY\.charAt\(ssit_NavY\.indexOf\(\'\.\'\)-1\)/ as (ssit_NavY.split(\'.\')[0]).split(\' \').pop()'

I also had to remove some other javascript fixups which dealt with blocking popup-windows and all kinds of stuff - I’m only trying to fix flash detection - my entire config is here

BBC should be ashamed for not having had someone run something like this on their webroots before now

find /var/www -name '*.htm*' -o -name '*.php' | while read f ; do \
  perl -i -pe "s/ssit_NavY\.charAt\(ssit_NavY\.indexOf\('\.'\)-1\)/(ssit_NavY.split('.')[0]).split(' ').pop()/g" "$f" \


  1. Have you reported this to the developers?

  2. I reported the problem via bbc site feedback but after I got fed up of waiting while they didn’t fix it, I fixed it myself.