title: Changing dynamic textfield inside button in as3
body: <p>I am having some problems getting this code to work properly. I want to change the text on a textfield inside a button. It works, but only for the upState. As soon as I hover or click the button, it changes back to the original name. Is there any way I can define it as anyState?</p>
  
  <pre><code>var doc:DisplayObjectContainer = m1.upState as DisplayObjectContainer;
  var tf:TextField = doc.getChildAt(1) as TextField;
  
  var boldText:TextFormat = new TextFormat();
  boldText.bold = true;
  
  tf.text = "Sterno Cleido Mastoid";
  tf.setTextFormat(boldText);
  </code></pre>
  
  <p>Example:
  <a href="http://www.testdummies.dk/dynamictext.fla" rel="nofollow">http://www.testdummies.dk/dynamictext.fla</a></p>