change your document setting to use AS2 if you insist on using actionscript on the timeline.
on the first frame of the loop set a counter variable and at the end of loop add 1 to the counter var and do an if statement to check the counters value and if it's the number of times you want then goto the next looping set of frames and so on
if you need to use AS3 then look on the net for some tutorials on setting up a document class. there's a good one over at
http://www.gotoandlearn.com
then in AS3 you'd set up a listener to check the current frame and do your repeating