title: Actionscript 3.0 String With Format?
body: <p>How can i format a string with supplied variables in AS3?</p>
  
  <pre><code>//vars
  var myNumber:Number = 12;
  var myString:String = "Months";
  var myObject:MovieClip = year;
  
  //string
  myString.txt = "One (?) consists of (?) consecutive (?)", string(myObject), string(myNumber), myString;
  </code></pre>
  
  <p>so in the string above, i would like myString to display <em>"One year consists of 12 consecutive Months</em>", but i'm new to AS3 and do not know how to properly format a string.</p>
  
  <p>i'm sure that i'll have to cast the number variable into a string, string(myNumber), but i don't know if casting a movie clip variable to a string, string(myMovieClip), will return the name of the movie clip or produce an error.  i'm willing to bet on the later.</p>