dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Speeding Up Animation

  1. #1
    Senior Member
    Join Date
    Mar 2002
    Posts
    300

    Speeding Up Animation

    I am currently working on the following example:

    http://www.flashkit.com/movies/3D/Symbols/3D_Walki-dlmeida-303/index.php

    Currently I have sped up the animation by changing the FPS from 18 to 30. My question is, using this example is there a way to speed up the animation without having to change the FPS? I would like to set the FPS to 12 and have the animation speed up using this framerate. If anyone could provide any further insight it would be much appreciated.

    Cheers

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Posts
    368
    well, if it's a frame based animation (different content in each frame, or use of onEnterFrame, then the fps controls the speed.

    the alternative is to code your animation in functions and then call the functions using setInterval. you can change the interval to control the speed.

  3. #3
    Senior Member vevmesteren's Avatar
    Join Date
    Sep 2001
    Location
    Montréal, Québec
    Posts
    566
    it is your mind that decides - it is with your mind that you fly


    vevmedia

  4. #4
    Senior Member
    Join Date
    Mar 2002
    Posts
    300
    The animation is frame based, and is actually of a man walking. I just wanted to speed up the animation without having to set such a high FPS. Not quite sure what you mean by coding it into functions????? Can this still be done using a frame based animation????

  5. #5
    Senior Member
    Join Date
    Mar 2002
    Posts
    300
    Originally posted by vevmesteren
    check out the component over at www.flashcomponents.net

    http://www.flashcomponents.net/compo...fm?nav=2&id=79
    How does it work??
    Last edited by thunderlips; 10-21-2002 at 01:15 PM.

  6. #6
    Senior Member
    Join Date
    Mar 2002
    Posts
    300
    Trying to use the component I cannot get it to work it still plays the movie at 12 fps. Can anyone please help.

  7. #7
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    Well, there is one way. Make your animation at 12 FPS. Then use loadMovie. If you load it into a movie that plays at 18, it will play at 18. If you want a 12 FPS movie to speed up and keep it at 12 FPS, your going to have to remove some frames. Like every other one.
    Last edited by iaskwhy; 10-22-2002 at 11:12 AM.

  8. #8
    Senior Member
    Join Date
    Mar 2002
    Posts
    300
    Originally posted by iaskwhy
    Well, there is one way. Make your animation at 12 FPS. Then use loadMovie. If you load it into a movie that plays at 18, it will play at 18. If you want a 12 FPS movie to speed up and keep it at 12 FPS, your going to have to remove some frames. Like every other one.
    Thanks for the idea, I will give it a shot. Your help is much appreciated.

  9. #9
    Senior Member
    Join Date
    Jan 2002
    Posts
    368
    Originally posted by iaskwhy
    Well, there is one way. Make your animation at 12 FPS. Then use loadMovie. If you load it into a movie that plays at 18, it will play at 18. If you want a 12 FPS movie to speed up and keep it at 12 FPS, your going to have to remove some frames. Like every other one.
    i don't believe that's true. the level0 movie determines the frame rate.

  10. #10
    Senior Member
    Join Date
    Jan 2002
    Posts
    368
    there is a trick to do it the other way around. make your movie at whatever frame rate you want.

    then make some other blank movies at different frame rates. say 12, 20, 30. the only action in this movie is to load your other movie into level1. if the 12fps movie loads your movie, it will play at 12fps. if the 30fps loads it, it will play at 30.

  11. #11
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    I just re-read this thread. Duhhh, I didn't snap to the fact that you are working with a frame by frame animation. Duhhhh.....

    >>The animation is frame based, and is actually of a man walking. I just wanted to speed up the animation without having to set such a high FPS.<<

    Anyway, your in luck. You can control the speed with actionscript like this. Open the man walking animation to edit in place. If you don't already have it, add a labels layer and an actions layer. On the actions layer, add a stop(); to the first frame. Add a keyframe and then a stop(); to the last frame. On the labels layer, add a last frame label called Lastpic.

    Go back to the main timeline and click the man walking animation on stage. In the actions panel, add:

    onClipEvent (load) {
    this.gotoAndPlay (_currentframe + 2);
    manWalk.Lastpic.gotoAndStop();
    }

    This will start the animation on load and play it one time, at twice the frame rate of the main movie. By setting the main movie frame rate and changing the number in the second line of code, you should get what you want.

  12. #12
    Senior Member
    Join Date
    Mar 2002
    Posts
    300
    Originally posted by iaskwhy
    I just re-read this thread. Duhhh, I didn't snap to the fact that you are working with a frame by frame animation. Duhhhh.....

    >>The animation is frame based, and is actually of a man walking. I just wanted to speed up the animation without having to set such a high FPS.<<

    Anyway, your in luck. You can control the speed with actionscript like this. Open the man walking animation to edit in place. If you don't already have it, add a labels layer and an actions layer. On the actions layer, add a stop(); to the first frame. Add a keyframe and then a stop(); to the last frame. On the labels layer, add a last frame label called Lastpic.

    Go back to the main timeline and click the man walking animation on stage. In the actions panel, add:

    onClipEvent (load) {
    this.gotoAndPlay (_currentframe + 2);
    manWalk.Lastpic.gotoAndStop();
    }

    This will start the animation on load and play it one time, at twice the frame rate of the main movie. By setting the main movie frame rate and changing the number in the second line of code, you should get what you want.

    Thanks man, that is a great idea, I haven't given it a shot yet but I will do so shortly. You have been much help, and it has been much appreciated. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center