# Simple Question

**URL:** <https://forum.kirupa.com/t/simple-question/185751>\
**Category:** Uncategorized\
**Created:** [April 16, 2006, 3:41am UTC](https://forum.kirupa.com/t/simple-question/185751 "2006-04-16T03:41:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dae](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@Dae](https://forum.kirupa.com/u/Dae)\
**Post date:** [April 16, 2006, 3:41am UTC](https://forum.kirupa.com/t/simple-question/185751/1 "2006-04-16T03:41:57Z")

</div>

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:

```auto
            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!

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [April 16, 2006, 4:58am UTC](https://forum.kirupa.com/t/simple-question/185751/2 "2006-04-16T04:58:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dae](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@Dae](https://forum.kirupa.com/u/Dae)\
**Post date:** [April 16, 2006, 5:04am UTC](https://forum.kirupa.com/t/simple-question/185751/3 "2006-04-16T05:04:09Z")

</div>

> [@TheCanadian](#):
>
> 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](http://as.org) may explain it better: [DEWA89 | LINK ALT DAFTAR DAN LOGIN VPN89.ME/DEWA89](http://www.actionscript.org/forums/showthread.php3?p=476107#post476107)

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [April 16, 2006, 5:09am UTC](https://forum.kirupa.com/t/simple-question/185751/4 "2006-04-16T05:09:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dae](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@Dae](https://forum.kirupa.com/u/Dae)\
**Post date:** [April 16, 2006, 5:57am UTC](https://forum.kirupa.com/t/simple-question/185751/5 "2006-04-16T05:57:18Z")

</div>

> [@TheCanadian](#):
>
> 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.
