Lock and Unlock Levels + Save Data

I have a game with multiple levels using director class and I need to lock all the levels until the previous level has been completed. I think I need to:

  1. create a data file that holds each level and states if it is locked or unlocked.

  2. if the prior level is completed, it needs to change the next level to unlocked.
    Can someone share a link with me or let me know how to accomplish this? I don’t know how to setup data files and reference/edit them. [import]uid: 32061 topic_id: 6567 reply_id: 306567[/import]

Please take a look at the topic below to see how can you load, save, set and get variables to control your game.

http://developer.anscamobile.com/forum/2011/02/02/how-can-i-easily-implement-save-and-load-system-0 [import]uid: 8556 topic_id: 6567 reply_id: 22809[/import]