Javascript animation, starting point

I understand how JS works, and I think I understand most of the DOM, but I have no idea about the animation. Does anyone know of a good guide that can explain to me how this is done in Javascript?

Also, should I even consider Javascript for animation? Should I study flash instead?

+6
javascript animation
source share
4 answers

Avoid flash memory, its terrible demand, Google’s untrustable, unsupported by a bunch of browsers and systems (like iPhone) and, most importantly, it forces you to reinvent web standards (like scroll bars and more), Javascript on the other hand is easier to maintain and code in the case of noscript.

try scriptaculous for your animation;

Notice that there are gazillion JS animation libraries, some really good jQuery . This is usually just a script tag and an onclick event to configure.

Good luck

/ tr

+4
source share

If your animation is simple, change the colors over time, go from x to y in 3 seconds. Javascript is fine. If you want all kinds of wizbang buttons and coordinated screen rotation, straight up js + dhtml will be awkward at best. Silverlight vs Flash were questions at that time. Interestingly, you program Silverlight with javascript, and that will be the main advantage of simply upgrading to a faster and more dynamic DOM, which is implemented in Silverlight, but still writing the same code. Flash programming is very limited in my experience, you can do something, but it will be slow and take thousands of lines of code. For a simple JS animation, see jQuery or Scriptaculous.

+2
source share

Check out the JS animation framework such as Bernard Sumption Animator.js . It is quite lightweight and has great examples.

Personally, I will not animate things in JS. Flash FTW.

+1
source share

If you are not interested in IE support, you can also try experimenting with the canvas element:

MOZILLA DEVELOPER NETWORK Basic Animations

0
source share

All Articles