views:

44

answers:

1

Hello everyone,

I'm trying to play a "cut scene" with cocos2d. I use:

[[CCDirector sharedDirector] replaceScene:[CCCrossFadeTransition transitionWithDuration:0.2 scene:[s node]]];

to play the new scene.

However, i want to return to the previous screen when i'm done playing this cut scene.

Can anyone help me?

+1  A: 

You can use pushScene: to switch to the new scene (instead of replaceScene:) and popScene to return to the previous one (so this works like a stack).

This will keep the old scene in memory, see also cocos2d Best Practices.

Felix Kling
Worked like charm... thank you so much.!
roloenusa
@roloenusa: If it helped you, you should accept the answer by clicking on the green tick beside it.
Felix Kling