DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Display FPS In Flash Movie

05.13.2007
| 15566 views |
  • submit to reddit
        
_root.createEmptyMovieClip("movFrameRate",100); 

_root.movFrameRate.onEnterFrame = function() { 
this.t = getTimer(); 
this.frameRate = Math.round(1000 / (this.t - this.o)); 
//trace(this.frameRate); 
this.o = this.t; 
}