Tutorial Actionscript 3 – Dynamic params in a function
If you want to create a function, but don’t know how many arguments you will get. This is your option.
private function testDynamicArguments(...args):void { trace("Get: " + args + "array lenght: " + args.length); }

