title: How update an image dynamically using data binding?
body: <p>I have a main.mxml application that lays out my application, it contains a "browse and upload" button. And contains an image to view the users uploaded image like so:</p>
  
  <pre><code>&lt;mx:Application
  &lt;mx:Script&gt;
      &lt;![CDATA[
  
      import model.myModel;
      import control.myControl;
  
      // Create data model
      public var model:myModel = new myModel();
      //[Bindable]
      //private var scld_img:Bitmap;
  
      // Create control
      public var mycontrol:myControl = new myControl(mymodel);
  
  &lt;/mx:Script&gt;
  
  &lt;!-- Upload and view --&gt;
  &lt;mx:Canvas id="upload" label="1: Upload Image"&gt;
  
     &lt;mx:VBox&gt;
     &lt;mx:HBox&gt;
  
     &lt;mx:Label text="Upload an image: "/&gt;
     &lt;mx:Button id="btn"
        label="Browse and preview..."
        click="mycontrol.browseAndUpload();"
        buttonMode="true"
        useHandCursor="true"/&gt;
  
     &lt;/mx:HBox&gt;
  
  
  &lt;mx:Image id="mximg_upld"
     verticalCenter="0"
     horizontalCenter="0"
     source="mymodel.img_scld_bm"/&gt;
  
  &lt;/mx:VBox&gt;
  &lt;/mx:Canvas&gt;
  ......
  </code></pre>
  
  <p>In my <code>myModel</code> class I have a <code>img_scld_bm</code> that the <code>browseAndUpload()</code> function draws into after scaling it.</p>
  
  <p>My intent is that my <code>mx:Image</code> will display the image. As shown here I'm assigning the image <code>source="mymodel.img_scld_bm"</code>, this ends up just showing a broken image icon.</p>
  
  <p>I also tried data binding, where in my <code>myModel</code> class I have <code>[Bindable] var img_scld_bm</code>. And then tried setting my <code>mx:Image source="{myModel.img_scld_bm}"</code> .. that didn't seem to do anything either. All this compiles fine, no warnings. I think in this case, I'm not setting a trigger or propertyChange event to update the binding?</p>
  
  <p>Can someone help me understand, or provide an example of how to correctly bind an <code>mx:Image</code> source to some bitmap??</p>