Fri, Nov 29, 4:33 AM CST

Renderosity Forums / Animation



Welcome to the Animation Forum

Forum Moderators: Wolfenshire Forum Coordinators: Anim8dtoon

Animation F.A.Q (Last Updated: 2024 Nov 13 3:03 pm)

In here we will dicuss everything that moves.

Characters, motion graphics, props, particles... everything that moves!
Enjoy , create and share :)
Remember to check the FAQ for useful information and resources.

Animation learning and resources:

 

[Animations]

 



Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Basic Flash loop problem


ADM ( ) posted Tue, 09 July 2002 at 5:48 AM · edited Fri, 29 November 2024 at 2:07 AM

I bet this is something real basic but I can't seem to find out why this won't work. A 40 frame amination with this action on frame 30 for(i=4;i>0;i--){ gotoAndPlay(1); } I basicly want it to repeat frames 1 to 30 a few times then run on to 40, I have tried putting goto actions after this set but it still doesn't do what I think it should... HELP Please!


kobaltkween ( ) posted Wed, 17 July 2002 at 3:09 PM

I believe that the problem is you're trying to handle all the counting at once. You only want to initialize i once, then count. If you put all that in one frame, each time the frame is played, i is initialized again. What you need is a frame that never gets played again to initialize i (say frame one, i=4;), frames of your animation (say frames 2-30) with a decrement on the first frame of the loop (frame 2, i--;) , and then a frame testing to see where to go to (say frame 31, if (i>0) { gotoAndPlay(2); } else {gotoAndPlay (32);}). I haven't tested this, so I'm not sure if that exact code should work, but I think that this would be the best waqy to handle it. If you're still having the problem that is. The one of the major things to remember in Flash is that all the code in a frame is executed at once.



saxon ( ) posted Fri, 19 July 2002 at 3:33 AM

I'm always really impressed by people who really understand action scripting, I'd have copied the frames and done it all on the timeline. I confess, I'm a low techie...


ADM ( ) posted Mon, 22 July 2002 at 9:23 AM

Cheers guys, sorry I didn't reply sooner, I was waiting for the "alert me" email... which never came. cobaltdream I will try that, and let you know how I got on. Saxon, that's what I used to do, but it starts to bloat the file size.


ADM ( ) posted Tue, 23 July 2002 at 5:58 AM

Yay it works! I knew it would be a basic wrong assumption I had made, now to learn more... thanks again


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.