This is just a quick post to let you know about another essential AS3 class you should download right now. It’s called SWFProfiler and it adds this slick memory usage and framerate monitor to your SWF:
Shane McCartney has built this clever component and released it for free. It is completely self-contained in it’s own class file. So, using it only requires 2 lines of code:
import com.lia.utils.SWFProfiler; SWFProfiler.init(stage, this);
I should also mention that it is automatically added to the context menu of your SWF, so you just right-click to show it or hide it.
To see the SWFProfiler in action, go to Shane’s blog.
You can download the most recent version of the SWFProfiler class from google code. Shane has a few other goodies there as well.
Gaian Helmers
Thank you very much for the link, very very useful utility.
Carl
To get the graph to run from right to left make the following changes in the update function of the ProfilerContent class
in the two for loops change
vec.moveTo(0, -value * height);
to:
vec.moveTo(width, -value * height);
and
vec.lineTo(i * inc, -value * height);
to:
vec.lineTo(width-(i * inc), -value * height);
Boris
Good stuff! Thank you!