By Doug Schepers

Many SVG-based WebApps use SMIL animation and interaction. As a partner and developer at Vectoreal, I often used it judiciously to enhance the user experience. So when I began optimizing my WebApps to make certain they worked well in Firefox's upcoming native SVG, I was disappointed to find that SMIL would not be supported in Firefox 1.5 (the first public release with native SVG support, due out in December 2005).

I salute the Mozilla SVG team, and intend to help improve the SVG implementation over the next year, but I also recognize that existing content that relies on SMIL needs support now. So I took it upon myself to implement SMIL in script, to help out with my own user interfaces. I soon realized that a scripted SMIL implementation would also be useful to others in the same boat. So I decided to make this into a community resource.

SmilScript is a library intended for use by authors or publishers of SVG documents. SVG uses an extended subset of SMIL to achieve declarative (element-based, non-scripted) user interaction and animation events. This library is not intended to be used outside the context of SVG and its limited subset of SMIL, so it probabaly isn't appropriate for other SMIL content. It also will not work for Firefox builds that do not include the native SVG viewer (version 1.5 or later).

This library can be used by anyone who needs it. The only limitations on its use are that it cannot be sold (though it can be used in commercial applications), and that the authorship and copyright notices must be distributed along with the library. Obviously, I can't guarantee that this implementation will work for your purposes, but I am trying to make sure that it is as complete as possible, and that it does not cause any problems. This is a work in progress, but I think that it is currently complete enough to justify its early release. If you find serious bugs, or have questions or suggestions, please email

I realize, too, that there is a certain delicious irony in using script to implement declarative animation. Nonetheless, though I am a great advocate of non-scripted solutions, and I think that by providing this stop-gap measure, SMIL will be afforded a more widespread adoption. I am also working on a Firefox Extension, so authors won't have to include the script file in their content.


This library has been tested in ASV3, Firefox 1.5b2, and Batik. There are several notable issues:

Supported Features

Unsupported Features

Test Suite

At the top of the page is a combination test-suite and use example. The examples should be self-explanatory, but if you encounter problems, please let me know.

If you do not see the image at the top, you do not have an SVG viewer. If you are using Firefox, download the newest version. Opera has its own native SVG implementation, including SMIL support. For Internet Explorer users, I currently recommend the SVG Web viewer, which also has its own SMIL implementation.



This software was authored by Doug Schepers. I consulted with Jonathan Watt and Jeff Rafter for help and critiques, as well as my partners at Vectoreal.


SmilScript is Copyright Doug Schepers, 2006. All rights reserved.

This software is licensed under the Artistic License (as described at the Open Source Initiative site).