5 Replies Latest reply on Feb 24, 2010 6:47 AM by kglad

    problems with going to next frame after mc ends

    dzisign

      Hey Community,

       

      I know, I am a newbie and this question aroused at least 10 times but I just can't figure out how to go to next frame, after my movieclip in frame 2 ends.

       

      What I've got running so far:

       

      Homescreen with BG-graphic and a "gallery"button. When I click on gallery the timeline jumps to frame 2, where my galleryVideo.f4v starts playing. Now I want the timeline to jump to frame 3 after the movie stopped playing. I searched the internet for 2 days now and all possible solutions don't seem to work because I am more a designer than a programmer. I tried it with

       

      1. on frame 2

      play();

      stop();

      goToAndStop(3);

       

      2. on frame 2 (copied from another discussion)

      var dyMCL:MovieClipLoader = new MovieClipLoader();
      dyMCL.addListener(this);
      dyMCL.loadClip("galleryVideo.f4v",1);
      function onLoadInit(mc:MovieClip) {
      dyMCL.removeListener(dyMCL);
      checkFrames(mc);
      }
      function checkFrames(mc:MovieClip) {
      mc.onEnterFrame = function() {
      if (this._currentframe == this._totalframes) {
      _root.gotoAndPlay(3);
      delete this.onEnterFrame;
      }
      };
      }

       

      If I take 1. the movie clip starts playing and seems to stop with its own 2nd frame (dunno why). If I take 2., the movie clip doesn't start playing (clicking "gallery"button jumps directly to frame 3 before playing frame 2 correctly)

       

      So pleeeeaase help me. And when you post solutions please try to make them foolproof for me x)

       

      Thank you & take care

      dziga