5 Replies Latest reply on Aug 19, 2009 9:22 PM by NSurveyor

    gotoAndPlay("frame name") won't work


      This is something I've never seen before.


      I have a stop action in frame 1

      I have a stop action in frame 53 which has a label "end" applied to it.


      In the actionscript for frame one i have gotoAndPlay("end");

      However, it just plays from frame 1.

      If i do _root.gotoAndPlay("end"); i get nothing, nothing plays

      If i do gotoAndPlay(53); it works locally but not online

      if i do _root.gotoAndPlay(53); it works locally but not online.


      I have no idea what's going on.I don't want to use frame numbers, but if that would work, at this point, i would use it.  Im using flash cs4, but I don't know as3 so I'm publishing in CS3 flash 10.


      Any ideas?  Thanks!!


      I attached a photo of my timeline.

        • 1. Re: gotoAndPlay("frame name") won't work
          EricFight Level 1

          I'm not a expert or anything but you could try using  a behavior.....just add a behavior to the frame and try both ways.....relative and use frame Number or try absolute and use a frame label....Hope this might help.....Sorry if not......just an idea....Is this As2 or As3??

          • 2. Re: gotoAndPlay("frame name") won't work
            Ned Murphy Adobe Community Professional & MVP

            Creating in CS3 versus CS4 really doesn't make a difference... they will both publish AS2 and AS3 files.  Try commenting out that other code you have in frame 1 and see if that makes a difference.

            1 person found this helpful
            • 3. Re: gotoAndPlay("frame name") won't work
              NSurveyor Level 2

              This is rather strange.


              Both  gotoAndPlay(53); and _root.gotoAndPlay(53); should definitely work at all times, (though I'd stay away from the former: there have been issues with using the function instead of the method for gotoAndPlay). If it works locally, it should most surely work online as player versions should not make any difference. Perhaps you saw a cached version of your movie online?


              gotoAndPlay("end"); and _root.gotoAndPlay("end");  should also both work, and again I advise avoiding the former choice. There are only two things that I can think of at the moment that could cause it to not work. Either, you have code before these function calls, preventing their execution. Or, maybe you have errored with the frame label? For instance, maybe you labeled the first frame "end" instead of the last frame? Or maybe both... but CS4 would tell you that you had done that.


              Very strange indeed.

              • 4. Re: gotoAndPlay("frame name") won't work
                Rothrock Level 5

                My guess would be that the whole file hasn't loaded by the time you call that so there is no way for the player to send the playhead to that frame.


                That would explain why it works locally, but not online.

                1 person found this helpful
                • 5. Re: gotoAndPlay("frame name") won't work
                  NSurveyor Level 2

                  Ah, of course. That is a much more sound argument. Of course I overlooked this since I haven't uploaded a flash movie with more than one frame, in a long long time