Simple Question

When you say, loop through some XML files to be loaded, and you use different XML objects of course, does Flash wait for the first XML file to be loaded to finish before starting the next, or does it load them all simultaneously?

Thanks,

While I’m at it, I’m stuck on a problem. Basicly I make an object with coordinates in an array 1-10. Then I’m loading some XML file 1-10, and when each one finishes it calls a function which makes use of that data. However, I need a way to pass an ID so this function knows which object its associated with. Like this:

            var m:CModel = new CModel(new CVector(att.x, att.y, att.z));

                xmlModelLoader* = new XML();
                xmlModelLoader*.ignoreWhite = true;
                xmlModelLoader*.onLoad = onLoadModel;
                xmlModelLoader*.load(att.name+".xml");

    public function onLoadModel(success):Void
    {
        if(success)
                l_this.DisplayModel(this);
        else
            trace("Error loading XML file");
    }

    public function DisplayModel(xmlModel):Void
    {
        var m:CModel = ???;

Could I go like load(att.name+".xml", ID); then onLoadModel(success, ID)? I’m not sure because I’m not using the standard onLoad callback function.

Thanks!

I have no idea about your first question but as for the second, in the onLoadModel method - this will reference the XML instance which called the function.

Doh, that wasn’t my question. I knew that, which is why I’m using a local l_this variable. My question was even though I’m redefining the callback function onLoad (with onLoadModel!!!), when I add attributes to the load() function call (ID!!!) will the function I rerouted to (onLoadModel!!!) still recieve them?

My topic at as.org may explain it better: DEWA89 | LINK ALT DAFTAR DAN LOGIN VPN89.ME/DEWA89

No, but you could just make id a property of the XML object(s).

God damnit, great idea! I didn’t know that would work because I didn’t think it was the same object. Because it loads the XML data and processes it, outputting the root object. I didn’t think properties stayed with it.