i’m having trouble understanding navigation with externally loaded swfs.
i want a button press to load one of the external .swfs (chosen randomly) into a container movieclip already on the stage. when it finishes playing that, i want the playhead to return to this frame and run again. the problem is that i’m inexperience with using external swfs and i’m not sure what happens with the playhead while this external swf plays. does it keep refreshing this frame?? or does it stop temporarily while the external plays (and if so, how do i control it from there?)
below is my code:
//remove movie clip
mcContainer.unloadMovie();
//limit # of external that can be swfs loaded
max = 3;
// * -------- FUNCTION TO LOAD EXTERNAL SWF ------- *//
loadContent = function(){
//max count not reached
if(counter>=max){
gotoAndPlay("transition1");
} else {
selectRandom();
counter ++;
mcContainer.loadMovie(path+randomFile);
}
}
// * -------- FUNCTION TO SELECT RANDOM FILE------- *//
// * -------- adapted from Kirupa Chinnathambi ------- *//
selectRandom = function(){
filename = ["p01_01.swf", "p01_02.swf", "p01_03.swf", "p01_04.swf", "p01_05.swf", "p01_06.swf"];
path = "http://a.parsons.edu/~lisa/spring04/interactivity/final/swfs/";
i = filename.length;
//randomly select swf
k = Math.floor(Math.random()*i);
randomFile = filename[k];
return(randomFile);
return(path);
}
// * -------end kirupa code ----------- * //
// * -------- BUTTON FUNCTIONS --------- * //
// each button calls same load function
b1.onPress = function(){
loadContent();
}
b2.onPress = function(){
loadContent();
}
b3.onPress = function(){
loadContent();
}
stop();
thanks for your help. i am kind of new and probably making many mistakes, but i cant find the answer here or on actionscript.org, nor in the macromedia help and starting to feel dumb