Continual looping

Hey in the past with Flash 8 I simply did “_root.onEnterFrame = functionName” to loop through code continually. I’ve been trying but cannot replicate this effect in Flash 9. Can anyone help?