Binding ArrayCollection items to vars
hi there,
i have arraycollection populating chart. can bind array items vars can modify?
private var ratingac:arraycollection = new arraycollection([ { rating: 10 }, // [0] positive { rating: 20 }, // [1] neutral { rating: 60 } // [2] negative ]);
rating variables
private var positive:int = 0; private var neutral:int = 0; private var negative:int = 0;
loop update arraycollection
private function buildchart():void{ for(var i:int; i<newsdb.length; i++){ if(newsdb[i].rateitem == 0){ ratingac.additemat(); // how can add 1 value @ index[0]? } if(newsdb[i].rateitem == 1){ neutral += 1; } if(newsdb[i].rateitem == 2){ negative += 1; } } }
is flex?
More discussions in ActionScript 3
adobe
Comments
Post a Comment