Fundamentally there seems to be nothing wrong with your code.
The code to repeat your movie is best placed on the first frame.
Open your movie file in Flash.
Select the first frame on the timeline.
Open the actionscript view.
Write your code.
Run the movie to test it and see what happens.
It's always difficult to know why programming doesn't work. There are so many possible reasons and there could well be aspects of your movie, depending on any other code or actions used, that is causing the trip up.
One possible workaround that I caught one of my staff using once is to add extra empty movie frames at the end of the movie and then set it to loop. In effect, you lengthen your movie and just 'freeze' the last moving frame and when the movie reaches the end of these dummy padding frames it loops and repeats as normal. Obviously this is not a desirable method of running your movie. Unless it is very short and will not be unduly affected by adding in a long pause at the end...
See how you get along, but the code seems sound and should go on the first frmae of the movie, not the last.