Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // MovieClip Prototype (Textfield Componentversion):
- MovieClip.prototype.fpsmeter = function ()
- {
- this.count = 0;
- this.onEnterFrame = function ()
- {
- this.count++;
- };
- show = function ()
- {
- this.display_txt.text = this.count;
- this.count = 0;
- };
- setInterval (this, "show", 1000);
- };
- ASSetPropFlags (MovieClip.prototype, "fpsmeter", 1);
- // MovieClip Prototype (Trace Version):
- MovieClip.prototype.fpsmeter = function ()
- {
- this.count = 0;
- this.onEnterFrame = function ()
- {
- this.count++;
- };
- show = function ()
- {
- trace(this.count);
- this.count = 0;
- };
- setInterval (this, "show", 1000);
- };
- ASSetPropFlags (MovieClip.prototype, "fpsmeter", 1);
- //use
- this.fpsmeter();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement