# XML.onLoad fires twice?

**URL:** <https://forum.kirupa.com/t/xml-onload-fires-twice/199723>\
**Category:** Uncategorized\
**Created:** [September 5, 2006, 2:02pm UTC](https://forum.kirupa.com/t/xml-onload-fires-twice/199723 "2006-09-05T14:02:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianmanden](https://avatars.discourse-cdn.com/v4/letter/b/3ec8ea/32.png) [@brianmanden](https://forum.kirupa.com/u/brianmanden)\
**Post date:** [September 5, 2006, 2:02pm UTC](https://forum.kirupa.com/t/xml-onload-fires-twice/199723/1 "2006-09-05T14:02:20Z")

</div>

With the following code I get an output of:

true  
true

It seems that the onLoad method fires twice ??  
I know the .load method has to come after the .onLoad function for the function to work but that doesn´t seem to be the problem in this case.

Can anyone please tell me what is going on here ?

[AS]xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = function(loaded) {  
trace(loaded);  
};  
xmlData.load("./myXML.xml");[/AS]

---

<div class="post-metadata">

**Author:** ![kevinarpe](https://avatars.discourse-cdn.com/v4/letter/k/ac8455/32.png) [@kevinarpe](https://forum.kirupa.com/u/kevinarpe)\
**Post date:** [June 1, 2008, 12:23pm UTC](https://forum.kirupa.com/t/xml-onload-fires-twice/199723/2 "2008-06-01T12:23:12Z")

</div>

I still have this same problem developing Open Source Flash / ActionScript in Eclipse. Is it possible my Adobe Flash player has a bug?

Does anyone else experience this same problem?

Thanks,  
Kevin

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 1, 2008, 2:23pm UTC](https://forum.kirupa.com/t/xml-onload-fires-twice/199723/3 "2008-06-01T14:23:44Z")

</div>

> [@kevinarpe;2334287](#):
>
> I still have this same problem developing Open Source Flash / ActionScript in Eclipse. Is it possible my Adobe Flash player has a bug?

Not likely. More likely you are doing something wrong. Show the full code or link source.
