Flex ArrayCollection
ArrayCollection provides more functionalities than an Array.
ArrayCollection provides more functionalities than an Array.
ArrayCollection provides more functionalities than an Array.
It provides methods like
addItem(), addItemAt(),
contains(),
getItemIndex(),
removeAll() etc which makes ArrayCollection more useful rather than using Array.
It also supports change listener that listens when arraycollection is updated.
Listeners can be added to listen the event.
// Creates ArrayCollection of 0 elements
var
myArrayCollection:ArrayCollection =
new
ArrayCollection();
|
// Creates ArrayCollection using existing Array
var
myArrayCollection:ArrayCollection =
new
ArrayCollection(myArray);
|
// Creates ArrayCollection and assigns values
var
myArrayCollection: ArrayCollection =
new
ArrayCollection(["RoseIndia",
10]);
|