• LightStyx (unregistered)

    First...

  • See Sharp (unregistered)

    if (img.src.indexOf("First")!=-1) { img.src="Second" ...

  • Addison (unregistered)

    claps slowly

    At first I thought "well maybe they didn't want to use .gifs. Then I realized that they were using them anyway. Plus you just KNOW someone spent ll afternoon making those 4 images. And they probably had the experience to make them into a .gif. I guess when some people get an idea in their head about how to fix something nothing will stop them. Not even many many CPU cycles!

  • (cs)

    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

  • Addison (unregistered)

    Nooo, I made the infamous "didn't close quotes grammar mistake.

  • illtiz (unregistered) in reply to LightStyx
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    Is it me or does the article point that out itself?

    But kudos on being Fist.

  • (cs) in reply to illtiz
    illtiz:
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    Is it me or does the article point that out itself?

    But kudos on being Fist.

    Hang on, doesn't it say that in the article?

  • Whole Wheat Noodles (unregistered) in reply to LightStyx
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    Wow. You do realise the purpose of this site?

  • Zhango! (unregistered)

    ...but I have animated GIFs shut off in my browser, so there!

    Which reminds me, he forgot the code for what to do if JavaScript is shut off.

  • HVS (unregistered)

    Actually, there is a perfectly good reason to do this. If you have a "report running" page that has been submitted, Firefox will often stop all running animations on the page. This is not a problem in IE. By doing it with javascript, it avoids this problem.

  • kaspar (unregistered) in reply to Zhango!

    iframe, with meta refresh tag and some serverside mechanism to determine the next picture :).

  • illtiz (unregistered) in reply to Bobbo
    Bobbo:
    illtiz:
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    Is it me or does the article point that out itself?

    But kudos on being Fist.

    Hang on, doesn't it say that in the article?

    Come to think of it, the article mentions the same thing already.

  • whatever (unregistered) in reply to LightStyx
    LightStyx:
    First...
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    O....M......G......!!!!

    You submit a 'first post' which is soooo lame it's ludicrous, and then 4 minutes later post a comment that is spelled out right there in the article.

    Wow.

  • Run This (unregistered) in reply to HVS
    HVS:
    Actually, there is a perfectly good reason to do this. If you have a "report running" page
    Remind me again why we need that cute dancing cartoon? Oh yeah it is to reassure the timid little untrainable luser that his precious report is still running. Even if it isn't. Damn lying GUI designers. Hey but at least it's colorful.
  • LightStyx (unregistered) in reply to Whole Wheat Noodles
    Whole Wheat Noodles:
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    Wow. You do realise the purpose of this site?

    ... it's to be the 1st poster, right?

  • Peter (unregistered)
    animFrame = animFrame % 6 + 1;

    should be:

    animFrame = (animFrame + 1) % 6;
  • illtiz (unregistered) in reply to Peter
    Peter:
    animFrame = animFrame % 6 + 1;
    should be:
    animFrame = (animFrame + 1) % 6;

    That's the common thing to do, but the index is supposed to be [ 1 .. 6 ] not [ 0 .. 5 ] here.

  • Ironic (unregistered)

    The ajaxload.info site is broken - I get stuck with this crappy loading animation whenever I try to click something.

  • (cs)

    I see the WTF. They're passing a string to setTimeout. They should pass a function object, so it doesn't have to recompile the code every 200 ms:

    setTimeout(Animate, 200)
    Or, even better, they could call setInterval once and it will automatically reschedule the timer.

    I hate when people don't take the time to read the API documentation.

  • (cs) in reply to illtiz
    illtiz:
    Bobbo:
    illtiz:
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    Is it me or does the article point that out itself?

    But kudos on being Fist.

    Hang on, doesn't it say that in the article?

    Come to think of it, the article mentions the same thing already.

    Check out http://thedailywtf.com/Articles/Technically,-Its-Still-GIF-Animation.aspx for an easy alternative to animated GIFs

  • Jay (unregistered) in reply to illtiz
    illtiz:
    Bobbo:
    illtiz:
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    Is it me or does the article point that out itself?

    But kudos on being Fist.

    Hang on, doesn't it say that in the article?

    Come to think of it, the article mentions the same thing already.

    I think I read something in the article that says something similar to this...

    CAPTCHA: persto (damn those typos >.< )

  • Ancient_Hacker (unregistered) in reply to LightStyx

    Ah, no, the real underlying problems are much deeper than that. They're checking for the existence of one snippet of text, then building a path using part of the name, and by induction guessing the next name, then loading an image and not checking to see if it actually was there to load and it did load.

  • J D (unregistered)

    document.getElementById() ? More cycles wasted!

    function Animate() {
       var img = document.getElementById('Logo');
       var async_loop;
       var animFrame = 0;
       async_loop = function() {
          animFrame = animFrame % 6 + 1;
          img.src = 'Template/Wait0' + animFrame + '.gif';
          setTimeout(async_loop, 200);
       };
       async_loop();
    }
    

    I particularly love that it has no exit condition. Anything that's worth doing, is worth doing FOREVER!

  • M C Spanner (unregistered) in reply to HVS
    HVS:
    Actually, there is a perfectly good reason to do this. If you have a "report running" page that has been submitted, Firefox will often stop all running animations on the page. This is not a problem in IE. By doing it with javascript, it avoids this problem.

    or use the animated gif and re-set the source of the image on submit and it'll keep going

  • (cs) in reply to cdosrun
    cdosrun:
    Check out http://thedailywtf.com/Articles/Technically,-Its-Still-GIF-Animation.aspx for an easy alternative to animated GIFs

    A circular reference! :O I hope the forum's garbage collector can handle that...

  • (cs)
    Ted:
    illtiz:
    cdosrun:
    illtiz:
    Bobbo:
    illtiz:
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    Is it me or does the article point that out itself?

    But kudos on being Fist.

    Hang on, doesn't it say that in the article?

    Come to think of it, the article mentions the same thing already.

    Check out http://thedailywtf.com/Articles/Technically,-Its-Still-GIF-Animation.aspx for an easy alternative to animated GIFs

    Thanks! Also, more useful information and links can be found at http://thedailywtf.com/Comments/Technically,-Its-Still-GIF-Animation.aspx

    Thanks! I was trying to remember where it was I read about this and could only vaguely rememebr a TDWFT article...

    And there's another useful option in that article's comments, posted by LightStyx (IIRC).

  • illvm (unregistered)

    TRWTF is they are using eval in the setTimeout() function. Instead of calling setTimeout("Animate()", 200) they should be calling setTimeout(Animate, 200). Oh... and using globals... and not caching the img element... and in the first version not using switch case. Maybe the original code was to support animated PNGs in a browser that still doesn't support them.

  • (cs) in reply to PSWorx
    PSWorx:
    cdosrun:
    Check out http://thedailywtf.com/Articles/Technically,-Its-Still-GIF-Animation.aspx for an easy alternative to animated GIFs

    A circular reference! :O I hope the forum's garbage collector can handle that...

    I see a lot of garbage in the comments, so I assume it's broken anyway

  • another guy (unregistered) in reply to HVS

    Is it Firefox that stops the animations? I thought I had that problem in IE but not Firefox. It has been a while though.

  • (cs)
    illtiz:
    cdosrun:
    illtiz:
    Bobbo:
    illtiz:
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    Is it me or does the article point that out itself?

    But kudos on being Fist.

    Hang on, doesn't it say that in the article?

    Come to think of it, the article mentions the same thing already.

    Check out http://thedailywtf.com/Articles/Technically,-Its-Still-GIF-Animation.aspx for an easy alternative to animated GIFs

    Thanks! Also, more useful information and links can be found at http://thedailywtf.com/Comments/Technically,-Its-Still-GIF-Animation.aspx

    Be careful with the code in that link - the whole thing could have been replaced by an animated gif.

  • Wyrd (unregistered) in reply to Run This
    Run This:
    HVS:
    Actually, there is a perfectly good reason to do this. If you have a "report running" page
    Remind me again why we need that cute dancing cartoon? Oh yeah it is to reassure the timid little untrainable luser that his precious report is still running. Even if it isn't. Damn lying GUI designers. Hey but at least it's colorful.
    Yeah, I'm with you. If you're gonna go to all the trouble of a progress bar or a "working..." message, it oughta be at least loosely tied to the actual progress of the process. That way it's not lying. The article links to a site that will create animated gifs of false progress indicators.

    The animatied gif progress indicators... they do nothing!

    -- Furry cows moo and decompress.

  • justsomedude (unregistered)

    Cognos BI?

  • J D (unregistered) in reply to illvm
    illvm:
    Maybe the original code was to support animated PNGs in a browser that *still* doesn't support them.

    Or animated JPEGs! As a low-tech alternative to embedded video. 5 frames per second!

    illvm:
    TRWTF is they are using eval in the setTimeout() function

    I'd agree that it's a bad idea, but probably the overhead is negligible, and modern JS implementations will optimise it away for you. Not really a WTF in itself.

    I'd say TRWTF is that they're not using an array of image filenames or at least clearly defined bounds in the original version: adding a frame in the original would mean adding two lines, which probably did happen at some point. It's pretty odd that each cycle lasts exactly 6/5 of a second.

  • HVS (unregistered) in reply to M C Spanner
    M C Spanner:
    or use the animated gif and re-set the source of the image on submit and it'll keep going

    I didn't know that. I'll have to give it a try. Thanks.

  • (cs) in reply to Addison
    Addison:
    *claps slowly*
    You mean, like this? [image]
  • diaphanein (unregistered) in reply to whatever
    whatever:
    LightStyx:
    First...
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    O....M......G......!!!!

    You submit a 'first post' which is soooo lame it's ludicrous, and then 4 minutes later post a comment that is spelled out right there in the article.

    Wow.

    agreed. +1 fail.

  • (cs) in reply to LightStyx
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    Obvious troll...is obvious.

  • Anonymouse (unregistered)

    Google actually does exactly this for those little animated emoticons you get in GMail Chat. Maybe there's a reason ...?

  • SR (unregistered) in reply to Andy Goth

    Nice effet! Care to share the code?

  • (cs) in reply to Andy Goth

    Andy Goth, how did you embed the JavaScript to do that animation?

  • Fast Eddie (unregistered)

    I prefer to use animated JPEGs. The compression is better and the transition more seamless.

  • JG (unregistered)

    There seems to be more WTF's in the comments then there were in the article :S

  • lol (unregistered) in reply to whatever
    whatever:
    LightStyx:
    First...
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    O....M......G......!!!!

    You submit a 'first post' which is soooo lame it's ludicrous, and then 4 minutes later post a comment that is spelled out right there in the article.

    Wow.

    Spoiler: LightStyx is a troll the likes of which we haven't seen since TopCod3r

  • Jim (unregistered) in reply to JG

    WTF attract WTF...

  • (cs) in reply to LightStyx
    LightStyx:
    Now for the comment...

    here's an easy way around that... just create the gif animation in GIMP as one file then stick it in there. Why would one need programming to animate a gif when they themselves are already animated?

    I think he just wanted to say GIMP

  • (cs)

    Im new here, should that have been "first" for second page or something?

  • Nobody (unregistered)

    I think you guys just invented recursive sarcasm.

  • (cs) in reply to Nobody

    Wow, the inner-platform effect strikes again! As noted, they did not handle the corner case of javascript being disabled; they should have included a noscript tag with a shockwave plugin doing a runtime rendering of the same animated image just in case.

    Nobody:
    I think you guys just invented obnoxious, weapons-grade stupidity.
    Fixed that for you.
  • TopModer (unregistered)

    gonna write it in pseudo html/js :

    <div1 visible=true><img1> <div2 visible=false><img2> ...

    var i = 1 function animate(){ if (stillBuildingReport){ div[i++].hide() div[i].show() setTimeout(animate, 200) } else { div[i].hide div[1].show } }

  • (cs) in reply to pjt33
    pjt33:
    Andy Goth, how did you embed the JavaScript to do that animation?
    Apparently the forum software does it automatically if you use the [img] tag on certain source images. It's really quite miraculous. I'm not sure how it is able to tell the difference between images that it should generate animations for and images that it should leave alone. Probably it has a special algorithm to detect Heath Ledger's face, and I'm impressed that it was able to make this determination even with that Joker makeup.

Leave a comment on “Technically, It's Still GIF Animation”

Log In or post as a guest

Replying to comment #252364:

« Return to Article