PDA

View Full Version : Constructor Parameters



Exodar
June 28th, 2008, 02:56 PM
Say you had a class with 3 parameters within its constructor function created like so:
var class:ClassName = new ClassName(a, b, c);

Each parameter has a default value so how would you change the value of c and skip a and b?

Krilnon
June 28th, 2008, 04:10 PM
You can't really skip them because AS3 doesn't have named arguments. You can pass in cardinal values for a and b so that you can later set them to the default values, but that wouldn't be handled automatically.