6 Replies Latest reply on Sep 28, 2006 1:21 PM by Newsgroup_User

    find unused castmembers

    user1001
      Need help: I rewrote a large cd-rom with 6 languages and a lot of video's. Because the company I made it for several years ago changed there productrange, I had to put in al lot of new pictures and video's (external) Now the cd is more than 800 Mb. I know there are many unused castmembers from old products / former cd-versions. How can I detect and delete them easely????
      Monique
        • 1. Re: find unused castmembers
          Chunick Level 3
          I wouldn't attempt to do it automatically since something like this wouldn't be 'detectable' (I believe) if you wrote something:

          sprite(me.spriteNum).member = member(12)

          ... well, I suppose you could run through each line of every script and check to make sure, but I wouldn't want to trust that method because there's a hundred ways I could switch a member such as sticking them in a list somewhere and then referencing the list when I wanted to switch one out for another in my list, etc...
          I would say you have a manual job ahead of you unless someone else can pipe up with a 100% solid solution.
          • 2. Re: find unused castmembers
            user1001 Level 1
            Thanks (I think) This is going to take days of 'stupid' labour. If at least I could produce a list, then it would be easier to do it manually. Any other ideas?
            Monique
            • 3. Re: find unused castmembers
              Level 7
              The find castmember command (command-;) can be set to select members not
              used in score. But as the reply suggests this will also select members
              only displayed by lingo commands.

              To mark as used one can identify and place these 'puppet sprite'
              members in the score, perhaps in a frame past the last displayed content.
              • 4. Re: find unused castmembers
                Level 7
                On Sun, 24 Sep 2006 14:31:10 GMT, user1001 posted in
                macromedia.director.basics:

                > Thanks (I think) This is going to take days of 'stupid' labour. If at
                > least I could produce a list, then it would be easier to do it manually.
                > Any other ideas? Monique

                Others have brought up the challenge of finding unused members, so I'll
                address the list question.

                If all of the members you're concerned with are externally linked, you can
                create a list of all linked members. It might help in some way.

                Here's a rough example of something you could do.

                on findLinked
                libs = the number of castLibs
                tmpStr = ""
                memCount = 0
                repeat with thisLib = 1 to libs
                mems = the number of members of castLib thisLib
                libName = castLib(thisLib).name
                repeat with thisMem = 1 to mems
                tmpMem = member(thisMem,thisLib)
                if tmpMem.linked then
                memCount = memCount + 1
                memName = tmpMem.name
                pth = tmpMem.fileName
                if pth = "" then pth = "MISSING FILE"
                tmpStr = tmpStr &"member(" &QUOTE &memName &QUOTE &","\
                &QUOTE &libName &QUOTE &")" &RETURN
                tmpStr = tmpStr &" path: " &pth &RETURN
                end if
                end repeat
                end repeat
                strOut = RETURN &"Found" &&memCount &&"linked cast members in"\
                &&libs &&"CastLibs" &RETURN &RETURN
                strOut = strOut &tmpStr
                put strOut
                end


                --
                Mark A. Boyd
                Keep-On-Learnin' :)
                • 5. Re: find unused castmembers
                  user1001 Level 1
                  JB/Mark, I followed the suggestion of JB and printed all the version-lists, checked them against each other and deleted the mutual members that were not used. I realise that your way will be faster but I just don't know enough of this manual programming-thing. Thanks to both of you..
                  • 6. Re: find unused castmembers
                    Level 7
                    On Wed, 27 Sep 2006 23:17:11 GMT, user1001 posted in
                    macromedia.director.basics:

                    > JB/Mark, I followed the suggestion of JB and printed all the
                    > version-lists, checked them against each other and deleted the mutual
                    > members that were not used. I realise that your way will be faster but I
                    > just don't know enough of this manual programming-thing.

                    Hey, if your "version lists" are records of updates between versions, you
                    will be able to do some things faster than I. Too many of my recent projects
                    lack that documentation - at least in a single, easy to read document.

                    Glad you got it worked out!


                    --
                    Mark A. Boyd
                    Keep-On-Learnin' :)