Skip to main content
Known Participant
February 28, 2007
Question

MovieClipLoader

  • February 28, 2007
  • 4 replies
  • 775 views
Hi - In over my head (as usual) but here goes...
I have a master.swf that will be the container and background for other swfs....most notably the "splash.swf" . Splash is the container for all the navigation (external text files loaded into dynamic text boxes) - so its important that it be completely ready before appearing.

In master I have the code below - using MovieClipLoader, loading splash into holder_mc. The problem is that when splash appears, it has a jerky, staggering appearance instead of the smooth movements it should. The onLoadProgress counter tells me that splash is appearing around 90%.

What am I doing wrong here?

TIA any suggestions.

JL
This topic has been closed for replies.

4 replies

Inspiring
March 4, 2007
thats ok, we all need help every now and then. =)

maybe at 7% theres a bigger chunk of data to load, so it might take a second or two to load it... wait it out..
if it's not moving after say 10seconds MAX... then there is something wrong..

but if it works locally it should work just fine on a server too.

*is it possible some of your other code is interfeering??
*did you edit the code in any way?

if you did, post it up, and we'll take a look.
Inspiring
March 3, 2007
Not a problem. =)

hope it's what you needed.
JLUCCAuthor
Known Participant
March 3, 2007
Thanks Sketchsta -
I appreciate your help and your time.
All the best.
JL
Inspiring
February 28, 2007
try:

//create a listener object
var listener_mc:Object = new Object();

//tell listener_mc what to do.
listener_mc.onLoadInit = function (target_mc:MovieClip) {
target_mc.play();
}
listener_mc.onLoadStart = function (target_mc:MovieClip) {
target_mc.stop();
}


hope that helps.
JLUCCAuthor
Known Participant
February 28, 2007
Sketchsta -

Thanks for the code. I need to double check with you that I've used it correctly - so it's attached.

Splash is loading up as before but that onLoadProgress function isn't showing up now. So I can't get whether the entire splash is loading.

When you use the phrase "target_mc" - am I supposed to replace that with my phrase "zloader" or "holder_mc" ?

I appreciate your expert input.

JL
Inspiring
March 1, 2007
Hi, yeah you done it right, but you forgot to add listener_mc to your movieClipLoader.

zloader.addListener(listener_mc);

as for target_mc, you dont need to change it to the file you are loading. By specifying target_mc, Flash automatically knows you are reffering to the clip thats being loaded.

also in your code where you create a movieClip, you have...
this.createEmptyMovieClip("holder_mc", getNextHighestDepth);

im not too sure if that will work as instructed. you forgot the open and close brackets after getNextHighestDepth.
should be..
this.createEmptyMovieClip("holder_mc", getNextHighestDepth());

i might be wrong, and it works without the brackets...but i havent tried, so i cant be sure..

anyway, once you add the listener, you should have no problems.
let me know how it goes.