Forum Topic: How To Display Fps In Actionscript?

(65 views • 1 reply)

This topic is 1 page long.

<< < > >>
None

Mufanza

Reply To Post Reply & Quote

Posted at: 11/8/09 04:34 PM

Mufanza LIGHT LEVEL 07

Sign-Up: 08/22/09

Posts: 22

Hi
I am looking for a way to display frames per second in ActionScript 2.0, I googled a lot, but I found only some weird scripts that shows 32 fps, even when my game is lagging like hell and I am not mentioning that it has only 30 fps set as default TT
So, anyone knows any decent way to display fps?
Thanks


None

Headshot777

Reply To Post Reply & Quote

Posted at: 11/8/09 04:44 PM

Headshot777 FAB LEVEL 21

Sign-Up: 05/04/08

Posts: 3,186

Make a dynamic textfield named fps_txt and put this in the frame.

var fpstime = getTimer();
onEnterFrame = function(){
var currtime = getTimer();
fps_txt.text = Math.floor(1000/(currtime-fpstime)) + " fps";
fpstime = currtime;
}

12

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 04:02 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!