Script: Set currentLayer bug
Hello, everybody.
It's not the first time i try do use the command "fl.getDocumentDOM().getTimeline().currentLayer = myLayerIndex" and it simply does nothing. The crazy thing is that it sometimes work, sometimes don't.
(in my case: it's currently selecting the top layer, with 0 as index)
layerIdx0 = 1;
fl.getDocumentDOM().getTimeline().currentLayer = layerIdx0;
fl.trace("Selected layer: "+fl.getDocumentDOM().getTimeline().currentLayer+" -> i tried to select "+layerIdx0+".");
the output above says: "Selected layer: 0 -> i tried to select 1.".
I've tried "fl.getDocumentDOM().getTimeline().setSelectedLayers(0);" as it appears on the documentation, but i get a javascript error saying "setSelectedLayers" is not a function.
I've also tried to make a fuction to force the selection of the layer, locking every layer that is not the one i want and making a new selection, and it still does not work.
I really (really) am out of ideas. I'm currently using Adobe Animate 2021.
Thanks in advance
