okay, i browsed thru alot of posts here, but i dont seem to figure it out myself, so please help me. i unfortunatly can’t post the fla’s here, cause my client would kill me
so, basically i got a few swfs. the first one is “main.swf” and the second one is “external_01.swf” and so on.
i dynamically create a blank movieClip in “main.swf” in which i can load all the “external_xx.swf” files, based on what buttons i click, which all works out perfectly fine. my problem is the following: i got one external file that has quite alot data, all divided by labels on the main timeline of that “external_01.swf”.
but somehow i can’t seem to navigate to these labels from the “main.swf”.
here is the code so far for one button in “main.swf”:
on (release) {
_root.loadercontainer.loadMovie(“preloader.swf”);
_root.mccontainer5.loadMovie(“clips/external_01.swf”);
_root.mccontainer5.gotoAndPlay(“hans”);
}
so, nevermind the preloader just tell me, how i can get the “external_01.swf” to play the label “hans”?
Just make a simple preloading function, something like this
function loader() {
var loading = Math.floor(mccontainer5.getBytesLoaded()/1024);
var total = Math.floor(mccontainer5.getBytesTotal()/1024);
if (loading>=total && loading>1) {
mccontainer5.gotoAndPlay(“hans”);
}
}
call the function after loadmovie.(oops nearly forgot:- you need to call with either enterFrame or setInterval. I have some examples if you get stuck
well if you are comfortable with that, thats all that matters. I like to to keep all code together(if i can)
if you put something like this on your main timeline
createEmptyMovieClip(“mccontainer5”, 5);
function loader(clip) {
var loading = Math.floor(clip.getBytesLoaded()/1024);
var total = Math.floor(clip.getBytesTotal()/1024);
percent = loading/total;
//textfield variable name loading_txt
loading_txt = Math.floor(percent*100)+" % loaded "+clip._name;
if (loading == total && loading>1) {
clearinterval(myInterval);
//all control is yours from here
clip.gotoAndPlay(“whatever”);
clip._x = 200;
clip._yscale = 50;
clip._xscale = 50;
}
}
//and on your button
on (release) {
_root.mccontainer5.loadMovie(“movie1.swf”);
myinterval = setInterval(loader, 20, mccontainer5);
}
this would also serve as a preloader and the function can be reused by your other buttons.
okay, nice. i have copied the text so i can try this one out aswell.
but as i allready have got a preloader for the external swfs (a neat little on with textfields for the bytes and a bar and stuff) and the way i posted before works for me at the moment - i will stick with that for now… as i am really short on time for this project… but thx alot for your time and help.