Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 159645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:53:44+00:00 2026-05-11T10:53:44+00:00

I have a TileList populated by an xml on creation complete and I would

  • 0

I have a TileList populated by an xml on creation complete and I would like the image from the selected item to be passed to the source of an image component.

This is the main application:

<?xml version='1.0' encoding='utf-8'?> <mx:Application xmlns:mx='http://www.adobe.com/2006/mxml' layout='horizontal' backgroundColor='#FFFFFF'> <mx:ArrayCollection id='theImages'></mx:ArrayCollection> <mx:Model id='items' source='items.xml' /> <mx:Script>     <![CDATA[         import ItemListObject;         public function initList():void          {           for each ( var node:Object in items.image ) {            var temp:ItemListObject = new ItemListObject();            temp.strThumbnail = node.strThumbnail;            temp.title = node.title;            theImages.addItem(temp);           }  }     ]]> </mx:Script> <mx:XML source='adjectives.xml' id='adjectivesXML'/>     <mx:Canvas x='20' y='20'>         <mx:Image              id='item'             source='????'              autoLoad='true'              width='500'              height='500'              scaleContent='true'/>     </mx:Canvas>     <mx:TileList id='imageTileList'         itemRenderer='CustomItemRenderer'         dataProvider='{theImages}'         width='400'         height='400'         columnCount='2'         creationComplete='initList();'/>     </mx:Application> 

I tried different things for the source of the Image component but nothing worked so I just put the 4 question marks. Here is the CustomItemRenderer:

    <?xml version='1.0' encoding='utf-8'?>     <mx:VBox xmlns:mx='http://www.adobe.com/2006/mxml'     horizontalAlign='center'     verticalAlign='middle'     verticalGap='0'     width='150'     height='150'     paddingRight='5'     paddingLeft='5'     paddingTop='5'     paddingBottom='5'>      <mx:Image id='img' height='100' width='100' source='{data.strThumbnail}' />     <mx:Label height='20' width='75' text='{data.title}' textAlign='center' color='0x000000' fontWeight='normal' /> </mx:VBox> 

Here is the items.xml:

<?xml version='1.0' encoding='utf-8'?> <items>  <image id='1'>     <title>Image 1</title>     <strThumbnail>1.jpg</strThumbnail>  </image>  <image id='2'>     <title>Image 2</title>     <strThumbnail>2.jpg</strThumbnail>  </image>  <image id='3'>     <title>Image 3</title>     <strThumbnail>3.jpg</strThumbnail>  </image>  <image id='4'>     <title>Image 4</title>     <strThumbnail>4.jpg</strThumbnail>  </image>     </items> 

And here is the ItemsListObject.as

package {  [Bindable]  public class ItemListObject extends Object  {   public function ItemListObject() {    super();   }    public var title:String = new String();   public var strThumbnail:String = new String();  } } 

This is a very rough example, but once I get over this hump I’ll be able to do a lot more of what I’m trying to do. Thanks for reading.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:53:45+00:00Added an answer on May 11, 2026 at 10:53 am

    The quickest way is:

    <mx:Image id='img' source='{imageTileList.selectedItem.strThumbnail}' /> 

    The data object is for use within an item renderer not outside of it. One data object represents one of the images in your xml that you passed into the renderer.

    Be sure to check out the docs for item renderers here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 82k
  • Answers 82k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try this: DetachedCriteria c = DetachedCriteria.For<Record>() .SetProjection(Projections.Property("Publisher")) .Add(Restrictions.Eq("Year", 2008)) .Add(Restrictions.Eq("Month",… May 11, 2026 at 4:43 pm
  • Editorial Team
    Editorial Team added an answer Just off the top of my head, I would argue… May 11, 2026 at 4:43 pm
  • Editorial Team
    Editorial Team added an answer I created a derived tab control about one year ago.… May 11, 2026 at 4:43 pm

Related Questions

I have a flex TileList to which I load a bunch of images. When
So I am trying to create an image gallery. My AIR application accepts files
Given: A Flex TileList with the following event: <mx:nativeDragDrop> <![CDATA[ if(event.clipboard.hasFormat(ClipboardFormats.FILE_LIST_FORMAT)) { var files:Array
I have a web-service that I will be deploying to dev, staging and production.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.