title: What data types does a SharedObject support?
body: <p>I know it is a simple matter to store Strings and Numbers with a SharedObject, and I am also familiar with this sort of thing:</p>
  
  <pre><code>var sharedObject:SharedObject = SharedObject.getLocal("userData");
  var obj:Object = new Object();
  obj.prop = "value";
  sharedObject.data.userobj= obj;
  sharedObject.flush();
  </code></pre>
  
  <p>However, I am attempting to store an object of the class GameStage, a class I have defined to hold data about stages in my game. This type of thing doesn't seem to be working:</p>
  
  <pre><code>var sharedObject:SharedObject = SharedObject.getLocal("userData");
  var stageOne:GameStage = new GameStage();
  stageOne.highScore = 99999;
  sharedObject.data.stageOne = stageOne;
  sharedObject.flush();
  </code></pre>
  
  <p>This code doesn't throw an error, but when I try to retrieve the stage data later, like so:</p>
  
  <pre><code>stageOne = sharedObject.data.stageOne;
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>TypeError: Error #1034: Type Coercion failed: cannot convert Object@3d220629 to GameStage.
  </code></pre>
  
  <p>I guess my question is: exactly what sort of data types can be stored in a SharedObject? Everywhere I've looked online has answered that question with "anything that can be used in Flash", which isn't very descriptive – obviously my GameStage class works in Flash too. Is there something about retrieving data from the SharedObject that I'm not aware of?</p>
  
  <p>My prediction is that I will not be able to store my stage data this way. If that is the case, could anyone suggest an alternative method to saving the data?</p>