PDA

View Full Version : load movie



DaDeViL
September 7th, 2003, 04:12 PM
ok so i am using this script to preload movies into my master clip:

function preload(clip) {
if (!loaded) {

if (clip.getBytesLoaded>0 && clip.getBytesLoaded>=clip.getBytesTotal) {
loaded = true;
}

var percent = (clip.getBytesLoaded()/clip.getBytesTotal()); loadBar._width = 100*percent;
// replace 100 for your loadbar width
}
}

loadMovie("home.swf", _root.containerMC);
_root.home.button.onPress = function() {
loadMovie("home.swf", _root.containerMC);
};

But, in each movie clip that is loaded into the master clip i also want to load an external image/swf movie from a folder, so it will be a random image everytime...(makes site more interesting)..but I cant figure out how to do this. Here is the code im using to load a movie into a movie thats loaded into the master clip:

loadMovie("images/models/img1.swf",_level0._root.vector.c);

click here to see it so far (http://test.un-identified.com/usoundz/)

click on 'Current Parties' to see the problem im having...it is completely switching the loaded Movie, instead of putting the pic over top...

claudio
September 7th, 2003, 04:28 PM
pictures_array = ["home", "kid", "house", "cat", "tree"];//store your picture names here
_root.vector.c.loadMovie("images/models/"+pictures_array[Math.floor(Math.random()*pictures_array.length)]+".jpg");

DaDeViL
September 7th, 2003, 04:58 PM
thats not the problem im having..its dynamically loading a movie clip into an already dynamically loaded movie clip

DaDeViL
September 8th, 2003, 11:19 PM
is it even possible to load a movie dynamically into a movie that has already been loaded dynamically into a master movie?