The (x,y) coordinates in the text field are out of range of the field.
I have a text field with many lines.
While checking the (x,y) coordinates of the field, I came across an incomprehensible problem.
The (x,y) coordinates in the text field are out of range of the field.
Why this problems occurred,
Please let me know if You can solve it.
I want to make the field's base point coordinates be (0,0).
Thank you
// sm => list Array
// There are no blanks before each character in the array.
for (var i: uint = 0; i < sm.length; i++) {
var tx: String = (i < sm.length - 1) ? "\n" : " ";
musicList.appendText(sm[i] + tx);
}
DisplayObject(musicList);
musicList.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
function mouseOutHandler(e: MouseEvent): void {
var topOut: Number = e.localY;
var leftOut: Number = e.localX;
var bottomOut: Number = e.localY;
// textField.height => 373.95
// The coordinates fluctuate slightly from time to time... For example
trace("TopOut : " + topOut); // 7.999603271484375 ( Top > 0 )
trace("LeftOut : " + leftOut); // -2.3534393310546875 ( Left < 0 )
trace("BottomOut : " + bottomOut); // 382.3807067871094 (Bottom > textField.height )
}
