startTijd = 0; framerate = 0; function onEnterFrame(){ timer(); } function timer(){ stopTijd = getTimer(); verschil = stopTijd - startTijd; framerate = Math.round(1000 / verschil); startTijd = stopTijd; }