actionscript 3 - Load the first 30 items in my TextField then loading the rest when click -


i'm making air app (as3) flash.

i've got sprite that's loading items database table.

function complete(e:event):void {     addchild(list);     products = json.parse(loader5.data) array;         for(var i:int = 0; < products.length; i++){         createlistitem(i, products[i]);     }     showlist(); }  function createlistitem(index:int, item:object):void {     var listitem:textfield = new textfield();     var myformat:textformat = new textformat();     myformat.size = 25     listitem.defaulttextformat = myformat;     listitem.text = item.title;     listitem.y = 140+ index * 40;     listitem.width = 100;     listitem.addeventlistener(mouseevent.click, function(e:mouseevent):void {         showdetails(item);     });     list.addchild(listitem);  }  function showlist():void {     list.visible = true; } 

i have more 200 items loaded. i'd load (or display) 30 first one, , click on button load/display 30 next..etc (like "pages").

any idea how can ?

try code

function showlist():void {     list.visible = true;     list.usevirtuallayout="true" } 

Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -