Make a moving wall?

I know how to make a rotating movie clip but i doesn’t know how to make it move first one direction and then back to where it started (only using action script).