If you have the source file of the flash (with the file extension .fla) and Adobe Flash Professional (not Adobe Flash Player), you export the .fla as gif in Adobe Flash Professional;
If you just have the swf file, you can use a swf to gif converter like this one...