• Keep in touch:
  • Linked In
  • Twitter
  • RSS

How do I make something move?

The basic technique for animating an object is surprising primitive. To make an object move you simply (have to) change its position frame by frame:

movie.add(new Place2.show(identifier, layer, x, y));

while (move) {
    x += delta;
    y += delta;
    movie.add(Place2.move(layer, x, y));

Once an object is placed on the display list you can refer to it using only the number of the layer on which it is displayed.

The more advanced techniques such as tweening or interpolation available in the Flash authoring tool are abstractions and not part of the Flash files that are generated.