Dave’s site live, and being over flash

September 11, 2006

I’ve finally squashed all of the bugs on Dave Thomas’ web site. I’m a dill – the majority of the difficulties stemmed from the interaction between the flash movie on the front page and the javascript controlling rollovers etc.

It seemed I had a few options – fs:command , GetURL or the new ExternalInterface API. The first two had cross-browser compatibility problems, so I concentrated on the newest solution. Of course, this meant that the actionscript/javascript communication only worked if the user was running a recent (8+ from memory) version of flash. Worse still, Safari on mac OS10.3 completely crashed…

Using SWFObject to only show the flash movie on recent players got around this. Users with old players just see an imagemap with js rollovers. Then I discovered that more recent macs (Safari 2+ on 10.4) didn’t play the rollover animations correctly. It seemed that the browser was calling the onmouseover and onmouseout events simulaneously. Arrgh! Fixed it with some js broswer detection – something I try to avoid doing unless my back is against a wall.

If I was doing it again, I would not bother doing the front page animation in flash at all, I would instead use a javascript effects library like YUI or moofx. But I thought doing it in flash would be quicker. Anyway, chalk it up to experience. As I said to Dave today, the launch beer is gonna taste fantastic!


If you’re embedding flash in a web site, use this script

August 18, 2006

Man, if I had found SWFObject a couple of weeks ago, it would’ve saved a lot of pain.

This script generates cross-browser, version checking flash embedding tags on your website. It gets around the nasty “click to activate this control” thing that comes with IE. Apparently this has something to do with a patent dispute, of all things!

It’s really simple to add the code to your page. And if a visitor fails the plugin/version check, it can display alternate content. You can see my implementation of the code on David Thomas’ Graphic Design site
I just thought I’d post about this here, so maybe someone will stumble upon it, or it will boost the site’s google ranking, or something.