my question is the Flex transposition of this question :
Can I pass an array as arguments to a method with variable arguments in Java?
That is, I have an Array in some Actionscript code and i need to pass every object indexed in the array into a method method(...arguments)
.
Some code to make it clear:
private function mainMethod():void{
var myArray:Array = new Array("1", "2", "3");
// Call calledMethod and give it "1", "2" and "3" as arguments
}
private function calledMethod(...arguments):void{
for each (argument:Object in arguments)
trace(argument);
}
Is there some way to do what the comment suggests?