# How do I make a movie loop once

**URL:** https://forum.kirupa.com/t/how-do-i-make-a-movie-loop-once/262209
**Category:** Uncategorized
**Created:** [June 4, 2008, 5:47am UTC](https://forum.kirupa.com/t/how-do-i-make-a-movie-loop-once/262209 "2008-06-04T05:47:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![juskin](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@juskin](https://forum.kirupa.com/u/juskin)
#### Post date: [June 4, 2008, 5:47am UTC](https://forum.kirupa.com/t/how-do-i-make-a-movie-loop-once/262209/1 "2008-06-04T05:47:50Z")

</div>

so im trying to get a loop to play the first frame  
until i is greater than 2.

so on the first frame Im increasing the value by 1

i++;

then on the last frame Im putting a if then statement  
that if i is less than 2 replay, else goto and stop at  
the next frame

var i = 1

if (i \< 2 ){  
gotoAndPlay(1);  
}else{  
gotoAndStop(361);  
}

now I kinda know whats happening when the second code excecutes its resetting  
var to 1, so my question is, how do I say once this movie has played once, stop the second time?

---

<div class="post-metadata">

### Author: ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)
#### Post date: [June 4, 2008, 7:32am UTC](https://forum.kirupa.com/t/how-do-i-make-a-movie-loop-once/262209/2 "2008-06-04T07:32:04Z")

</div>

Do you want it to play twice or once?  
else just make removeMovieClip(this) on the last frame of the MC.
