11 Replies Latest reply on Jan 25, 2013 4:08 AM by domus_rf

    How do I break apart .CCT files?

    Brian_Kendig
      I have some files with a .CCT extension. They appear to be uncompressed, unencrypted archives containing graphic and sound files. I was able to discover that ".CCT" means they're "Macromedia Director Cast" files.

      Is there some program I can use to open these archive files and extract their contents? Will the trial version of Director let me do this?

        • 1. Re: How do I break apart .CCT files?
          Level 7
          > Is there some program I can use to open these archive files and extract their
          > contents? Will the trial version of Director let me do this?

          You can use Director itself to access the cast members the library
          contains, and the trial version ought to be able to do this.
          I would suggest making a projector (executable) that links to the
          castLib and adding a button to the stage that issues a
          castLib(intIndex).save("path_to_file") command. This will create an
          unprotected castLib that you can then open in the authoring environment.
          • 2. How do I break apart .CCT files?
            Brian_Kendig Level 1
            I don't know anything at all about Director. I'm a web developer by trade, but I've never used Shockwave in my work.

            I downloaded and installed a trial copy of Director 11, and now when I double-click my .CCT file it launches Director, but the file itself doesn't appear to open - I don't see anything on the screen which would lead me to believe that I can have access to anything in the file.

            How can I use Director to get access to the contents of a .CCT file, and just save the pieces to individual graphic and sound files?

            Thank you very much for your assistance!


            • 3. Re: How do I break apart .CCT files?
              Level 7
              > I am clueless about Director - the only thing I know is that it has something
              > to do with Flash!

              You're right about your first statement, but FWIW Director has nothing
              to do with Flash other than that it can act as a host for Flash movies,
              is owned by the same company, and revenue from sales of Director allowed
              Macromedia to purchase FutureSplash which became Flash

              > I downloaded and installed a trial copy of Director 11, and now when I
              > double-click my .CCT file it launches Director, but the file itself doesn't
              > appear to open - I don't see anything on the screen which would lead me to
              > believe that I can have access to anything in the file.

              This is why I suggested you need to create an executable, link it to the
              CCT file and issue a castLib.save() command. The CCT file is a
              "protected" format, saving it will create an unprotected version that
              you can then open by double-clicking into the authoring environment.

              How large is the castLib (file size)?
              • 4. How do I break apart .CCT files?
                Brian_Kendig Level 1
                Aha - I'm reading a little more about Director, and I think I understand your message now. I wasn't aware that some cast files are openable in Director and some aren't.

                The Director environment is alien to me. If you could give me just a little more info - how to get started making an executable like you say, that will create an unprotected file - I'm sure I can figure the rest out on my own!

                Or has someone else done this before, and is there some app already out there which can export a cast library to an unprotected file?

                Thank you for the pointers!


                • 5. Re: How do I break apart .CCT files?
                  Level 7
                  Start a new movie, double-click the frameScript channel (just above the
                  divider bar that indicates which frame the playhead is playing) on, for
                  argument's sake, frame 5. Paste the following into the script window
                  that opens:
                  --
                  on exitFrame me
                  _movie.go(_movie.frame)
                  end

                  Hit Ctrl + 7 to open your Tools palette if it isn't already. Change the
                  drop-down at top to say Classic. Click the Push Button tool (bottom
                  right of tools section) and click somewhere on your stage and drag the
                  button out a little. Add some text, like "Save", and click off the
                  button. Now right click it (on the stage) and choose "Script..." This
                  will again start a behavior script with a handler stub. Paste the
                  following into the script, being careful to change castLibName.cct to
                  the name of your existing - protected - cast library:
                  --
                  on mouseUp me
                  _movie.newMember(#bitmap).importFileInto("@/castLibName.cct")
                  OK = castLib(2).save("@/unprotected.cst")
                  alert "Saved cast file:" && OK
                  end

                  Now you need to publish this as a projector executable. Save the file
                  into the same folder as your protected castLib and go to the File ->
                  Publish Settings dialog. Make sure Windows projector (or Mac projector,
                  depending on which platform you're working on) is checked. Hit the
                  Publish button and the projector should preview. Push your "Save" button
                  and it should create a new file in the same folder named
                  "unprotected.cst" which you can double-click to have open in Director.
                  Now you can start extracting assets from it, and to do so you'll
                  probably need to download and install a few xtras. Let's deal with that
                  when you've made it this far successfully.
                  • 6. Re: How do I break apart .CCT files?
                    Brian_Kendig Level 1
                    Thank you so much for the guidance!

                    I was able to follow your directions down the point where I'm publishing the projector; in the "Publish Settings" dialog, "Macintosh Projector" and "Windows Projector" are both unchecked and greyed out (each one's checkbox and field). "Shockwave File (DCR)", "HTML", and "Image File" are all active.

                    I'm doing this on a Mac (though I have a Windows XP box here to try it on if necessary). I tried publishing the "Shockwave File (DCR)", and it came up properly in Safari with the button, but each time I tried clicking the button it crashed Safari (possibly because Shockwave on Mac isn't all that stable to begin with, in my experience).

                    Do you have any ideas on why the two Projector checkboxes would be greyed out? And, also, how could I have it prompt me to find the .CCT file instead of hardcoding its name? (This language looks a whole lot like HyperTalk and AppleScript...)


                    • 7. Re: How do I break apart .CCT files?
                      Level 7
                      > I was able to follow your directions down the point where I'm publishing the
                      > projector; in the "Publish Settings" dialog, "Macintosh Projector" and "Windows
                      > Projector" are both unchecked and greyed out (each one's checkbox and field).
                      > "Shockwave File (DCR)", "HTML", and "Image File" are all active.

                      Sorry, I forgot that you can't create an executable from the trial version.

                      > I'm doing this on a Mac (though I have a Windows XP box here to try it on if
                      > necessary).

                      I'm not sure what the projector resources look like for Mac, but for
                      Windows you should be able to grab the file named Projec32.skl from the
                      install folder, rename it .exe and add an ini file to tell it which file
                      to open.
                      Perhaps you could try this on XP. Download and install the trial, shift
                      your existing file from your Mac onto your PC, copy projec32.skl into
                      the same folder and rename it 'stub.exe' for example, and place the
                      following in a plain ASCII text file named 'stub.ini'
                      [Movies]
                      Movie01=@/unprotector

                      (Assuming your .dir file is named 'unprotector.dir')


                      > And, also, how could I have it prompt me to find the .CCT file instead of
                      > hardcoding its name?

                      To do this you need to use an xtra that will display a file-select
                      dialog. There's one that ships with Director, called FileIO, but it's
                      going to get tricky so bear with me. In the same folder where you copied
                      and renamed projec32.skl and created an ini file for it, create a folder
                      named 'xtras'. Into this folder you need to copy:
                      Dirapi.dll
                      Iml32,dll
                      Proj.dll
                      all from the folder that Director was installed to - the same folder
                      that contains the projector skeleton that you renamed earlier. You also
                      need to place a copy of FileIo.x32 into this folder. You'll find it in
                      %Director11%\Configuration\Xtras\Scripting\
                      Open the Director file you were working on and go to Modify -> Movie ->
                      Xtras, select all of the xtras listed one at a time and remove them.
                      Since you have only a #pushButton cast member you don't need any of the
                      xtras listed and your movie may barf if it starts and can't find them in
                      the 'xtras' folder, so it's simpler to remove them.
                      Modify the script attached to the button as follows:
                      --
                      on mouseUp me
                      fio = xtra("FileIO").new()
                      tCast = fio.displayOpen()
                      if voidP(tCast) then exit
                      fio = VOID
                      _movie.newMember(#bitmap).importFileInto(tCast)
                      OK = castLib(2).save("@/unprotected.cst")
                      alert "Cast library saved:" && OK
                      -- quit
                      end

                      > (This language looks a whole lot like HyperTalk and
                      > AppleScript...)

                      I think there is a (peripheral) relationship with SmallTalk and LISP.
                      See http://www.lingoworkshop.com/Articles/history.php for more details.
                      • 8. Re: How do I break apart .CCT files?
                        Brian_Kendig Level 1
                        Thank you very much for all this assistance; I really do appreciate it!

                        When I wasn't able to build an executable with the trial version, I went looking to see if anyone else had written a program to turn .CCT files into something I could use. And I was able to find something called "cct-cxt-opener 1.0" which, despite having the worst interface I've seen since the 1980s, does the trick and turns my .CCT files into .CST files which I can then open and inspect within Director 11. So while I'm going to go back later and learn from what you wrote in your previous comment, for now I have something I can work with.

                        Which brings me to my next question: now that I can see the resources in the .CST file from within Director, how do I save the resources to individual .jpg and .mp3 files for use in other programs? I wasn't able to see any way to do this by hand, though of course doing it programatically would be much easier...


                        • 9. Re: How do I break apart .CCT files?
                          Level 7
                          I'm glad you have a cast library you can open. In order to export,
                          you'll need a couple of xtras - one is free, the other will show a
                          single nag screen you can ignore.
                          Sharp Export: < http://www.sharp-software.com/products/index.htm#sharpexport>
                          Audio Xtra: < http://xtras.tabuleiro.com/download/audio.htm>
                          Extract them and place them in the Configuration/Xtras/Scripting folder
                          where you installed Director. Create a new movie and link your
                          unprotected cast library to it (CTRL + Shift + C; Link...). Create a
                          #movie script (CTRL + Shift + U) and paste in the following:
                          --
                          on exportImages
                          mPath = _movie.path
                          sx = xtra("SharpExport").new()
                          if objectP(sx) = 0 then
                          alert "SharpExport initialisation failed"
                          exit
                          end if
                          nMembers = castLib(2).member.count
                          repeat with m = 1 to nMembers
                          tMember = member(m, 2)
                          if tMember.type = #bitmap then
                          tName = tMember.name
                          if tName = EMPTY then tName = string(m)
                          OK = sx.exportJPG(tMember, mPath & tName & ".jpg", 10)
                          if OK <> 0 then put "Export failed:", OK, m
                          end if
                          end repeat
                          put "Done..."
                          end

                          on exportAudio
                          mPath = _movie.path
                          nMembers = castLib(2).member.count
                          repeat with m = 1 to nMembers
                          tMember = member(m, 2)
                          if tMember.type = #sound then
                          tName = tMember.name
                          if tName = EMPTY then tName = string(m)
                          OK = axLoadSound(tName, "member", tMember)
                          if OK <> 0 then put "axLoadSound failed:", OK, m
                          OK = axConvertToFile(tName, mPath & tName & ".wav", "WAVE")
                          if OK <> 0 then put "Export failed:", OK, m
                          OK = axRemoveSound(tName)
                          end if
                          end repeat
                          put "Done..."
                          end

                          You can execute these 2 handlers from your message window by hitting
                          Ctrl + M and typing in/pasting the handler names followed by RETURN/ENTER:
                          exportImages(){ENTER}
                          -- "Done..."
                          exportAudio(){ENTER}
                          -- "Done..."
                          • 10. Re: How do I break apart .CCT files?
                            Nanomedia Level 1
                            quote:

                            Originally posted by: Brian Kendig
                            now that I can see the resources in the .CST file from within Director, how do I save the resources to individual .jpg and .mp3 files for use in other programs?


                            Just select and copy a cast member.
                            You can paste it in any image or sound editor.


                            • 11. Re: How do I break apart .CCT files?
                              domus_rf

                              Hi, I'm having the same problem with cct and cxt files.

                              I tried to do the "Publish" instruction but no "unprotected.cst" appears

                              I think this may be related to the fact that the cct and cxt files are hidden files in my Mac Finder window.

                              I made them visible through a Terminal command but they're still dimmed and maybe Director can't see them to Publish.

                              Is there a solution for this?