[ActionScript3.0] 传递任意数量的参数

function setAgument(a:int,...rest):void
{
  for(var i:int=0;i<rest.length;i++){
    trace(rest[i]);
  }
}
setAgument(5,"1","fs",3,4);//1 fs 3 4

posted on 2015-02-14 17:02  晏过留痕  阅读(159)  评论(0编辑  收藏  举报