1 Reply Latest reply on Aug 24, 2006 11:06 AM by abeall

    Help Translate old script

    zambody_nolte
      Can someone please help me translate this old script to work with 2004 MX

      I have created my file to work with it, but its not working. I have even tryed to take a few stabs at updateing th script myself, but I must be missing somthing.

      The script is from a tutorial on actionscripts.org
      heres the link:
      http://www.actionscripts.org/tutorials/intermediate/relative_scrolling/rel_scrol_1.shtml

      here are the actual action scripts, I apreachiate any help, Thanks!

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

      Main timeline script:

      stop();
      // set startup variables - we don't want it scrolling
      // away as soon as the file opens!
      /bar:target = 1;
      /bar:direction = "f";
      // our 'director' function, which will control movements
      function director() {
      if (/bar:target</bar:current) {
      // if we're going backwards then, set direction to backwards!
      /bar:direction = "b";
      } else if (/bar:target>/bar:current) {
      // if we're going forwards then, set direction to forwards!
      /bar:direction = "f";
      } else if (/bar:target==/bar:current) {
      /bar:direction = "null";
      }
      goto = (String(/bar:direction+/bar:current));
      trace(goto);
      bar.gotoAndPlay(goto);
      }


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

      Movie Clip

      Frame Lable "f1" Example

      current = 1
      if (target == current) {
      stop ();
      }

      _______________________________________________________________________

      Button Action Script Example

      on (release) {
      /bar:target = 1;
      director ();
      }

        • 1. Help Translate old script
          abeall Level 3
          Good heavens, if this was ever proper syntax, I'm glad it was before my time!

          /bar:target = 1;

          I can't even tell what that is supposed to be. Maybe:

          bar.target = 1;
          // or
          _root.bar.target = 1;
          // or most likely
          _root.bar_target = 1;

          Whatever the case, it's definately not AS1.0, 2.0 or 3.0. Figure out if changing all uses of the / and : to the above suggestions makes it work.