6 Replies Latest reply on Oct 22, 2006 1:10 PM by Newsgroup_User

    open audio part of e-CD

    shutiri
      Hi,

      I did a cross platform enhanced CD (audio + data). on Mac, it opens 2 sessions: audio and data, so the audio is not "hidden".

      On PC, the autoplay from the windows explorer uses my autorun.inf and doesn't opens the media player to play the audio files. So, how do I add a button in my projector named "play audio" to actually play the audio part of my e-CD ?

      thank you,
      ludo.
        • 1. Re: open audio part of e-CD
          KRMult
          Try this:

          global CDAudioDrive
          global cdAppPath





          on mouseUp me

          CDAudioDrive = ""
          cdAppPath = ""
          WMPath = "c:\program files\Windows Media Player\wmplayer.exe"

          if baFileExists(WMPath) then
          cdAppPath = QUOTE & WMPath & QUOTE & " " & "/Device:AudioCD"
          else
          cdAppPath = baReadRegString( "AudioCD\Shell\Play\Command\", "", "Error", "HKEY_CLASSES_ROOT" )
          end if
          open cdAppPath

          end
          • 2. Re: open audio part of e-CD
            shutiri Level 1
            Thank you KRMult; I've been trying to use this script but it doesn't works. I'm not a director expert (obviously) and I'm just using it to publish my flash movie on the data session of my e-CD, so I'm not familiar with lingo.

            I looked for the global CDAudioDrive and cdAppPath functions but I don't know what to do with those (no topics on the help with that syntax). And the script you wrote stops on the "if baFileExists" part in the debugger.

            Can you please be specific about what should I do and how to use this script (and maybe where can I read about CDAudioDrive and cdAppPath).

            thank you,
            ludo.
            • 3. Re: open audio part of e-CD
              shutiri Level 1
              I'm using this script, which opens media player, but I don't know if it will really work or what kind of error will I get:

              on mouseUp me
              open("C:\Program Files\Windows Media Player\wmplayer.exe")
              end
              • 4. Re: open audio part of e-CD
                Level 7
                That script will work perfectly as long as the person playing the
                program has wmplayer.exe in that exact path that you specified. If the
                person, like myself, does not have Windows installed on the c:\ drive (I
                have it on the d:\ drive), then there will probably be no error and
                Media Player will not launch.
                • 5. Re: open audio part of e-CD
                  shutiri Level 1
                  how can I fix that ? Actually I tried this script in my projector and the audio session doesn't play: I have to manually open my CD drive. So, the only thing I've accomplish with that script is to open wmp on a specific path ! any way to open the .cda files from the same drive the projector is in ?

                  thanks,
                  ludo.
                  • 6. Re: open audio part of e-CD
                    Level 7
                    You will need to use an xtra like BuddyAPI. With that, you can use the
                    command baOpenFile which will automatically open any file with the
                    program that it is associated with. If your computer has the .cda file
                    type associated with Windows Media Player, then this command will open
                    an audio file in the same folder as the Director movie:

                    baOpenFile(the moviePath&"filename.cda","normal")