People keep telling me that the only way to learn is to ask questions...
...and that there are no "stupid questions" So here goes...
From the bits and pieces of my other posts, I have cobbled together the following code:
- (BOOL)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:[touch view]];
Sprite *sprite1 = (Sprite *)[self getChildByTag:1];
Sprite *sprite2 = (Sprite *)[self getChildByTag:2];
Sprite *sprite3 = (Sprite *)[self getChildByTag:3];
Sprite *bg = (Sprite *)[self getChildByTag:4];
CGPoint convertedPoint = [[Director sharedDirector] convertCoordinate:location];
CGRect spriteRect1 = [self makeRect:sprite1];
CGRect spriteRect2 = [self makeRect:sprite2];
CGRect spriteRect3 = [self makeRect:sprite3];
CGRect bgRect = [self makeRect:bg];
id action1 = [Liquid actionWithWaves:5 amplitude:20 grid:ccg(10, 10) duration:3];
if(CGRectContainsPoint(spriteRect1, convertedPoint)) [sprite1 runAction:action1];
else if(CGRectContainsPoint(spriteRect2, convertedPoint)) [sprite2 runAction:action1];
else if(CGRectContainsPoint(spriteRect3, convertedPoint)) [sprite3 runAction:action1];
else if(CGRectContainsPoint(bgRect, convertedPoint)) [bg runAction:action1];
else return kEventIgnored;
return kEventHandled;
}
Sprites1-3 are just little circles and bg is a PNG background image sized for the screen and being loaded RGBA8888.
I have The sprites moving in a circular motion around the center of the screen on top of the background (bg). If I omit the background, it runs at 60FPS. If include the background, it runs at 30FPS.
the touches are basically working in that *something* happens, The action is called when the touch happens.
However, It only registers touches in the upper 1/4 right of the screen for the background and and when touched, the FPS immediately drops to 20 FPS and never recovers.
If the circles are touched, they run the action correctly, BUT, again, the FPS drops to 20 and the Back ground disappears. I have experimented with each of the sprites at their own z-level and it appears that when a sprite is touched that every sprite on every layer under it disappears??
I really do appreciate the help and take all these suggestions to heart... Thanks