blue-genie
asked on
does AS3 have a variable amount of parameters option?
assume i want to create a function that will call different methods in the webservice and pass the required parameters for that method. how would I do this?
public function callWSDL(action:String, ....):void
{
switch (action)
{
case "login":
WSDLAction = "login";
op.something();
break
case "register":
WSDLAction = "register";
op.somethingelse();
break;
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Cyan specified what you needed.
Uuups ... sorry ... didn't see that. Must have bin a simoultaneous post.
It would be nice if EE would modify the posting for on screen updates as well as the question list..
But nevertheless my second post offers a second option that also answers the question asked.
ASKER
you guys rock!!!
posting another question now. ... go check it out.
(Genie wishes she paid attention to OOP 101);
posting another question now. ... go check it out.
(Genie wishes she paid attention to OOP 101);
A funcky one with this syntax is that the optional arguments need to be positioned at the last...
function optionalParameters(a:Numbe r=null, b:String="default") { }
So, you cannot do this...
function optionalParameters(a:Numbe r=null, b:String="default", c:String) { }
OOP... Who cares about that??? The only thing that comes out of my mouth is oops all the time when I try to use OOP... :p
CyanBlue
function optionalParameters(a:Numbe
So, you cannot do this...
function optionalParameters(a:Numbe
OOP... Who cares about that??? The only thing that comes out of my mouth is oops all the time when I try to use OOP... :p
CyanBlue
ASKER
no cb i've been having a fab day with other peoples classes.
why is this protected? why is that static, no i need that, let me in .......
why is this protected? why is that static, no i need that, let me in .......
http://www.flex888.com/574/can-i-have-a-variable-number-of-arguments-in-as3.html