title: Cant call function from within object after saving with SharedObject
body: <p>tl;dr --- I'm trying to create an object and have the name of a function inside that object, then save the object, load it later, and be able to call the function e.g. <strong>myFunction on the Main.as</strong>, based on the obj.fun() where <strong>obj.fun = myFunction</strong> or <strong>obj.fun = "myFunction"</strong>;</p>
  
  <p>I create a global variable</p>
  
  <pre><code>var master = {};
  </code></pre>
  
  <p>I create an object thusly</p>
  
  <pre><code>createMyObject():Object
  {
    obj = {
    name:"myObject",
    fun:myFunctionInMain
    }
  return obj
  }
  </code></pre>
  
  <p>I then push the obj into an Array </p>
  
  <pre><code>master.myArray.push(obj);
  </code></pre>
  
  <p>Then I save</p>
  
  <pre><code>save.data.master = master;
  </code></pre>
  
  <p>Then I load</p>
  
  <pre><code>master = save.data.master;
  </code></pre>
  
  <p>Then I trace my object name like this:</p>
  
  <pre><code>trace(master.myArray[0].name) // output is correct "myObject" so the save and load worked
  </code></pre>
  
  <p>but when I call the function </p>
  
  <pre><code>master.myArray[0].fun();
  </code></pre>
  
  <p>it says value is not a function.</p>
  
  <p>This works fine until I save then load... It's as if it isn't saving the function inside the object.... so I tried to put the function in quotes, inside the object and it saves the string, but I can't figure out how to call the function from that after I save it.</p>
  
  <p>I've tried </p>
  
  <pre><code>master.myArray[0][master.myArray[0]]() // didn't work
  </code></pre>
  
  <p>I've tried </p>
  
  <pre><code>var fun:String = master.myArray[0]fun;
  master.myArray[0][fun]() // didn't work
  </code></pre>
  
  <p>I've tried </p>
  
  <pre><code>var fun:Function = master.myArray[0].fun;
  fun(); // didn't work
  </code></pre>
  
  <p>I thank you very much for any insight here... I've been calling functions from within objects for a while now, but now that I want to save and load, I am seeing this isn't going to work like that.</p>