Download the most recent version from the scripts page.
Instead of adding a lot of markup to a page, or using animated gif (big files), this script allows use of jpg files for individual animated images. The image is placed in the html normally, and linked to the other images by a script call. It only preloads one image at a time. The advantage is that pages load faster than scripts that preload all images. The disadvantage is that if it's a slow connection, the images may load slower than the animation, so the animation will be forced to slow down.
name and id attributes with the same value, for compatibility):<img src="gifs/icon01.jpg" alt="fast animation example" name="roll1" id="roll1" height="65" width="65">
<script type="text/javascript" src="animR2.js"></script>
</body> tag (must be after the previously attached script) to start the animation for all images. (alternately, you can add a call to the setupAnim() function from an onload = setupAnim(...))setupAnim(). Add the time, image name, and list of animation images to setupAnim() for each animated image.<script type="text/javascript"><!--
// Pass this information for each animation:
// setupAnim(seconds between images,name of image,Array(list of images))
// (the image written into the page is _not_ included in the list of images)
setupAnim(0.5,'roll1',Array('gifs/icon02.jpg','gifs/icon03.jpg','gifs/icon04.jpg','gifs/icon05.jpg','gifs/icon06.jpg'))
// -->
</script>![]()
![]()
copyright © 2006 eightize
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.