3 Replies Latest reply on Aug 1, 2014 8:17 AM by Ned Murphy

    transition commands

    cabaka11

      Hello,

       

      i have a file on sites that transit into the main site from alpha 0 to 100.

       

      .the buttons i have have the following code below. i use frame labels. But i seem to have a button that runs two clicks to work. And the action seems too slow as if disconnected from the command. i also have a variable that sits on the first and some subsequent keyframes of the main timeline.

      can anyone point to what the problem is? 

       

      on(rollOver) {

        gotoAndStop("Over")

      }

      on(rollOut) {

        gotoAndStop("Up")

      }

      on(press) {

        gotoAndStop("Down")

      }

      on(release) {

        gotoAndStop("Up");

        _level0.goingToPage = "biography";

        _level0.play();

      }

       

      thank you for your time.

       

      Best,

      Cagri Kasap

        • 1. Re: transition commands
          Ned Murphy Adobe Community Professional & MVP

          Try putting a trace command in the click code to see if it is executing twice when you click it twice...

           

          on(release) {

             trace("clicked");

            gotoAndStop("Up");

            _level0.goingToPage = "biography";

            _level0.play();

          }

          • 2. Re: transition commands
            cabaka11 Level 1

            Hello,


            i have tried your suggestion. it tells me that it is working on each click, not on two clicks. My problem is that the transition works at the second click. However I want it to work at the first click. Do you have any other suggestions?


            Best,

            Cagri Kasap

            • 3. Re: transition commands
              Ned Murphy Adobe Community Professional & MVP

              Which line in the function you show should cause the animation that you say doesn't happen on the first click?

               

              The first thing I will recommend is that you get the code off of the object and place it in the timeline using the timeline version of the code.  If the button is in the main timeline and you assign it an instance name of "btn" then that code would look something like...

               

              btn.onRollover = function() {

                btn.gotoAndStop("Over");

              }

              btn.onRollOut = function() {

                btn.gotoAndStop("Up");

              }

              btn.onPress = function() {

                btn.gotoAndStop("Down");

              }

              btn.onRelease = function() {

                btn.gotoAndStop("Up");

                goingToPage = "biography";

                play();

              }