Skip to content Skip to sidebar Skip to footer

Canvas Animation To Work In IE

Is it possible to have this canvas animation working in IE6~8 ? Animation here: http://jsfiddle.net/calebo/4qMMy/ I have tried using these 2 plugins but it still won't work. http:

Solution 1:

The only way to get canvas to work in older versions of IE is to use some kind of hack.

Canvas was only implemented into IE9, so previous versions don't know anything about it.

There are a number of javascript hacks available which translate Canvas into a VML object for compatibility with IE6-8.

One example is here: http://code.google.com/p/explorercanvas/

Similar hacks exist for SVG, which can also be converted to VML for older IEs. eg http://code.google.com/p/svg2vml/

Please note, however, that no matter how clever these hacks are, you are likely to have some fairly fundamental speed issues with older versions of IE if you're doing anything clever with canvas. These hacks are written in Javascript and need to run in real-time on what is basically the slowest Javascript interpreter around. If you do any kind of complex graphics, the results will not be pretty.

To be honest, I've given up trying to get Canvas to work in older IEs.

The best success I've had with cross-browser dynamic graphics is using the Raphael library. This produces SVG in most browsers, and VML in older IEs, and seems to work well -- and more importantly, reasonably quickly, even in older IEs.

It isn't canvas, but it is cross-browser dynamic graphics, and at the end of the day the end user doesn't really care what you use to draw the graphics, as long as it looks good.


Solution 2:

Explorer Canvas has always worked great for me. Did you make sure that you downloaded the latest JS file:

http://code.google.com/p/explorercanvas/downloads/list

and also included this tag at the top of your document:

<head>
<!--[if lt IE 9]><script src="excanvas.js"></script><![endif]-->
</head>

Post a Comment for "Canvas Animation To Work In IE"