# Question about onloadinit

**URL:** <https://forum.kirupa.com/t/question-about-onloadinit/300141>\
**Category:** Uncategorized\
**Created:** [November 16, 2009, 8:34pm UTC](https://forum.kirupa.com/t/question-about-onloadinit/300141 "2009-11-16T20:34:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![revin](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@revin](https://forum.kirupa.com/u/revin)\
**Post date:** [November 16, 2009, 8:34pm UTC](https://forum.kirupa.com/t/question-about-onloadinit/300141/1 "2009-11-16T20:34:34Z")

</div>

```auto
 
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadInit = function(target:Movieclip) {
if (target._name=="head"){
mcl.loadClip("testhead.swf",_root.head);
}
};
mcl.addListener(mclL);
mcl.loadClip("test1.swf",_root.body);

```

does having an if statement in a onloadinit trigger the loadclip command?

it doesn’t seem so or am i doing something wrong?
