• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Arrays to List component

Explorer ,
Jun 25, 2011 Jun 25, 2011

Copy link to clipboard

Copied

I am fairly new AS3 coder now using Flash Builder and I can't work out how to display my data (a collection of actionscript arrays returned by a AS3 function) in a List component as a list of labels and images. My arrays look like this:

var aNames:Array = new Array("John", "Ringo", "Paul");

var aImages:Array = new Array("http://myserver.com/image1.jpg", "http://myserver.com/image2.jpg", "http://myserver.com/image3.jpg");

Now I want to display them in a list component, each list item has the image on the left and then the name on the right.

Can anyone provide an example please, I think I need to use an arraycollection and a custom item renderer inside the list and then have the lists dataprovider set to the arraycollection but have not been able to construct the code.

Many thanks.

Views

396

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 27, 2011 Jun 27, 2011

Copy link to clipboard

Copied

LATEST

You'll get better responses on the Flex general discussion forum for non-Flash Builder queries.

-Anirudh

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines