title: How to dynamically name a variable on an object in as3
body: <p>So, if I need to give a custom variable name to an object how would I do that?</p>
  
  <p>For instance, if I have a gameID that is 12345 and its rating is 3 I want to save a variable called gameRatings_12345 thats value is 3 in my shared local object.</p>
  
  <pre><code>//share object
  protected var mySavedData:SharedObject = SharedObject.getLocal("mySavedData");
  </code></pre>
  
  <p>I have the game id in a string</p>
  
  <pre><code>var gameID:String = "12345";
  </code></pre>
  
  <p>Then when I try to assign the value like this...</p>
  
  <pre><code>mySavedData.data.gameRatings_gameID = 3
  </code></pre>
  
  <p>I think it's literally reading it as <code>"mySavedData.data.gameRatings_gameID"</code> instead of <code>"mySavedData.data.gameRatings_12345"</code></p>
  
  <p>How can I give the variable a custom name?</p>