Preloader animation?

This may seem like a really stupid question to ask, but how do you just have a simple animation as a preloader (and maybe even a nice pixel preloader…)?

Also, another easy to solve question, how do you get your preloader to disappear after the swf has loaded?