I think I tried something with casting to array or using Function.apply, I'm
pretty sureFunction.apply or call does the trick

after messing around with it I decided it wasnt worth the mess and used
array's instead..

On Fri, Nov 28, 2008 at 4:18 PM, Latcho <[EMAIL PROTECTED]> wrote:

>
> Hi List,
>
> How can I pass a variable amount off function arguments to a next function
> ?
> Below the way I tried and which fails. While passing them they get combined
> I'd like to remain 5 variables for args_B and not a single string.
> Stijn
>
> CODE:
>
> testargs( "a","b",{z:'zz'},[1,2,3],"c" )
>
> private function testargs(... argsA):void
> {
>  trace("#args_A:", argsA.length)                                        ///
> traces: #args_A:   5
>  passingArgs(argsA)
> }
>
> public function passingArgs(... argsB):void
> {
>  trace("#args_B:",argsB.length)                                       ///
> traces: #args_B:   1    for(var i:int=0;i<argsB.length;i++) {
> trace(argsB[i]); }  // which traces a string: a,b,[object Object],1,2,3,c
> };
>
>
> Latcho
>
>
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
M.A. van't Kruis
http://www.malatze.nl/
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to