title: (AS3) Error 1009 when trying to save data with SharedObject?
body: <p>No matter when I call my saveData function I just get error 1009. I'm not sure where I'm going wrong because I far as I can see nothing is null :/</p>
  
  <p>All answers are appreciated in advance.</p>
  
  <p>My Code:</p>
  
  <pre><code>import flash.events.Event;
  import flash.net.SharedObject;
  
  stop();
  
  var Gold = 1;
  var goldGain = 1;
  var Diamond = 1;
  var diamondGain =  1;
  var saveDataObject:SharedObject;
  
  
  
  function saveData(){
      saveDataObject.data.savedGold = Gold;
      saveDataObject.data.savedDiamonds = Diamond;
      saveDataObject.data.savedGoldGain = goldGain;
      saveDataObject.data.savedDiamondGain = diamondGain;
  }
  saveData();
  
  function loadData(){
      Gold = saveDataObject.data.savedGold;
      Diamond = saveDataObject.data.savedDiamonds;
      goldGain = saveDataObject.data.savedGoldGain;
      diamondGain = saveDataObject.data.savedDiamondGain;
  }
  
  addEventListener(Event.ENTER_FRAME, enterFrameEventSaves)
  function enterFrameEventSaves(event:Event){
  
  
  
  }
  
  playScreen_clickButtonMovieClipUp.addEventListener(MouseEvent.MOUSE_DOWN, playScreen_clickButton_stateChangeEventUp);                     
  function playScreen_clickButton_stateChangeEventUp(event:MouseEvent){      
  gotoAndStop(2);
  
  
  Gold += goldGain;
  
  
  }
  </code></pre>