goto Label call from Javascript inside nested swf
Hello All,
I need some help.
I have tried various methods to get this to work, including External Interface which probably was too complex for my momentary knowledge.
I have following test case which works fine:
A HTML button calls the following function, the Flash movie jumps then to the desired frame Label "redframe"
function golabel() {
if (movieIsLoaded(thisMovie(movieName))) {
thisMovie(movieName).TGotoLabel("_level0/","redframe");
}
}
My problem is the following: I want Flash to go to a frame label inside of a swf, which is loaded into the main-swf by a preloader.
The loaded swf has the ID 'uiLoader'.
Inside of 'uiLoader' is a container called 'mainContainer'.
Inside of 'mainContainer' I want to go to the label 'string_power_measurement'.
Using "_level0.uiLoader.mainContainer" doesn't work for me.
function golabel2() {
if (movieIsLoaded(thisMovie(movieName))) {
thisMovie(movieName).TGotoLabel("_level0.uiLoader.mainContainer","string_power_measurement");
}
}
Does anyone has an idea how to solve this?
Apart from that I have a function which tells Javascript if the Main-Swf is loaded to prevent errors. I don't know if this also addresses the load of the nested swf. If not I would help how to address the nested swf next to the main swf. Ideal would be a function not only stops itself if the swfs aren't fully loaded, but which waits until the movie is fully loaded and then triggers the function.
This is my Code:
function movieIsLoaded (theMovie) {
if (typeof(theMovie) != "undefined") {
return theMovie.PercentLoaded() == 100;
} else {
return false;
}
}
Any help would be great.
Many thanks,
Felix
