如果我想将一个对象发送到一个名为foo且其子元素值为"bar"的函数中,我需要执行以下操作:
有没有一种方式可以在函数中声明对象?就像这样:
var obj:Object = new Object();
obj.foo="bar";
myfunction(obj);
有没有一种方式可以在函数中声明对象?就像这样:
myfunction(new Object{foo:"bar"});
谢谢!
使用Flash-AS3。