Help with loops

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:

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

Ok I switched computers and I don’t think that code will work :frowning: 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.

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

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

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

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

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…

Sorry!

here goes…

Rewko

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

*8

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.

Ok well I did learn setInterval :slight_smile: Give me a few minutes

Here

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!

It shouldnt change it much. Its more keyframes that changes the file size. :slight_smile: glad to help

Thanks again…

And a good first post me thinks!!!

*8