A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: XMLObject - Array - ComboBox issue

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Posts
    19

    XMLObject - Array - ComboBox issue

    PROBLEM RESOLVED I must be burnt out or something. Didn't take me very long to realize I should just addItem and forget the array.
    ------------------------------------------------
    Objective: Populate a combo box with ceratin data found within an xml object. Combo box should display 2 out of 5 team names.

    Work So Far: I figured I could create an array(teamArray) to send to the combo box(chooseTeam) by loop-filtering through my xml object for '...attributes.full = 0' and filling the array thusly.
    It works, but my combo box displays 5 "entries", 3 of which are blank, 2 of which are the desired content.

    Is there an easy way to fix this or do I need to utilize a new method for populating the combo box?

    PHP Code:
    teamArray = new Array(); 
        for (
    i=0i<_root.numTeamsi++) { 
            if (
    _root.teamInfo_xml.firstChild.childNodes[i].attributes.full == 0) { 
                var 
    myItem = new Object(); 
                
    myItem.label _root.teamInfo_xml.firstChild.childNodes[i].attributes.name
                
    myItem.data _root.teamInfo_xml.firstChild.childNodes[i].attributes.pass
                
    teamArray[i] = myItem
                
    //trace(teamArray); 
        


    this.chooseTeam.setDataProvider(teamArray); 
    Last edited by frankenscarf; 11-20-2004 at 12:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center