title: Easiest way to order array from a string word - Interesting
body: <p>I am writing a childrens game and it consists of letter blocks.</p>
  
  <p>The child has to put the blocks in a correct order (following silhouettes) to spell the word</p>
  
  <p>Now my question is I have 2 Arrays.</p>
  
  <pre><code>var myLetters = new Array(
      new BlockC(),
      new BlockA(),
      new BlockB()
  );
  
  public static var myLetters2 = new Array(
      new BlockC(),
      new BlockA(),
      new BlockB()
  );
  </code></pre>
  
  <p>So you see this is setup to spell the word C A B.</p>
  
  <p>What i would would like to do is have a string variable that i can put the word in to and then have code fill the array in the correct order.</p>
  
  <p>i.e. </p>
  
  <p>var word:String = "CAB";</p>
  
  <p>Hope this makes sense and i can get some good help from you guys</p>
  
  <p>Thanks</p>