3 Replies Latest reply on May 9, 2006 10:48 AM by Newsgroup_User

    Creating/linking castLibs 'on the fly'

    David Farman
      I need to be able to create a castLib "on the fly" and link its members to a bunch of external video files.

      I have previously used Penworks' CastLink Xtra for this task, but seem to have deleted it, and Penworks appears to have disappeared.

      Does anyone know of an alternative Xtra, or how to achieve the same thing in Lingo? Alternatively, could anyone kindly let me have another copy of CastLink?

      Thanks!

      David
        • 1. Re: Creating/linking castLibs 'on the fly'
          Level 7
          you could have an empty cast linked to the movie & add members with the
          new() method

          assuming you have the video file names in a list (you can fill it
          dinamically with getNthFileNameInFolder() or BuddyApi xtra):

          videoList = [...]

          repeat with i=1 to videoList.count
          newVideo = new(#digitalVideo)
          member(i).fileName = videoList
          end repeat

          never tried myself but i think it should work, let us know if it does


          David Farman wrote:

          > I need to be able to create a castLib "on the fly" and link its members to a
          > bunch of external video files.
          >
          > I have previously used Penworks' CastLink Xtra for this task, but seem to have
          > deleted it, and Penworks appears to have disappeared.
          >
          > Does anyone know of an alternative Xtra, or how to achieve the same thing in
          > Lingo? Alternatively, could anyone kindly let me have another copy of CastLink?
          >
          >
          > Thanks!
          >
          > David
          >
          • 2. Re: Creating/linking castLibs 'on the fly'
            David Farman Level 1
            Ahah, getNthFileNameinFolder() - a new one on me! Many thanks for pointing me in the right direction.

            I have only recently returned to Director, having last used version 8.5 a few years ago, and am still getting to grips with the greatly enhanced fuctionality of Director nowadays. No wonder Penworks has disappeared: there's rather less need for Xtras these days.

            I have also just come across the Joe Sparks articles "Dynamic run-time linking to external media" and "Using external media to create cast members" which offer another approach.

            Thanks again

            David
            • 3. Re: Creating/linking castLibs 'on the fly'
              Level 7
              you're welcome. and yes, it's difficult to be up to date in these days &
              too often we bypass commands or approachs that would save a lot of time )-:

              David Farman wrote:
              > Ahah, getNthFileNameinFolder() - a new one on me! Many thanks for pointing me
              > in the right direction.
              >
              > I have only recently returned to Director, having last used version 8.5 a few
              > years ago, and am still getting to grips with the greatly enhanced fuctionality
              > of Director nowadays. No wonder Penworks has disappeared: there's rather less
              > need for Xtras these days.
              >
              > I have also just come across the Joe Sparks articles "Dynamic run-time linking
              > to external media" and "Using external media to create cast members" which
              > offer another approach.
              >
              > Thanks again
              >
              > David
              >