# Persistent Shared Objects

**URL:** <https://forum.kirupa.com/t/persistent-shared-objects/39690>\
**Category:** Uncategorized\
**Created:** [January 9, 2004, 10:56pm UTC](https://forum.kirupa.com/t/persistent-shared-objects/39690 "2004-01-09T22:56:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mojoNYC](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mojoNYC](https://forum.kirupa.com/u/mojoNYC)\
**Post date:** [January 9, 2004, 10:56pm UTC](https://forum.kirupa.com/t/persistent-shared-objects/39690/1 "2004-01-09T22:56:58Z")

</div>

the good news: i’ve got the SO working!🙂  
my problem is that i’m overwriting the original SO each time i save to it :puzzle:  
here are my proto functions:

```auto

interfaceClass.prototype.saveLSO=function(){ //saves color set vars to local shared object (cookie) on disk	
	this.myN="gamecookie"; //name of cookie file
	trace("saveLSO");
	this.myLSO = SharedObject.getLocal(this.myN); 
	this.myLSO.data.savedArray = _level0.saveArray; //saving array to LSO value: colorSet	
	//trace(this.saveArray);
	this.myLSO.flush(); } //saves LSO to disk

interfaceClass.prototype.loadLSO=function(){
	trace("loadLSO");
	_level0.saveArray=this.myLSO.data.savedArray; } //sets saveArray to contents of LSO 	   

```

i know i should do some kind of test, but the way to do it eludes me–can anybody  
help me out on this one?

muchas grabas,  
-mojo
