Hi, I thought this might be useful to some people-- you can hijack
document.createElement to use FlashCanvas. This makes it so you don't
have to spend a bunch of time adding if (typeof's) to larger pre-
existing canvas projects.
document.createElementOverride = document.createElement;
document.createElement = function(type) {
if (type.toLowerCase() === "canvas") {
var canvas = document.createElementOverride(type);
if (typeof FlashCanvas != "undefined") {
FlashCanvas.initElement(canvas);
}
return canvas;
} else { // other nodes
return document.createElementOverride(type);
}
};