terbooter
01.12.2007, 10:25
Такой вот интересный факт. Два обратных к друг другу метода, по-разному думают откуда отсчитывать нулевой чар.
В доках этот вопрос не описывается
dt.border = true;
dt.text="firstline*asdadasd\n asfasf fasfdKJLKJLKJ z xfasvasm,df";
dt.scrollV=2;
var index:int = dt.getCharIndexAtPoint(3,3);
trace("index at point(3,3) " +index)
var rect:Rectangle = new Rectangle();
rect = dt.getCharBoundaries(index);
trace("x= "+rect.x+" y= "+rect.y);
trace("check index "+ dt.getCharIndexAtPoint(rect.x,rect.y))
В доках этот вопрос не описывается
dt.border = true;
dt.text="firstline*asdadasd\n asfasf fasfdKJLKJLKJ z xfasvasm,df";
dt.scrollV=2;
var index:int = dt.getCharIndexAtPoint(3,3);
trace("index at point(3,3) " +index)
var rect:Rectangle = new Rectangle();
rect = dt.getCharBoundaries(index);
trace("x= "+rect.x+" y= "+rect.y);
trace("check index "+ dt.getCharIndexAtPoint(rect.x,rect.y))