but.@name = allButtonsList[j].Name butList += but; } var sort:Sort = new Sort(); sort.fields=[new SortField("@name",true)]; remainingButtonsCollection.sort = sort; } ]]>