You are looking for setInterval(func, time) . In case it works like ENTER_FRAME, you will make the time very small. So, if you want to simulate a frame rate of, say, 30 times per second:
Actually, setInterval also in Flash - flash.utils.setInterval .
As a side note - unfortunately, setInterval (in both Flash and JS) may work against its own refresh rate. In Flash, ENTER_FRAME avoids this - you are rendering the SWF. In the browser, well, setInterval just can't do it.
source share