Ble*_*mer 1 actionscript-3 flex4
我们的想法是通过阵列args[]具有[<int>, <String>, <int>]
接受多个参数的函数,如:
myFunc (int arg1, String arg2, int arg2 ):void
这样的函数调用:
myFunc(args[]); 可以在不改变原始函数调用的情况下实现.
欢迎任何建议.
你可以用Function.apply().
在你的情况下
myFunc.apply(null,args);
Run Code Online (Sandbox Code Playgroud)
你的args []应该包含与你的数据类型匹配的myFunc args列表的相同顺序.
这样你就无法改变原有的功能.
表现明智apply()不太好.您可以使用的其他情况call().
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Function.html#apply()