for each in loop not updating the progress bar until loop is finished
this air app in flex3 on osx 10.4.
i have loop running through xml object.
in example there more 3000 children, more once distributed.
while i'm processing xml, want show progress bar user.
but progress bar not update until loop finished, trace prints in flex builder console loop runs.
once loop finished progress bar updates (too late of course)
i have tried importprogress.validatenow(); no luck
how can progress bar update each loop.
tia
flashharry
var tracklength:number = xml.children().length();
var trackcount:number = 0;
for each(var d:xml in xml) {
trackcount ++;
trace(trackcount);
importprogress.setprogress(trackcount, tracklength);
//do something
}
try refactoring your importprogress.setprogress(trackcount, tracklength); call separate function , call new function using calllater. idea.
atta
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment