4 Replies Latest reply on Aug 29, 2009 6:50 AM by AESS1981

    deepLink

    AESS1981

      I am implementing deepLink in Actionscript 1.0.

      On the main timeline I am using the following within a mc button:

       

      this.deepLink = '/portfolio/';

      this.onRelease = _parent.btnRelease;

      this.onRollOver = _parent.btnRollOver;

      this.onRollOut = _parent.btnRollOut;


      stop();

       

       

      This works perfectly. However, once I put a mc button into another Movie Clip on the main timeline, the script no longer functions.

      I have tried, unsucessfully:

       

      _root.deepLink = '/portfolio/';

      this.onRelease = _parent.btnRelease;

      this.onRollOver = _parent.btnRollOver;

      this.onRollOut = _parent.btnRollOut;


      stop();

       

      How can I have this mc button direct the movie to $/portfolio/ on the main timeline?

       

      Many thanks

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

          Assuming that set of functions is on the main timeline, have yotry the following:

           

          _root.deepLink = '/portfolio/';

          this.onRelease = _root.btnRelease;

          this.onRollOver = _root.btnRollOver;

          this.onRollOut = _root.btnRollOut;

           

          stop();

           

          If that doesn't work, then it may be necessary to see what's inside those functions as they may need to be retargeted for one more depth of targeting due to the addition of the movieclip.

          • 2. Re: deepLink
            AESS1981 Level 1

            Thanks for reply, unfortunately this didn't work.

             

            the AS on the first frame of the movie is:

             

            #include "SWFAddress.as"


            function btnRelease() {

            SWFAddress.setValue(this.deepLink);

            }

            function btnRollOver() {

            SWFAddress.setStatus(this.deepLink);

            }

            function btnRollOut() {

            SWFAddress.resetStatus();

            }


            SWFAddress.onChange = function() {

            var value = SWFAddress.getValue();

            if (_currentframe == 2 && value == '/') {

            play();

            } else {

            var frame = _currentframe;

            gotoAndStop('$' + value);

            if (frame == _currentframe) {

            gotoAndStop('$/error/');

            return;

            }

            }

            SWFAddress.setTitle(formatTitle(value));

            }


            stop();

            How would I add more depth of targeting?
            Thanks again

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

              If that code you first showed is still in the movieclip, then the code I showed should be okay except that the deepLink value may have to be a declared variable in the main timeline.  From what you showed originally, where it worked, that var appears to be in the movieclip... but the main timeline code is looking for it on the main timeline.

               

              Aside from that, I am not familiar with SWFAddress beyond knowing what it's intended use is, so I can't help much at its end of things.  If it worked fine the way you first had it, then some trial and error retargeting should work things out.

              • 4. Re: deepLink
                AESS1981 Level 1

                Thanks for your help. I think I have found an alternate way to achieve the same objective.

                Cheers!