A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: !!! MC Communication Help !!!

  1. #1

    Smile

    I have 4 MCs - all activated by separate buttons. I only want one MC activated at a time. Each MC has a small intro and stops on frame 43. And each has a small outro that begins at frame 44 and continues to frame 60.

    I am trying to make it so that when one MC has already been activated and is resting at frame 43 - when another MC is activated, the original one opened plays the outro(form frame 60) while the newly activated MC plays the intro.

    All this has to be achieved by not affecting any of the other inactive MCs... I know this is possible ??? HELP ME

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    If you give each clip an instance name

    clip0, clip1, clip2 and clip3,

    if now on the timeline containing these clips you place the code
    Code:
    function playClip(id) {
      for (i = 0; i < 4; ++i) {
        if (i != id) {
          if (this["clip" + i]._currentframe == 43) {
            this["clip" + i].gotoAndPlay(44);
          }
        } else {
          this["clip" + i].gotoAndPlay(1);
        }
      }
    }
    then make your buttons (again on the same timeline)

    (button for clip0)

    on (release) {
    playClip(0);
    }


    (button for clip1)

    on (release) {
    playClip(1);
    }

    and so on for each clip

  3. #3
    catbert303

    Thanks mate... worked perfectly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center