Dynamic text

I have a dynamic text field that gets the mouse location to sisplay on screen

but it comes back undefined

onClipEvent (enterFrame){
xval=_root.xmouse;
yval=_root.ymouse;
}

this is the code that am using

does any one know wha tis wrong or a better way of doing it??