Navigation for external movie

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 :frowning:

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) {

so, nevermind the preloader just tell me, how i can get the “external_01.swf” to play the label “hans”?

thx alot for the help - cheers, cyze.

You need to check if it has loaded before you can tell it to do anything. Set up a loop to check getBytesLoaded()/getBytestotal() of your container.

erm, and how can i do this? i am not too good at action script yet… would be really appreciated if you cold help me a bit more.

thx - cyze

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) {

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

actually, i think i might have found another good solution to my problem:

for main.swf:

on (release) {
_root.framepos = “hans”;

i can replace “hans” with any other label in the “external_01.swf”, depending on wich label has to be displayed.

and for a frame in external_01.swf:

if (_root.framepos == “hans”) {
if (_root.framepos == “otherlabelname”) {

it seems to work for me… what do you think, stringy?

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) {
//all control is yours from here
clip._x = 200;
clip._yscale = 50;
clip._xscale = 50;

//and on your button

on (release) {
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.

regards from berlin, cyze.