How do you make these gifs?

How do you make these gifs?

i use adobe photoshop cs5