How to use the replaceScene() ?

Hi everyone:
i got a problem here .
when i use
void Stage_1_1::menuGameStart(CCObject* pSender) { CCScene* pScene = HelloWorld::scene(); if(pScene != NULL){ CCDirector::sharedDirector()->pushScene(pScene); } }
and click the button , the app crushed .
i need help . ty !

sharedDirector()->runWithScene(pScene)

This is the first thing you do. This will make your first scene the root scene and start the director.

Jacob Anderson wrote:

sharedDirector()->runWithScene(pScene)
>
This is the first thing you do. This will make your first scene the root scene and start the director.

Thank u .
but what to do then ?

what to do? WHAT TO DO? :slight_smile: The user takes over and drives the interaction in your scene, that’s what.

When you want to do a new scene, you use pushScene(myScene), but remember to use popScene() when the soft back key is pressed, or when the user uses the ‘back’ button in your game.

Once you do the runWithScene() your game is off and running. Just program the buttons and gestures to let the user explore your game!

Jacob Anderson wrote:

what to do? WHAT TO DO? :slight_smile: The user takes over and drives the interaction in your scene, that’s what.
>
When you want to do a new scene, you use pushScene(myScene), but remember to use popScene() when the soft back key is pressed, or when the user uses the ‘back’ button in your game.
>
Once you do the runWithScene() your game is off and running. Just program the buttons and gestures to let the user explore your game!

Thank u so much!

Jacob Anderson wrote:

what to do? WHAT TO DO? :slight_smile: The user takes over and drives the interaction in your scene, that’s what.
>
When you want to do a new scene, you use pushScene(myScene), but remember to use popScene() when the soft back key is pressed, or when the user uses the ‘back’ button in your game.
>
Once you do the runWithScene() your game is off and running. Just program the buttons and gestures to let the user explore your game!

Thank u so much!