# \<==== AS Loop

**URL:** <https://forum.kirupa.com/t/as-loop/8019>\
**Category:** flash\
**Created:** [November 12, 2002, 4:50pm UTC](https://forum.kirupa.com/t/as-loop/8019 "2002-11-12T16:50:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MP5SD](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@MP5SD](https://forum.kirupa.com/u/MP5SD)\
**Post date:** [November 12, 2002, 4:50pm UTC](https://forum.kirupa.com/t/as-loop/8019/1 "2002-11-12T16:50:55Z")

</div>

Ok i need a small problem solved  
Basicly i need to know how to get a actionscript to loop over and over agian in a singal fram that the movie is stoped at

Can any help?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 12, 2002, 6:25pm UTC](https://forum.kirupa.com/t/as-loop/8019/2 "2002-11-12T18:25:05Z")

</div>

Hmmm… on that frame you could have code that says  
gotoandplay(sameframe);

that way it would never loop out of it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 12, 2002, 6:43pm UTC](https://forum.kirupa.com/t/as-loop/8019/3 "2002-11-12T18:43:12Z")

</div>

if you put the following code on the frame AFTER the one you want the timeline to stop it will remain on the frame you stopped and still loop.  
this.gotoAndPlay(this.\_currentframe-1);  
if there are no other ‘goto’ actions in that frame then you will only see the frame before the code. code is executed before the frame is drawn, so you won’t see what is drawn in the frame with the code above.  
🙂  
jeremy

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 12, 2002, 7:29pm UTC](https://forum.kirupa.com/t/as-loop/8019/4 "2002-11-12T19:29:23Z")

</div>

You’re absolutely right, Sinfiniti. Didnt think that one all the way before posting. Ironically, I always test code before puttin on here, even on the simplest things…except this time, of course.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 12, 2002, 10:18pm UTC](https://forum.kirupa.com/t/as-loop/8019/5 "2002-11-12T22:18:47Z")

</div>

Thanks Guys  
I used the code and it work NP  
But i was hoping for a AS that i could use in the fram along with the actions i wanted to loop but this works fine

TY
