Stop Adobe Flash from Crashing in Firefox

For some time now Adobe Flash has been causing Firefox to freeze for a few seconds and then comes up with a message that Flash has crashed. I don’t know why I lived with it for so long but here’s how to fix it and stop it from happening.