Apress

Foundation Actionscript 3.0 Animation

Making Things Move!

By Keith Peters

Foundation Actionscript 3.0 Animation Cover Image

If you are still relying on key frames and tweens for the bulk of your Flash animation, you are missing out on some very exciting stuff! This book will show you how to get ActionScript 3.0 doing your animation for you.

Full Description

  • ISBN13: 978-1-59059-791-0
  • 568 Pages
  • User Level: Beginner to Advanced
  • Publication Date: April 8, 2007
  • Available eBook Formats: PDF
  • Print Book Price: $39.99
  • eBook Price: $27.99
Buy eBook Buy Print Book Add to Wishlist

Related Titles

Full Description

Flash has long been one of the most approachable, user-friendly tools for creating web-based animations, games, and applications. This has contributed to making it one of the most widely used programs for creating interactive web content. With each new version of Flash, ActionScript, its built-in scripting language, has become more powerful and a little more complex, too. ActionScript, now at version 3.0, has significantly matured as a programming language, bringing power and speed only previously dreamed about to Flash-based animation, going far beyond traditionally used keyframes and tweens.

The material inside this book covers everything you need to know to harness the power of ActionScript 3.0. First, all the basics of script-based animation and setting up an ActionScript 3.0 project are covered. An introduction to object-oriented programming follows, with the new syntax, events, and rendering techniques of ActionScript 3.0 explained, giving you the confidence to use the language, whether starting from scratch or moving up from ActionScript 2.0.

The book goes on to provide information on all the relevant trigonometry you will need, before moving on to physics concepts such as acceleration, velocity, easing, springs, collision detection, conservation of momentum, 3D, and forward and inverse kinematics. In no time at all, you'll both understand the concepts of scripted animation and have the ability to create all manner of exciting animations and games.

What you’ll learn

  • All the ActionScript 3.0 (including math and trigonometry functions) and Flash rendering techniques you'll need to start animating with code
  • Basic motion principles such as velocity, acceleration, friction, easing, and bouncing
  • How to handle user interaction via the keyboard and mouse
  • Advanced motion techniques such as springs, coordinate rotation, conservation of momentum, and forward and inverse kinematics
  • All the basic 3D concepts you need to do 3D in Flash, from simple perspective to full 3D solids complete with backface culling and dynamic lighting

Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.

Errata

If you think that you've found an error in this book, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.

* Required Fields

On page 69:
linear vertical motion will not run. All I get is a blank screen with no sprite on the screen. I am using Actionscript 3.0 on a mac with the CS5 version.

Please advise.

On page 74-75:
On the circle and elliptical examples: Math.cos should be used for X and Math.sin should be used for Y. But they are printed opposite. This differs from the tutorial and from the summary examples on page 80.

On page 111 and 112:
Incorrect number of arguments. Expected no more than zero.

This error is against the middle line of the following code:

var myBitmapData:BitmapData=new BitmapData(100,100,false,0xff0000);
var myBitmap:Bitmap=new Bitmap(myBitmapData);
addChild(myBitmap);

This same error is against the similar code on page 112:
canvas=new BitmapData(stage.stageWidth,stage.stage.Height,true,0x000000);
var bmp:Bitmap=new Bitmap(canvas);
addChild(bmp);


On page 145:
Under "Add velocity to position:" movieclip._x += vx;
is from the previous edition (AS2).

It should be: sprite.x += vx;