20 Replies Latest reply on Oct 26, 2006 6:38 PM by kglad

    playing mulitple mc's at one time.

    MichelleTen
      Hi. I have a website that I'm designing and I need a way so that when I press a button it goes to a frame it creates two new emptyMovieClips and plays the two movies at the same time. I have it working with just one movie clip and the code I have is:

      on (press) {
      gotoAndPlay("mar");
      this.createEmptyMovieClip("original_mc", depth++);
      mcA = ["IceAd_next_mc", "Marriott_fade_mc"];
      index = 0;
      xx = 448;
      yy = 105;
      mc = this.attachMovie(mcA[index], "mc", 0);
      mc._x = xx;
      mc._y = yy;
      trace(mc);
      this.onEnterFrame = function() {
      if (mc._currentframe == mc._totalframes) {
      index++;
      if (index<mcA.length) {
      mc.removeMovieClip();
      attachMovie(mcA[index], "mc", 0);
      mc._x = this.xx;
      mc._y = this.yy;
      }
      }
      };


      }


      I also can make it work for the second movie clip alone, but not together the code for the second movie clip is just below. Is there a way to combine the two so that they both play at the same time?

      this.createEmptyMovieClip("text_mc", depth++);
      mcA = ["ICE_txt_mc", "MAR_txt2_mc"];
      index = 1;
      xx = 217.5;
      yy = 367.5;
      mc = this.attachMovie(mcA[index], "mc", 1);
      mc._x = xx;
      mc._y = yy;
      trace(mc);
      this.onEnterFrame = function() {
      if (mc._currentframe == mc._totalframes) {
      index++;
      if (index<mcA.length) {
      mc.removeMovieClip();
      attachMovie(mcA[index], "mc", 1);
      mc._x = this.xx;
      mc._y = this.yy;
      }
      }
      };


      Thanks!