Shared Objects? Save and Load?

Hi! Im trying to learn Adobe Flash and making some stuff and that export it to my iPad. It doesnt have to be Shared Object, just read on internet that it could be used. But i dont know.

I need a save and load function. Im gonna explain why and how.
Im making a test game. When the player finish a level another level on the “Level select” screen should be unlock.

So, when player open my game first time. Level 2 is locked. When he finish Level 1 he can play Level 2.
I got some help with this and got it to work like this:

LEVEL SELECT MENU:

Level1Select.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame1);

function fl_ClickToGoToAndStopAtFrame1(event:MouseEvent):void
{
    gotoAndStop(20);
}


if(level2played==true){
    
Level2Select.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);

function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void
{
    gotoAndStop(21);
}

}  


LEVEL 1


var level2played:Boolean=false  

//If Player hits goal. 
addEventListener (Event.ENTER_FRAME, HitGoal);
function HitGoal (e:Event):void
{
if(Player.hitTestObject(Goal))
{
    
    level2played=true;
    gotoAndStop(2);

}
    
}

That means if Player hits goal he get send back to frame 2 and “level2played” gets true and he can click and play level2. But this doesnt ofcourse get saved when the app get closed. So i kinda need it to be saved. So if Player hits goal in level 1, this “level2played=true;” gets saved.

Hope you understand what I mean :slight_smile: