AS3.0 班级姓名,用时,得分 按照顺序排序
作者:互联网
var arr:Array=[{name:"d",core:10,times:1},{name:"a",core:20,times:1},{name:"d",core:30,times:7}] arr.push ({name:"3",core:50,times:3}) arr.sortOn(["times","core"],[Array.UNIQUESORT,Array.DESCENDING]) for(var i:uint=0;i<arr.length;i++){ trace(arr[i].name,arr[i].core,arr[i].times) }
同样得分用时短靠前
标签:AS3.0,core,班级,name,用时,arr,times,var,Array 来源: https://www.cnblogs.com/zqiang0803/p/16339899.html