Selection.getBeginIndex Issues

The problem is that when I select my input textField, then select some of my text I typed, then use a function to save the Selecition.getBeginIndex result as a variable, when I trace that variable, it always comes up as -1… Anyone got some tips on how to fix this problem?

I guess it may have something to do with it being a textField or textArea? Whats the difference between a textField and a textArea?