I just need to know how to save my mobile AIR game levels on local machine. Like all the details should be get save eg. how much level i finished or opened once and played, those levels should be in unlocked state. If the level which was never open before will be in locked state. This is my concept and this is the concept used in all mobile games nowadays. kindly please go through any mobile game level type and please let me know the coding for my concept its very urgent. And Thanks in advance. Any help will be kindly appreciatable.
The code which i used is below: Flash AS3
var file = File.applicationStorageDirectory.resolvePath("test.txt");
var str = "Locked Levels : Level 1,Level 2,Level 3,Level 4";
file.addEventListener(Event.COMPLETE, fileSaved);
file.save(str);
function fileSaved(event)
{
trace("Done.");
}
In the above code the text document is getting write to my local machine. But i don't know how to check the levels which are locked are unlocked using this . i kept my level buttons on stage itself by using frames for lock and unlock position. Thanks in advance.