Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2007
    Thanked 0 Times in 0 Posts

    JavaScript Buttons to Control GIF Animation?

    I have a sequence of photographs depicting an object making one complete revolution. My plan is to convert it into a .gif animation to show on my website.

    One option would be to have the object simply continue to rotate with no user interaction.

    But I was wondering: Is it possible to have JavaScript buttons that control the sequence of frames in a .gif animation left and right? In other words, you press the left-hand button to (in my case) rotate the object to the left as long as you want (past 360 degrees if you wish), and you press the right-hand button to go the other direction.

    I originally created the effect with Flash, but if possible I'd like to have a non-Flash version too, for those who don't have the Flash plugin. To get a better idea of the effect I'm looking for, you can view the Flash .swf version at:


    If it is possible to use JavaScript buttons to control a .gif animation, any help with the code and process would be greatly appreciated.


  • #2
    Senior Coder
    Join Date
    Mar 2005
    Portsmouth UK
    Thanked 512 Times in 499 Posts
    Just about any javascript Slide Show script can be modified to do this.

    The images would be in an array and would be rotated a set interval when the button is depressed. The speed of rotation would be easy controlled.

    Advantage over animated gif is the image quality would not be restricted to gif standard.

    God Loves You and will never love you less.


    If my post has been useful please donate to http://www.operationsmile.org.uk/


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts