Copy link to clipboard
Copied
An issue I'm having in Animate CC with a JSFL script, just trying to select an element.
A symbol is on the stage, then on running this jsfl script I get an error.
var el = fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0];
fl.trace(el); // returns: [object SymbolInstance]
fl.selectElement(el, false); //returns: TypeError: fl.selectElement is not a function
It looks like it can find the element, and trace the[object SymbolInstance] but I can't select it.
Hi.
It seems that this method will only work with fl.findObjectInDocByName() or fl.findObjectInDocByType() according to the official documentation.
In my understanding, it should work with a direct reference to an element.
My workaround for you will be to use the selected property. Like this:
el.selected = true;
I hope this helps.
Regards,
JC
Copy link to clipboard
Copied
Hi.
It seems that this method will only work with fl.findObjectInDocByName() or fl.findObjectInDocByType() according to the official documentation.
In my understanding, it should work with a direct reference to an element.
My workaround for you will be to use the selected property. Like this:
el.selected = true;
I hope this helps.
Regards,
JC
Find more inspiration, events, and resources on the new Adobe Community
Explore Now