Can flash detect when cursor is out of the flash environment?

I have a swf embedded in the center of an html document. Can flash detect when the cursor is outside the boundries of the swf (in the html area)?

I have a function running in the swf using onClipEvent(enterFrame) and if the cursor leaves the swf two quickly, the function keeps running, even though the cursor is not over the swf.

Thanks.