3 Replies Latest reply on Mar 1, 2010 11:40 AM by willise414

    Why are my images not loading?

    willise414 Level 1

      Hi there,

       

      I am trying to place an image inside of  VBox in my application, but when I run the application, all that is displayed is the placeholder for where the image is supposed to be.

       

      This is the code I am using to place the image:

       

      <mx:Canvas width="698"
                                 height="35%"
                                 right="0"
                                 top="0"
                                 verticalScrollPolicy="off"
                                 horizontalScrollPolicy="off">
                          <mx:Image id="aviationNightFlight"
                                    maintainAspectRatio="true"
                                    scaleContent="true"
                                    height="100%"
                                    width="100%"
                                    source="assets/Aviation_Night_Flight.jpg"/>
                      </mx:Canvas>

       

      The image is located in the assets directory and the spelling is all correct.

       

      I have also tried source="@Embed(source='assets/Aviation_Night_Flight.jpg')"/> but that doesn't work either.

       

      Where is my error?

       

      Thanks so much!