title: Flex 3: Is it possible to use a remote image as the icon for a LinkButton?
body: <p>We are creating a LinkButton programmatically and would like to set it's icon to an image retrieved from the remote server rather than something embedded within the SWF.  The <code>.icon</code> property expects a <code>Class</code> but I can't figure out how to create one equivalent to an <code>@Embed</code> but from a dynamically generated URLRequest or URL String.</p>
  
  <pre><code>var myImage:Image = new Image();
  myImage.source = "http://www.domain.com/img/1234.png";
  myImage.width = 16;
  myImage.height = 16;
  myImage.scaleContent = true;
  
  var myButton:LinkButton = new LinkButton();
  myButton.label = "Some text"
  
  // This is what I'm trying to figure out.
  myButton.setStyle("icon", ???)
  </code></pre>
  
  <p>I'm probably missing something obvious - I've tried passing in the URL and <code>myImage</code> separately but both throw errors.  Stepping into the <code>setStyle()</code> method shows that the code is expecting a <code>Class</code> - so what do I pass in place of the ???</p>
  
  <p>I can't embed the image itself because it's dynamic - the URL is different each time the software runs.</p>
  
  <p>Thanks for any assistance!</p>