1 Reply Latest reply on May 26, 2010 8:45 AM by CapumCap

    Image Class - randomly Broken Image


      Hi everybody,


      I've got some trouble with the <mx:Image> Class, which sometimes shows the correct image and othertimes shows a broken image. It seems to me, that there is no clear rule behind it. I assume, it is some loaderIssue, but I can't figure it out. I have already tried some different binding strategies, but all were ending in the same result.


      The context is quite simple.

      I've got a custom Component, that itself contians three simple components which display a label and an image. The labeltext and the imageSource of the child components depend on the data, with which the child component is feeded.

      Unfortunatly most of the time only not all 3 images are shown. But sometimes they are.


      Here's my source.


      <?xml version="1.0" encoding="utf-8"?>
      <s:HGroup xmlns:fx="http://ns.adobe.com/mxml/2009"
                  import environment.User.TFUser;
                  private var user:TFUser;
                  private var imagePath:String;
                  public function init(user:TFUser):void {
                      this.user = user;
                      this.imagePath = user.imagePath;
                      lblUserName.text = user.fullName;


          <mx:Image id="imgUserPic"
                    source="{'images/users/140px/' + imagePath + '.png'}"
         <s:Label id="lblUserName" />


      Any ideas? I do appreciate any kind of support.




        • 1. Re: Image Class - randomly Broken Image
          CapumCap Level 1



          just after posting I tried sth. I though I've already tried several times before, but I must have missed sth. Anyway, it did the trick.


          I removed the binding in the image and set the source property within my custom init-function.


          I don't know why I didn't work before / why it does now, but result is all I care for (right now).


          Best Greeets,

          Maybe this will help anybody some time.



          Message was edited by: CapumCap