# Can somebody explain the purpose of this?

**URL:** <https://forum.kirupa.com/t/can-somebody-explain-the-purpose-of-this/208018>\
**Category:** flash\
**Created:** [November 24, 2006, 1:59am UTC](https://forum.kirupa.com/t/can-somebody-explain-the-purpose-of-this/208018 "2006-11-24T01:59:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![2socks](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/2socks/32/3026_2.png) [@2socks](https://forum.kirupa.com/u/2socks)\
**Post date:** [November 24, 2006, 1:59am UTC](https://forum.kirupa.com/t/can-somebody-explain-the-purpose-of-this/208018/1 "2006-11-24T01:59:34Z")

</div>

I got this code from the XML portfolio tutorial and use it all the time. Works good. But just for my own curiousity why are all the ‘Success’ arguments needed? The function wouldn’ be called until it is properly loaded anyway right? (i.e. onLoad automatically checks this?). And why the second ‘success’ with the if statement. Just trying to understand…

My\_xml.onLoad = function(success) {  
if (success) {  
doSomething(this);  
}  
}
