Copy link to clipboard
Copied
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();
Copy link to clipboard
Copied
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);
Copy link to clipboard
Copied
before running jsfl,Only the entire symbol on the stage can be selected
Copy link to clipboard
Copied
The symbol contains 4 layers
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Yes!
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
are you converting layers to symbols?
Copy link to clipboard
Copied
are symbols
Copy link to clipboard
Copied
what's the purpose of selecting a layer?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
layer_3 contains 5 keyframes