<p>I understand how JS is run and I think I understand most of the DOM but I've no idea about animation. Does anybody here know of a good guide that can explain to me how it's done in Javascript?</p>

<p>In addition, should I even consider Javascript for animation? Should I instead be looking to learn flash?</p>

[{'answer_id': 10048, 'author': 'DevelopingChris', 'author_id': 1220, 'author_profile': 'https://Stackoverflow.com/users/1220', 'pm_score': 2, 'selected': False, 'text': '<p>if your animation is simple, change colors over time, move from x to y in 3 seconds. Javascript is fine. If you want all kinds of wizbang buttons and coordinated rotation of the screen, straight up js + dhtml will be clunky at best. Silverlight vs Flash are you questions at that point. Interestingly enough, you program Silverlight with javascript, and that would be the major benefit to simply upgrading to a faster and more dynamic DOM that is implemented in Silverlight but still writing the same code. Flash programmability is very limited in my experience, you can do anything, but it will be slow and take thousands of lines of code to get there. For simple JS animations look at jQuery or Scriptaculous.</p>\n'}, {'answer_id': 10053, 'author': 'ninesided', 'author_id': 1030, 'author_profile': 'https://Stackoverflow.com/users/1030', 'pm_score': 1, 'selected': False, 'text': '<p>Check out a JS animation framework like Bernard Sumption\'s <a href="http://web.archive.org/web/20101028234136/http://berniecode.com/writing/animator.html" rel="nofollow noreferrer">Animator.js</a>. It\'s pretty light-weight and has some excellent examples.</p>\n<p>Personally, I wouldn\'t be animating things in JS. Flash FTW.</p>\n'}, {'answer_id': 10054, 'author': 'mauriciopastrana', 'author_id': 547, 'author_profile': 'https://Stackoverflow.com/users/547', 'pm_score': 3, 'selected': True, 'text': '<p>Avoid flash, its a horrible requirement, uncrawlable by Google, unsopported by a bunch of browsers and systems (eg iPhone) and most importantly: it forces you to reinvent web standards (e.g. scroll bars and whatnot), Javascript on the other hand is easier to maintain and code for in the noscript case.</p>\n\n<p>try <a href="http://script.aculo.us/" rel="nofollow noreferrer">scriptaculous</a> for your animations;</p>\n\n<ul>\n<li><a href="http://woork.blogspot.com/2008/01/toggle-effect-using-scriptaculous.html" rel="nofollow noreferrer">here\'s a quickie 3-line tutorial so\nyou can see it working</a></li>\n<li><a href="http://www.tutorialspoint.com/script.aculo.us/index.htm" rel="nofollow noreferrer">here\'s a more complete tutorial</a></li>\n<li><a href="http://github.com/madrobby/scriptaculous/wikis" rel="nofollow noreferrer">here\'s the scriptaculous wiki</a></li>\n</ul>\n\n<p>note that there are a gazillion JS animation libraries, some really good <a href="http://jquery.com/" rel="nofollow noreferrer">jQuery</a> comes to mind. Usually they\'re just a script tag and an onclick event to setup.</p>\n\n<p>Good luck!</p>\n\n<p>/mp</p>\n'}, {'answer_id': 26946, 'author': 'Emmett', 'author_id': 2749, 'author_profile': 'https://Stackoverflow.com/users/2749', 'pm_score': 0, 'selected': False, 'text': '<p>If you aren\'t concerned with IE support, you could also try experimenting with the canvas element:</p>\n<p>MOZILLA DEVELOPER NETWORK <a href="https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_animations" rel="nofollow noreferrer">Basic animations</a></p>\n'}]
['https://Stackoverflow.com/questions/10038', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1384652/']