4 Replies Latest reply on May 30, 2006 7:35 AM by kglad

    Random speed/duration. Need help please

    cerupcat
      I was wondering if there is a script for random animation speed. For example, I want to create a movieclip that has random speed from one tween to the next. This way, I can have multiples of the same moveiclip on the stage and they'll appear more diverse. I'm not sure how this would be done. Would the fps have to speed up or something else?

      thank you for any help.
        • 1. Re: Random speed/duration. Need help please
          neil manuell
          I am presuming that these animations are time line.

          I would suggest using a setInterval to control your animations, as you can vary the frame rate dynamically

          put a stop() action on every frame of your animations.

          then create a setInterval that loops through all your animations and sends them to the next frame at different rates.

          you could also put a variable in certain frames to indicate that you want to create a new random nextframe rate.



          • 2. Random speed/duration. Need help please
            cerupcat Level 1
            Thanks! I guess I'll try that out. I don't really know what I'm doing since I'm new to actionscripting. I know only very basic basic things. But I guess i'll try to figure out what you said.

            There's most likley only going to be one fram tweening to another one. So not a lot of different ones. So the animation is very basic and then a script that determines how fast/slow randomly the animation takes. It's not something that will be interactive.
            • 3. Random speed/duration. Need help please
              cerupcat Level 1
              I tried what I could and I think this may be too adavanced for me; especially to start from scratch. Does anyone know of a tutorial?
              • 4. Re: Random speed/duration. Need help please
                kglad Adobe Community Professional & MVP
                add the code below the dotted line to the first frame of you _level0 swf. you can then apply the movieclip method playF() to play any movieclip from frame M to frame N at fps frames per second.

                to use on movieclips mc1 to mc10 and have them play at between 1 and maxFPS frames per second: