# Need help with onLoadComplete

**URL:** <https://forum.kirupa.com/t/need-help-with-onloadcomplete/300715>\
**Category:** Uncategorized\
**Created:** [November 26, 2009, 12:36am UTC](https://forum.kirupa.com/t/need-help-with-onloadcomplete/300715 "2009-11-26T00:36:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Numinus](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@Numinus](https://forum.kirupa.com/u/Numinus)\
**Post date:** [November 26, 2009, 12:36am UTC](https://forum.kirupa.com/t/need-help-with-onloadcomplete/300715/1 "2009-11-26T00:36:27Z")

</div>

Below is my code.  
The “pageTwo.swf” loads fine.  
The .onLoadcomplete is supposed to send a trace and run a function, but it doesn’t.  
I don’t know whats missing. This is the last problem i have before my website, which i’ve been working on for like 6months, will be finished. Any advice?

var pageLoader:MovieClipLoader = new MovieClipLoader();  
pageLoader.addListener(pagePreloader);

function pagePreload () {  
trace (“PagePreload”);  
pageLoader.loadClip(“pageTwo.swf”,\_root.targetII);  
pagePreloader.onLoadComplete = function(){  
trace (“Page is Loaded”);  
completedFunction();  
}  
}

pagePreload();
