1
General Board / Re: ActionScript 3 (Another one)
« on: April 05, 2006, 09:35:50 am »
Your right they both produce the same results. The * isn't necessary but undoubtably going to be used.
One last request. Could we get the "... (rest)" parameter added too? Again this isn't necessary as you can already get at each functions parameters through the arguments variable however this again is something new to AS3 as another way of writting the function parameters. I have a feeling I am going to run into this sooner or later when I try to import someone elses code :-/
Heres an example:
public function traceArgArray(x: int, ... args):void {
for (var i:uint = 0; i < args.length; i++) {
trace (args);
}
}
Thanks much!!
Lance
One last request. Could we get the "... (rest)" parameter added too? Again this isn't necessary as you can already get at each functions parameters through the arguments variable however this again is something new to AS3 as another way of writting the function parameters. I have a feeling I am going to run into this sooner or later when I try to import someone elses code :-/
Heres an example:
public function traceArgArray(x: int, ... args):void {
for (var i:uint = 0; i < args.length; i++) {
trace (args);
}
}
Thanks much!!
Lance