Thanks for your reply David.
I use a menu scene with multiple layers. In the one layer I execute this code:
// Load animation
// loads the sprite frames from a Zwoptex generated file
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"menuAnimation.plist"];
NSMutableArray *animFrames = [NSMutableArray array];
for(int i = 0; i < 21; i++) {
CCSpriteFrame *frame = [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:[NSString stringWithFormat:@"Faster_Menu%i.png",i]];
[animFrames addObject:frame];
}
CCAnimation *animation = [CCAnimation animationWithName:@"dance" delay:0.07f frames:animFrames];
CCSprite *logo = [CCSprite spriteWithSpriteFrameName:@"Faster_Menu0.png"];
id action = [CCAnimate actionWithAnimation: animation];
id delay = [CCDelayTime actionWithDuration:3.5f];
id repeating = [CCRepeatForever actionWithAction:[CCSequence actions:delay,action,nil]];
logo.position = ccp(160,242);
[self addChild:logo z:2];
[logo runAction:repeating];
When I now switch to a different layer like this for example:
[(CCMultiplexLayer *)parent_ switchTo:1];
And then switch back to Layer 0 (where the animation should be playing), the animation is stopped.
Do you need more info?
Thanks!