Dynamic vs. Static Animation

Another advantage to using coded animation goes far beyond simple file size . Its the fact that a coded animation becomes dynamic. Have you ever watched the movie Titanic ? I hope Im not giving away too much, but the boat sinksevery time. It sank in the theaters, it sinks on VHS, and it even sinks on DVD. Short of pressing the stop or pause button, you cant stop it from sinking. Thats because a movie is a series of still images. The images near the end of this particular series show the boat sinking, and thats that.

Now lets move from the Titanic movie to a Flash website. Remember the late 1990s, when Flash was originally taking off? Everyone had to have a Flash website intro. Some shapes would slide in and grow or fade out. A cheap audio loop would play. Some trendy buzzwords would fade or slide in or out. Maybe a beam of light or some shadows would appear. Wow!

OK, I wont be too harsh . At least two or three I remember really were wow materialreal works of art. The intros for the Gabocorp and Ray of Light sites, shown in Figures 1-2 and 1-3, were legendary. But when I think back on it, I recall actually sitting through them only a couple of times. They were a minute or two long, and I watched them two or three times. Was that because they werent good? No, it was because after you saw them a couple of times, there wasnt much more to see. Just like the Titanic movie, the website intros did the same thing each time. I call that static animation (my own personal oxymoron!), because the animation never changes. Each frame, from start to finish, is predefined.

image from book
Figure 1-2: The legendary gabocorp.com intro
image from book
Figure 1-3: Intro for rayoflight.com

Now, a coded animation isnt necessarily dynamic. I could take an object and, using code, put it in a certain position and have it move across the screen. Each time you play the movie, the same code runs and causes the same movement. Thats hardly dynamic.

But what if I take an object, and again using code, determine a random point to place it and a random direction and speed to move it? Now each time you play the movie, something different will happen.

Or what if, when the movie starts, I find out the time of day and month of the year, and use that data to create a scenesay a winter morning, a summer afternoon, or an evening in April?

Or how about if I have some factors in my movie that can be changed while the movie is running, via the keyboard and mouse? That would allow the user to interact with the objects on the screen. Thats about as far from static as you can get. You could even save the Titanic!

Perhaps the most interesting aspect of dynamic animation, and what this book is mainly about, is the application of real-world mathematics and physics principles to the objects in the movie. You dont merely have some object move off in some random direction; you also give it some gravity, so that as it moves, it starts to fall down. When it hits the ground, it bounces , but not as high as it started out. Then it eventually settles down and just sits there. Now you add some user interaction to that, allowing the user to pick it up with the mouse or move it around with the keyboard. As the user throws the object around, she starts getting the feeling that she is really handing a physical object.

With this type of animation, the user is no longer just sitting there watching some frames play out. She has entered into the environment you have created. How long is she going to stay there? She will remain as long as the environment keeps her interested. The more she can interact with the environment, the longer she will be interested. Make it interesting enough, and she will stay there a lot longer than she would sit through your intro (and sadly, probably longer than she would sit in front of the Mona Lisa ). I have many e-mail messages from people telling me they spent their entire morning or afternoon playing with the experiments on www.bit-101.com. And not only will people stay longer, but they will also come back for more.



Foundation ActionScript. Animation. Making Things Move
Foundation Actionscript 3.0 Animation: Making Things Move!
ISBN: 1590597915
EAN: 2147483647
Year: 2005
Pages: 137
Authors: Keith Peters

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net