Cursor - hide out of the flash window

I´ve created a custom cursor, but I wulod like to hide the cursor movie clip when the mouse goes out of the flash window.

the temporaries solutions that I´ve created is “timer” that hide the movieclip when the mouse don´t move or click or a hit area that hide the movieclip and shows the mouse when the cursor gets close to the end of the window.

But they are not a good solution.

Can someone help me with this?