# Replaying a Single Frame

**URL:** <https://forum.kirupa.com/t/replaying-a-single-frame/204563>\
**Category:** flash\
**Created:** [October 20, 2006, 8:59pm UTC](https://forum.kirupa.com/t/replaying-a-single-frame/204563 "2006-10-20T20:59:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickcherryjiggz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nickcherryjiggz/32/2107_2.png) [@nickcherryjiggz](https://forum.kirupa.com/u/nickcherryjiggz)\
**Post date:** [October 20, 2006, 8:59pm UTC](https://forum.kirupa.com/t/replaying-a-single-frame/204563/1 "2006-10-20T20:59:47Z")

</div>

This question seems very elementary, and I’m surprised that after using Flash for a few years, I’ve never come across an ideal solution. I’ve come up with several satisfactory ways to work around the issue, but never a direct solution. Anyway…the question - How can I replay a single frame until some condition is met? For example (I realize this is not practical and could be handled with a for loop, but just for the sake of simplicity):

Frame 20  
if (c == 1000){  
trace(“i’m done”);  
stop();  
}  
else{  
c++;  
gotoAndPlay(20); // \<-- I realize this doesn’t work, but it’s the idea I want  
}

How can I accomplish this without adding an extra movie clip or using 2 frames? Thanks.
