checking actual framerate

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default checking actual framerate

    Hi,


    I made a site which uses horizontal scrolling navigation (check:
    [url]http://www.esthervenrooy.com[/url]) Not surprisingly, the scrolling is far from
    smooth on older machines. I would like to be able to test the actual
    framerate of the movie on the client machine, so when I detect a very slow
    fps I can just make the navigation skip to the next section without
    scrolling...

    Anybody have function/idea for that?


    ..soma


    somaBoy MX Guest

  2. Similar Questions and Discussions

    1. Application frameRate???
      Can anybody explain to me what for is frameRate property. It seems that nothing changes when I change framerate of my flex application to 120. Does...
    2. chromelib framerate display dissapears when I switchcamera
      Does anyone know why it would do this? Cheers Michael UK
    3. Chrome Lib - framerate display help needed
      Please forgive my impatience, I have only been using the ChromeLib for 20 minutes. Just thought it quicker to ask the forum lol. I added the...
    4. Use maximum framerate?
      Hello, I was wondering if there is any reason *not* to use the maximum framerate (120 fps) in game development. (bugs, unexpected errors etc.) ...
    5. Altering speed of playhead (framerate?)
      Hi guys, Could anyone please tell me how i alter the speed at which my projectors playback. Am i right in thinking that the default is 30? I...
  3. #2

    Default Re:checking actual framerate

    AFAIK there is no way to get the framerate of an swf. I saw some experiment to calculate an estimate of fps or to estimate the capacilities of client's machines, but ... I don't remember where sorry.



    CesareRocchi webforumsuser@macromedia.com Guest

  4. #3

    Default Re: checking actual framerate

    Perhaps you can use the getTimer()-function to find out how long an interval
    of a few frames takes?

    ....but I dont know!
    -André-




    André Heßler Guest

  5. #4

    Default Re: checking actual framerate

    When you say older machines I assume you mean machines with less RAM. If that is true it might help you to remember that flash is an embedded object and html can call upon several programs (including itself) to check system info before you load any swf object.


    eonyron webforumsuser@macromedia.com Guest

  6. #5

    Default Re: checking actual framerate

    I'm pretty sure there is an extension in the Exchange that will do this.
    look up zShowFPS in the Exchange

    - Hayes


    Chris Hayes Guest

  7. #6

    Default Re: checking actual framerate

    Here's one I made earlier. Of course, if you don't need to actuall *display*
    the frame rate, you can get rid of all the textField stuff and just use the
    variable values.

    //--------------------------------------------------------------------------
    -----------
    // Creates timer a rough frames per second counter...
    //--------------------------------------------------------------------------
    -----------
    //create clip
    _root.createEmptyMovieClip("counter", 2);
    //set textformat
    counterText = new TextFormat();
    counterText.font = "courier";
    counterText.size = 12;
    counterText.bold = true;
    counterText.color = 0xFF0000;
    //create text field
    counter.createTextField("label", 1, 10, 10, 0, 0);
    counter.label.autoSize = "left";
    counter.label.text = "fps: ";
    counter.label.setTextFormat(counterText);
    counter.createTextField("fps", 2, counter.label._width, 10, 0, 0);
    counter.fps.autoSize = "left";
    counter.fps.type = "dynamic";
    counter.fps.variable = "_root.counter.fpsDisp";
    counter.fps.setNewTextFormat(counterText);
    counter.startTime = getTimer();
    //posotion
    counter._y -= counter.label._height*2;
    //enterframe handler
    counter.onEnterFrame = function() {
    this.allTime = getTimer()-this.startTime;
    this.fpsDisp = Math.round(1000/this.allTime);
    this.startTime = getTimer();
    };

    //--------------------------------------------------------------------------
    -----------
    // END TIMER
    //--------------------------------------------------------------------------
    -----------




    hth
    }`¬P

    --
    ---------------------------------------
    [url]http://www.phageinteractive.com[/url]
    PhageInteractive Ltd.
    remove mm_ to mail
    ---------------------------------------
    'I wish we lived in a world where it was possible to be religious and think
    at the same time.' - Jonh Graves


    Peter Blumenthal Guest

  8. #7

    Default Re: checking actual framerate

    Thanks for your help, all of you...

    I did the following:

    Made a movieClip with some complex alpha tweened animation which plays
    offstage.

    I check with getTimer() how long it takes for the movie to complete. If the
    value returned is more than double the time it should take at the movie's
    author-time framerate, I disable the animated navigation.

    Seems to do the job.


    ..soma


    somaBoy MX Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139