2 Replies Latest reply on Mar 16, 2007 9:11 AM by Charles Parcell

    Exe Looking for development path names

    Javo_1 Level 1
      I have developed a project on DVD using several video clips
      .

      I have used the following loadmovie script reference the paths
      (in a sub directory of root called red - the projector being in the root) :

      on startMovie
      append the searchPaths, the moviePath & "res"
      append the searchPaths, the moviePath & "sound"
      end


      However when transfering the disc to some machines or copying the contents to a hard drive - an message comes up asking "where is" the resource and references the original absolute file path from the development machine.

      Any ideas how i can solve this problem


      Cheers


      J
        • 1. Re: Exe Looking for development path names
          Level 7
          I have found 'the searchpaths' to be very unreliable when using it to
          find external files. It is kind of hit or miss sometimes. In my case
          it was quicktime movies that it couldn't find. The way I fixed my
          problem was to parse the filename of the quicktime, and test to see if
          the file was in the place I expected it. Then set the filename to have
          the exact path it needed.

          This uses the BuddyAPI xtra. My project was PC only. You will have to
          make adjustments if you plan on having it work on Macintosh's as well.
          (watch for line wrapping on some of the longer lines of code here)

          on beginSprite me
          oldDelim=the itemDelimiter
          the itemDelimiter="\"

          thisMovie=sprite(me.spriteNum).member.filename.item[sprite(me.spriteNum).member.filename. item.count]
          sprite(me.spriteNum).member.filename=thisMovie

          if baFileExists(the moviePath&"res\"&thisMovie) then
          sprite(me.spriteNum).member.filename=the
          moviePath&"Media\Movies\"&thisMovie
          end if

          if baFileExists(the moviePath&"sound\"&thisMovie) then
          sprite(me.spriteNum).member.filename=the
          moviePath&"Media\Movies\"&thisMovie
          end if

          the itemDelimiter=oldDelim
          end
          • 2. Re: Exe Looking for development path names
            Charles Parcell Level 1
            You also might want to try clearing the searchPaths list before plugging in items.

            the searchPaths = []
            append the searchPaths, the moviePath & "res"
            append the searchPaths, the moviePath & "sound"