6 Replies Latest reply on Oct 18, 2007 11:58 AM by mhunter

    Absolute path error

    mhunter Level 1
      In this file I have several movie clips controlling each other using absolute paths. Then I get to one that just wont work. After a lot of trial and error I decided to try a relative path and that worked. Is there a reason for having to use _root to get something to work?

      thanks in advace...
        • 1. Re: Absolute path error
          clbeech Level 3
          it entirely depends on the path that you were trying and the object loactions (of course) If you needed to call to the lowest level, sometimes that is necessary and the easiest way to reach the destination, instead of writing fifteen '_parent's in a row to go down the chain :)

          also I prefer to use '_level0' to reach the lowest level as '_root' can be problematic in some situtations, and there's cautions against it.
          • 2. Re: Absolute path error
            mhunter Level 1
            they are real simple paths:

            this._parent.lampDS1.gotoAndStop(1);
            that works, but for a different clip I had to use:

            _root.DC1MC.play();

            And, all movie clips are on the root, but when I use the helper to find the target, DC1MC ends up with "this." which does not work, while the lampDS clips get this._parent and that works...
            • 3. Re: Absolute path error
              clbeech Level 3
              well hmm, I guess I'd have to ask:

              if lampDS1, is an instance on the main timeline, then 'this._parent' is in reference to the main timeline, if the calling clip is also located there (main timeline)

              could it be that the call for the instance DC1MC.play() was within an on Handler? in this case the 'this' within the handler function refers to the instance the function is operating on, and it may have taken an extra '_parent' to get 'out' of that scope, so to speak. IF it was made from within a handler function try (just for fun) this._parent._parent.DC1MC.play() and see what happens.
              • 4. Re: Absolute path error
                mhunter Level 1
                it was something about the movie clip the code was in that was causing it. I recreated the clip from scratch and it worked. Even tried copying and pasting frames from the old clip into the new clip it didnt work. guess the clip got corrupted somehow.

                thanks for the help tho
                • 5. Re: Absolute path error
                  ChrisElmes Level 1
                  The target button in the script window gets a little confused sometimes, it seams to not always be acurate if your not on frame 1 of the MovieClip

                  Also if you load a movie into an empty movieClip the timeline of the loaded movie replaces the empty movieClips timeline so sometimes you think you might need 2 _parents when in fact you only need 1.
                  • 6. Re: Absolute path error
                    mhunter Level 1
                    Thats very interesting. Of course, a lot of this wouldnt happen if I would quit being a wuss and hand code it...

                    Thanks guys