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) }
同样得分用时短靠前
posted on 2022-06-03 13:40 zqiang0803 阅读(36) 评论(0) 编辑 收藏 举报