Category Archives: Object Patent Magic

Quick Update – HistoryKeeper, SwfHTML, SwfShim

Just a quick post.

There have been a couple of fixes and changes that have gone into HistoryKeeper, SwfHTML and SwfShim that are now in the SVN trunk, as well as a few other issues that have been nailed down, and put into the issue tracker.

Among the fixes are finally a fix for the incorrect use of Javascript Errors in SwfHTML, as well as fixing the previously unfinished SwfShim.

Despite the fact that I can’t figure out how to pass flashvars from SwfShim to loaded AS3 based swfs, I’m still going to include it anyway, with a note about that caveat. It does solve some other issues, and adds an easy way to utilize ExpressInstall even if you are using html to embed the swf (rather than javascript). More on that in a future post.

I’ll also be cleaning house around the site, here and on google code. I’ve already removed some old lingering (and useless) ad stuff.

Also, since Microsoft removed the “click to activate” silliness, I went ahead and┬ádeprecated┬áPatentMagic. It was buggy anyway.

Check back for more updates, and hopefully, an actual release!

Object Patent Magic Woes

Well, it seems that Object Patent Magic is not without it’s problems. I originally intended for this to be a super tiny drop in patch that could be used on any existing site to solve the click to activate issue in IE. But while it does work on everything that I’ve deployed it with, it doesn’t work on all of everything (like the demo) in IE 6 (IE 7 seems fine). I’m not sure what is causing it, but the problem occurs when you attempt to load a large swf that hasn’t already been cached (meaning the first time someone loads your page).

Just to be sure that there wasn’t some easy solution that I could “borrow” from Karina Steffens, I tested ObjectSwap, and sadly, the problem exists there as well.

There is good news though. I don’t think this problem will turn up much, and the behavior is quite consistent, so it’s easy to test for. To test for it, clear your browser history and cache in IE 6. Then, test load up any pages that use Object Patent Magic or ObjectSwap. If the flash movies loads, you are fine. If you get the space where the movie should load, but it doesn’t load. You’ll have to use a different solution to get around the “click to activate” problem, at least for now.

On the horizon, I do have a new loader swf that I’ve been working on, which could be used to solve this problem. More on that later.

Object Patent Magic and a note about javascript defer

I’ve updated Object Patent Magic. It was broken for a while. It seems that doing the swap using a deferred script (which loads sooner than window.onload does) causes some problems with if you interrupt already loading content, then try to load it again (which is exactly what Patent Magic for swfs and some PNG transparency fixes are doing when you use a deferred script).

So that leaves us with some caveats; Using this method hides the movies until the page’s onload event fires, which includes downloading swf files (I did some testing to make sure it is not actually running the swf, and it doesn’t appear to be, as long as the object’s display style is set to “none” – if anyone could help me confirm that, that’d be awesome.). So as with the satay method, I’d recommend using a shim swf that can load itself quickly, then load the main swf file through that. This actually provides a nice opportunity for in swf flash version detection and upgrade prompting using Express Install.

Anyway, it’s updated and posted, so if anyone would like to give it a try, feel free.

The PatentMagic demo page is fully validating XHTML 1.1 as a bonus (using satay)