Hello and welcome to our community! Is this your first visit?
Register
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
    Posts
    22
    Thanks
    6
    Thanked 0 Times in 0 Posts

    JavaScript Buttons to Control GIF Animation?

    Hi,
    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:

    http://bmbweb.home.comcast.net/rotating_image.html

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

    Thanks!
    Bill

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,504
    Thanks
    3
    Thanked 501 Times in 488 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.
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    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
    •