title: How to create an image from array of pixel colors? (Flash, Actionscript 3)
body: <p>I have a Width and Height parametr. I have been given an array of colors in such format: [r, g, b, a, r, g, b, a, r, g, b, a... etc] 
  Data can be acsessed by something like this </p>
  
  <pre><code>for(var y = 0; y &lt; height; y++)
  {
     for(var x = 0; x &lt; width; x++)
     {
        r = data[y*width + x + 0]
        g = data[y*width + x + 1]
        b = data[y*width + x + 2]
        a = data[y*width + x + 3]
     }
  }  
  </code></pre>
  
  <p>I want to paint that data on some sprite. How to do such thing? </p>
  
  <p>BTW: I use Flash Builder for mxml+actionscript coding. So if it is easy for you you can give example using MXML (not todraw on some sprite but on some MXML component).</p>