Position in scroll view

Hi,

When I tap the screen in a scroll view, I get the cooridnate of the tap on the screen (between 0 and 1920).

However, I would like to get the coordinate inside the scroll view, for example 2500 if the user went down before taping.

How could I do this?

Thanks in advance for your replies

Have you looked at this API? https://docs.coronalabs.com/api/type/ScrollViewWidget/getContentPosition.html

If that doesn’t get you want you want look at:

https://docs.coronalabs.com/api/type/DisplayObject/localToContent.html

and

https://docs.coronalabs.com/api/type/DisplayObject/contentToLocal.html

Rob

I had not looked at this one but it’s perfect.

Thank you very much :slight_smile:

Have you looked at this API? https://docs.coronalabs.com/api/type/ScrollViewWidget/getContentPosition.html

If that doesn’t get you want you want look at:

https://docs.coronalabs.com/api/type/DisplayObject/localToContent.html

and

https://docs.coronalabs.com/api/type/DisplayObject/contentToLocal.html

Rob

I had not looked at this one but it’s perfect.

Thank you very much :slight_smile: