1 Reply Latest reply on Jul 30, 2009 12:51 PM by jimmyoneshot

    Strange Image Problems in Application

    jimmyoneshot Level 1

      I have designed an application which makes use of a tilelist and when each item is clicked in the tilelist the source of an image on the right hand side changes, or at least it should.

       

      This works when I preview it in Internet Explorer and also when I upload it to the net but I've now turned the app into an AIR application and as I say it works when I preview it however after I export it for release and actually install the app on my computer the image on the right hand side doesn't appear when I click either of the items in the tilelist, it's just empty as if it can't find the image.

       

      Is this a common problem? It's strange as the images within the tilelist do show up but the right hand one doesn't when I click them as it should.

       

      Here's the code:-

       

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

      <mx:WindowedApplication

       

       

      xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" viewSourceURL="srcview/index.html"

      >

       

       

       

      <mx:Script>

      <![CDATA[

       

      [

       

      Bindable

      ]

      [

       

      Embed(source="assets/images/cnn_small.png"

      )]

       

       

      public var

      image1:Class;

       

      [

       

      Bindable

      ]

      [

       

      Embed(source="assets/images/asda_small.png"

      )]

       

       

      public var

      image2:Class;

       

      ]]>

       

       

      </mx:Script>

       

       

       

      <mx:TileList id="profile1AddLinksTilelist" itemClick="linkImage.source=profile1AddLinksTilelist.selectedItem.largeImage;" fontWeight="bold

      "

      dragEnabled="

       

      true" dragMoveEnabled="true" dropEnabled="true" height="135

      "

      width="

       

      255" top="10" left="10" columnCount="3" rowHeight="145" columnWidth="125

      "

      backgroundColor="

       

      #000000" color="#FFFFFF"

      >

       

       

      <mx:dataProvider>

       

       

      <mx:Object label="CNN" icon="{image1}" largeImage='assets/images/cnn_small.png'

      />

       

       

      <mx:Object label="ASDA" icon="{image2}" largeImage='assets/images/asda_small.png'

      />

       

       

      </mx:dataProvider>

       

       

      </mx:TileList>

       

       

      <mx:Image id="linkImage" x="273" y="10" width="137" height="135"/>

       

      </mx:WindowedApplication>

        • 1. Re: Strange Image Problems in Application
          jimmyoneshot Level 1

          Nevermind I think I have actually fixed it now. I changed the code to this:-

           

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

          <mx:WindowedApplication

           

           

          xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" viewSourceURL="srcview/index.html"

          >

           

           

           

          <mx:Script>

          <![CDATA[

           

          [

           

          Bindable

          ]

          [

           

          Embed(source="assets/images/cnn_small.png"

          )]

           

           

          public var

          image1:Class;

           

          [

           

          Bindable

          ]

          [

           

          Embed(source="assets/images/asda_small.png"

          )]

           

           

          public var

          image2:Class;

           

          ]]>

           

           

          </mx:Script>

           

           

           

          <mx:TileList id="profile1AddLinksTilelist" itemClick="linkImage.source=profile1AddLinksTilelist.selectedItem.largeImage;" fontWeight="bold

          "

          dragEnabled="

           

          true" dragMoveEnabled="true" dropEnabled="true" height="135

          "

          width="

           

          255" top="10" left="10" columnCount="3" rowHeight="145" columnWidth="125

          "

          backgroundColor="

           

          #000000" color="#FFFFFF"

          >

           

           

          <mx:dataProvider>

           

           

          <mx:Object label="CNN" icon="{image1}" largeImage='{image1}'

          />

           

           

          <mx:Object label="ASDA" icon="{image2}" largeImage="{image2}"

          />

           

           

          </mx:dataProvider>

           

           

          </mx:TileList>

           

           

          <mx:Image id="linkImage" x="273" y="10" width="137" height="135"/>

           

          </mx:WindowedApplication>