Tuesday, 20 December 2011

Memory usage and frame rate with SWFProfiler

This is quick post about an Actionscript 3 class called SWFProfiler that adds a memory usage and frame rate monitor to the context menu your swf. To view the SWFProfiler, simply right click on the swf and select ‘Show Profiler’. You can also hide the SWFProfiler by selecting the 'Hide Profiler' context menu item.



To use this class you only need two lines of code. You can download the class here.

import com.lia.utils.SWFProfiler;
SWFProfiler.init(stage, this);

There is another performance monitor called Hi-Res! Stats that provides a simple info box with the: frames per second, milliseconds to render a frame, memory usage and maximum memory the application has reached. To use you add the following code:

import net.hires.debug.Stats;
addChild( new Stats() );

0 comments:

  COPYRIGHT © 2014 · ILIKE2FLASH · Theme by Ourblogtemplates

Back to TOP