Animation illustrates conservation of linear momentum and Energy.
Consider the case when only one sphere is drawn aside. When released the striking sphere collides with the second sphere it and not all of them. This is because of a very small gap between the spheres. First collision is between first sphere with second sphere. First sphere stops and the second sphere acquires the same velocity as the first in accordance with the laws of conservation of linear momentum and energy(Kinetic). There are succession of collisions, and the last sphere when it is hit by the one next to it, conditions are same as when first hit second, leading to last one acquiring the same velocity as the first one.
All spheres are of equal mass.
Collisions are assumed to be perfectly elastic.
Effect of resistive forces is ignored.