A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Changing the FPS... HEADACHE!!

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Posts
    22

    Changing the FPS... HEADACHE!!

    OK, I need to do something VERY simple but after 2 days I could not do it!

    I have a document that only contains moving images set at 1 frame per second and I need to make an interval of that frame move at 12fps. Simply enough?

    The quicker the help the faster this headache will go away.

    Thanks

  2. #2
    Senior Member Genesis F5's Avatar
    Join Date
    Jan 2002
    Location
    Unallocated memory
    Posts
    1,845
    When you click on the stage, you should get a properties window in the bottom portion of the workspace with a variable box called "Frame Rate." Set it to 12. That won't work well if you plan on having other animations. It will really detract from the fluidity of the entire movie. You may want to consider the setInterval() function.

  3. #3
    Junior Member
    Join Date
    Jan 2007
    Posts
    22
    Thanks for the reply.

    I know about that Frame Rate in the bottom of the screen. The problem with it is that it changes the FPS for all of the slides in the document. I just have a small interval of frames that I need to have a different FPS.

    I did some searching and it seems that setInterval is the only way to do such a thing. However, I tried it and it did not work

  4. #4
    Junior Member
    Join Date
    Jan 2007
    Posts
    22
    Sorry about the double post.

    I have attached a small FLA file that shows a clip that I want to change the fps from 1 to 12 WITHOUT changing the initial document Frame Rate which is set at 1.

    Also, please attach the same fla file after changing the fps to 12.

    This means a lot to me.. thanks to the person that helps
    Attached Files Attached Files

  5. #5
    Senior Mamba austriaman's Avatar
    Join Date
    Aug 2004
    Location
    Somewhere over the rainbow
    Posts
    472
    Put this on the timeline you wish to accelerate:
    code:
    function accelerate() {
    nextFrame();
    updateAfterEvent();
    }
    var faster:Number = setInterval(accelerate, 1000);

    // 1000 = 1 frame / second
    // make that number smaller to increase your speed

    Hope this helps.
    aut.

  6. #6
    Junior Member
    Join Date
    Jan 2007
    Posts
    22
    THIS IS WONDERFUL! Thanks you saved me a bunch of trouble!

  7. #7

  8. #8
    Junior Member
    Join Date
    Jan 2007
    Posts
    22
    Ok just one more question about formula. It did work which is wonderful.

    The problem I am having is that the frames after the ones that I inserted the script to are accelerating as well, how do I make those frames not accelerate (and return to 1fps)?

  9. #9

  10. #10
    Junior Member
    Join Date
    Jan 2007
    Posts
    22
    Did I tell you I like you! Most help I have got from an online forum EVER! Thanks for making my day once again.

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