3 Replies Latest reply on Nov 1, 2009 12:01 PM by allendupras

    stop gotoNextslide

    allendupras

      Hello,

       

      I'm a beginner at action script....

      But I have a presentation were the first slide I have put...

       

      ----------------------------------------------------------------------------

      currentslide = intro;

       

      if (_currentframe == 511 && currentslide == intro) {
           _parent.currentSlide.gotoNextSlide();
      }  else {

       

          _parent.currentSlide. gotoLastSlide();

       

      }

      ----------------------------------------------------------------------------

       

      in the 511 frame of that slide screen.


      So then it goes to the next slide fine but it continues to

      Do this on all the slides following. It will go to the next slide at the 511

      Frame of what ever slide it is on....

       

      I guess I'm confused in why it does this and if there’s any way you

      can think of getting around this.

       

      here is a link to the project

      http://www.filedropper.com/testpresentation

       

      Thanks,

      If I need to explain more let me know.

        • 1. Re: stop gotoNextslide
          Ned Murphy Adobe Community Professional & MVP

          If you are assigning currentslide = intro each time before you run that conditional, then at frame 511 it will go to the next slide.  Is intro the instance name of the slide?

          • 2. Re: stop gotoNextslide
            allendupras Level 1

             

            yes "intro" is the name of the slide instance.

            But "currentslide" is a var I made up which is different then "currentSlide".

            I don't know why it wasn't working using "currentSlide"??

            At every slide following intro I've tried putting this...

             

            in frame 511

            ------------------------------------------------------------------------------------------ -------

            currentslide = outro;

             

            if (_currentframe == 511 && currentslide == intro) {
                 _parent.currentSlide.gotoNextSlide();
            }  else {

             

                _parent.currentSlide. gotoLastSlide();

             

            }

            ------------------------------------------------------------------------------------------ ---------

            I've also tried just the first line too.....

            Neither work or have any response.

             

            Also I found the ...

            _currentframe == 511

            Has no effect on what happens

            as long as I keep the script in frame 511.

             

            also sorry about the confusion...

            the else statement I don’t want to gotoLastSlide.

            I just put that there to see if it would do anything.... and it didn't.....

            Instead I just want it to stay at currentSlide.

            (if I could edit my first post I would)

             

            Anyways thanks for your interest and help so far!!!

            And I don’t care if anyone finds my script to be a bad way of doing

            this.. just scratch my code and there's probably a better way of doing it.

            Thanks for the support so far!!!

            • 3. Re: stop gotoNextslide
              allendupras Level 1

               

               

              I think I figured out another script that might work instead....

               

              frame 511

              --------------------------------------------------------

              loop = +1;

               

              if (loop == 1) {
                   _parent.currentSlide.gotoNextSlide();
              }

              --------------------------------------------------------

               

              You would think it would work but it doesn't??

              Any ideas?

               

              I figured out that the main problem is that the script from the first slide

              repeat through all the other slide so....

              Each time even if I put currentslide = outro; it will still repeat the first code

              that makes it equal intro.

               

              So this way each time the script repeats it adds 1. After the second time it

              will equal 2 and the if statement shouldn’t run.....

               

              but it is......
              know why??

              thanks,