Here's something quick off the top of my head, since I have done it before:
find an animated "loading" gif online, and break it into separate image files, put them in a folder under your images folder like images/gfx
Create a set of objects, one for each image. Here, off the top of my head is about how I would do it:
function setupAnimation() as object
m.animation=[{url:"pkg:/images/gfx/frame0.png",compositionMode:"Source_Over",targetrect:{x:640,y:360,w:32,h:32}}
{url:"pkg:/images/gfx/frame1.png",compositionMode:"Source_Over",targetrect:{x:640,y:360,w:32,h:32}}
{url:"pkg:/images/gfx/frame2.png",compositionMode:"Source_Over",targetrect;{x:640,y:360,w:32,h:32}}
{url:"pkg:/images/gfx/frame3.png",compositionMode:"Source_Over",targetrect;{x:640,y:360,w:32,h:32}}
{url:"pkg:/images/gfx/frame4.png",compositionMode:"Source_Over",targetrect;{x:640,y:360,w:32,h:32}}
{url:"pkg:/images/gfx/frame5.png",compositionMode:"Source_Over",targetrect;{x:640,y:360,w:32,h:32}}]
m.animpointer=0
end function
function updateAnimation(screen as object, animation as object)
screen.setlayer(3,[animation[m.animpointer]])
m.animpointer=m.animpointer+1
end function
within whatever function is downloading and parsing data, you want to periodically call updateAnimation. You'll have to pass the screen and animation object around, or you could make them both globals, remove the parameters from the function call and then you could just call updateAnimation() from anywhere to draw the next frame.
- Joel