9 Replies Latest reply on Apr 21, 2007 10:30 PM by kglad

    overlaping movie problem

    nu_guy
      The project includes several overlapping movies controlled by buttons the size of the start of the movie. I've got everything working except that when I roll out and on to another button I need the movie that's playing to complete before the next movie starts so things will be smooth.

      Here's a portion of the script:

      b1.onRollOver = over;
      b1.onRollOut = out;

      function over() {
      movie1.gotoAndPlay(2);
      }

      function out() {
      movie1.gotoAndPlay(17);

      }

      b2.onRollOver = over2;
      b2.onRollOut = out2;

      function over2() {
      movie2.gotoAndPlay(2);
      }

      function out2() {
      movie2.gotoAndPlay(17);

      }

      b3.onRollOver = over3;
      b3.onRollOut = out3;

      function over3() {
      movie3.gotoAndPlay(2);
      }

      function out3() {
      movie3.gotoAndPlay(17);


      I've tried a bunch of if else statements but can't find one that will work. Anyone got any ideas? I'd love to get a handle on this. Been screwing around with it for about a half a day now.
        • 1. Re: overlaping movie problem
          kglad Adobe Community Professional & MVP
          on your movie1, movie2 etc frame 2 put

          donePlaying=false;

          and at the end of the frame 17 transition put

          donePlaying=true;

          you can then use:

          • 2. Re: overlaping movie problem
            nu_guy Level 1
            Thanks, I'll give that a try.
            • 3. Re: overlaping movie problem
              kglad Adobe Community Professional & MVP
              you're welcome.
              • 4. Re: overlaping movie problem
                nu_guy Level 1
                Ok I tried the script. I think I applied it correctly but it's not doing exactly what I wanted. The behavior, with or without the donePlaying = true and false statements is that the movie doesn't start on over, but on mouse out it jumps directly to frame 17 and continues to play to the end if a new mouse over event happens. It does immediately jump back to 17 if you go out then over then out before the clip has finished.

                What I need to happen is that a mouse over event starts the movie and it continues to play through the end running right past the stop at 17 if there is a mouse out event. I also want it to continue to the end if there is a second mouse over event before the end of the movie and then start the sequence over again.

                Thanks for your help..
                • 5. Re: overlaping movie problem
                  kglad Adobe Community Professional & MVP
                  it does that because that's what you asked for: "...when I roll out and on to another button I need the movie that's playing to complete before the next movie starts...".
                  • 6. overlaping movie problem
                    nu_guy Level 1
                    But I need the movie to start playing at frame 2 as you roll over. As it is when I roll over it begins at the roll out point (17) and that part of the movie completes. With the code you gave me anywhere in the script file I completely miss the roll over action. I've tried adjusting the statements but I can't find anything that works.

                    Maybe I don't have the code placed correctly. Are the donePlaying statements supposed to turn blue indicating reserved words? The statement doesn't in my script.

                    Sorry to be such a pain. I'm very comfortable with After Effects expressions, but this Action Script is like trying to learn a new language all over again.
                    • 7. Re: overlaping movie problem
                      kglad Adobe Community Professional & MVP
                      when you rollover, you want to goto frame 2 and play.

                      if there's a rollout while the rollover transition is playing you want what?
                      and if there's another rollover while the first rollover is playing you want what?
                      and if there's another rollover while the first rollout is playing you want what?
                      • 8. Re: overlaping movie problem
                        nu_guy Level 1
                        pretty simple really.

                        You roll over button 1 and frame 1 to 16 plays, you roll out and 17-34 plays.
                        If you roll out before the end of 1 - 16 then 1-16 plays and without stopping it proceeds to 17-34.

                        IOW, you roll in and out quickly and you get the entire movie. If you bump back over and out again the movie completes I don't want it to jump back to start before the movie completes. In fact, it would be great if an accidental bump of the button would be ignored.

                        The way I have it written now things work just fine unless you bump over and out of the button.

                        I just don't want anything happen until the entire clip completes if you bump back over or out of the clip when it's playing.

                        I've seen this on a ton of sites with animated flyout menus, with image galleries, with all kinds of things. Most of them work great and don't have any jumpping around if you're not completely accurate or steady with the mouse.

                        Thanks again.
                        • 9. Re: overlaping movie problem
                          kglad Adobe Community Professional & MVP
                          on frame 16 of you movieclips put: