Create a new file of width: 960px and height: 600px, background color as white.
Create a new layer and draw a solid circle (frame 1), then duplicate it to next layer and move the circle right by 40 pixels. Repeat till you have 6 frames (frame 1 to frame 6). These frames are our subjects.
Create a new file of width: 6px and height: 600px, create new layer and delete the background layer, as we need the layer to be transparent. Then create a fixed rectangle of width 5px and height: 600px. Refer to this site to get an idea of how to set the size and position for the rectangle.
Save the single bar and create new layer in the main project. Here name it as bars, and add the saved single bar image, and copy paste till you fill the whole width of 960px. (Frame name: bars)
Select the transparent area of the bars, refer to this site to understand how. Then invert the selection, by clicking Ctrl+I
.
Now we delete all the subject frames except frame 1. (How: You can click on the layer you want to delete and press Delete
)
Unselect the selection by clicking Shift+Ctrl+A
. Now move the bars frame by one pixel to the right. (How: Select the move
tool and click on the bars, and then click on right arrow once)
Repeat steps 5 through 7, and every time don't delete one of the subject frames. We first do not delete frame 1, next it will be frame2. Repeat the process till you have reached to stage of not deleting frame 6, after which we are done.
The magic is ready, we unselect everything and move the bars pixel by pixel towards right or left and see the animation!!