How to remove setFocus from Input field?

I basically have a input field inside a movie clip. I want a function so that whenever someone clicks outside the input field, the blinking cursor gets automatically removed.

I tried the following code, but it doesn’t seem to work.

Selection.setFocus(null);

Please help me with this issue!