# Help with loops

**URL:** <https://forum.kirupa.com/t/help-with-loops/28606>\
**Category:** flash\
**Created:** [August 15, 2003, 4:56pm UTC](https://forum.kirupa.com/t/help-with-loops/28606 "2003-08-15T16:56:40Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![8bit\_boy](https://avatars.discourse-cdn.com/v4/letter/8/e68b1a/32.png) [@8bit\_boy](https://forum.kirupa.com/u/8bit_boy)\
**Post date:** [August 15, 2003, 4:56pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/1 "2003-08-15T16:56:40Z")

</div>

Hey everyone, i’m a Kirupa virgin so please handle gently!

I have a question and to be honest my Flash Actionscript skills are minimal, but my brain tells me that there must be away to do what i wanna do…please read on!

I have made a small animation in Max 5.1. I have restricted this to 10 frames as Swift 3d swf files are somewhat large.

I have imported my Swift swf into MX.

The big question is, can I set up something like a For/Next loop(basic, yup!) to slow down the rate of the frames in Flash.

i.e. Play frame 1 of Movie ‘x’…add somekind of loop to delay time before moving to frame 2 of Movie ‘x’…

This is my way of a workaround to keep file sizes small.

Maybe someone here knows another way of doing this

Maybe i’m going about this the hard way, which for me wouldn’t be a first!..

Thank you in advance.

\*8:azn:

---

<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:** [August 15, 2003, 5:01pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/2 "2003-08-15T17:01:35Z")

</div>

You can use setInterval to do that  
[AS]  
Function moveFrames(){  
gotoAndStop(\_currentframe+1);  
}  
setInterval (moveFrames, 5000);  
[/AS]

I think this will work (emphasis on think). Don’t have flash to test it now.

Either that or just slow the movie down to 1 fps

---

<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:** [August 15, 2003, 5:13pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/3 "2003-08-15T17:13:31Z")

</div>

Ok I switched computers and I don’t think that code will work ☹ sorry about that. I know you can use setInterval to do it, I just don’t know how. Search the forums there are tons of questions like this.

---

<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:** [August 15, 2003, 5:19pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/4 "2003-08-15T17:19:21Z")

</div>

Hey grandsp5

Thanks for your swift reply mate.

There has to be someway to do this i’m sure and your right, i will do some more researching into this…

Somebody mentioned the ‘While’ statement…God knows what this does but someone here might!

Argggggghhhhhhhhhh!!!

\*8

---

<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:** [August 15, 2003, 5:24pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/5 "2003-08-15T17:24:16Z")

</div>

can you post your fla or email it to me and I will see what I can do.

---

<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:** [August 15, 2003, 5:36pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/6 "2003-08-15T17:36:33Z")

</div>

Hey,

File attached…This is just a test fla of a 3d box in 10 frames.

It’s 1.5kb which is great…

Just need to slow down the frame rate independant to the main Timeline

thanks

\*8

---

<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:** [August 15, 2003, 5:39pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/7 "2003-08-15T17:39:02Z")

</div>

Can you post the fla? I need that not the swf

---

<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:** [August 15, 2003, 5:48pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/8 "2003-08-15T17:48:18Z")

</div>

Execuse me, Have you tried to change frame rate this way :  
Modify\>\>Document (ctrl+j) and there change frame rate from usual 12 to anything…

---

<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:** [August 15, 2003, 5:49pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/9 "2003-08-15T17:49:17Z")

</div>

Sorry!

here goes…

---

<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:** [August 15, 2003, 5:53pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/10 "2003-08-15T17:53:46Z")

</div>

Rewko

er, yeah, but that changes the Frame rate of the whole movie not the individual Movie Clips within…

\*8

---

<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:** [August 15, 2003, 5:55pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/11 "2003-08-15T17:55:06Z")

</div>

Well unless I learn setInterval in the next 5 minutes (which is possible but unlikely because I am disassembling an optical platform right now), I would say just spread out the frames inside your movie clip. Try asking one of the mods who knows setInterval.

---

<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:** [August 15, 2003, 6:14pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/12 "2003-08-15T18:14:01Z")

</div>

Ok well I did learn setInterval 🙂 Give me a few minutes

---

<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:** [August 15, 2003, 6:16pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/13 "2003-08-15T18:16:47Z")

</div>

Here

---

<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:** [August 15, 2003, 6:23pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/14 "2003-08-15T18:23:18Z")

</div>

Well what can i say…  
Knew it was possible…

You da man!

Thanks matey

\*8

PS:I did try the stretching out the frames and that works as well, although how this reflects on the overall file size i don’t know!

---

<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:** [August 15, 2003, 6:26pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/15 "2003-08-15T18:26:20Z")

</div>

It shouldnt change it much. Its more keyframes that changes the file size. 🙂 glad to 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:** [August 15, 2003, 6:28pm UTC](https://forum.kirupa.com/t/help-with-loops/28606/16 "2003-08-15T18:28:00Z")

</div>

Thanks again…

And a good first post me thinks!!!

\*8
