define('DISALLOW_FILE_EDIT', true); Object Patent Magic and a note about javascript defer – unFocus Projects – Kevin Newman and Ken Newman

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)

Author: Kevin Newman

I'm the lead developer at adcSTUDIO located in Kingston NY (in Livingston Manor NY before that). I do all kinds of things there, from robust server side work to the much more enjoyable client side development in HTML/JavaScript/Flash (RIAs, HTML5, etc.) and all the other tech-buzz-phrases of the moment. My brother came up with the idea for unFocus.com which was originally meant be a place to discuss and blog about whatever topics we both found interesting, from politics to technology, to art and design. Time was scarce, and I need a place to host History Keeper, and unFocus Projects - a sub focus of unfocus.com was born, and eventually migrated to the font page. Oh, and I'm on Twitter (@Touvan) and Google+.

Leave a Reply

Your email address will not be published. Required fields are marked *