![]() |
![]() |
||||||
|
|||||||
| Tags: based, extension, files, layers, movieclip, names, renames |
![]() |
|
|||
|
Hi all,
I was wondering if anyone knew of an extension that could rename layers on the main time line based on the movie clip names that are found on the time line. I have a client file that is absolutely huge but all the layers are just names Layer followed by random numbers. I have seen extensions that clean up the library but never one that cleans layer names. |
| Sponsored Links |
|
|||
|
fcastro75,
> I was wondering if anyone knew of an extension that > could rename layers on the main time line based on > the movie clip names that are found on the time line. I can't think of one offhand, but do you know you can do it yourself? The language is called JSFL, and you'll find it in the Extending book in the Help docs. It's basically JavaScript, except your DOM isn't an HTML document, but rather, the Flash authoring tool. Obviously, you'd have to be comfortable with code, which may or may not be your cup of tea. But if you do have some experience as a programmer, you could definitely write a quite script that you could run from the Commands file menu. David Stiller Adobe Community Expert Dev blog, http://www.quip.net/blog/ "Luck is the residue of good design." |
|
|||
|
Hi David, thanks for the reply.
I had read that JSFL was used to create extensions but that is way outside my expertise Maybe I can coax some JSFL experts to take this on, lol. Thisisn't the first project I have had that is totally a mess with the naming of layers. |
|
|||
|
fcastro75,
> I had read that JSFL was used to create extensions but > that is way outside my expertise ![]() Aw, too bad! I can totally understand, though. If I can find some time, I'll try to write a quick command for you. I'm still working through tech edits and copyedit reviews for two books, so my evenings are still pretty packed (but the end is in sight!). > This isn't the first project I have had that is totally a mess > with the naming of layers. Well, let's give it a shot. Spell out exactly what you're after, and I'll keep an eye on this thread. Maybe some JSFLers will see what you've listed out and can jump in before I do. It sounds like you want a command that: a) Looks at the current timeline's layers. b) Checks each layer in turn, renaming that layer to the name of the symbol that appears on that layer. Here are my questions: What should the command do if a given layer doesn't have a symbol? (Maybe it's a text field, a shape, a component....) Do you care if numerous symbols have been dragged to numerous layers? That might give you 10 layers named "tree". Maybe the command should check for instance names first, and give those precedence? Also, what if a layer contains more than one symbol -- just pick the first one? David Stiller Adobe Community Expert Dev blog, http://www.quip.net/blog/ "Luck is the residue of good design." |
|
|||
|
Hi David,
Sounds great! I was actually thinking about this over the weekend and asking a few fellow flashers what they though. I think instance names should have the highest importance. The layer should be renamed "the instances name" in quotes. Layers that have multiple instances should read multi-item. What should the command do if a given layer doesn't have a symbol? - Layer should be named accordingly without quotes (eg. text, combo box, movieclip, shape etc) I don't know if there are universal shortcuts for everything but perhaps we would use those (eg. mc, gfx, cbx) Do you care if numerous symbols have been dragged to numerous layers? - Perhaps we can add a number to the end of the string eg. - "car_mc" (2) - This would denote instance name "car_mc" and the second time it has been called to a layer. Also, what if a layer contains more than one symbol -- just pick the first one? - I think it should just read multi-item. I don't if there is a built in limitation to the length of a layer name. Maybe it starts multi-item and then lists the mc names in quotes? It would be great to get any other input from others who work with client files. ![]() |
|
|||
|
fcastro75,
> Sounds great! I was actually thinking about this over the > weekend and asking a few fellow flashers what they though. > I think instance names should have the highest importance. [...] If you're still watching this thread, I have a few more questions for you. I finally have some time to play with this script, and there's atwist I didn't think of earlier. Here's how JSFL works in regard to your particular aim: a) Get the current timeline. b) Get the layers of that timeline. c) Get the *frames* inside each layer. d) Get the elements inside each frame. The twist is C, and it adds considerable complexity to this script. You might have a layer with 100 frames on it, and each frame has a different mc (or graphic, or text field, etc.) on it. What on earth should this layer be named? In your previous post, you suggested this: > Layers that have multiple instances should read multi-item. That may well mean that feasibly half of your layers say "multi-item" in then, even if a given layer only has two separate items on it (one graphic symbol spanned from frames 50 to 80, and another graphic symbol spanned from frames 200 to 550). Even if we were to increment the names of these, you could easily get 30 layers in a row named "multi-item (1)", "multi-item (2)", "multi-item (3)", and so on. Seems to me like that wouldn't be any more helpful than what you have now. One approach -- much easier to program, as it happens -- would be to simply stop at the first frame in a layer that has content at all, and name the layer after that. e.g. "instanceName" (moveiclip) [1] .... where "instanceName" is the element's instance name, (movieclip) is the element's type, and [1] is the occurence of that element. If that layer contains any additional content -- either on that frame, or subsequent frames, we could add that "multi-item" phrase, like this: "instanceName" (moveiclip) [1] multi-item This way, in cases where the designer only used on element in a layer, you'd get a meaningful indication of that. In cases where the designer used several, you'd at least get an indication of the first one, with a hint that others exist. Whatcha think? David Stiller Adobe Community Expert Dev blog, http://www.quip.net/blog/ "Luck is the residue of good design." |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise