Adobe Dreamweaver Forums



Last 10 THreads :         Re: Removing unused files from the user's ability tosearch (Last Post : Captiv8r - Replies : 1 - Views : 2 )           »          First time install, need a little help. (Last Post : firstbat - Replies : 1 - Views : 5 )           »          Blend modes do not work (Last Post : pongtoe - Replies : 0 - Views : 1 )           »          loader onComplete firing, but TextField not disappearing (Last Post : Laura MS - Replies : 0 - Views : 1 )           »          Adventure game engine: a couple of issues (Last Post : kglad - Replies : 3 - Views : 4 )           »          Upgrading from CF 7 to CF 8 (Last Post : Kling - Replies : 0 - Views : 1 )           »          Can't see remote and local files in Files Window (Last Post : shannablas - Replies : 2 - Views : 5 )           »          need check of site in IE7 please. (Last Post : Tim G - Replies : 5 - Views : 6 )           »          Property inspector (Last Post : jkfarley - Replies : 0 - Views : 1 )           »          Mail form not working (Last Post : JoeyD1978 - Replies : 1 - Views : 2 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flash
 
Tags: , , , , , ,



Reply
  #1 (permalink)  
Old 09-04-2008, 06:21 PM
fcastro75
 
Posts: n/a
Diggs:
Default Is There An Extension that Renames Layers Based on MovieClip Names of Files

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.



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-04-2008, 06:40 PM
David Stiller
 
Posts: n/a
Diggs:
Default Re: Is There An Extension that Renames Layers Based on Movie Clip Names of Files

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."


Reply With Quote
  #3 (permalink)  
Old 09-04-2008, 08:15 PM
fcastro75
 
Posts: n/a
Diggs:
Default Re: Is There An Extension that Renames Layers Based onMovie Clip Names of Files

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. This
isn't the first project I have had that is totally a mess with the naming of
layers.

Reply With Quote


  #4 (permalink)  
Old 09-04-2008, 08:42 PM
David Stiller
 
Posts: n/a
Diggs:
Default Re: Is There An Extension that Renames Layers Based on Movie Clip Names of Files

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."


Reply With Quote
  #5 (permalink)  
Old 09-08-2008, 02:34 AM
fcastro75
 
Posts: n/a
Diggs:
Default Re: Is There An Extension that Renames Layers Based onMovie Clip Names of Files

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.



Reply With Quote
  #6 (permalink)  
Old 09-19-2008, 06:46 PM
David Stiller
 
Posts: n/a
Diggs:
Default Re: Is There An Extension that Renames Layers Based on Movie Clip Names of 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 a
twist 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."


Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 04:35 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk