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

  • SEARCH
  • Home
  • 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 7177749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:46:43+00:00 2026-05-28T16:46:43+00:00

I load label and icon from mysql database. and i’d like to create a

  • 0

I load label and icon from mysql database.

and i’d like to create a list with label and icon field.

So I try to do something like that but it doesn’t work indeed each line contain label but icon is empty.

var xmllisteFamille:XMLList = XML(event.result).famille;
                var xmlListCollFami = new XMLListCollection(xmllisteFamille);
                for each (var item:Object in xmlListCollFami){
                    var vbox:VBox = new VBox;
                    vbox.label = item.sdfNom;
                    trace(vbox.label);
                    vbox.percentHeight=100;
                    vbox.percentWidth=100;
                    var xmlItem2:XMLList = item.commDent;
                    if(xmlItem2.length()>0){

                        /*
                            var listAcc:List = new List();
                            listAcc.percentHeight = 100;
                            listAcc.percentWidth =100;
                            listAcc.labelField = "name";
                            listAcc.dataProvider = xmlItem2;
                            vbox.addChild(listAcc);
                            accOnglet1.addChild(vbox); */
                        var urlImageRoot : urlManager = new urlManager();
                        var urlRootDental:String = urlImageRoot.urlDental();
                        trace(urlRootDental);
                        var list:Array = new Array();
                        var object:Object;

                        var xmlListdetail:XMLListCollection = new XMLListCollection(xmlItem2);
                        for each (var item2:Object in xmlListdetail)
                        {

                            object = new Object();
                            // -- --
                            object.label = item2.name;

                            var rootIcon:String= "http://127.0.0.1:10088/Sys/OEMySQL/Dental/"+item2.photo;
                            trace("rootIcon " + rootIcon);

                            object.icon = rootIcon;

                            trace("object.icon " + object.icon);

                            list.push(object);
                        }

                        /* var aNode:XML;
                        for each (aNode in xmlItem2)
                        {
                            object = new Object();
                            // -- --
                            object.label = aNode.name;
                            object.icon = new urlManager().urlDental()+aNode.photo;
                            list.push(object);
                        } */

                        var arrList:ArrayList;

                        arrList = new ArrayList(list);
                        var listAcc:List = new List();
                        listAcc.percentHeight = 100;
                        listAcc.percentWidth =100;
                        listAcc.labelField = "label";
                        listAcc.iconField="icon";
                        //listAcc.dataProvider = xmlItem2;
                        listAcc.dataProvider = arrList;
                        vbox.addChild(listAcc);
                        accOnglet1.addChild(vbox); 
                    }

                }

            }
        }

I hope that you can help me.

Thanks

  • 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. Editorial Team
    Editorial Team
    2026-05-28T16:46:43+00:00Added an answer on May 28, 2026 at 4:46 pm

    I found the solution.
    I had to create an itemrenderer and add it in as3 to my list.

    thanks

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

Sidebar

Related Questions

I try to load a .swf file from assets folder to a webview, but
I have a UILabel that does not update on first load but does load
I am using Colorbox to load some content from an external (but local) file.
I am using this code to read data from Oracle Database. That data stored
load() just returns a proxy by default and database won’t be hit until the
I load a UIWebView from a string in a navigation based app. I'm using
I load content via Ajax and then I'll have element like $('.my_content_class') and I
ViewA load some data from Coredata, then push to the next viewB . In
i load a class using Class.forName(klassname,false,loader) After this i create an instance using klass.newInstance();
My first application will just be a kind of launcher that I would like

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.