View Full Version : Multiple MC methodology
YoungTurk
11-26-2002, 08:58 AM
I'm trying to sequentially attach 37 separate MC's into one scene but I'm having trouble getting the next MC into the main scene after the very first has played. Any suggestions on methodoogy to follow in this situation? Place an instance of each MC on the stage and then proceed frame by frame? Stick a little script at the end of each MC attaching the next MC? Can an array hold MC's? Just trying to look before I leap.
Just an idea but,
make an array (McArray) containing the name (id) (without "") of your mc.
set a var (ie)
i=0;
loadMovie(McArray[i]);
then made a function like
function test () {
/* not sure for frameNumber... Haven't got flashMx installed on the Pc I write the answer...*/
if (this[McArray[i]].frameNumber == this[McArray[i]].totalFrame) {
if (i<=McArray.length-1) {
// do the action you want, ie unload this movie and then load the next one
this[McArray[i]].unloadMovie();
i++;
attachmovieClip(McArray[i], "yourname", i)
}
}
}
then set an interval
setInterval(test, 40);
perhaps the syntax isn't really correct. It's because I write this answer in the PC's highSchool, and they haven't got flashMx, so sorry...
But it can help you, just for the way...
;)
YoungTurk
11-26-2002, 12:30 PM
Hmmmm....So, if an array can be used to call up MC's I may be able to work a randomiser in there as well. C'est fantastique! Merci beau coups!!
Sorry for my bad french but I'm english.
yes you can ie when you build your array and
framenumber is _framesloaded
and totalFrame is _totalframes
;)
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.