Preloader for External Text?

I have some pages that load text from external files, but it can take a while occasionally. I don’t so much need a percentage preloader, but I would quite like an animation, (for example an hourglass), that let’s the user know the text is loading.

Question is how would I program it so that the animation plays only until the text has appeared? The text isn’t on the timeline, nor does it have it’s own one, so I’m not really sure where or how to start?