It appears that argument list passing is not very well documented in the flash docs for whatever reason. But we know it is possible because the trace() funcion is one such function that accepts an argument list.
the syntax for such a function is acheived by using the tripledot keyword as such
function ExampleConcatString(... str:String):String
{
var newStr:String = "";
for(var i = 0; i < str.length; i++)
{
newStr+= str[i];
}
return newStr;
}
Also, intuitively, argument list should come after default arguments which are before required arguments as such:
function SomeFunc(required:String, optional:Object = null, ... arglist:*)
« Thought is a creative process IE8 sure knows how to push the blame »
