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

Can someone fix this jsfl bug?

Contributor ,
Oct 04, 2022 Oct 04, 2022
an.getDocumentDOM().enterEditMode('inPlace');                                                          

var layerIndex = fl.getDocumentDOM().getTimeline().findLayerIndex("layer_3");

an.getDocumentDOM().getTimeline().setSelectedLayers(layerIndex[0], true); 

an.getDocumentDOM().setElementProperty('firstFrame', 5-1);                                          

an.getDocumentDOM().exitEditMode();  
TOPICS
ActionScript , Code , Error
803
Translate
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 ,
Oct 04, 2022 Oct 04, 2022

how can you enter edit mode with nothing selected?  that should throw an error.

 

or do you select something manually before running the jsfl?

 

and what is

an.getDocumentDOM().setElementProperty('firstFrame', 5-1);  

 

 

Translate
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
Contributor ,
Oct 04, 2022 Oct 04, 2022

before running jsfl,Only the entire symbol on the stage can be selected截屏2022-10-05 上午1.24.33.png

Translate
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
Contributor ,
Oct 04, 2022 Oct 04, 2022

The symbol contains 4 layers

Translate
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 ,
Oct 04, 2022 Oct 04, 2022

ok, so layer_3 is selected and then you're executing

 

 

an.getDocumentDOM().setElementProperty('firstFrame', 5-1); 

 

 

which makes no sense:  a layer isn't on stage so it's not an element.

 

what are you trying to do to layer_3?

Translate
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
Contributor ,
Oct 04, 2022 Oct 04, 2022

Yes!

Translate
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 ,
Oct 04, 2022 Oct 04, 2022

ok, so layer_3 is selected and then you're executing

 

 

an.getDocumentDOM().setElementProperty('firstFrame', 5-1); 

 

 

which makes no sense:  a layer isn't on stage so it's not an element.

 

what are you trying to do to layer_3?

Translate
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
Contributor ,
Oct 04, 2022 Oct 04, 2022

I am only able to select layer_0 on the stage,If you can directly choose layer_3 first, then the problem is much simpler

Translate
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 ,
Oct 04, 2022 Oct 04, 2022

are you converting layers to symbols?

Translate
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
Contributor ,
Oct 04, 2022 Oct 04, 2022

are symbols

Translate
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 ,
Oct 04, 2022 Oct 04, 2022
LATEST

what's the purpose of selecting a layer?

Translate
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
Contributor ,
Oct 04, 2022 Oct 04, 2022

截屏2022-10-05 上午1.29.31.png

Translate
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
Contributor ,
Oct 04, 2022 Oct 04, 2022

layer_3 contains 5 keyframes

Translate
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