leifi
08-05-2007, 10:25 AM
Hi all,
I've got a simple question:
is it possible in 3DFA to give your functions optional parameters?
// c shall be the optional parameter
function myFunction(a,b,c) {
trace (a,b);
trace (a,b,c);
}
myFunction(1,2,3); // everthing is ok...
myFunction(1,2); // 3DFA shows an error
Error:
function myFunction(a,b,c) was given 2 parameters when 3 were expected on line 9 myFunction(1,2)
Anyone knows how to solve this?
Thanks,
leifi
I've got a simple question:
is it possible in 3DFA to give your functions optional parameters?
// c shall be the optional parameter
function myFunction(a,b,c) {
trace (a,b);
trace (a,b,c);
}
myFunction(1,2,3); // everthing is ok...
myFunction(1,2); // 3DFA shows an error
Error:
function myFunction(a,b,c) was given 2 parameters when 3 were expected on line 9 myFunction(1,2)
Anyone knows how to solve this?
Thanks,
leifi