Copy link to clipboard
Copied
I selected 5 elements in a single layer and lost the original selection after using the following command. How can I still keep the original selection after Inserts keyframes?
fl.getDocumentDOM().getTimeline().insertKeyframe();
Copy link to clipboard
Copied
save them
then reselect with jsfl after taking deselecting steps.
Copy link to clipboard
Copied
Can you provide specific jsfl code?
Copy link to clipboard
Copied
use the api. i'm on my mobile phone.
Copy link to clipboard
Copied
back at computer
var selectedA = fl.getDocumentDOM().selection;
fl.getDocumentDOM().getTimeline().insertKeyframe();
// you may want to deselect everything here
for(var i=0;i<selectedA.length;i++){
selectedA[i].selected = true;
}
Copy link to clipboard
Copied
It's strange that after testing, the selected element is not restored
Copy link to clipboard
Copied
The previous keyframe remains selected, but the current keyframe is not selected
Copy link to clipboard
Copied
how are you using the code i suggested? ie, you select on-stage objects, then you execute the amended script so you insert a keyframe where desired and still have the selected objects, selected.
Copy link to clipboard
Copied
Yes, I followed the steps you mentioned to execute jsfl, but after inserting keyframes, the object is not automatically selected.