Skip to main content
Participant
Feb 21, 2010 1:59 PM UTC
Question

get Element position (x,y)

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 is closed to new replies. Start a new post to keep the conversation going.

3 replies

Adobe Employee
Feb 22, 2010 4:24 AM UTC

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.

Translate
selborgiAuthor
Participant
Feb 22, 2010 8:05 AM UTC

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

Translate
Adobe Employee
Feb 24, 2010 7:08 AM UTC

It should work for inlines as well.

- robin

Translate