Hi, i'm having a problem with my flash file but i'm not sure what it is that i'm doing wrong.

The site starts with a preloader and loads up a simple shell, then once thats loaded i want it to dynamically load the home.swf into an empty movieclip, only it doesn't, but when i click on any of the links the .swf's will load into the blank movieclip just fine, so i know they work alright.

Here's the actionscript for the first frame:


myInterval = setInterval(preloader,10);
function preloader(){

After that's loaded it goes onto the next frame with this actionscript:


onLoad = function(){
	external_swf_mc.loadMovieNum("home.swf", 0);

button_home.onRelease = function(){

I've tried using google to find an answer but no luck so far, i tried using onEnterFrame but that seems to break it, does anyone have any ideas?


Sorry if this is a "duh" question, but why do you have an onload script AND a button doing the same thing?

Sorry if this is a "duh" question, but why do you have an onload script AND a button doing the same thing?

I shortened that second bit of actionscript as i didn't think the rest was important, the button is one of five that load in the other pages (external swf's) of the site into the shell, home, classes, contact, etc.

But i want the home page to load up automatically once the preloader has loaded in the shell, otherwise you have a shell with no content, which looks a little boring and causes the site to look broken.

Anyway, it doesn't matter now, someone over at actionscript.org sent me a link to a tutorial on kirupa.com that solved the problem, i needed to use MovieClipLoader instead of onLoad, which was a huge relief, i was tearing my hair out here trying to get it to work!


Cheers anyway, peace :)

Great! Thanks for sharing the solution here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.