elektroluse elektroluse - 1 year ago 244
ActionScript Question

AS3 referencing a list item which has no name


When you add an object to the list like this, how do you reference to it later without using a listener for the list and then going


Are list items not indexed like arrays? I would want to do something like this


And have it return "a" Is this not possible with lists?

Answer Source
list.dataProvider.length // gets total number of items
list.dataProvider.getItemAt(0) // gets first item
list.dataProvider.getItemAt(0).label // gets the first item label

See all the methods here.. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/data/DataProvider.html

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download