5 Replies Latest reply: Jul 28, 2011 11:32 AM by Ned Murphy RSS

    Skip intro not working

    ruthgordy Community Member

      I have created an animated home page that I have put a "skip intro" button.

      When the viewer clicks on the skip intro button I want them to go to the end of the animation/homepage.

      There are three embedded movie clips of test tubes filling (near the end of the main timeline and these testubes are also navigation buttons to the rest of the site). Even though the viewer goes to the end of the main timeline when they click SKIP INTRO, the testtubes fill at this point and the animation loops back to frame 1 and keeps looping. I want viewer to stay at last frame with all testtubes filled and animation complete.

      I'm guessing it's something in the individual testube clips AS that is causing this or some simple solution that I'm overlooking?

       

      I published an html file and when I tested in a browser and DON'T skip the intro animation it goes through the full animation - to end and stops and does not loop.

      If however, I test this same file and hit SKIP INTRO it does go to the end as I described above and keeps looping.

       

      Any thoughts?

      I'm in flash CS4 - AS 3.0

       

      Thanks for any help.

       

      //this is the code that starts the animation of one of three test tubes to fill - it is in the full 27 frames of the AS layer

      stop();

       

      gotoAndPlay(1);

       

      function startMovie(event:MouseEvent):void

      {

      this.play();

      }

      teach_btn.addEventListener(MouseEvent.CLICK, startMovie);

       

       

       

      //this is the code that allows viewer to navigate to new page by clicking on testtube button - it is in last keyframed frame in AS layer

      stop();

       

      teach_btn.addEventListener(MouseEvent.CLICK,mouseClick);

      function mouseClick(event:MouseEvent):void

      {

       

      var request = new URLRequest("teachers/index.htm")

      navigateToURL(request,"_self");

      }

       

      //On the main timeline the code that sends the viewer to the last frame when they click on the skip intro button is (last frame is labeled "end"):

       

      btnSkip.addEventListener(MouseEvent.CLICK, goToEnd);

      function goToEnd(event:MouseEvent):void

      {

      gotoAndStop("end");

      }

        • 1. Re: Skip intro not working
          Ned Murphy CommunityMVP

          If the following code is what leads to the problem...

           

          btnSkip.addEventListener(MouseEvent.CLICK, goToEnd);

          function goToEnd(event:MouseEvent):void

          {

          gotoAndStop("end");

          }

           

          What code is in that "end" frame?

          • 2. Re: Skip intro not working
            ruthgordy Community Member

            There is no code in the end frame.

            The code you refer to is in frames 1-119 of AS layer. End frame is 120.

            • 3. Re: Skip intro not working
              ruthgordy Community Member

              Can I throw out another thought to solve this problem?

               

              Can I have the Skip Intro button navigate to a static version of my homepage instead of going to the end of my animated home page?

               

              I have the static version already created and wouldn't it be better when viewer is navigating the site to go back to the static home page if they need to?

               

              thanks

              • 4. Re: Skip intro not working
                Ned Murphy CommunityMVP

                Where is that gotoAndPlay(1) line located relative to the main timeline?  Are you getting any error messages?

                • 5. Re: Skip intro not working
                  Ned Murphy CommunityMVP

                  A Skip Intro button will normally take one out of the intro entirely and plant the user in the home page.  So if that is not where you are sending them, then it could help avoid the problem you're having... though the problem you are having should not be happening. Something is contradicting the gotoAndStop command (particularly the "Stop" aspect of it).  That would normally fall out as some code that is continually cycling and telling the timeline to play.