If you want to pass an undefined number of ordered values, just pass an array
function foobar(values:Array):void { ... } foobat([1.0, 3.4, 4.5]); foobat([34.6, 52.3, 434.5, 3344.5, 3562.435, 1, 1, 2, 5]);
If you want to pass named parameters where only some of them are passed, use an object
function woof(params:object):string { if (params.hasProperty('name')) { return name + "xxx"; } ... } woof({name:'Joe Blow', count: 123, title: 'Mr. Wonderful'});
James keesey
source share