PNG for still images, better quality. I had heard they were trying to make a format similar to PNG, but with animation. I believe it's called APNG. Ah, yep, looks like they went through with it(
link). SWF is a flash file, so it would be good for an animation with sound. GIF would be a small animation, and if it were up to me, people would stop using JPEG all together.