Wednesday, 4 November 2009

A quick fix for swfir and prototype incompatibility


Some of you might know about a small and smart library called swfir. This library intends to extend some of the limitations of classic html images. It can rotate the images and it can draw some fancy borders and fancy shadows around the borders and so on. I like the library despite the fact that it's not perfect. It's not compatible with prototype. :(

Here is a small patch that I posted to the authors and hopefully a new release will come out which will support prototype :)

Untill then you can use the patch from here:

@@ -569,7 +569,11 @@
Flash Vars
var varString = "";
- for(va
r key in this.params){ varString += ("&"+key+'='+ this.params[key]); }
+ for(var key in this.params){
+ if("function" != typeof(this.params[key])){
+ varString += ("&"+key+'='+ this.params[key]);
+ }
+ }
Rendering before:

Rendering after: