If I have a function like:
public function defaultValues(first = 1,second =2,third = 3)
{
trace(first);
trace(second);
trace(third);
}
How can I call this function by only passing in a value for second = 20 ?
ActionScript3 does not support named parameters. If you really want this behavior, you can use an associative array… but I don’t recommend it unless you really want to be dynamic :
Then, you can call it: