Results 1 to 5 of 5

Thread: Stop Animation with HTML

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Location
    New York
    Posts
    679

    Stop Animation with HTML

    Does anyone no if there is an HTML code that will stop an animation after a number of rotations or actions....

    I have some animation on a business Intranet site, and it has been requested that the animation run a few times and then stop...but that it will restart once the page is refreshed...


    Any suggestions would be welcomed!

    Thank you

  2. #2
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196
    What sort of aminations?
    When you create animated gifs you can usually set the number
    of times the animtion will loop.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Location
    New York
    Posts
    679
    What about animations that you have not created?

    Is there a way to stop the animation after so many loops, or is that only with those that you personally created?

  4. #4
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196
    I'm not aware of any way of specifying the number of loops using script.
    but it should just be a matter of getting some freeware gif editor,
    opening the file changing the settings and saving it again.

  5. #5
    Hyperactive Member bsw2112's Avatar
    Join Date
    Nov 2001
    Location
    ottawa, canada
    Posts
    292
    this is what i would try doing, assuming you want a animated gif.

    you need 2 image files(the animated gif, and a static gif)

    then when you load the page you have the animated gif playing

    <img src="anim.gif" name="foo">

    then you need a setTimeOut function that will trigger a function
    that will replace the anim.gif with static.gif)

    function swi() {
    document.images['foo'].src='static.gif';
    }

    in you <head>

    a = setTimeOut("swi()",5000); //this will call the function after seconds

    my example is not tested but should give you one way of dealing with the problem

    regards

    bsw

Posting Permissions

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



Click Here to Expand Forum to Full Width