5 Replies Latest reply on Feb 18, 2008 1:44 PM by kglad

    loadClip path problem

    gralish
      I'm working to convert a bunch of CBT lessons to run off of one master file instead of copies of this file distributed in multiple directories.

      The master file loads a bunch of complied pages. The swf pages have links to audio and video files.

      When the page.swf loads the path in the page files looks for the audio/video link with with the master files root rather then the loaded pages path. I do have a global pointer to the relative path & could prepend this to all of the video and audio load calls... but that means opening & recompiling hundreds of files.

      Is there a way of setting the path for the page.swf when I call the loadClip from the single master file rather than embedding it in each page?

      thisMCL.loadClip(_global.LessonPath + "section"+(nCurrentIndex+1)+"/page"+thisPage+".swf", mcContentHolder);
        • 1. Re: loadClip path problem
          kglad Adobe Community Professional & MVP
          does each loadClip in your loaded pages already use a path variable that you need to change that from the loading swf?
          • 2. Re: loadClip path problem
            gralish Level 1
            No - they all are dependent on the root being 1 directory level up. What's worse is that there are embedded video links in components.

            What I'm considering now is making the sing master file call a dummy loader that is in the expected relative position for the page files, and have that load _lockroot = true

            Not sure if that will work. Any other ideas????
            • 3. Re: loadClip path problem
              kglad Adobe Community Professional & MVP
              the path to your external files will be relative to the html page that's embedding your _level0 swf. you can't work-around that fact by using a dummy loader.

              the page swfs are located in several different directories, correct? those page swfs already have their path/file names encoded, correct? those path/file names are correct relative to the page swfs locations, correct? and you're using a master swf, that's in another location, to load your page swfs, correct?

              if yes to all, you have a problem that has no painless solution.
              • 4. Re: loadClip path problem
                gralish Level 1
                That's what i'm realizing - after beating my head against the code for longer than I should have. I broke down this morning and added the path variable to a couple lessons for a time estimate.

                Thanks for your help!

                Mike
                • 5. Re: loadClip path problem
                  kglad Adobe Community Professional & MVP
                  you're welcome.