# How do I loop through 20 frames three times?

**URL:** <https://forum.kirupa.com/t/how-do-i-loop-through-20-frames-three-times/223707>\
**Category:** Uncategorized\
**Created:** [April 25, 2007, 4:05am UTC](https://forum.kirupa.com/t/how-do-i-loop-through-20-frames-three-times/223707 "2007-04-25T04:05:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![will\_s](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@will\_s](https://forum.kirupa.com/u/will_s)\
**Post date:** [April 25, 2007, 4:05am UTC](https://forum.kirupa.com/t/how-do-i-loop-through-20-frames-three-times/223707/1 "2007-04-25T04:05:21Z")

</div>

As the title says, all I want to do is play a 20-frame sequence and then loop back through it twice more and then stop.

All the samples I see on the 'net seem too complicated.

I came up with this code, but it doesn’t work. Am I close?

/\*  
i=0;  
if (++i \< 2) {  
gotoAndPlay (“loopBulge”);  
}  
else {  
gotoAndStop (“atLoopStop”);  
}  
\*/
