Looping a SWF limited times

I need to loop my SWF 3 times and have it freeze on the last frame of the movie. I assume a conditional “if” “else” action is needed but cannot get it too work. Any help???

Thanks,
sixfish

Try this:

firstFrame of your FLA

counter=1

lastFrame of you FLA

if (counter==3) {
stop();
} else {
counter++;
gotoAndPlay(2);
}

i added this code to the last frame only:

counter = counter+1;
if (counter<3) {
_root.mcalbums.gotoAndPlay(1);
} else {
_root.mcalbums.gotoAndStop(“final”);
}

“mcalbums” was my movie clip. I couldn’t believe how simple it was. I was looking at books, trying “do while” and “for” statements, complicating things.

Usually the simplist solution is the right answer!

Thanks again.