我有一个变量,我想使用 actionscript 和 flex 将这个变量放入 arraycollection 或数组中
以下是代码
var xyz:int=30;
var myArray:Array = [ {Month: "January", Views_Week1:xyz}, { Month: "June",
Views_Week2: 13 }, { Month:" December", Views_Week3: 14} ];
pageViews= new ArrayCollection(myArray);
或者
pageViews= new ArrayCollection(myArray);
[
{ Month: January, Views_Week1: xyz},
{ Month:June, Views_Week2: 13},
{ Month: december, Views_Week3: 14}])
请