Sorry if the answer is somewhere on the forum but I haven't found it.
So...
I have a camera class with a touchEvent listener (to manage a drag functionality)
I attach a bunch of sprites to that camera (camera:addchid...). These sprites also have a touchEvent listener.
The result I want :
I can drag my camera to scroll through my sprites and I can click one of the sprites to activate him BUT...
when I click one of the sprites (hitTest verified and with the use of the stopPropagation), the camera Event also occurs.
any idea?
My meditation plan :
SinisterSoft: “ I don't create classes that much - classes are good for making things simpler but imho for frame rate they are also death by a thousand cuts.”
Totebo: “ Best quote ever.”
🤔
Comments
and if you use stopPropagation, then event should not propogate any further
As in:
If child2 was hit then event stops here and parent does not receive the event.
This is how it should work
What structure do you have?
Thanks ar2rsawseen ! Good to see u every time I need, just behind my shoulder
My code's structure looks quite near of your example (as much as I can judge with my pitiful dev skill) :-S
But, I have the answer I want :" It should work". So, I'm gonna try to clean a little bit my code and find, by myself, where is the problem !
I'll be back if I doesn't found it in few hours :O
SinisterSoft: “ I don't create classes that much - classes are good for making things simpler but imho for frame rate they are also death by a thousand cuts.”
Totebo: “ Best quote ever.”
🤔
stopPropagation in a child's event.mouse_down doesn't stop the event's propagation
to his parent's event.touch_down... ~X(
SinisterSoft: “ I don't create classes that much - classes are good for making things simpler but imho for frame rate they are also death by a thousand cuts.”
Totebo: “ Best quote ever.”
🤔