How do you switch levels after one level is completed?

Hello,
I was wondering how do you switch levels after reaching you goal.

So I want it like when you finish the level a pop-up will come up and say congradulations! move on on quit. Then you click move on and it brings you to your next level. Any ideas on how do that.

Thanks. Auksfrail Co. Inovative Learning for Others.
Carter. [import]uid: 44060 topic_id: 8967 reply_id: 308967[/import]

Hi,

The best thing to do is use the “Director” module…it is set up so that each screen is a different lua file…and you can use something like changeScene when ready to switch to a new screen.

You can set it up so that each level is a different lua file. That’s the easiest way.
http://developer.anscamobile.com/code/director-class-10

Of course, if you have a lot of levels… the other option is to load different levels in the same lua screen. Once they click on the dialog…have it flash out to another temporary screen for a few seconds…and then reload the same .lua file with the new level data, etc.

Enjoy :slight_smile: [import]uid: 12700 topic_id: 8967 reply_id: 32750[/import]

im sorry but thats not quite what im looking for i want something like bubble ball like when you complete the level a pop up comes up then you click continue it goes to the next level and i have all the levels in different lua files. [import]uid: 44060 topic_id: 8967 reply_id: 32809[/import]

What you’re talking about *IS* a perfect use case for Director.

Just use native.showAlert() for the message and then switch to a different Director scene.
Here’s where to find the info on showAlert:
http://developer.anscamobile.com/reference/index/nativeshowalert

And use that link shown earlier to get Director.

Jay
[import]uid: 9440 topic_id: 8967 reply_id: 32810[/import]