# \[CS4 AS2\] Local Shared Objects don't load info

**URL:** <https://forum.kirupa.com/t/cs4-as2-local-shared-objects-dont-load-info/324444>\
**Category:** flash\
**Created:** [August 21, 2011, 6:28pm UTC](https://forum.kirupa.com/t/cs4-as2-local-shared-objects-dont-load-info/324444 "2011-08-21T18:28:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rtyper](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@Rtyper](https://forum.kirupa.com/u/Rtyper)\
**Post date:** [August 21, 2011, 6:28pm UTC](https://forum.kirupa.com/t/cs4-as2-local-shared-objects-dont-load-info/324444/1 "2011-08-21T18:28:30Z")

</div>

Hi, I’ve just finished a puzzle game and i’m working on a level select screen, each level is an individual frame and after completing one i use this code (replacing the number with the number of the level that was completed):

```auto
if(savegame.data.levelnum > 1){	savegame.data.levelnum = 1;
	savegame.flush();
}

```

I’ve already loaded/created the shared object at the start with:

```auto
savegame=SharedObject.getLocal("Styxisdata");

```

and then on the level select screen I check to see if the level that’s been clicked is unlocked like this:

```auto
on (release) {
	if(savegame.data.levelnum >=1){
		gotoAndPlay(113);
	}
}

```

But for some reason when I go to the level select screen, all the levels are accesible, even if I haven’t completed them. It’s the same on other people’s computers, so I know it isn’t just that my PC still has a shared object from completing them when testing.

Does anyone have any ideas?
