Thanks! The problem I have seems to be that the flash player locks up for about 1-2 seconds from the time I make the request, to the time I get the xml data back. Is this something Ill just have to live with or is it fixable?

JesterXL wrote:

Theoretically, yes. Both LoadVars & XML both have a getBytesLoaded & getBytesTotal. However, in practice, neither took long enough to actually justify the time in creating a preloader for them. I'd be lucky to even get it to show a percentage.

Therefore, you're better of just showing a "loading" progress bar, (ProgressBar.indeterminate = true):
- show the progress bar
- 1 frame later, load your XML
- when the XML arrives, update your progress bar to done
- 2 seconds later, kill the progress bar

People can argue that for LoadVars & XML calls to files larger than 200k, it's work it, but to me, people who think Flash can parse such loads without locking the computer are the types of people who are well aware of what they are doing (parsing data across frames to prevent Flash locking up) and thus already know how to create progress bars.

The common use case is not them, however, most are in the less than 100k range.

----- Original Message ----- From: "Mike Boutin" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Thursday, December 01, 2005 7:16 PM
Subject: [Flashcoders] preload loadvar xml return


I am doing a loadVars call to a php file, that then returns a bunch of xml.

Is it possible to show a preloader for this load?

var catalog_xml:XML = new XML();
   catalog_xml.ignoreWhite = true;
   catalog_xml.onLoad = function(success:Boolean) {
       if (success) {

} else {

}
sendAndLoad("catalog.php", catalog_xml);



Thanks
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to