title: Verify that property of AS3 SharedObject data exists
body: <p>How do I verify that certain properties of SharedObject exist? In other words, I want to make sure I read something sensible from my local SharedObject (one  should not get anything good the first time loading swf )</p>
  
  <p>I am going from information found on <a href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/SharedObject.html" rel="nofollow">http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/SharedObject.html</a></p>
  
  <p>Let's say I define </p>
  
  <pre><code>var my_so:SharedObject = SharedObject.getLocal("superfoo");
  </code></pre>
  
  <p>Now, if I have already gotten something under my_so.data.foobar I would like to use it in my application. (myapp.myfoo already has a default value before this)</p>
  
  <pre><code>if (my_so.data.foobar != null) myapp.myfoo=my_so.data.foobar;
  </code></pre>
  
  <p>This seems to hang on Flash 10.1 . What am I missing ?</p>
  
  <p>EDIT: Thanks to your help the issue is fixed. :)</p>
  
  <p>However, it would be nice to see the idiomatic way of doing this kind of check for SharedObject. I've found many examples teaching how to use SharedObject but they seem to gloss over the fact that you need to check whether you saved anything worthwhile in it. That is exactlyl what happens on loading .swf the first time.  Another issue would be checking whether one successfully instantiated SharedObject (for example, when it is disabled), but that would be a whole another question...</p>