Skip to main content
Inspiring
May 2, 2010
Question

get posittion - help!

  • May 2, 2010
  • 1 reply
  • 468 views

Hi,

I have a canvas contaienr that holds a sprite which I use as container for a TextFlow. How can I get the position in the text flow whne I move the mouse over the textflow?

If couse I can listen to mouse move and get the mouse X and Y values, but I need to convert those into a textflow positions.

(I'm using EditManager)

Thanks.

This topic has been closed for replies.

1 reply

oscar7878Author
Inspiring
May 2, 2010

I tried this:

trace('* columnWidth '+ editManager.textFlow.columnWidth);
trace('* digitWidth '+ editManager.textFlow.digitWidth);

but outputs this:

* columnWidth inherit
* digitWidth undefined

Adobe Employee
May 3, 2010

Hi,

You'll still want to use the static method SelectionManager.computeSelectionIndex as you saw in the other thread.

This method is in the tlf_internal namespace.  You'll need these two lines of code.

   import flashx.textLayout.tlf_internal;

   use namespace tlf_internal;

Hope that helps,

Richard