I am creating an Flex AIR app which imports data from a zip file into a sqlite db. I need to show a progress bar / "Please Wait" spinner animation so that the user waits till the operation completes. 

I have tried to put a pop-up spinner animation but the problem is that the spinner stops spinning as soon as the database import queries start executing. 

I need to run both the spinner code and the import code simultaneously rather than sequentially. 

Thanks