title: Create a button with an icon in actionscript
body: <p>I want to create buttons with icons in Flex dynamically using Actionscript.</p>
  
  <p>I tried this, with no success:</p>
  
  <pre><code>var closeButton = new Button();
  closeButton.setStyle("icon", "@Embed(source='images/closeWindowUp.png");
  </code></pre>