Preloader script from tutorials

I’ve been using this simple script from the kirupa tutorials section to preload my movies:

if (_framesloaded>=_totalframes) {
gotoAndPlay (2);
} else {
gotoAndPlay (1);
}

Is this the best code to use, because all I want is to show a small animation that loops to tell the viewer that the movie is loading. I only ask, because I have embedded some video in a few files but this script only works half it should do & then tries to load the video, but then stops about five frames after until it has ‘properly’ loaded. It is quite frustrating to say the least…

Is this code actionscript 2 or 1? should it be exported with a specific Flash player? I think at the moment it’s Flash Player 7. And in actionscript 2 I have the export frame for classes set as frame 2, is this correct?

I know I’m being useless but I hope you understand and can help a guy out.

Cheers