2 Replies Latest reply on Aug 10, 2011 10:22 AM by aligned2009

    Image doesn't render when original replaced

    aligned2009 Level 1

      I know that if I create an image and add it, it renders, but why when I replace an image that exists, why does it not render?


      <?xml version="1.0" encoding="utf-8"?>

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"


         xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init()">


      <!-- Place non-visual elements (e.g., services, value objects) here -->




      private function init():void{




      private function renderImage(event:Event):void{

      var i:Image=new Image;



      //doesnt.validateNow(); //this uncommented does not work either




      <s:VGroup id="images">

      <s:Button click="{renderImage(event)}" label="Image"/>

      <s:Image id="works"/>

      <s:Image id="doesnt"/>