2 Replies Latest reply on Nov 14, 2008 12:57 PM by garydg

    duplicate mc problem


      I am creating a flash file that duplicates a mc (jclip_mc) every few seconds or so on random places on the screen. This works.
      I would also like to scale the mc depending on where on the screen it appears. If it appears on the upper half, it should scale 50%. On the lower half, no scale. This I can't make to work. The code is below.

      mycount = 0;
      function createjclip_mc() {
      if (mycount<50) {
      randomX = 500*Math.random() + 100;
      randomY = 300*Math.random() + 100;
      eval("jclip_mc"+mycount)._x = randomX;
      eval("jclip_mc"+mycount)._y = randomY;

      newmcname = ("jclip_mc"+mycount);
      if (randomY < 250) {

      } else {
      } else {
      for(var i = 0;i<50;i++){
      ID = setInterval(createjclip_mc,4000);

      I figured if I do this; newmcname = ("jclip_mc"+mycount);
      to refer to the new mc name in the conditional if/else, it would work, but it doesn't.

      Any help would be greatly appreciated.