Random Sender MC not working

  • Bobbo171
  • Graduate
  • Graduate
  • Bobbo171
  • Posts: 174

Post 3+ Months Ago

In this filehere 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:
Code: [ Select ]
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);
};
  1. stop();
  2. ID = [];
  3. function goOn(idNum) {
  4.     _root["MC"+i].play();
  5.     clearInterval(ID[idNum]);
  6. }
  7. onEnterFrame = function () {
  8.     //this adds to the array
  9.     idAdder++;
  10.     ran = random(10000)+2000;
  11.     i = random(9)+1;
  12.     ID[idAdder] = setInterval(goOn, ran, idAdder);
  13. };

To:
Code: [ Select ]
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);
};
  1. stop();
  2. ID = [];
  3. function goOn(idNum) {
  4.     if (i == 1) {
  5.             _root.MC1.play();
  6.         }
  7.         else if (i == 2) {
  8.             _root.MC2.play();
  9.         }
  10.         else if (i == 3) {
  11.             _root.MC3.play();
  12.         }
  13.         else if (i == 4) {
  14.             _root.MC4.play();
  15.         }
  16.         else if (i == 5) {
  17.             _root.MC5.play();
  18.         }
  19.         else if (i == 6) {
  20.             _root.MC6.play();
  21.         }
  22.         else if (i == 7) {
  23.             _root.MC7.play();
  24.         }
  25.         else if (i == 8) {
  26.             _root.MC8.play();
  27.         }
  28.         else if (i == 9) {
  29.             _root.MC9.play();
  30.         }
  31.         else if (i == 10) {
  32.             _root.MC10.play();
  33.         }
  34.     clearInterval(ID[idNum]);
  35. }
  36. onEnterFrame = function () {
  37.     //this adds to the array
  38.     idAdder++;
  39.     ran = random(10000)+2000;
  40.     i = random(9)+1;
  41.     ID[idAdder] = setInterval(goOn, ran, idAdder);
  42. };

This, which i thought for shure would work....and it didnt, Im really stuck on this problem


any help to solve this is appreciated :)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 15 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.