I think so. Many people will have read both, but it would be good to see if Adobe Animate users have ideas. I'll move it.
Huh, who would have thought Adobe would decide to complicate the Animate CC API by inflicting Edge's "compositions" concept on it.
Well anyway, this isn't that hard. Just do:
var lib = AdobeAn.getComposition(Object.keys(AdobeAn.compositions)[0]).getLibrary();
Err, okay that is a little dense. Broken down into a multi-liner, the above would be:
var key = Object.keys(AdobeAn.compositions)[0];
var comp = AdobeAn.getComposition(key);
var lib = comp.getLibrary();
Object.keys is a method supported by newer browsers that returns an array of all the keys (property names) on an object. Assuming an Animate project only has a single "composition", the code above just grabs the first element of the keys array.
Wait... so this means Animate 2017 no longer populates the lib global, which means they just broke every single project that uses bla = new lib.linkageName to instantiate objects from the library. My god.
I'd be submitting an angrily-worded bug report to Adobe regarding this. At the very least there should be a less obtuse method for pages to access their own library. This is looking like Adobe actively trying to discourage developers from using the library object.