
Script to display currently framerate of flash movie for flash-developer.
AS2 version featured:
AS3 version include a featured:
Display memory usage and its graph.
Example:
This is 3D enginge of flash 8 which is AS2 version. This will generate 30 pieces of object with blur effect to test a performance.
See the graph while you toggle the blur effect, you’d see the different.
flash
AS2 version usage:
import com.lifeztream.debug.FPS; //FPS.start (movieFPS:Number [,alignment:String="left"]); FPS.start (31,"left");
alignment “left” or “right”, “left” is default.
AS3 version usage:
import com.lifeztream.debug.FPS;
//var fps:FPS = new FPS([iAlign:String = "left"]);
var fps:FPS = new FPS("left");
addChild(fps);
* version 1.3 - Auto-start when added to stage and auto-stop when it’s removed
* - Fix Bug from StageAlignments
* Minor Improve Coding Speed
* version 1.2 - Dispose unused bitmapData and variables for garbage collector to free up ram.
FPSMonitor Class AS2 (521)
FPSMonitor Class AS3 (1212) version 1.3




November 30th, 2007 at 3:53 am
AS2 class it’s not working properly when compiled using MTASC. The “graphic” doesn’t chance. But still a great class. If you correct this bug, let me know.
Regards.
Nicholas
February 6th, 2008 at 9:15 pm
tried using AS3, Error:
1172: Definition com.lifeztream.utils:BitmapContainer could not be found.
February 11th, 2008 at 7:00 pm
import com.lifeztream.utils:BitmapContainer;
Just delete this line.
December 9th, 2008 at 12:35 pm
Thanks for this, works great in CS4 (once you delete the Bitmap util import)
January 29th, 2009 at 12:55 pm
hi, this is awesome class!!
I tried to integrate FPSmonitor, however, there seemed not to have “com.lifeztream.utils.BitmapContainer.as” in zip file.
Could you please attach that class or where can I find it on your website?
thanks in advance.
April 7th, 2009 at 6:32 pm
Thank you for a such great utility.
For the AS3 library, I think the expression
currentMemory*0.00001
should be
currentMemory*0.000001
Thank you again
May 1st, 2009 at 4:16 pm
Hi wissar,
Thank you very much for the script, it works really well and it’s amazingly helpful
March 3rd, 2010 at 7:30 pm
Hello, got some issues …
C:\Data\Dev\Flash\(…)\src\com\lifeztream\debug\FPS.as(133): col: 9 Warning: variable ‘mcEnterFrame’ has no type declaration.
And this is the same with the following functions (bOver,bOut, …)
I have just copied the lib into my src folder (with the “com” folder) and created a new class in the Main. I’m currently using flashdevelop and I thing your code will only work in the flash IDE ? (need of the Stage maybe)
If it speaks to you I need some enlightenment :).
This feature seems very neat and I want to use it !
Thx