title: Restoring custom class object array from SharedObject
body: <p>I have an array of Widgets (a class I created) called "widgetArray" that I save into a shared object.</p>
  
  <pre><code>savedGame1.data.widgetArray = widgetArray;
  </code></pre>
  
  <p>When I go to load this data out and use the widgets I run into problems. The array is stored fine, but each widget is saved as an object. So I can't simply do:</p>
  
  <pre><code>widetArray = savedGame1.data.widgetArray;
  </code></pre>
  
  <p>because then if I try to use the widgets:</p>
  
  <pre><code>widgetArray[0].someWidgetFunction();
  </code></pre>
  
  <p>it does not work because flash thinks they are objects. I have tried typecasting the widgets when I load them, but it only produces a null object.</p>
  
  <pre><code>widgetArray[i] = widgetArray[i] as Widget;//widgetArray[i] becomes null
  tempWidget:Widget = widgetArray[i] as Widget;//null as well
  </code></pre>
  
  <p>This question is asked in one of the forums from a friend, since there were no responses, i thought this is the right place for it...
  How does anyone else deal with this?</p>