# Problem with .onLoadComplete

**URL:** <https://forum.kirupa.com/t/problem-with-onloadcomplete/300714>\
**Category:** Uncategorized\
**Created:** [November 26, 2009, 12:33am UTC](https://forum.kirupa.com/t/problem-with-onloadcomplete/300714 "2009-11-26T00:33:44Z")\
**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:33am UTC](https://forum.kirupa.com/t/problem-with-onloadcomplete/300714/1 "2009-11-26T00:33:44Z")

</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();
