Possible solution for a List component:
Code:
import mx.events.ScrollEvent;
import mx.collections.ArrayCollection;
[Bindable]
private var dp : ArrayCollection = new ArrayCollection();
private function init():void
{
var obj : Object;
for (var k : int = 0; k < 20; k++ )
{
obj = new Object();
obj.label = 'Label ' + k;
dp.addItem(obj);
}
}
private function onScroll(event:ScrollEvent):void
{
if (event.position > dp.length - list.rowCount - 3)
{
var obj : Object = new Object();
obj.label = 'Label ' + dp.length;
dp.addItem(obj);
}
}
]]>
MXML:
<mx:List id="list" dataProvider="{dp}" width="200" height="200" scroll="onScroll(event)"/>