3 Replies Latest reply on Apr 26, 2006 3:01 AM by blemmo

    loadMovie with its loaded variables

    greell
      I loaded variables into my movieOriginal (loadVariables("my.txt", this); and the display just fine. However, when I use loadMovie to load movieOriginal into a new movie anchored by an empty movieClip (emptyMC.loadMovie("movieOriginal.swf") the variables do NOTdisplay. I guess its about levels but I can't find a solution. Please help.
        • 1. Re: loadMovie with its loaded variables
          blemmo Level 1
          Check the path to the object that displays the variables. I guess there's a "_root" involved, which works fine standalone, but not if the movie is loaded into another one. You can use
          emptyMC.lockroot = true;
          that locks the references to "_root" in the loaded movie to the mc's timeline (you can't access the real "_root" then from the movie!), or replace the absolute paths in your movie (the ones containing "_root") with relative paths, e.g. "this", "_parent" etc.

          hth,
          blemmo
          • 2. Re: loadMovie with its loaded variables
            greell Level 1
            Thanks

            The lockroot = true; method was unsuccessful but I found one reference to _root in the orginal movie and replaced it with the relative path 'this' and it worked fine.

            cheers
            • 3. loadMovie with its loaded variables
              blemmo Level 1
              quote:

              The lockroot = true; method was unsuccessful

              That's because it's actually _lockroot, I wrote it from memory and forgot the underscore. Maybe it's useful in the future...

              cheers,
              blemmo