Would you be using the WebViewer to display the puzzle?
Animated gif files are supported there but not on the Canvas.
Also there is likely javascript code out there to do what you want or something similar that could be modified.
Would you be willing to use javascript to build the puzzle?
If you wish to use the Canvas, you will have to do more work to simulate gif animation.
---
sf