# Create 'internal clock' as alternative onEnterFrame()

**URL:** <https://forum.kirupa.com/t/create-internal-clock-as-alternative-onenterframe/203157>\
**Category:** Uncategorized\
**Created:** [October 8, 2006, 2:15pm UTC](https://forum.kirupa.com/t/create-internal-clock-as-alternative-onenterframe/203157 "2006-10-08T14:15:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superjohn](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@superjohn](https://forum.kirupa.com/u/superjohn)\
**Post date:** [October 8, 2006, 2:15pm UTC](https://forum.kirupa.com/t/create-internal-clock-as-alternative-onenterframe/203157/1 "2006-10-08T14:15:11Z")

</div>

I am designing a couple of games in flash and i came to the conclusion that i need a more flexible solution for timing instead of onEnterFrame; An interval based system which i can pause or change the speed, independent of the frame-rate of the flash file. So some processes might be running at frame-rate while others use the clock. One of the trickiest parts might be controlling animations with the clock, but this would allow to make a real slowmotion effect… Since i really have to brush up my skills, i have some problems/questions;

[LIST=1]  
[_]what technique would be most usefull for this? thinking of an interval and 'addlistener’s type of thing. Is this heavy on performance?  
[_]Not sure if the animation part would work.  
[\*]Do You guys think it could be a usefull function? is there another way?

[LEFT]  
Ps. I posted this here, because to me this is more about the technique than its application (the game).  
[/LEFT]  
[/LIST]
