An easy way would be to show a gif file as animation rather than doing it yourself.

Also is your scan dialog modal or non modal ??