6 Replies Latest reply on Jan 24, 2013 3:18 PM by Amy Blankenship

    How to find Library Symbols of a certain Base Class

    Amy Blankenship Level 4

      Hi, all;

       

      I need to find all the symbols (if any) in my library that have a certain .as Class in the Base Class field. Is there an easy way to do this within Flash itself, or is there an extension that looks at this field while doing a search of library symbols?

       

      Thanks;

       

      Amy

        • 1. Re: How to find Library Symbols of a certain Base Class
          kglad Adobe Community Professional & MVP

          you can use jsfl to find that.

           

          you would use the library class'es items property (an array) to loop through each library item and use the item property linkageClassName to check for the base classes you want.

          • 2. Re: How to find Library Symbols of a certain Base Class
            Amy Blankenship Level 4

            Hi, klglad;

             

            I appreciate that you're trying to help, but I think since I said "or is there an extension", you might have dug a little bit deeper. I know you're used to answering newbie questions by people not familiar with the product or the documentation, but I'm actually not one of those people.  If I come to the forums to ask a question, it's because I've exhausted nearly every resource I have at my disposal.

             

            Thanks;

             

            Amy

            • 4. Re: How to find Library Symbols of a certain Base Class
              Amy Blankenship Level 4

              I'm not sure who marked this correct. While I won't go so far as to mark it as uncorrect, I'd just like to say that it did not answer the question I asked, which was "is there something that already exists that would allow me to do this" not "how do I write something to do this". I needed something that would be available that day and wouldn't take me away from other tasks for the time that it would take to write an extension.

               

              But thanks for the valiant try.

              • 5. Re: How to find Library Symbols of a certain Base Class
                kglad Adobe Community Professional & MVP

                i did't know of anything that was available at the time of my first response to this thread but, if you'd have explained that you didn't understand my response, i would have been more explicit and put those words into code:

                 

                var itemA=fl.getDocumentDOM().library.items

                var searchClass = "A";

                for(var i=0;i<itemsA.length;i++){

                    if(itemsA[i].linkageClassName==searchClass){

                        fl.trace(searchClass+" Class item found");

                    }

                }

                 

                and my guess is that the admin that marked it correct understood that i'd given the correct response and it may be helpful to someone else (even though it wasn't helpful to you). 

                 

                p.s. you're welcome.  and, maybe this will be helpful to someone. (it was a good question.)

                1 person found this helpful
                • 6. Re: How to find Library Symbols of a certain Base Class
                  Amy Blankenship Level 4

                  It's not that I didn't understand your response, it's that I haven't written an extension in almost 10 years, and that was for Fireworks. So to even get started with how to get the extension working, etc., would have taken more time that I had. I do have a bookmark collection that deals with how to write extensions, so had I intended to go that route I would not have posted the question. I would have just done it.

                   

                  I do appreciate the code, though. If I get to the point where I have the leisure to get back into writing extensions, I'm sure it will be really helpful. But the one that lets me paste in a list of frame label names and have it create the labels for me is ahead of it .