Scroll View and other touch/tap events

Hey! I did not want to make another thread so I just edited this one:

_____________________________________________________________________________________

Old question:

I made my background scrollable (vertically only) but I´d like to have certain buttons tied to a specific location on my background.

(For example, if there is a lamp on my Background, and I put a button directly on the lamp I want it to stay there even if I scroll the background to the right/left)

– I solved it with something like this:

local function scrollListener( event )

  

 if event.phase == “ended” then

   lamp.x = (scrollView:getContentPosition() + 20)

 end

_____________________________________________________________________________________

However, I have another problem now, if I do new tap or touch events they don´t work because corona always thinks I am activating the scrollView-event whenever I touch some point on the screen. I tried adding “isHitTestMasked = true” to my scrollView but this didn´t work.

Any suggestions? :smiley:

Greetings, Elias

Try reading this https://docs.coronalabs.com/api/type/ScrollViewWidget/takeFocus.html as it will help you

Try reading this https://docs.coronalabs.com/api/type/ScrollViewWidget/takeFocus.html as it will help you