Thanks for the info. fl.installedPlayers certainly works towards getting the latest version, however the dilemma is getting the document's version. The problem is getting this value relies on opening the document. And opening the document will cause that warning dialog to popup. My goal is to also avoid that dialog, since I want the tool to be animated.
I found there is a method to call which is named fl.exportPublishProfileString. But even doing this call will cause the warning dialog to show up. It would seem that even this call uses the same underlying or similar enough code path as opening the document.
It would have been really slick if they had a means to detect and bypass those dialogs via JSFL.
What exactly you need to do after opening the document?
I'm asking because it's possible, for example, to copy items from a FLA without opening it. Maybe it's possible to do what you want silently.
Just out of curiosity, how do you copy items from an FLA without opening? Sorry if it seems naive. I just started using JSFL this week, so I'm getting used to the SDK.
What I really want to do is publish it or call testMovie, which requires me to have an open document.
This is to automate processing the file to extract assets we need. Our current pipeline (for a game) is that someone manually runs the file. I want to be able to automate this process as much as possible. I have this pretty much working, however there are some issues:
-Some of our FLA files are older, so they post the warning dialog related to the AIR version
-Compiler errors (we use Actionscript to extract what we need)
-Dialog about dismissing all or continuing when something bad is in the file and flash isn't happy about the construction
I believe I know how to get around the compiler issue, but both dialogs will pose a problem in automation.
Or I suppose is there a away to suppress the dialogs at all or auto accept?
Please refer to this topic to see how to copy items from a FLA: Scripting the import of a moviefile (for animation-reference) .
I think you're gonna have to make use of some third party application to help you suppress this warning, like or Mouse Recorder - Macro Recorder - Windows Automation or https://autohotkey.com/ . You can create a script that dismiss the warning and then call it with JSFL.
Furthermore, try to contact Adobe support or request this feature at: Adobe Animate CC Feature Request/Bug Report Form .
Sigh, okay, so as an FYI, copying items (fl.copyLibraryItem) will suffer the same warning. It seems to me that the mechanism for Animate to open an FLA for any reason uses the same code path, which essentially will encounter the warning regarding not using the latest Adobe AIR version.
I actually worked around this warning in a slightly convoluted way, but it works. I essentially:
-Traverse all the installed players and find the highest Air version
-Create an XFL via bash script (I execute this from JSFL)
-Modify and save
-Load the XFL
I will eventually save it as an FLA.
I'll have to see if I can work through the other scenarios.
I'll contact Adobe Feature Request/Bug Report. Unfortunately I don't have tremendous faith that they will want to address this, but one never knows.
Thanks again for your suggestions.