Focus in browser

is there a class or general method used to know if the browser has focus of the swf or not?