Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Flash: how to make objects in layers move

Aug 22, 2007 9:22AM PDT

How do you make objects in layers move?
eg. while a car is moving from left to right on the stage, its window is being rolled down.
It is kind of hard to describe.

Thanks in advance for any help.

Discussion is locked

- Collapse -
2 layers, and a beginning and an end time line for each
Aug 24, 2007 12:44AM PDT

It's been a few years since I used Flash to animate so I am very rusty.

But what you need to do is define 2 images, the first is the car on the left, (at rest) without a window, and the second is the window in the car on the left with the window wound up.

Then for layer 1 position the car on the left of the screen and set the timeline. Then move the carto the right of the screen and set the end timeline. That end time can be adjusted to give smooth motion if need be.

Then for layer 2 position the window in the car on the left and set the same beginning timeline. Finally position the window where the car ends at the end of the timeline, (or anywhere in between), and re-shape the window so it looks like it has been wound down. Set that timeline for the window.

When you run the timeline the car and the window should animate, the car moving left to right, and the window getting smaller and smaller.

At least I think that's how it works.

Mark

- Collapse -
Thank you
Aug 24, 2007 3:44AM PDT

I gues that would work. But that was just an example. I would like to learn how to make one layer with objects inside that layer moving. eg a car moving from left to right (one layer) and inside that layer there are three layers: the car body and two wheels. And the two wheel layers should be spinning. Another example: a person is walking from left to right and his jaw is constanly bobing up and down (the person and the jaw are in the same layer).

TIA for any help

- Collapse -
But that's the same.
Aug 24, 2007 7:51PM PDT

For example, wheels spinning;

The wheels would not spin round, they would rotate as they move from left to right, in their own layers. Although in their own layers the time line is the same as that for the car and the window. But rotating a circular image would not achieve much as there would be no change in the image. So you add a defect or two to the wheels, eg a visible spoke, or a scuff mark on the tire, to make the rotation visible.

Having just one layer for everything would be extremely difficult in my view and that is not how animation is done. Animation is a series of still images where minute changes are sequenced, and with Flash the great thing is you can sequence individual image changes, (layers), over the same time line.

I assume you have FlashMX and I reckon your best bet is to get a book from Amazon or somewhere similar called Flash Animation for Dummies. The "..for Dummies" series of books are a good way to get started on new projects.

There are web stes to help with starting out and a google search for ""Creating animation in Flash" is a useful place to start. I found the following 3 sites on the first page of a Google search;

http://www.dummies.com/WileyCDA/DummiesArticle/id-1320,subcat-BUILDING.html

http://www.kirupa.com/developer/mx/basic_animation.htm

http://animation.about.com/od/2danimationtutorials/ss/2d_fla_lesson1.htm

I hope that helps.

Mark