In this file
here I have 10 enemy movieclips that I want to be sent across the stage randomly by and 11th white movie clip to the side. This was working for only MC1-MC5, none of the others, so I took one of the other, red guys, and deleted it and replaced it with a copied and pasted brown guy, thinking that I had an error in the red guy's MC, this wasnt the case...I have tried many other things, but I cant get any of those MC's to be sent out...Ive just recently changed my script in the white sender box from this:
stop();
ID = [];
function goOn(idNum) {
_root["MC"+i].play();
clearInterval(ID[idNum]);
}
onEnterFrame = function () {
//this adds to the array
idAdder++;
ran = random(10000)+2000;
i = random(9)+1;
ID[idAdder] = setInterval(goOn, ran, idAdder);
};
- stop();
- ID = [];
- function goOn(idNum) {
- _root["MC"+i].play();
- clearInterval(ID[idNum]);
- }
- onEnterFrame = function () {
- //this adds to the array
- idAdder++;
- ran = random(10000)+2000;
- i = random(9)+1;
- ID[idAdder] = setInterval(goOn, ran, idAdder);
- };
To:
stop();
ID = [];
function goOn(idNum) {
if (i == 1) {
_root.MC1.play();
}
else if (i == 2) {
_root.MC2.play();
}
else if (i == 3) {
_root.MC3.play();
}
else if (i == 4) {
_root.MC4.play();
}
else if (i == 5) {
_root.MC5.play();
}
else if (i == 6) {
_root.MC6.play();
}
else if (i == 7) {
_root.MC7.play();
}
else if (i == 8) {
_root.MC8.play();
}
else if (i == 9) {
_root.MC9.play();
}
else if (i == 10) {
_root.MC10.play();
}
clearInterval(ID[idNum]);
}
onEnterFrame = function () {
//this adds to the array
idAdder++;
ran = random(10000)+2000;
i = random(9)+1;
ID[idAdder] = setInterval(goOn, ran, idAdder);
};
- stop();
- ID = [];
- function goOn(idNum) {
- if (i == 1) {
- _root.MC1.play();
- }
- else if (i == 2) {
- _root.MC2.play();
- }
- else if (i == 3) {
- _root.MC3.play();
- }
- else if (i == 4) {
- _root.MC4.play();
- }
- else if (i == 5) {
- _root.MC5.play();
- }
- else if (i == 6) {
- _root.MC6.play();
- }
- else if (i == 7) {
- _root.MC7.play();
- }
- else if (i == 8) {
- _root.MC8.play();
- }
- else if (i == 9) {
- _root.MC9.play();
- }
- else if (i == 10) {
- _root.MC10.play();
- }
- clearInterval(ID[idNum]);
- }
- onEnterFrame = function () {
- //this adds to the array
- idAdder++;
- ran = random(10000)+2000;
- i = random(9)+1;
- ID[idAdder] = setInterval(goOn, ran, idAdder);
- };
This, which i thought for shure would work....and it didnt, Im really stuck on this problem
any help to solve this is appreciated
