[thelist] Flash 5 and XML

John Dowdell jdowdell at macromedia.com
Fri Nov 3 16:46:50 CST 2000

At 6:16 PM 11/1/0, Anthony Baratta wrote:
>The "if (productXML.loaded)" always evaluates to false. Any clues would be
>Flash 5 Code.....
>// Load Products
>productXML = new XML();
>if (productXML.loaded) {
>        [snip]
>         }
>     }
>} else {
>     products = "failed to load XML";

Sorry, net retrieval is an asynchronous process... the script would likely
execute much, much faster than the net retrieval would!

I'm typing from Eudora, rather than from a test, but try looping around
until the thing loads:

  if (!productXML) {
    //  init XML object

  if (productXML.loaded) {
    //  process data
  } else {

The first test catches the initialization and will only start the retrieval
on the first time through the loop. If the data is loaded it will be
processed and the movie will progress... until it's loaded, we'll keep
checking on this single frame.

How does this work out for what you've got there...?


John Dowdell, Macromedia Tech Support, San Francisco CA US
Search technotes: http://www.macromedia.com/support/search/
Offlist email risks capture by the spam filters. I may not see your
email if it's not on the list. Private one-on-one email options are
available via Priority Access: http://www.macromedia.com/support/

More information about the thelist mailing list