# Loading external swfs question

**URL:** <https://forum.kirupa.com/t/loading-external-swfs-question/228803>\
**Category:** flash\
**Created:** [June 11, 2007, 6:08pm UTC](https://forum.kirupa.com/t/loading-external-swfs-question/228803 "2007-06-11T18:08:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hideout](https://avatars.discourse-cdn.com/v4/letter/h/8797f3/32.png) [@Hideout](https://forum.kirupa.com/u/Hideout)\
**Post date:** [June 11, 2007, 6:08pm UTC](https://forum.kirupa.com/t/loading-external-swfs-question/228803/1 "2007-06-11T18:08:21Z")

</div>

I have this function that allows you to preload external swfs into a movie clip when you click on a button. For example on a web site you have a container n when the user clicks about us the swf file “about us” will load into the container. My problem is i can not get a swf to load into the container when the intro animation to the site is done. So the user must click one of the pages before the pages can be displayed. Basicly i would like to have the first page about us to load in when the intro animation is done. here is the code. Any help with this will be greatly apperciated. Thank you.

stop();

///button rollover code  
b1.onRollOver = over  
b1.onRollOut = out  
b1.buttText.buttonText.text = “about us”  
/////////////  
///button code  
b2.onRollOver = over  
b2.onRollOut = out  
b2.buttText.buttonText.text = “Products”  
/////////////  
///button code  
b3.onRollOver = over  
b3.onRollOut = out  
b3.buttText.buttonText.text = “People”  
/////////////  
///button code  
b4.onRollOver = over  
b4.onRollOut = out  
b4.buttText.buttonText.text = “Contact”  
/////////////

/////////////  
function over () {  
this.gotoAndPlay(2)  
}  
function out () {  
this.gotoAndPlay(7)  
}

////// end button code  
////// button onrelase code  
//////////////////////////load swfs  
b1.onRelease = function() {  
startPreload(“load/overview.swf”);

};  
b4.onRelease = function() {  
startPreload(“load/contact.swf”);

};  
//////////////////////////load swfs  
// this function begins preloading a swf url  
function startPreload(url) {  
//  
//  
preloader\_mc.url = url;  
//  
preloader\_mc.target = content\_mc;  
//  
preloader\_mc.gotoAndPlay(2);  
}  
//  
//  
//  
next = null;

Thank you guys for your time.
