# gotoAndPlay("framelabel") certain amount of times

**URL:** https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808
**Category:** flash
**Created:** [July 16, 2003, 6:46pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808 "2003-07-16T18:46:46Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![jillymo](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jillymo](https://forum.kirupa.com/u/jillymo)
#### Post date: [July 16, 2003, 6:46pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/1 "2003-07-16T18:46:46Z")

</div>

I am working on an animated character. It is fairly simple, when it gets to the last frame of the animation I would like it to go back to the ninth frame of the animation, which I have labeled as “nine” and play through that maybe 3 or 4 times.  
What code would I add in to do this?

right now-  
\<hr\>  
gotoAndPlay(“nine”)  
\<hr\>

thanks for any help  
:cowboy:

---

<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: [July 16, 2003, 6:54pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/2 "2003-07-16T18:54:01Z")

</div>

you could set up some sort of variable and do an if else statement, like for each time it played it would add to that variable and not play after it reached that limit.

---

<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: [July 16, 2003, 6:58pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/3 "2003-07-16T18:58:19Z")

</div>

Well that sounds great, but I don’t know how to do that.

=)

---

<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: [July 16, 2003, 7:00pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/4 "2003-07-16T19:00:07Z")

</div>

Post the file real quick.

---

<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: [July 16, 2003, 7:01pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/5 "2003-07-16T19:01:44Z")

</div>

There is probably an extremly simple way to do this, so anyone else with an idea is free to put mine to shame. But…

I would stick with your goto and play “nine”, and on that frame i would put some actions. I would also add an empty mc with maybe 3 or 4 (or however many you want) keyframes with a stop on them and name the instance. The actions on “nine” would tell the mc to advance a frame. On the last frame inside the mc you can tell the main timeline to go to whatever frame is your ending one.

OK, i just read that back, and it made very little sense… if you cant work it out and no one else has a better idea, ill make u a quick example. Good luck.

---

<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: [July 16, 2003, 7:02pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/6 "2003-07-16T19:02:17Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=28692](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=28692) :sigh:

---

<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: [July 16, 2003, 7:02pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/7 "2003-07-16T19:02:21Z")

</div>

oops, random hero beat me. Yeah, ignore me, listen to him.

---

<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: [July 16, 2003, 7:03pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/8 "2003-07-16T19:03:29Z")

</div>

too big…

---

<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: [July 16, 2003, 7:09pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/9 "2003-07-16T19:09:17Z")

</div>

okay Kax, (and everyone else thankyou)  
you are referring me to the thread that is referred to in the thread that I am linking to right?  
_L_  
I just glanced through it quick and am going to try it. This is a stand alone mc, for now anyway, he (the character mc) might be his own swf or his own mc- there may not be another mc to refer to once it is finished playing.  
That may not matter though, like I said I am going to go look more carefully.  
thanks again  
:s:

---

<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: [July 16, 2003, 7:11pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/10 "2003-07-16T19:11:53Z")

</div>

If you can’t get it to work, repost on this thread and I’ll take the time to build an example.

---

<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: [July 16, 2003, 7:13pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/11 "2003-07-16T19:13:16Z")

</div>

😛

I posted a link to that thread because it’s still on the first page of the forums!! Which means you didn’t bother to search first. :-\

Anyway, you’re welcome. =)

---

<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: [July 16, 2003, 7:18pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/12 "2003-07-16T19:18:48Z")

</div>

:run:  
I did search first…I did a search on loop, looping and could not find the info I wanted. I always search first…  
Anyway, after that I was not sure what else to search for so I posted the thread

---

<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: [July 16, 2003, 7:20pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/13 "2003-07-16T19:20:08Z")

</div>

_Whips Actionscript Troll_

WA-KSSSH! WA-KSSSH!

Blah! Master says work, so work I shall…

---

<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: [July 16, 2003, 7:23pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/14 "2003-07-16T19:23:09Z")

</div>

:thumb:  
it worked Kax…thanks everyone…  
R.H. don’t whip the as troll too hard…_L_

---

<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: [July 16, 2003, 7:24pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/15 "2003-07-16T19:24:24Z")

</div>

man, and I got the troll up for nothing. oh well. For that, you’re puttin’ him back.

---

<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: [July 16, 2003, 7:33pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/16 "2003-07-16T19:33:30Z")

</div>

just for giggles, I finished it anyway.

---

<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: [July 16, 2003, 7:59pm UTC](https://forum.kirupa.com/t/gotoandplay-framelabel-certain-amount-of-times/25808/17 "2003-07-16T19:59:51Z")

</div>

ahhh cool.  
you did it just a little different than the other example I used so now I know 2 ways to do it…

😏

:crazy:
