# Trying to save an array of customClass objects to a SharedObject

**URL:** https://forum.kirupa.com/t/trying-to-save-an-array-of-customclass-objects-to-a-sharedobject/320718
**Category:** flash
**Created:** [March 31, 2011, 5:35am UTC](https://forum.kirupa.com/t/trying-to-save-an-array-of-customclass-objects-to-a-sharedobject/320718 "2011-03-31T05:35:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NateIhle](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@NateIhle](https://forum.kirupa.com/u/NateIhle)
#### Post date: [March 31, 2011, 5:35am UTC](https://forum.kirupa.com/t/trying-to-save-an-array-of-customclass-objects-to-a-sharedobject/320718/1 "2011-03-31T05:35:40Z")

</div>

I am trying to save an array of CustomClass objects to a SharedObject like so:

object\_list = new Array();  
//add elements of type CustomClass to object\_list

registerClassAlias(“CustomClassAlias”, CustomClass);  
var data\_on\_disk:SharedObject = SharedObject.getLocal( “data” );  
data\_on\_disk.data.object\_list=object\_list;  
data\_on\_disk.flush();

But when I try to access data after closing the swf and reopening it, it seems to be an array with empty elements?

the size of array will equal to what it should be, but all the elements are null

Anybody know what I am doing wrong?
