MovieClip Prototype (Textfeld Komponentenversion):
PHP-Code:
MovieClip.prototype.fpsmeter = function ()
{
    
this.zaehler 0;
    
this.onEnterFrame = function ()
    {
        
this.zaehler++;
    };
    
anzeigen = function ()
    {
        
this.display_txt.text this.zaehler;
        
this.zaehler 0;
    };
    
setInterval (this"anzeigen"1000);
};
ASSetPropFlags (MovieClip.prototype"fpsmeter"1);
this.fpsmeter (); 
Komponentendownload:
http://www.flashstar.de/tutlist/index.php3?id=1042

MovieClip Prototype (Trace Version):
PHP-Code:
MovieClip.prototype.fpsmeter = function ()
{
    
this.zaehler 0;
    
this.onEnterFrame = function ()
    {
        
this.zaehler++;
    };
    
anzeigen = function ()
    {
        
trace(this.zaehler);        
        
this.zaehler 0;
    };
    
setInterval (this"anzeigen"1000);
};
ASSetPropFlags (MovieClip.prototype"fpsmeter"1);
this.fpsmeter (); 
Die Alte Version nochmal schnell durchgereicht:
PHP-Code:
Object.prototype.getFps = function ()
{
    if (
signal == true)
    {
        
time getTimer ();
    }
    else
    {
        
tempo Math.ceil (1000 / (getTimer () - time));
    }
    
signal = !signal;
    return 
tempo;
};

this.onEnterFrame = function ()
{
    
trace (getFps ());
}; 
Be inspired

Liebe Grüsse
Matze K.