• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Animate CC doesn't save changes made by a .jsfl script

Community Expert ,
Aug 14, 2017 Aug 14, 2017

Copy link to clipboard

Copied

Hi!

I wrote a simple .jsfl script to rename multiple Movie Clips in a grid. The script works and the instances are renamed the way I want.

But when I reopen the FLA the changes are gone.

Here is the script:

var selection = fl.getDocumentDOM().selection;

var i;

var total = selection.length;

var count = -1;

selection.reverse();

for (i = 0; i < total; i++)

{

     if (i % 16 == 0)

     {

          count++;

     }

     var xPos = i % 16;

     var yPos = count;

     selection.name = "tile" + xPos.toString() + "_" + yPos.toString();

}

Can someone tell me what is happening?

Thanks in advance!

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Aug 17, 2017 Aug 17, 2017

Thanks for sharing the video!

It seems the name changes were correctly getting saved if you're working on the main timeline. However, in your video you're working inside a Symbol - which is when the problem happens.

I'll log it as a bug internally.

Votes

Translate

Translate
LEGEND ,
Aug 14, 2017 Aug 14, 2017

Copy link to clipboard

Copied

Save the FLA before reopening it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 14, 2017 Aug 14, 2017

Copy link to clipboard

Copied

Even saving the file changes are not retained.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 14, 2017 Aug 14, 2017

Copy link to clipboard

Copied

Well, I just tested using JSFL to change the name of a moveclip, and it survived a save/load just fine.

Maybe try manually renaming a couple of movieclips before saving and see if those changes don't get saved either.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2017 Aug 15, 2017

Copy link to clipboard

Copied

Hi!

I tried changing another property of the Movie Clips (e.g. alpha) after renaming them and so the changes were saved.

But if I only change the names with the script, save the file and then reopen it, changes are gone.

This is a bug and I think it should be reported to Adobe.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 15, 2017 Aug 15, 2017

Copy link to clipboard

Copied

I tried running your JSFL script on a bunch of selected symbol instances on stage.

I then saved,closed and reopened the file and the name changes were present as expected.

Can you please specify how exactly to recreate the issue, if any? Please also share your test file, if it happens on a specific file only.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 16, 2017 Aug 16, 2017

Copy link to clipboard

Copied

Hi, Nipun. Thanks for your answer.

Here is a video showing what is happening:

First, I run the script without altering any other property. In this way the names are not kept when I reopen the FLA. Then, I run the script and alter the alpha property of all instances. In this way the names are kept when I reopen the FLA.

And here are the files so you can take a look: https://drive.google.com/drive/folders/0BxplDXBQ7gXzLUpCd3ZoaDNuWVU?usp=sharing

I tested in two FLA and the problem persisted.

Thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 17, 2017 Aug 17, 2017

Copy link to clipboard

Copied

Thanks for sharing the video!

It seems the name changes were correctly getting saved if you're working on the main timeline. However, in your video you're working inside a Symbol - which is when the problem happens.

I'll log it as a bug internally.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 08, 2019 Mar 08, 2019

Copy link to clipboard

Copied

Sir, do you know the current status of this bug?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Mar 08, 2019 Mar 08, 2019

Copy link to clipboard

Copied

LATEST

As far as I know it's related to some kind of 'fast-save optimization'.

You may increase your chance to get changes saved if you open the Modify menu, choose Document... and just click OK.

This will generate a Modify FLA Document entry in history which is likely to force Save to go through the whole file and save all changes.

Clipboard-1.png

My memory is a little vague at the moment, but I think they introduced this in CS5 or CS4. It's definitely present in CS6.

(Obviously a poorly implemented feature.)

If you just do Save As and give it a new name most likely changes will not be saved. It is a very persistent 'feature'.

The safest way to tackle this might be to copy / paste all your stuff into a new file and save that new file; then close, then open and check.

Have fun!

Nick - Character Designer and Animator, Flash user since 1998
Member of the Flanimate Power Tools team - extensions for character animation

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 17, 2017 Aug 17, 2017

Copy link to clipboard

Copied

Thank you, Nipun!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 07, 2019 Mar 07, 2019

Copy link to clipboard

Copied

I've found that a lot of changes made with JSFL are dropped even after saving. This issue can't be replicated on a MAC. However, using the following snippet before saving the document seems to trick it into working... don't ask me why.

fl.getDocumentDOM().getTimeline().addNewLayer("_temp"); fl.getDocumentDOM().getTimeline().deleteLayer(fl.getDocumentDOM().getTimeline().findLayerIndex("_temp")[0]);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines