title: Can not save array in shared object as3
body: <p>I have this code in my simple flash. I want to save name and score in my quiz. My code reference in this website <a href="http://www.mollyjameson.com/blog/local-flash-game-leaderboard-tutorial/" rel="nofollow">http://www.mollyjameson.com/blog/local-flash-game-leaderboard-tutorial/</a></p>
  
  <p>I want to make my code in just one actionscript. But I didn't success do it.</p>
  
  <pre><code>var m_FlashCookie = SharedObject.getLocal("LeaderboardExample");
  
  var EntryName:String ="nama kamu";
  var EntryScore:String ="nilai";
  const NUM_SCORES_SAVED:int = 10;
  
  inputBoxScore.text = EntryScore;
  inputBoxName.text = EntryName
  
  var latest_score_object:Object = {
    name: EntryName,
    score: EntryScore
  };
  
  var arr:Array;
  arr = m_FlashCookie.data.storedArray
  
  if ( arr == null)
  {
      arr = new Array();
  }
  
  arr.push( latest_score_object );
  arr.sortOn("score", Array.NUMERIC | Array.DESCENDING);
  
  if ( arr.length &lt; NUM_SCORES_SAVED )
  {
    arr.pop();
  }
  
  btnSave.addEventListener(MouseEvent.CLICK, saveData);
  function saveData(event:Event):void
  {
        m_FlashCookie.data.arr = arr;
        m_FlashCookie.flush();
  }
  
  var myHTMLL:String = "";
  var total_stored_scores:int = arr.length;
  
  btnLoad.addEventListener(MouseEvent.CLICK, loadData);
  function loadData(event:Event):void
  {
      for (var i:int = 0; i &lt; total_stored_scores; ++i)
      {
        // loop through every entry, every entry has a "name" and "score" field as that's what we save.
        var leaderboard_entry:Object = arr[i];
  
        // is this the last score that was just entered last gamestate?
        if ( leaderboard_entry == latest_score_object )
        {
          myHTMLL += (i+1) + ". &lt;b&gt;&lt;font color=\"#0002E5\"&gt;"+ leaderboard_entry.name + " " + leaderboard_entry.score +"&lt;/font&gt;&lt;/b&gt;&lt;br&gt;";
        }
        else
        {
          myHTMLL += (i+1) + ". "+ leaderboard_entry.name + " " + leaderboard_entry.score +"&lt;br&gt;";
        }
      }
      myHTML.text = myHTMLL;
  }
  </code></pre>
  
  <p>Can anybody help me?</p>