Skip to main content
Participant
February 21, 2010
Question

get Element position (x,y)

  • February 21, 2010
  • 1 reply
  • 679 views

Is there a way to get the Element position? so i can introduce drag and drop of image or text string...?

This would also help to position tooltips or popups acurately.

Please advise.

This topic has been closed for replies.

1 reply

Adobe Employee
February 22, 2010

There is not, but there is a way to get the bounds of a text range. See flashx.textLayout.utils.GeometryUtil.getHighlightBounds(). It's not documented, mainly because we think we may have to change the interface in the future, but you can use it. It returns a list of bounding boxes, one per line, of whatever range of text you pass in.

selborgiAuthor
Participant
February 22, 2010

I did see your other post about this class however an I right in saying this doesn't take into consideration the. Inline graphic element.... Will this work for getting any position of where the mouse is place over the text area.

Thanks again for the quick reply

Adobe Employee
February 24, 2010

It should work for inlines as well.

- robin