Flash CS 5 Professional how to find out where movie clips are used?
Asked Answered
C

2

6

I'm using Flash CS 5. When I look at FLA project tree, I see Use Count column next to a movie clip. How do I find where this movie clip is used?

I'm hoping there is a 'Find usages' or 'Find references' feature since Flash CS knows about usage of a movie clip.

enter image description here

Currie answered 5/3, 2012 at 4:18 Comment(4)
I think there is no built in way to do this, but if there is it'd be nice to know. +1Tidewater
Not the best solution, but if your .fla file is always referencing your symbol for all instances of it via ActionScript, you could simply delete the symbol and build your project. It should throw an error whenever the symbol is still used in the code. Then you'd at least get a better idea of where it is used. Alternatively you can manually hunt each instance down. Out of curiosity, after finding all instances what are you going to do with them?Tidewater
Not a bad workaround. I'll try that. I've inherited a project and trying to figure out how it works. Hence I the question. I'm also very new to flash.Currie
I'm hoping there is a 'Find usages' or 'Find references' feature since Flash CS knows about usage of a movie clip.Currie
P
7

Try: Edit > Find and Replace (Control + F). Search in Current Document, Search for Symbol, And for the Name find your Symbol name from the dropdown, then just hit "Find Next" a couple times.

Phillisphilly answered 5/3, 2012 at 8:38 Comment(2)
That means the object is referenced in some other library object, but that library object is not actually placed anywhere in the scene. "Use Count" counts uses in the library. "Find and Replace" finds objects that are placed on the stage somewhere and their children (including objects in guide layers).Putrefaction
So you could drag every object in the library onto the root level stage. Then do a Find All. Not elegant, but it would work.Putrefaction
D
0

Flash Pro (or even Animate CC) doesn't have an option for this (searching your whole Library). You can just search for elements present in the current Stage, which maybe works for you if you have a very small FLA with a single scene (see Iggy's answer for that).

You can still search in your entire Library, though, by saving your FLA as XFL using "File/Save as..." and then searching in the plain text files inside the LIBRARY folder of the XFL package for the name of the Library movieclip/sprite/bitmap/whatever you want to know the uses of.

To perform this search you can use any command line or graphical tool. If you are using Mac OS X you can use "grep" out of the box. And if you're using Windows you can install it with cygwin (or use GrepWin, which is a graphical version of grep). The command line syntax would be something like:

grep -ir "Library Clip Name" .

(assuming the current working directory is the "LIBRARY" folder of your XFL)

You have to look for "DOMSymbolInstance". The files containing that string when performing the aforementioned grep search are using that clip (just look for the name of the file at the left, which is the same name you assigned in the Library window).

You can perform a nested grep so you don't have to manually look for "DOMSymbolInstance" in the output:

grep -ir "Library Clip Name" . |grep DOMSymbolInstance

This is the best and fastest way of getting the usages of a Library item in a big FLA/XFL.

If you just want to see the library item names without duplications (in case an item is used several times in the same clip), use this:

grep -ir "Library Clip Name" . |grep DOMSymbolInstance |cut -d: -f1 |uniq
Disloyalty answered 3/11, 2016 at 8:4 Comment(9)
This seems misleading. @Phillisphilly already mentioned how it can be done from within Flash.Abdullah
Somebody else answered, so what? A question can have multiple answers. What's misleading about my answer? Also Iggy's method doesn't really work to search for a MovieClip name and find where it's used as the OP asked (at least it didn't work for me), and if it actually worked it would be ultra-cumbersome having to add each and every clip in the library into the stage to be able to perform the search. My method is a lot quicker and cleaner if you know your way around a command line, which you should if you're a developer, and if you're not, knowing a couple of command line commands doesn't hurtDisloyalty
Hi @OMA. The question was "How do I find where this movie clip is used?", and you said, "[Flash] doesn't have an option for this", which is misleading because Flash does have a pretty good option, as Iggy pointed out. You are probably right about that edge case though. So perhaps this would be better worded like: "If Iggy's solution does not work, here is why, and here is a workaround."Abdullah
No, Flash/Animate does NOT have a "pretty good option". Have you tried it yourself? That's just a kludgy way of achieving what the OP asked for. So I still stand by what I said: "Flash Pro (or even Animate CC) doesn't have an option for this". It just has an option to search for items added to the Stage, not just present in the Library, so you have to add everything in your Library to the Stage in order to perform the search, which is extremely tedious and cumbersome. And even after doing that, this Stage search doesn't work properly most of the time (at least in my experience).Disloyalty
I tried it, yes, and it worked well for me. Maybe I was lucky that all my content was accessible from the stage. In any case, Iggy's solution is a good first thing to try. And your solution (which is a bit more involved) is a good fallback. However in my browser, your answer shows up first, and states Flash has no such feature, which almost made me overlook the solution which ended up working. That's why I say misleading. I am not saying your solution is not useful. I'm sure it is.Abdullah
In my browser Iggy's answer appears first, even when I'm not logged in into SO, but whatever. I don't think of my answer as a "fallback", more like the other way around. My answer is the one that actually works for the entire Library, without having to go to the trouble of putting everything in your library into the current Stage, which is cumbersome for big projects with hundreds and hundreds of Library items. It's Iggy's answer the one that is a worse approach that should only be used as a fallback just in case you're unsure of how to use the command line. And even then, you can use GrepWinDisloyalty
This is GrepWin, a graphical application for Windows, so you don't have to install extra command line tools into Windows or use the command line at all to perform a search: stefanstools.sourceforge.net/grepWin.html (in a Mac you're better off using the command line since grep comes with the system)Disloyalty
By the way, I've edited my answer, so it mentions Iggy's answer, so it's not "misleading" anymore ;-)Disloyalty
I've also added a "nested grep" one liner which makes this even easier.Disloyalty

© 2022 - 2024 — McMap. All rights reserved.