How to use onEnterFrame

i have been use onEnterFrame in AS@ like
onEnterFrame = function(){
trace(mouseX+" "+mouseY)
}

and how i change into AS3

it’s always showing up the error
1120: Access of undefined property enterFrame.