Browsing the archives for the FrameRater category.

Actionscript 3 FrameRater Class

actionscript 3, classes, FrameRater, utils

In my previous post you may have noticed the little frame rate meter in the top left corner.
Somebody just asked me to post this simple but very useful class.

Download FrameRater
..and extract it to: [your as3 classes dir]/com/oaxoa/components/

Usage is very simple:

// import class from the oaxoa package
import com.oaxoa.components.FrameRater;
// create a new instance
var fr:FrameRater=new FrameRater(0xffffff, true);
// position it where you want
fr.x=10; fr.y=10;
// add it to the displayList

The constructor function can receive four optionals parameters:

public function FrameRater(textColor:uint=0x000000, drawShadow:Boolean=false, showGraph:Boolean=true, graphColor:uint=0xff0000) {

Leave a comment if you like it ;)