8 Replies Latest reply on Mar 16, 2010 5:05 AM by TB_DK

    How to get the image to show?

    TB_DK

      Hi  have a problem to refer from an MXML component to an arry in my main MXML application

      I just don't understand why I get this error when referring to an array in my main application.

       

      What I did: I created an array in my main application where I refer to a couple of images

       

      <mx:Array id="picArray">
          <mx:Object
              thumbnailImage="assets/DSC_1904_thumb.jpg"
              fullImage="assets/DSC_1904.JPG" />
      </mx:Array>

       

      later in the code I am filling the icon field of a horizontal list with the 'thumbnailImage' specified in the 'picArray'

       

      <mx:HorizontalList id="picList"
                      iconField="thumbnailImage"
                      click="showImage(event)"
                      dataProvider="{picArray}"
                      itemRenderer="CustomItemRenderer"
                      columnCount="4"
                      columnWidth="210"
                      rowCount="1"
                      rowHeight="120"
                      horizontalScrollPolicy="on" width="863"/>

       

      The pictures are shown in the list and when I click on one a PopUp is created to show the enlarged picture. However, the PopUp doesn't show the 'fullImage'. There is no error message at that point when I refer from the MXML component of the TitleWindow to the 'picList' in the main application that way:

       

      <mx:Image id="popImage" source="@picList.selectedItem.fullImage"/>

       

      How do I get my Image to be shown?

       

      Chers Thomas