@ ZodiacLeo123,
I don’t think you can set “focus” on an entire display group, however it might be possible. I never use the “obj:setFocus()” API so I can’t say if it’s possible or not.
I need to correct my last post. You *can* use “return true” with tap listeners. If you have 3 objects on top of each other, only the first one (top) will receive the tap if you put “return true” in the object’s target listener function.
So, if you want to skip the top object, and use only the object behind it, you still need to tell Corona that the top object can’t be tapped (setting a boolean flag on each object is the cleanest method). Then, only “return true” IF an object has received a signal. That will prevent the tap from going through to the 3rd layer down.
Here’s a bare-bones example. “.active” in this case is the boolean flag applied to each object. It is only “true” for the object that you allowed to be tapped; otherwise false.
local function selectObject( event )
local obj = event.target
if ( obj.active == true ) then
object.active = false
elseif ( obj.active == false ) then
obj.active = true
return true
end
end
Hope this helps get you on the right track.
Without knowing your exact design and how you want to build the specific tap capabilities, this example is only a basic idea.
Brent
[import]uid: 9747 topic_id: 24928 reply_id: 101467[/import]