hi all,
I have a problem with loading external .
swf's into my flash. I can load them but they all load at the toplevel. How can I make them load into a certain layer/ You can see my problem here:
http://www.gotoandflash.com/sanderbe...ite_apr12.html
this is my code so far:
- Code: Select all
// Create a Movie Clip to load the swf Movie into
this.createEmptyMovieClip("myExternallyLoadedSWFMovieHolder", 0);
// A variable to hold the name and location of where the external swf Movie is located
var myVariable = "http://www.gotoandflash.com/sanderbeenen/video1.swf";
// Set the Movie's location on the Stage
myExternallyLoadedSWFMovieHolder._x = 350;
myExternallyLoadedSWFMovieHolder._y = 450;
/* Set the Progress Bar to manual mode so that we can reset its value back to 0. We don't want it staring from 100 ! */
myProgressBar.mode = "manual";
// Reset the Progress Bar back to zero
myProgressBar.setProgress(0, 100);
// Show the Progress Bar
myProgressBar._visible = true;
// Create a listener object event.
myProgressBarListener = new Object();
// When the Progress Bar is complete and has preloaded the Movie, the listener will call and run this code below:
myProgressBarListener = function (eventObject) {
// Hide the Progress Bar now the Movie is loaded
myProgressBar._visible = false;
// This next section is optional.
// If you wish to remain on Frame 2 and view the External Movie do nothing
// Otherwise un-comment any of the options bellow:
// Plays the Movie from Frame 2 onwards:
// play();
// Go to the next Frame:
// nextFrame();
// Go to the next scene but may not automatically play beyond the Frame 1 in the next scene:
// nextScene();
// Goes to a Frame Label or Frame number and Play:
// gotoAndPlay("myFrameLabel");
// gotoAndPlay(10);
// Go to and stop at the Frame Label or Frame number:
// gotoAndStop("myFrameLabel");
// gotoAndStop(10);
// closes the function
};
// Declares a listener that detects when the Progress Component has loaded the external Movie and is complete.
// It will call the function myProgressBarListener when the external swf Movie has loaded
myProgressBar.addEventListener("complete", myProgressBarListener);
// Set up the Progress Bar Component variables
// Set up the Progress Bar Component to polled when loading the Movie. It has to be set to polled to work
myProgressBar.mode = "polled";
// Set the preloader source to show the progress of the loader Component as it loads the external swf Movie
myProgressBar.source = "myExternallyLoadedSWFMovieHolder";
/* This is how we automatically load the external swf Movie. We call the load Movie Clip event and load the external swf Movie into the Movie Clip we created through ActionScript */
loadMovie(_root.myVariable, _root.myExternallyLoadedSWFMovieHolder);
// Stop the Movie at the frame until the Movie is loaded
stop();
I guess I have to add some script to the location part or something?
Hope someone can help me

marieke