5 Replies Latest reply on May 15, 2007 10:32 AM by Rothrock

    Hopefully last AS problem

    Gravytrain128 Level 1
      Okay, so I have this for the AS:

      IntroButton.onRelease = function() {

      but when I release the button- it doesnt move on...
      IntroButton is the name of the button
      I tried gotoAndPlay(71) also.. but still nothing..

        • 1. Re: Hopefully last AS problem
          Rothrock Level 5
          Well what is supposed to go to the nextFrame() or gotoAndPlay(71)?

          Both of those methods belong to the MovieClip class so they have to tell a specific movieclip instance to do those things.

          Does IntroButton have 71 frames? I'm not exactly sure, butt I think since there is no clip specified it will try and send the current scope (and the command is inside a handler for IntroButton) to the requested location.

          My guess is that you want something like:


          or perhaps


          In general I advise against using _root because it will cause problems later if you try and load things externally and such.

          Anyways here is a neat trick.

          var home:MovieClip=this;

          By setting up home as this on the main timeline you are providing yourself a neat shortcut to what is (at the moment) _root. But if you later load the swf into another or some such, home will still be this and the place you want to be.

          PS: HAHA, "last AS problem." I've been doing this for a very long time and I haven't even come close to hitting the last AS problem yet. :)
          • 2. Re: Hopefully last AS problem
            like Rothrock said, it's more than likely a scope issue — you're not telling it which movie clip so it just goes to the next frame in the MC you called it from.
            • 3. Hopefully last AS problem
              Gravytrain128 Level 1
              71 is simply the next frame-
              gotoAndPlay(71) and NextFrame would do the same thing

              Neither of the suggestions work =(.. sorry

              button is one frame long...

              • 4. Re: Hopefully last AS problem
                Damon Edwards Level 3
                how about making the source available.
                • 5. Re: Hopefully last AS problem
                  Rothrock Level 5
                  You say 71 is simply the next frame, but the next frame of what?