how do i compress a spring in animation?

how do i compress a spring in animation?

SolidworksAssemblies