Help with preloader

I was wondering if somone could help me with my preloader. I need after its loaded the movie and the bar is at 100% to have it scale backwards and fade away.

heres my code
stop();
myInterval = setInterval(preloader, 10);
function preloader() {
if (getBytesLoaded()>=getBytesTotal()) {
play();
clearInterval(myInterval);
}
bar_mc._xscale = (getBytesLoaded()/getBytesTotal())*100;
}

Cheers