Preload Sound Object Problem
Hey gurus. Having a problem with a preloader for a sound object movie. Basically I'm calling up a preloader to load in an MC (clip holder) in my main movie.
The preloader loads fine in the MC (clip holder) but then the file it loads up places the SWF in the default location (top left of movie). How do I get the loader and the movie it calls up to play inside the MC (clip holder).
The MC (clip holder) has an instance "holder"
This is the main action from the frame with the clip holder in my main movie:
loadMovie("swf/loaddemo.swf", "holder");
// loaddemo.swf is the external movie I'm calling up in a SWF folder
These are the actions I have in my loading movie (loaddemo.swf):
onClipEvent (load) {
loadMovieNum("swf/demo.swf", 1);
}
onClipEvent (enterFrame) {
percentloaded = Math.floor((_level1.getBytesLoaded()/_level1.getBytesTotal())*100);
if (percentloaded == 100 && !initialize) {
_level1.mysound();
initialize = true;
_visible = false;
}
}
The problem is the preloader loads the new movie (demo.swf) onto level 1 in the main movie in the top left corner (not inside my clip holder MC). It seems logical that my problem is because it's loading onto level 1. But if I play with that number, my preloader doesn't work. Any thoughts?
Thank you.
Re: Preload Sound Object Problem
Quote:
Originally posted by beachin
Any thoughts?
explain it clearer :p eG
load sound object > revise
Sorry. It was kind of late last night/this morning. Let me try and be clearer:
I have a main movie (webRH4.fla) that has an Empty MC to hold a loaded external file.
The external file is actually two files (one calling up the other) from a subfolder (swf). My main problem is this is the first time I've worked with preloading a sound object. So I built the preloader from one of the tutorials to preload the external SWF file. I get the preloader to load fine (swf/loaddemo.swf). But when it loads the sound file (swf/demo.swf) it doesn't load it in my clip holder on the main movie. It loads it on top of the main movie in level 1 at the default top left corner. I realize that is what my code is telling it do, but I don't how to adjust the code in the (loaddemo.fla) file to load the sound file (demo.fla) in the clip holder on the main movie.
Here are the source files of what I'm trying to do:
http://portfoliodisc.com/site/files/sitetest.zip
When you click on the first button (demo), it jumps to the label to start the external load. I hope the source files shed a little light on what I'm trying to do. And as always, I appreciate your help.
Thanks.