1 2 Previous Next 67 Replies Latest reply on Oct 1, 2006 3:06 PM by kglad

    Movieclip button

    angelina28
      Hi! I have a movieclip button and this is my code:

      b1.onRelease = function() {
      _root.b1.gotoAndStop(6);
      };
      b1.onRollOver = function() {
      _root.b1.gotoAndPlay(2);
      };
      b1.onRollOut = function() {
      _root.b1.gotoAndPlay(7);
      };

      b1 is the name of my movieclip button. When the user clicks the button, I want to stop the button at frame 6. This works fine if I take out the onRollOut function. But I need to somehow keep the OnRollOut, but I don't know how to keep it from interfering with the onRelease function.

      Thanks in advance for any help or suggestions.
        • 1. Re: Movieclip button
          Level 7
          angelina28,

          > Hi! I have a movieclip button and this is my code:

          Okay ...

          > b1.onRelease = function() {
          > _root.b1.gotoAndStop(6);
          > };

          Ah. Right off the bat, you may want to use the global "this" property,
          which refers to whatever object or timeline it's in.

          b1.onRelease = function() {
          this.gotoAndStop(6);
          }

          Less typing, and also less prone to errors, depending on how long the
          path reference is to the object (here, a movie clip) in question.

          > When the user clicks the button, I want to stop the
          > button at frame 6. This works fine if I take out the
          > onRollOut function.

          That makes sense, right? After the use clicks and releases, the user is
          very likely to move the mouse away from the button. The onRollOut event is
          the last one to get triggered.

          > But I need to somehow keep the OnRollOut, but I
          > don't know how to keep it from interfering with the
          > onRelease function.

          Because you're using a movie clip to do this, you have all the features
          that a movie clip provides, including the fact that you can add a script
          layer inside the clip. It's good as a best practice to keep most of your
          code in the main timeline, but I personally think it's fine, here and there,
          to put the occasional stop() or gotoAndStop(), etc. inside movie clip
          timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
          when someone rolls out, the clip will go to frame 7, do its thing, continue
          to frame 8, then stop at frame 6.


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: Movieclip button
            TimSymons Level 1
            Are you trying to simulate a toggling effect? Something like a checkbox that has a checked state and an unchecked state?

            If so, that you can do something like this:

            var isToggled:Boolean = false;
            b1.onRelease = function() {
            isToggled = true;
            _root.b1.gotoAndStop(6);
            };
            b1.onRollOver = function() {
            _root.b1.gotoAndPlay(2);
            };
            b1.onRollOut = function() {
            if (isToggled) {
            _root.b1.gotoAndPlay(6);
            } else {
            _root.b1.gotoAndPlay(7);
            }
            };

            Tim
            • 3. Re: Movieclip button
              Level 7
              angelina28,

              > Hi! I have a movieclip button and this is my code:

              Okay ...

              > b1.onRelease = function() {
              > _root.b1.gotoAndStop(6);
              > };

              Ah. Right off the bat, you may want to use the global "this" property,
              which refers to whatever object or timeline it's in.

              b1.onRelease = function() {
              this.gotoAndStop(6);
              }

              Less typing, and also less prone to errors, depending on how long the
              path reference is to the object (here, a movie clip) in question.

              > When the user clicks the button, I want to stop the
              > button at frame 6. This works fine if I take out the
              > onRollOut function.

              That makes sense, right? After the use clicks and releases, the user is
              very likely to move the mouse away from the button. The onRollOut event is
              the last one to get triggered.

              > But I need to somehow keep the OnRollOut, but I
              > don't know how to keep it from interfering with the
              > onRelease function.

              Because you're using a movie clip to do this, you have all the features
              that a movie clip provides, including the fact that you can add a script
              layer inside the clip. It's good as a best practice to keep most of your
              code in the main timeline, but I personally think it's fine, here and there,
              to put the occasional stop() or gotoAndStop(), etc. inside movie clip
              timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
              when someone rolls out, the clip will go to frame 7, do its thing, continue
              to frame 8, then stop at frame 6.


              David Stiller
              Adobe Community Expert
              Dev blog, http://www.quip.net/blog/
              "Luck is the residue of good design."


              • 4. Re: Movieclip button
                Level 7
                angelina28,

                > Hi! I have a movieclip button and this is my code:

                Okay ...

                > b1.onRelease = function() {
                > _root.b1.gotoAndStop(6);
                > };

                Ah. Right off the bat, you may want to use the global "this" property,
                which refers to whatever object or timeline it's in.

                b1.onRelease = function() {
                this.gotoAndStop(6);
                }

                Less typing, and also less prone to errors, depending on how long the
                path reference is to the object (here, a movie clip) in question.

                > When the user clicks the button, I want to stop the
                > button at frame 6. This works fine if I take out the
                > onRollOut function.

                That makes sense, right? After the use clicks and releases, the user is
                very likely to move the mouse away from the button. The onRollOut event is
                the last one to get triggered.

                > But I need to somehow keep the OnRollOut, but I
                > don't know how to keep it from interfering with the
                > onRelease function.

                Because you're using a movie clip to do this, you have all the features
                that a movie clip provides, including the fact that you can add a script
                layer inside the clip. It's good as a best practice to keep most of your
                code in the main timeline, but I personally think it's fine, here and there,
                to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                when someone rolls out, the clip will go to frame 7, do its thing, continue
                to frame 8, then stop at frame 6.


                David Stiller
                Adobe Community Expert
                Dev blog, http://www.quip.net/blog/
                "Luck is the residue of good design."


                • 5. Re: Movieclip button
                  Level 7
                  angelina28,

                  > Hi! I have a movieclip button and this is my code:

                  Okay ...

                  > b1.onRelease = function() {
                  > _root.b1.gotoAndStop(6);
                  > };

                  Ah. Right off the bat, you may want to use the global "this" property,
                  which refers to whatever object or timeline it's in.

                  b1.onRelease = function() {
                  this.gotoAndStop(6);
                  }

                  Less typing, and also less prone to errors, depending on how long the
                  path reference is to the object (here, a movie clip) in question.

                  > When the user clicks the button, I want to stop the
                  > button at frame 6. This works fine if I take out the
                  > onRollOut function.

                  That makes sense, right? After the use clicks and releases, the user is
                  very likely to move the mouse away from the button. The onRollOut event is
                  the last one to get triggered.

                  > But I need to somehow keep the OnRollOut, but I
                  > don't know how to keep it from interfering with the
                  > onRelease function.

                  Because you're using a movie clip to do this, you have all the features
                  that a movie clip provides, including the fact that you can add a script
                  layer inside the clip. It's good as a best practice to keep most of your
                  code in the main timeline, but I personally think it's fine, here and there,
                  to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                  timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                  when someone rolls out, the clip will go to frame 7, do its thing, continue
                  to frame 8, then stop at frame 6.


                  David Stiller
                  Adobe Community Expert
                  Dev blog, http://www.quip.net/blog/
                  "Luck is the residue of good design."


                  • 6. Re: Movieclip button
                    Level 7
                    angelina28,

                    > Hi! I have a movieclip button and this is my code:

                    Okay ...

                    > b1.onRelease = function() {
                    > _root.b1.gotoAndStop(6);
                    > };

                    Ah. Right off the bat, you may want to use the global "this" property,
                    which refers to whatever object or timeline it's in.

                    b1.onRelease = function() {
                    this.gotoAndStop(6);
                    }

                    Less typing, and also less prone to errors, depending on how long the
                    path reference is to the object (here, a movie clip) in question.

                    > When the user clicks the button, I want to stop the
                    > button at frame 6. This works fine if I take out the
                    > onRollOut function.

                    That makes sense, right? After the use clicks and releases, the user is
                    very likely to move the mouse away from the button. The onRollOut event is
                    the last one to get triggered.

                    > But I need to somehow keep the OnRollOut, but I
                    > don't know how to keep it from interfering with the
                    > onRelease function.

                    Because you're using a movie clip to do this, you have all the features
                    that a movie clip provides, including the fact that you can add a script
                    layer inside the clip. It's good as a best practice to keep most of your
                    code in the main timeline, but I personally think it's fine, here and there,
                    to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                    timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                    when someone rolls out, the clip will go to frame 7, do its thing, continue
                    to frame 8, then stop at frame 6.


                    David Stiller
                    Adobe Community Expert
                    Dev blog, http://www.quip.net/blog/
                    "Luck is the residue of good design."


                    • 7. Re: Movieclip button
                      Level 7
                      angelina28,

                      > Hi! I have a movieclip button and this is my code:

                      Okay ...

                      > b1.onRelease = function() {
                      > _root.b1.gotoAndStop(6);
                      > };

                      Ah. Right off the bat, you may want to use the global "this" property,
                      which refers to whatever object or timeline it's in.

                      b1.onRelease = function() {
                      this.gotoAndStop(6);
                      }

                      Less typing, and also less prone to errors, depending on how long the
                      path reference is to the object (here, a movie clip) in question.

                      > When the user clicks the button, I want to stop the
                      > button at frame 6. This works fine if I take out the
                      > onRollOut function.

                      That makes sense, right? After the use clicks and releases, the user is
                      very likely to move the mouse away from the button. The onRollOut event is
                      the last one to get triggered.

                      > But I need to somehow keep the OnRollOut, but I
                      > don't know how to keep it from interfering with the
                      > onRelease function.

                      Because you're using a movie clip to do this, you have all the features
                      that a movie clip provides, including the fact that you can add a script
                      layer inside the clip. It's good as a best practice to keep most of your
                      code in the main timeline, but I personally think it's fine, here and there,
                      to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                      timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                      when someone rolls out, the clip will go to frame 7, do its thing, continue
                      to frame 8, then stop at frame 6.


                      David Stiller
                      Adobe Community Expert
                      Dev blog, http://www.quip.net/blog/
                      "Luck is the residue of good design."


                      • 8. Re: Movieclip button
                        Level 7
                        angelina28,

                        > Hi! I have a movieclip button and this is my code:

                        Okay ...

                        > b1.onRelease = function() {
                        > _root.b1.gotoAndStop(6);
                        > };

                        Ah. Right off the bat, you may want to use the global "this" property,
                        which refers to whatever object or timeline it's in.

                        b1.onRelease = function() {
                        this.gotoAndStop(6);
                        }

                        Less typing, and also less prone to errors, depending on how long the
                        path reference is to the object (here, a movie clip) in question.

                        > When the user clicks the button, I want to stop the
                        > button at frame 6. This works fine if I take out the
                        > onRollOut function.

                        That makes sense, right? After the use clicks and releases, the user is
                        very likely to move the mouse away from the button. The onRollOut event is
                        the last one to get triggered.

                        > But I need to somehow keep the OnRollOut, but I
                        > don't know how to keep it from interfering with the
                        > onRelease function.

                        Because you're using a movie clip to do this, you have all the features
                        that a movie clip provides, including the fact that you can add a script
                        layer inside the clip. It's good as a best practice to keep most of your
                        code in the main timeline, but I personally think it's fine, here and there,
                        to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                        timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                        when someone rolls out, the clip will go to frame 7, do its thing, continue
                        to frame 8, then stop at frame 6.


                        David Stiller
                        Adobe Community Expert
                        Dev blog, http://www.quip.net/blog/
                        "Luck is the residue of good design."


                        • 9. Re: Movieclip button
                          Level 7
                          angelina28,

                          > Hi! I have a movieclip button and this is my code:

                          Okay ...

                          > b1.onRelease = function() {
                          > _root.b1.gotoAndStop(6);
                          > };

                          Ah. Right off the bat, you may want to use the global "this" property,
                          which refers to whatever object or timeline it's in.

                          b1.onRelease = function() {
                          this.gotoAndStop(6);
                          }

                          Less typing, and also less prone to errors, depending on how long the
                          path reference is to the object (here, a movie clip) in question.

                          > When the user clicks the button, I want to stop the
                          > button at frame 6. This works fine if I take out the
                          > onRollOut function.

                          That makes sense, right? After the use clicks and releases, the user is
                          very likely to move the mouse away from the button. The onRollOut event is
                          the last one to get triggered.

                          > But I need to somehow keep the OnRollOut, but I
                          > don't know how to keep it from interfering with the
                          > onRelease function.

                          Because you're using a movie clip to do this, you have all the features
                          that a movie clip provides, including the fact that you can add a script
                          layer inside the clip. It's good as a best practice to keep most of your
                          code in the main timeline, but I personally think it's fine, here and there,
                          to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                          timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                          when someone rolls out, the clip will go to frame 7, do its thing, continue
                          to frame 8, then stop at frame 6.


                          David Stiller
                          Adobe Community Expert
                          Dev blog, http://www.quip.net/blog/
                          "Luck is the residue of good design."


                          • 10. Re: Movieclip button
                            Level 7
                            angelina28,

                            > Hi! I have a movieclip button and this is my code:

                            Okay ...

                            > b1.onRelease = function() {
                            > _root.b1.gotoAndStop(6);
                            > };

                            Ah. Right off the bat, you may want to use the global "this" property,
                            which refers to whatever object or timeline it's in.

                            b1.onRelease = function() {
                            this.gotoAndStop(6);
                            }

                            Less typing, and also less prone to errors, depending on how long the
                            path reference is to the object (here, a movie clip) in question.

                            > When the user clicks the button, I want to stop the
                            > button at frame 6. This works fine if I take out the
                            > onRollOut function.

                            That makes sense, right? After the use clicks and releases, the user is
                            very likely to move the mouse away from the button. The onRollOut event is
                            the last one to get triggered.

                            > But I need to somehow keep the OnRollOut, but I
                            > don't know how to keep it from interfering with the
                            > onRelease function.

                            Because you're using a movie clip to do this, you have all the features
                            that a movie clip provides, including the fact that you can add a script
                            layer inside the clip. It's good as a best practice to keep most of your
                            code in the main timeline, but I personally think it's fine, here and there,
                            to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                            timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                            when someone rolls out, the clip will go to frame 7, do its thing, continue
                            to frame 8, then stop at frame 6.


                            David Stiller
                            Adobe Community Expert
                            Dev blog, http://www.quip.net/blog/
                            "Luck is the residue of good design."


                            • 11. Re: Movieclip button
                              Level 7
                              angelina28,

                              > Hi! I have a movieclip button and this is my code:

                              Okay ...

                              > b1.onRelease = function() {
                              > _root.b1.gotoAndStop(6);
                              > };

                              Ah. Right off the bat, you may want to use the global "this" property,
                              which refers to whatever object or timeline it's in.

                              b1.onRelease = function() {
                              this.gotoAndStop(6);
                              }

                              Less typing, and also less prone to errors, depending on how long the
                              path reference is to the object (here, a movie clip) in question.

                              > When the user clicks the button, I want to stop the
                              > button at frame 6. This works fine if I take out the
                              > onRollOut function.

                              That makes sense, right? After the use clicks and releases, the user is
                              very likely to move the mouse away from the button. The onRollOut event is
                              the last one to get triggered.

                              > But I need to somehow keep the OnRollOut, but I
                              > don't know how to keep it from interfering with the
                              > onRelease function.

                              Because you're using a movie clip to do this, you have all the features
                              that a movie clip provides, including the fact that you can add a script
                              layer inside the clip. It's good as a best practice to keep most of your
                              code in the main timeline, but I personally think it's fine, here and there,
                              to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                              timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                              when someone rolls out, the clip will go to frame 7, do its thing, continue
                              to frame 8, then stop at frame 6.


                              David Stiller
                              Adobe Community Expert
                              Dev blog, http://www.quip.net/blog/
                              "Luck is the residue of good design."


                              • 12. Re: Movieclip button
                                Level 7
                                angelina28,

                                > Hi! I have a movieclip button and this is my code:

                                Okay ...

                                > b1.onRelease = function() {
                                > _root.b1.gotoAndStop(6);
                                > };

                                Ah. Right off the bat, you may want to use the global "this" property,
                                which refers to whatever object or timeline it's in.

                                b1.onRelease = function() {
                                this.gotoAndStop(6);
                                }

                                Less typing, and also less prone to errors, depending on how long the
                                path reference is to the object (here, a movie clip) in question.

                                > When the user clicks the button, I want to stop the
                                > button at frame 6. This works fine if I take out the
                                > onRollOut function.

                                That makes sense, right? After the use clicks and releases, the user is
                                very likely to move the mouse away from the button. The onRollOut event is
                                the last one to get triggered.

                                > But I need to somehow keep the OnRollOut, but I
                                > don't know how to keep it from interfering with the
                                > onRelease function.

                                Because you're using a movie clip to do this, you have all the features
                                that a movie clip provides, including the fact that you can add a script
                                layer inside the clip. It's good as a best practice to keep most of your
                                code in the main timeline, but I personally think it's fine, here and there,
                                to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                when someone rolls out, the clip will go to frame 7, do its thing, continue
                                to frame 8, then stop at frame 6.


                                David Stiller
                                Adobe Community Expert
                                Dev blog, http://www.quip.net/blog/
                                "Luck is the residue of good design."


                                • 13. Re: Movieclip button
                                  Level 7
                                  angelina28,

                                  > Hi! I have a movieclip button and this is my code:

                                  Okay ...

                                  > b1.onRelease = function() {
                                  > _root.b1.gotoAndStop(6);
                                  > };

                                  Ah. Right off the bat, you may want to use the global "this" property,
                                  which refers to whatever object or timeline it's in.

                                  b1.onRelease = function() {
                                  this.gotoAndStop(6);
                                  }

                                  Less typing, and also less prone to errors, depending on how long the
                                  path reference is to the object (here, a movie clip) in question.

                                  > When the user clicks the button, I want to stop the
                                  > button at frame 6. This works fine if I take out the
                                  > onRollOut function.

                                  That makes sense, right? After the use clicks and releases, the user is
                                  very likely to move the mouse away from the button. The onRollOut event is
                                  the last one to get triggered.

                                  > But I need to somehow keep the OnRollOut, but I
                                  > don't know how to keep it from interfering with the
                                  > onRelease function.

                                  Because you're using a movie clip to do this, you have all the features
                                  that a movie clip provides, including the fact that you can add a script
                                  layer inside the clip. It's good as a best practice to keep most of your
                                  code in the main timeline, but I personally think it's fine, here and there,
                                  to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                  timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                  when someone rolls out, the clip will go to frame 7, do its thing, continue
                                  to frame 8, then stop at frame 6.


                                  David Stiller
                                  Adobe Community Expert
                                  Dev blog, http://www.quip.net/blog/
                                  "Luck is the residue of good design."


                                  • 14. Re: Movieclip button
                                    Level 7
                                    angelina28,

                                    > Hi! I have a movieclip button and this is my code:

                                    Okay ...

                                    > b1.onRelease = function() {
                                    > _root.b1.gotoAndStop(6);
                                    > };

                                    Ah. Right off the bat, you may want to use the global "this" property,
                                    which refers to whatever object or timeline it's in.

                                    b1.onRelease = function() {
                                    this.gotoAndStop(6);
                                    }

                                    Less typing, and also less prone to errors, depending on how long the
                                    path reference is to the object (here, a movie clip) in question.

                                    > When the user clicks the button, I want to stop the
                                    > button at frame 6. This works fine if I take out the
                                    > onRollOut function.

                                    That makes sense, right? After the use clicks and releases, the user is
                                    very likely to move the mouse away from the button. The onRollOut event is
                                    the last one to get triggered.

                                    > But I need to somehow keep the OnRollOut, but I
                                    > don't know how to keep it from interfering with the
                                    > onRelease function.

                                    Because you're using a movie clip to do this, you have all the features
                                    that a movie clip provides, including the fact that you can add a script
                                    layer inside the clip. It's good as a best practice to keep most of your
                                    code in the main timeline, but I personally think it's fine, here and there,
                                    to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                    timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                    when someone rolls out, the clip will go to frame 7, do its thing, continue
                                    to frame 8, then stop at frame 6.


                                    David Stiller
                                    Adobe Community Expert
                                    Dev blog, http://www.quip.net/blog/
                                    "Luck is the residue of good design."


                                    • 15. Re: Movieclip button
                                      Level 7
                                      angelina28,

                                      > Hi! I have a movieclip button and this is my code:

                                      Okay ...

                                      > b1.onRelease = function() {
                                      > _root.b1.gotoAndStop(6);
                                      > };

                                      Ah. Right off the bat, you may want to use the global "this" property,
                                      which refers to whatever object or timeline it's in.

                                      b1.onRelease = function() {
                                      this.gotoAndStop(6);
                                      }

                                      Less typing, and also less prone to errors, depending on how long the
                                      path reference is to the object (here, a movie clip) in question.

                                      > When the user clicks the button, I want to stop the
                                      > button at frame 6. This works fine if I take out the
                                      > onRollOut function.

                                      That makes sense, right? After the use clicks and releases, the user is
                                      very likely to move the mouse away from the button. The onRollOut event is
                                      the last one to get triggered.

                                      > But I need to somehow keep the OnRollOut, but I
                                      > don't know how to keep it from interfering with the
                                      > onRelease function.

                                      Because you're using a movie clip to do this, you have all the features
                                      that a movie clip provides, including the fact that you can add a script
                                      layer inside the clip. It's good as a best practice to keep most of your
                                      code in the main timeline, but I personally think it's fine, here and there,
                                      to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                      timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                      when someone rolls out, the clip will go to frame 7, do its thing, continue
                                      to frame 8, then stop at frame 6.


                                      David Stiller
                                      Adobe Community Expert
                                      Dev blog, http://www.quip.net/blog/
                                      "Luck is the residue of good design."


                                      • 16. Re: Movieclip button
                                        Level 7
                                        angelina28,

                                        > Hi! I have a movieclip button and this is my code:

                                        Okay ...

                                        > b1.onRelease = function() {
                                        > _root.b1.gotoAndStop(6);
                                        > };

                                        Ah. Right off the bat, you may want to use the global "this" property,
                                        which refers to whatever object or timeline it's in.

                                        b1.onRelease = function() {
                                        this.gotoAndStop(6);
                                        }

                                        Less typing, and also less prone to errors, depending on how long the
                                        path reference is to the object (here, a movie clip) in question.

                                        > When the user clicks the button, I want to stop the
                                        > button at frame 6. This works fine if I take out the
                                        > onRollOut function.

                                        That makes sense, right? After the use clicks and releases, the user is
                                        very likely to move the mouse away from the button. The onRollOut event is
                                        the last one to get triggered.

                                        > But I need to somehow keep the OnRollOut, but I
                                        > don't know how to keep it from interfering with the
                                        > onRelease function.

                                        Because you're using a movie clip to do this, you have all the features
                                        that a movie clip provides, including the fact that you can add a script
                                        layer inside the clip. It's good as a best practice to keep most of your
                                        code in the main timeline, but I personally think it's fine, here and there,
                                        to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                        timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                        when someone rolls out, the clip will go to frame 7, do its thing, continue
                                        to frame 8, then stop at frame 6.


                                        David Stiller
                                        Adobe Community Expert
                                        Dev blog, http://www.quip.net/blog/
                                        "Luck is the residue of good design."


                                        • 17. Re: Movieclip button
                                          Level 7
                                          angelina28,

                                          > Hi! I have a movieclip button and this is my code:

                                          Okay ...

                                          > b1.onRelease = function() {
                                          > _root.b1.gotoAndStop(6);
                                          > };

                                          Ah. Right off the bat, you may want to use the global "this" property,
                                          which refers to whatever object or timeline it's in.

                                          b1.onRelease = function() {
                                          this.gotoAndStop(6);
                                          }

                                          Less typing, and also less prone to errors, depending on how long the
                                          path reference is to the object (here, a movie clip) in question.

                                          > When the user clicks the button, I want to stop the
                                          > button at frame 6. This works fine if I take out the
                                          > onRollOut function.

                                          That makes sense, right? After the use clicks and releases, the user is
                                          very likely to move the mouse away from the button. The onRollOut event is
                                          the last one to get triggered.

                                          > But I need to somehow keep the OnRollOut, but I
                                          > don't know how to keep it from interfering with the
                                          > onRelease function.

                                          Because you're using a movie clip to do this, you have all the features
                                          that a movie clip provides, including the fact that you can add a script
                                          layer inside the clip. It's good as a best practice to keep most of your
                                          code in the main timeline, but I personally think it's fine, here and there,
                                          to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                          timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                          when someone rolls out, the clip will go to frame 7, do its thing, continue
                                          to frame 8, then stop at frame 6.


                                          David Stiller
                                          Adobe Community Expert
                                          Dev blog, http://www.quip.net/blog/
                                          "Luck is the residue of good design."


                                          • 18. Re: Movieclip button
                                            Level 7
                                            angelina28,

                                            > Hi! I have a movieclip button and this is my code:

                                            Okay ...

                                            > b1.onRelease = function() {
                                            > _root.b1.gotoAndStop(6);
                                            > };

                                            Ah. Right off the bat, you may want to use the global "this" property,
                                            which refers to whatever object or timeline it's in.

                                            b1.onRelease = function() {
                                            this.gotoAndStop(6);
                                            }

                                            Less typing, and also less prone to errors, depending on how long the
                                            path reference is to the object (here, a movie clip) in question.

                                            > When the user clicks the button, I want to stop the
                                            > button at frame 6. This works fine if I take out the
                                            > onRollOut function.

                                            That makes sense, right? After the use clicks and releases, the user is
                                            very likely to move the mouse away from the button. The onRollOut event is
                                            the last one to get triggered.

                                            > But I need to somehow keep the OnRollOut, but I
                                            > don't know how to keep it from interfering with the
                                            > onRelease function.

                                            Because you're using a movie clip to do this, you have all the features
                                            that a movie clip provides, including the fact that you can add a script
                                            layer inside the clip. It's good as a best practice to keep most of your
                                            code in the main timeline, but I personally think it's fine, here and there,
                                            to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                            timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                            when someone rolls out, the clip will go to frame 7, do its thing, continue
                                            to frame 8, then stop at frame 6.


                                            David Stiller
                                            Adobe Community Expert
                                            Dev blog, http://www.quip.net/blog/
                                            "Luck is the residue of good design."


                                            • 19. Re: Movieclip button
                                              Level 7
                                              angelina28,

                                              > Hi! I have a movieclip button and this is my code:

                                              Okay ...

                                              > b1.onRelease = function() {
                                              > _root.b1.gotoAndStop(6);
                                              > };

                                              Ah. Right off the bat, you may want to use the global "this" property,
                                              which refers to whatever object or timeline it's in.

                                              b1.onRelease = function() {
                                              this.gotoAndStop(6);
                                              }

                                              Less typing, and also less prone to errors, depending on how long the
                                              path reference is to the object (here, a movie clip) in question.

                                              > When the user clicks the button, I want to stop the
                                              > button at frame 6. This works fine if I take out the
                                              > onRollOut function.

                                              That makes sense, right? After the use clicks and releases, the user is
                                              very likely to move the mouse away from the button. The onRollOut event is
                                              the last one to get triggered.

                                              > But I need to somehow keep the OnRollOut, but I
                                              > don't know how to keep it from interfering with the
                                              > onRelease function.

                                              Because you're using a movie clip to do this, you have all the features
                                              that a movie clip provides, including the fact that you can add a script
                                              layer inside the clip. It's good as a best practice to keep most of your
                                              code in the main timeline, but I personally think it's fine, here and there,
                                              to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                              timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                              when someone rolls out, the clip will go to frame 7, do its thing, continue
                                              to frame 8, then stop at frame 6.


                                              David Stiller
                                              Adobe Community Expert
                                              Dev blog, http://www.quip.net/blog/
                                              "Luck is the residue of good design."


                                              • 20. Re: Movieclip button
                                                Level 7
                                                angelina28,

                                                > Hi! I have a movieclip button and this is my code:

                                                Okay ...

                                                > b1.onRelease = function() {
                                                > _root.b1.gotoAndStop(6);
                                                > };

                                                Ah. Right off the bat, you may want to use the global "this" property,
                                                which refers to whatever object or timeline it's in.

                                                b1.onRelease = function() {
                                                this.gotoAndStop(6);
                                                }

                                                Less typing, and also less prone to errors, depending on how long the
                                                path reference is to the object (here, a movie clip) in question.

                                                > When the user clicks the button, I want to stop the
                                                > button at frame 6. This works fine if I take out the
                                                > onRollOut function.

                                                That makes sense, right? After the use clicks and releases, the user is
                                                very likely to move the mouse away from the button. The onRollOut event is
                                                the last one to get triggered.

                                                > But I need to somehow keep the OnRollOut, but I
                                                > don't know how to keep it from interfering with the
                                                > onRelease function.

                                                Because you're using a movie clip to do this, you have all the features
                                                that a movie clip provides, including the fact that you can add a script
                                                layer inside the clip. It's good as a best practice to keep most of your
                                                code in the main timeline, but I personally think it's fine, here and there,
                                                to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                to frame 8, then stop at frame 6.


                                                David Stiller
                                                Adobe Community Expert
                                                Dev blog, http://www.quip.net/blog/
                                                "Luck is the residue of good design."


                                                • 21. Re: Movieclip button
                                                  Level 7
                                                  angelina28,

                                                  > Hi! I have a movieclip button and this is my code:

                                                  Okay ...

                                                  > b1.onRelease = function() {
                                                  > _root.b1.gotoAndStop(6);
                                                  > };

                                                  Ah. Right off the bat, you may want to use the global "this" property,
                                                  which refers to whatever object or timeline it's in.

                                                  b1.onRelease = function() {
                                                  this.gotoAndStop(6);
                                                  }

                                                  Less typing, and also less prone to errors, depending on how long the
                                                  path reference is to the object (here, a movie clip) in question.

                                                  > When the user clicks the button, I want to stop the
                                                  > button at frame 6. This works fine if I take out the
                                                  > onRollOut function.

                                                  That makes sense, right? After the use clicks and releases, the user is
                                                  very likely to move the mouse away from the button. The onRollOut event is
                                                  the last one to get triggered.

                                                  > But I need to somehow keep the OnRollOut, but I
                                                  > don't know how to keep it from interfering with the
                                                  > onRelease function.

                                                  Because you're using a movie clip to do this, you have all the features
                                                  that a movie clip provides, including the fact that you can add a script
                                                  layer inside the clip. It's good as a best practice to keep most of your
                                                  code in the main timeline, but I personally think it's fine, here and there,
                                                  to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                  timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                  when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                  to frame 8, then stop at frame 6.


                                                  David Stiller
                                                  Adobe Community Expert
                                                  Dev blog, http://www.quip.net/blog/
                                                  "Luck is the residue of good design."


                                                  • 22. Re: Movieclip button
                                                    Level 7
                                                    angelina28,

                                                    > Hi! I have a movieclip button and this is my code:

                                                    Okay ...

                                                    > b1.onRelease = function() {
                                                    > _root.b1.gotoAndStop(6);
                                                    > };

                                                    Ah. Right off the bat, you may want to use the global "this" property,
                                                    which refers to whatever object or timeline it's in.

                                                    b1.onRelease = function() {
                                                    this.gotoAndStop(6);
                                                    }

                                                    Less typing, and also less prone to errors, depending on how long the
                                                    path reference is to the object (here, a movie clip) in question.

                                                    > When the user clicks the button, I want to stop the
                                                    > button at frame 6. This works fine if I take out the
                                                    > onRollOut function.

                                                    That makes sense, right? After the use clicks and releases, the user is
                                                    very likely to move the mouse away from the button. The onRollOut event is
                                                    the last one to get triggered.

                                                    > But I need to somehow keep the OnRollOut, but I
                                                    > don't know how to keep it from interfering with the
                                                    > onRelease function.

                                                    Because you're using a movie clip to do this, you have all the features
                                                    that a movie clip provides, including the fact that you can add a script
                                                    layer inside the clip. It's good as a best practice to keep most of your
                                                    code in the main timeline, but I personally think it's fine, here and there,
                                                    to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                    timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                    when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                    to frame 8, then stop at frame 6.


                                                    David Stiller
                                                    Adobe Community Expert
                                                    Dev blog, http://www.quip.net/blog/
                                                    "Luck is the residue of good design."


                                                    • 23. Re: Movieclip button
                                                      Level 7
                                                      angelina28,

                                                      > Hi! I have a movieclip button and this is my code:

                                                      Okay ...

                                                      > b1.onRelease = function() {
                                                      > _root.b1.gotoAndStop(6);
                                                      > };

                                                      Ah. Right off the bat, you may want to use the global "this" property,
                                                      which refers to whatever object or timeline it's in.

                                                      b1.onRelease = function() {
                                                      this.gotoAndStop(6);
                                                      }

                                                      Less typing, and also less prone to errors, depending on how long the
                                                      path reference is to the object (here, a movie clip) in question.

                                                      > When the user clicks the button, I want to stop the
                                                      > button at frame 6. This works fine if I take out the
                                                      > onRollOut function.

                                                      That makes sense, right? After the use clicks and releases, the user is
                                                      very likely to move the mouse away from the button. The onRollOut event is
                                                      the last one to get triggered.

                                                      > But I need to somehow keep the OnRollOut, but I
                                                      > don't know how to keep it from interfering with the
                                                      > onRelease function.

                                                      Because you're using a movie clip to do this, you have all the features
                                                      that a movie clip provides, including the fact that you can add a script
                                                      layer inside the clip. It's good as a best practice to keep most of your
                                                      code in the main timeline, but I personally think it's fine, here and there,
                                                      to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                      timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                      when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                      to frame 8, then stop at frame 6.


                                                      David Stiller
                                                      Adobe Community Expert
                                                      Dev blog, http://www.quip.net/blog/
                                                      "Luck is the residue of good design."


                                                      • 24. Re: Movieclip button
                                                        Level 7
                                                        angelina28,

                                                        > Hi! I have a movieclip button and this is my code:

                                                        Okay ...

                                                        > b1.onRelease = function() {
                                                        > _root.b1.gotoAndStop(6);
                                                        > };

                                                        Ah. Right off the bat, you may want to use the global "this" property,
                                                        which refers to whatever object or timeline it's in.

                                                        b1.onRelease = function() {
                                                        this.gotoAndStop(6);
                                                        }

                                                        Less typing, and also less prone to errors, depending on how long the
                                                        path reference is to the object (here, a movie clip) in question.

                                                        > When the user clicks the button, I want to stop the
                                                        > button at frame 6. This works fine if I take out the
                                                        > onRollOut function.

                                                        That makes sense, right? After the use clicks and releases, the user is
                                                        very likely to move the mouse away from the button. The onRollOut event is
                                                        the last one to get triggered.

                                                        > But I need to somehow keep the OnRollOut, but I
                                                        > don't know how to keep it from interfering with the
                                                        > onRelease function.

                                                        Because you're using a movie clip to do this, you have all the features
                                                        that a movie clip provides, including the fact that you can add a script
                                                        layer inside the clip. It's good as a best practice to keep most of your
                                                        code in the main timeline, but I personally think it's fine, here and there,
                                                        to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                        timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                        when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                        to frame 8, then stop at frame 6.


                                                        David Stiller
                                                        Adobe Community Expert
                                                        Dev blog, http://www.quip.net/blog/
                                                        "Luck is the residue of good design."


                                                        • 25. Re: Movieclip button
                                                          kglad Adobe Community Professional & MVP
                                                          lol, dave. that's a bit on the extreme side.
                                                          • 26. Re: Movieclip button
                                                            Level 7
                                                            angelina28,

                                                            > Hi! I have a movieclip button and this is my code:

                                                            Okay ...

                                                            > b1.onRelease = function() {
                                                            > _root.b1.gotoAndStop(6);
                                                            > };

                                                            Ah. Right off the bat, you may want to use the global "this" property,
                                                            which refers to whatever object or timeline it's in.

                                                            b1.onRelease = function() {
                                                            this.gotoAndStop(6);
                                                            }

                                                            Less typing, and also less prone to errors, depending on how long the
                                                            path reference is to the object (here, a movie clip) in question.

                                                            > When the user clicks the button, I want to stop the
                                                            > button at frame 6. This works fine if I take out the
                                                            > onRollOut function.

                                                            That makes sense, right? After the use clicks and releases, the user is
                                                            very likely to move the mouse away from the button. The onRollOut event is
                                                            the last one to get triggered.

                                                            > But I need to somehow keep the OnRollOut, but I
                                                            > don't know how to keep it from interfering with the
                                                            > onRelease function.

                                                            Because you're using a movie clip to do this, you have all the features
                                                            that a movie clip provides, including the fact that you can add a script
                                                            layer inside the clip. It's good as a best practice to keep most of your
                                                            code in the main timeline, but I personally think it's fine, here and there,
                                                            to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                            timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                            when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                            to frame 8, then stop at frame 6.


                                                            David Stiller
                                                            Adobe Community Expert
                                                            Dev blog, http://www.quip.net/blog/
                                                            "Luck is the residue of good design."


                                                            • 27. Re: Movieclip button
                                                              Level 7
                                                              angelina28,

                                                              > Hi! I have a movieclip button and this is my code:

                                                              Okay ...

                                                              > b1.onRelease = function() {
                                                              > _root.b1.gotoAndStop(6);
                                                              > };

                                                              Ah. Right off the bat, you may want to use the global "this" property,
                                                              which refers to whatever object or timeline it's in.

                                                              b1.onRelease = function() {
                                                              this.gotoAndStop(6);
                                                              }

                                                              Less typing, and also less prone to errors, depending on how long the
                                                              path reference is to the object (here, a movie clip) in question.

                                                              > When the user clicks the button, I want to stop the
                                                              > button at frame 6. This works fine if I take out the
                                                              > onRollOut function.

                                                              That makes sense, right? After the use clicks and releases, the user is
                                                              very likely to move the mouse away from the button. The onRollOut event is
                                                              the last one to get triggered.

                                                              > But I need to somehow keep the OnRollOut, but I
                                                              > don't know how to keep it from interfering with the
                                                              > onRelease function.

                                                              Because you're using a movie clip to do this, you have all the features
                                                              that a movie clip provides, including the fact that you can add a script
                                                              layer inside the clip. It's good as a best practice to keep most of your
                                                              code in the main timeline, but I personally think it's fine, here and there,
                                                              to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                              timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                              when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                              to frame 8, then stop at frame 6.


                                                              David Stiller
                                                              Adobe Community Expert
                                                              Dev blog, http://www.quip.net/blog/
                                                              "Luck is the residue of good design."


                                                              • 28. Re: Movieclip button
                                                                Level 7
                                                                angelina28,

                                                                > Hi! I have a movieclip button and this is my code:

                                                                Okay ...

                                                                > b1.onRelease = function() {
                                                                > _root.b1.gotoAndStop(6);
                                                                > };

                                                                Ah. Right off the bat, you may want to use the global "this" property,
                                                                which refers to whatever object or timeline it's in.

                                                                b1.onRelease = function() {
                                                                this.gotoAndStop(6);
                                                                }

                                                                Less typing, and also less prone to errors, depending on how long the
                                                                path reference is to the object (here, a movie clip) in question.

                                                                > When the user clicks the button, I want to stop the
                                                                > button at frame 6. This works fine if I take out the
                                                                > onRollOut function.

                                                                That makes sense, right? After the use clicks and releases, the user is
                                                                very likely to move the mouse away from the button. The onRollOut event is
                                                                the last one to get triggered.

                                                                > But I need to somehow keep the OnRollOut, but I
                                                                > don't know how to keep it from interfering with the
                                                                > onRelease function.

                                                                Because you're using a movie clip to do this, you have all the features
                                                                that a movie clip provides, including the fact that you can add a script
                                                                layer inside the clip. It's good as a best practice to keep most of your
                                                                code in the main timeline, but I personally think it's fine, here and there,
                                                                to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                                timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                                when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                                to frame 8, then stop at frame 6.


                                                                David Stiller
                                                                Adobe Community Expert
                                                                Dev blog, http://www.quip.net/blog/
                                                                "Luck is the residue of good design."


                                                                • 29. Re: Movieclip button
                                                                  Level 7
                                                                  angelina28,

                                                                  > Hi! I have a movieclip button and this is my code:

                                                                  Okay ...

                                                                  > b1.onRelease = function() {
                                                                  > _root.b1.gotoAndStop(6);
                                                                  > };

                                                                  Ah. Right off the bat, you may want to use the global "this" property,
                                                                  which refers to whatever object or timeline it's in.

                                                                  b1.onRelease = function() {
                                                                  this.gotoAndStop(6);
                                                                  }

                                                                  Less typing, and also less prone to errors, depending on how long the
                                                                  path reference is to the object (here, a movie clip) in question.

                                                                  > When the user clicks the button, I want to stop the
                                                                  > button at frame 6. This works fine if I take out the
                                                                  > onRollOut function.

                                                                  That makes sense, right? After the use clicks and releases, the user is
                                                                  very likely to move the mouse away from the button. The onRollOut event is
                                                                  the last one to get triggered.

                                                                  > But I need to somehow keep the OnRollOut, but I
                                                                  > don't know how to keep it from interfering with the
                                                                  > onRelease function.

                                                                  Because you're using a movie clip to do this, you have all the features
                                                                  that a movie clip provides, including the fact that you can add a script
                                                                  layer inside the clip. It's good as a best practice to keep most of your
                                                                  code in the main timeline, but I personally think it's fine, here and there,
                                                                  to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                                  timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                                  when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                                  to frame 8, then stop at frame 6.


                                                                  David Stiller
                                                                  Adobe Community Expert
                                                                  Dev blog, http://www.quip.net/blog/
                                                                  "Luck is the residue of good design."


                                                                  • 30. Re: Movieclip button
                                                                    Level 7
                                                                    angelina28,

                                                                    > Hi! I have a movieclip button and this is my code:

                                                                    Okay ...

                                                                    > b1.onRelease = function() {
                                                                    > _root.b1.gotoAndStop(6);
                                                                    > };

                                                                    Ah. Right off the bat, you may want to use the global "this" property,
                                                                    which refers to whatever object or timeline it's in.

                                                                    b1.onRelease = function() {
                                                                    this.gotoAndStop(6);
                                                                    }

                                                                    Less typing, and also less prone to errors, depending on how long the
                                                                    path reference is to the object (here, a movie clip) in question.

                                                                    > When the user clicks the button, I want to stop the
                                                                    > button at frame 6. This works fine if I take out the
                                                                    > onRollOut function.

                                                                    That makes sense, right? After the use clicks and releases, the user is
                                                                    very likely to move the mouse away from the button. The onRollOut event is
                                                                    the last one to get triggered.

                                                                    > But I need to somehow keep the OnRollOut, but I
                                                                    > don't know how to keep it from interfering with the
                                                                    > onRelease function.

                                                                    Because you're using a movie clip to do this, you have all the features
                                                                    that a movie clip provides, including the fact that you can add a script
                                                                    layer inside the clip. It's good as a best practice to keep most of your
                                                                    code in the main timeline, but I personally think it's fine, here and there,
                                                                    to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                                    timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                                    when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                                    to frame 8, then stop at frame 6.


                                                                    David Stiller
                                                                    Adobe Community Expert
                                                                    Dev blog, http://www.quip.net/blog/
                                                                    "Luck is the residue of good design."


                                                                    • 31. Re: Movieclip button
                                                                      Level 7
                                                                      angelina28,

                                                                      > Hi! I have a movieclip button and this is my code:

                                                                      Okay ...

                                                                      > b1.onRelease = function() {
                                                                      > _root.b1.gotoAndStop(6);
                                                                      > };

                                                                      Ah. Right off the bat, you may want to use the global "this" property,
                                                                      which refers to whatever object or timeline it's in.

                                                                      b1.onRelease = function() {
                                                                      this.gotoAndStop(6);
                                                                      }

                                                                      Less typing, and also less prone to errors, depending on how long the
                                                                      path reference is to the object (here, a movie clip) in question.

                                                                      > When the user clicks the button, I want to stop the
                                                                      > button at frame 6. This works fine if I take out the
                                                                      > onRollOut function.

                                                                      That makes sense, right? After the use clicks and releases, the user is
                                                                      very likely to move the mouse away from the button. The onRollOut event is
                                                                      the last one to get triggered.

                                                                      > But I need to somehow keep the OnRollOut, but I
                                                                      > don't know how to keep it from interfering with the
                                                                      > onRelease function.

                                                                      Because you're using a movie clip to do this, you have all the features
                                                                      that a movie clip provides, including the fact that you can add a script
                                                                      layer inside the clip. It's good as a best practice to keep most of your
                                                                      code in the main timeline, but I personally think it's fine, here and there,
                                                                      to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                                      timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                                      when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                                      to frame 8, then stop at frame 6.


                                                                      David Stiller
                                                                      Adobe Community Expert
                                                                      Dev blog, http://www.quip.net/blog/
                                                                      "Luck is the residue of good design."


                                                                      • 32. Re: Movieclip button
                                                                        Level 7
                                                                        angelina28,

                                                                        > Hi! I have a movieclip button and this is my code:

                                                                        Okay ...

                                                                        > b1.onRelease = function() {
                                                                        > _root.b1.gotoAndStop(6);
                                                                        > };

                                                                        Ah. Right off the bat, you may want to use the global "this" property,
                                                                        which refers to whatever object or timeline it's in.

                                                                        b1.onRelease = function() {
                                                                        this.gotoAndStop(6);
                                                                        }

                                                                        Less typing, and also less prone to errors, depending on how long the
                                                                        path reference is to the object (here, a movie clip) in question.

                                                                        > When the user clicks the button, I want to stop the
                                                                        > button at frame 6. This works fine if I take out the
                                                                        > onRollOut function.

                                                                        That makes sense, right? After the use clicks and releases, the user is
                                                                        very likely to move the mouse away from the button. The onRollOut event is
                                                                        the last one to get triggered.

                                                                        > But I need to somehow keep the OnRollOut, but I
                                                                        > don't know how to keep it from interfering with the
                                                                        > onRelease function.

                                                                        Because you're using a movie clip to do this, you have all the features
                                                                        that a movie clip provides, including the fact that you can add a script
                                                                        layer inside the clip. It's good as a best practice to keep most of your
                                                                        code in the main timeline, but I personally think it's fine, here and there,
                                                                        to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                                        timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                                        when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                                        to frame 8, then stop at frame 6.


                                                                        David Stiller
                                                                        Adobe Community Expert
                                                                        Dev blog, http://www.quip.net/blog/
                                                                        "Luck is the residue of good design."


                                                                        • 33. Re: Movieclip button
                                                                          Level 7
                                                                          angelina28,

                                                                          > Hi! I have a movieclip button and this is my code:

                                                                          Okay ...

                                                                          > b1.onRelease = function() {
                                                                          > _root.b1.gotoAndStop(6);
                                                                          > };

                                                                          Ah. Right off the bat, you may want to use the global "this" property,
                                                                          which refers to whatever object or timeline it's in.

                                                                          b1.onRelease = function() {
                                                                          this.gotoAndStop(6);
                                                                          }

                                                                          Less typing, and also less prone to errors, depending on how long the
                                                                          path reference is to the object (here, a movie clip) in question.

                                                                          > When the user clicks the button, I want to stop the
                                                                          > button at frame 6. This works fine if I take out the
                                                                          > onRollOut function.

                                                                          That makes sense, right? After the use clicks and releases, the user is
                                                                          very likely to move the mouse away from the button. The onRollOut event is
                                                                          the last one to get triggered.

                                                                          > But I need to somehow keep the OnRollOut, but I
                                                                          > don't know how to keep it from interfering with the
                                                                          > onRelease function.

                                                                          Because you're using a movie clip to do this, you have all the features
                                                                          that a movie clip provides, including the fact that you can add a script
                                                                          layer inside the clip. It's good as a best practice to keep most of your
                                                                          code in the main timeline, but I personally think it's fine, here and there,
                                                                          to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                                          timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                                          when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                                          to frame 8, then stop at frame 6.


                                                                          David Stiller
                                                                          Adobe Community Expert
                                                                          Dev blog, http://www.quip.net/blog/
                                                                          "Luck is the residue of good design."


                                                                          • 34. Re: Movieclip button
                                                                            Level 7
                                                                            kglad,

                                                                            > lol, dave. that's a bit on the extreme side.

                                                                            lol ... maybe. ;) Tim probably nailed it closer to what the OP
                                                                            intended. I'm having a hard time picturing the actual intent.


                                                                            David Stiller
                                                                            Adobe Community Expert
                                                                            Dev blog, http://www.quip.net/blog/
                                                                            "Luck is the residue of good design."


                                                                            • 35. Re: Movieclip button
                                                                              Level 7
                                                                              angelina28,

                                                                              > Hi! I have a movieclip button and this is my code:

                                                                              Okay ...

                                                                              > b1.onRelease = function() {
                                                                              > _root.b1.gotoAndStop(6);
                                                                              > };

                                                                              Ah. Right off the bat, you may want to use the global "this" property,
                                                                              which refers to whatever object or timeline it's in.

                                                                              b1.onRelease = function() {
                                                                              this.gotoAndStop(6);
                                                                              }

                                                                              Less typing, and also less prone to errors, depending on how long the
                                                                              path reference is to the object (here, a movie clip) in question.

                                                                              > When the user clicks the button, I want to stop the
                                                                              > button at frame 6. This works fine if I take out the
                                                                              > onRollOut function.

                                                                              That makes sense, right? After the use clicks and releases, the user is
                                                                              very likely to move the mouse away from the button. The onRollOut event is
                                                                              the last one to get triggered.

                                                                              > But I need to somehow keep the OnRollOut, but I
                                                                              > don't know how to keep it from interfering with the
                                                                              > onRelease function.

                                                                              Because you're using a movie clip to do this, you have all the features
                                                                              that a movie clip provides, including the fact that you can add a script
                                                                              layer inside the clip. It's good as a best practice to keep most of your
                                                                              code in the main timeline, but I personally think it's fine, here and there,
                                                                              to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                                              timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                                              when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                                              to frame 8, then stop at frame 6.


                                                                              David Stiller
                                                                              Adobe Community Expert
                                                                              Dev blog, http://www.quip.net/blog/
                                                                              "Luck is the residue of good design."


                                                                              • 36. Re: Movieclip button
                                                                                Level 7
                                                                                kglad,

                                                                                > lol, dave. that's a bit on the extreme side.

                                                                                lol ... maybe. ;) Tim probably nailed it closer to what the OP
                                                                                intended. I'm having a hard time picturing the actual intent.


                                                                                David Stiller
                                                                                Adobe Community Expert
                                                                                Dev blog, http://www.quip.net/blog/
                                                                                "Luck is the residue of good design."


                                                                                • 37. Re: Movieclip button
                                                                                  Level 7
                                                                                  angelina28,

                                                                                  > Hi! I have a movieclip button and this is my code:

                                                                                  Okay ...

                                                                                  > b1.onRelease = function() {
                                                                                  > _root.b1.gotoAndStop(6);
                                                                                  > };

                                                                                  Ah. Right off the bat, you may want to use the global "this" property,
                                                                                  which refers to whatever object or timeline it's in.

                                                                                  b1.onRelease = function() {
                                                                                  this.gotoAndStop(6);
                                                                                  }

                                                                                  Less typing, and also less prone to errors, depending on how long the
                                                                                  path reference is to the object (here, a movie clip) in question.

                                                                                  > When the user clicks the button, I want to stop the
                                                                                  > button at frame 6. This works fine if I take out the
                                                                                  > onRollOut function.

                                                                                  That makes sense, right? After the use clicks and releases, the user is
                                                                                  very likely to move the mouse away from the button. The onRollOut event is
                                                                                  the last one to get triggered.

                                                                                  > But I need to somehow keep the OnRollOut, but I
                                                                                  > don't know how to keep it from interfering with the
                                                                                  > onRelease function.

                                                                                  Because you're using a movie clip to do this, you have all the features
                                                                                  that a movie clip provides, including the fact that you can add a script
                                                                                  layer inside the clip. It's good as a best practice to keep most of your
                                                                                  code in the main timeline, but I personally think it's fine, here and there,
                                                                                  to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                                                  timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                                                  when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                                                  to frame 8, then stop at frame 6.


                                                                                  David Stiller
                                                                                  Adobe Community Expert
                                                                                  Dev blog, http://www.quip.net/blog/
                                                                                  "Luck is the residue of good design."


                                                                                  • 38. Re: Movieclip button
                                                                                    Level 7
                                                                                    kglad,

                                                                                    > lol, dave. that's a bit on the extreme side.

                                                                                    lol ... maybe. ;) Tim probably nailed it closer to what the OP
                                                                                    intended. I'm having a hard time picturing the actual intent.


                                                                                    David Stiller
                                                                                    Adobe Community Expert
                                                                                    Dev blog, http://www.quip.net/blog/
                                                                                    "Luck is the residue of good design."


                                                                                    • 39. Re: Movieclip button
                                                                                      Level 7
                                                                                      angelina28,

                                                                                      > Hi! I have a movieclip button and this is my code:

                                                                                      Okay ...

                                                                                      > b1.onRelease = function() {
                                                                                      > _root.b1.gotoAndStop(6);
                                                                                      > };

                                                                                      Ah. Right off the bat, you may want to use the global "this" property,
                                                                                      which refers to whatever object or timeline it's in.

                                                                                      b1.onRelease = function() {
                                                                                      this.gotoAndStop(6);
                                                                                      }

                                                                                      Less typing, and also less prone to errors, depending on how long the
                                                                                      path reference is to the object (here, a movie clip) in question.

                                                                                      > When the user clicks the button, I want to stop the
                                                                                      > button at frame 6. This works fine if I take out the
                                                                                      > onRollOut function.

                                                                                      That makes sense, right? After the use clicks and releases, the user is
                                                                                      very likely to move the mouse away from the button. The onRollOut event is
                                                                                      the last one to get triggered.

                                                                                      > But I need to somehow keep the OnRollOut, but I
                                                                                      > don't know how to keep it from interfering with the
                                                                                      > onRelease function.

                                                                                      Because you're using a movie clip to do this, you have all the features
                                                                                      that a movie clip provides, including the fact that you can add a script
                                                                                      layer inside the clip. It's good as a best practice to keep most of your
                                                                                      code in the main timeline, but I personally think it's fine, here and there,
                                                                                      to put the occasional stop() or gotoAndStop(), etc. inside movie clip
                                                                                      timelines. Maybe in frame 8 of b1, you could put gotoAndStop(6). Thus,
                                                                                      when someone rolls out, the clip will go to frame 7, do its thing, continue
                                                                                      to frame 8, then stop at frame 6.


                                                                                      David Stiller
                                                                                      Adobe Community Expert
                                                                                      Dev blog, http://www.quip.net/blog/
                                                                                      "Luck is the residue of good design."


                                                                                      1 2 Previous Next