1 Reply Latest reply on Sep 4, 2011 9:25 PM by kglad

    link to frame isnt working?

    helloeveryone.I need help

      I'm trying to simply link to another frame. In the file, when the down arrow is pressed in the 2nd layer (frame 21) I want it to play starting at frame 30, labeled "to 3". I've tried this code:

       

      on(press) {
          gotoAndPlay("to3");
      }

       

      but it doesnt seem to work, and thats quite confusing, since this same code worked in the down arrow in frame 1, and when clicked, the clip at frame 10 began playing. I dont know what is wrong. Please suggest possible problems, and look at the original file. How do I attach the file, I cant find anything that allows me to do so...

        • 1. Re: link to frame isnt working?
          kglad Adobe Community Professional & MVP

          your frame label "to 3" is not the same as the gotoAndPlay() argument "to3".

           

          in addition, you shouldn't have code attached to objects and you should not use the goto functions, use the goto methods:

           

          var tl:MovieClip=this;

          yourbtn.onPress=function(){

          tl.gotoAndPlay("to 3");  // if that's the correct label in the timeline that contains this code.

          }