... args is the one object that the method expects. You can pass multiple elements or (in this case) a single array with parameters.
Example:
function mainMethod():void { //Passing parameters as one object calledMethod([1, 2, 3]); //Passing parameters separately calledMethod(1, 2, 3); } function calledMethod(...args):void { for each (var argument in args) { trace(argument); } } mainMethod();
Hope this helps, Rob
source share