I have a layer and several child layer to this main layer. I can drag each child layer separately using ccTouchMoved method. I need to drag the main layer so the other layers will follow, but how Can I drag the main layer through the ccTouchMoved? Thank you.
+1
A:
You can drag the main layer in the same way you can drag the child layers
Either, you can have a child layer accept the ccTouchMoved and then have that layer send a message to the parent. parent.position = CGPointMake(x, y)
in example
Or, you can have the child layers ignore the ccTouchMoved event until it's propagated to the main layer (which obviously has to be touch enabled for this to work)
nash
2009-11-05 13:33:58