I updated FLVPlayback class and stuck it in a SWC called FLVPlayback.swc. The class definition has a new "version" public constant.
When compiling my code and looking for the definition of fl.video.FLVPlayback, it should find the definition inside FLVPlayback.swc, because it's listed first at the top of the AS3 Settings Library Path list. Somewhere below that is a "fl_package.swc" that contains the rest of the fl class definitions as well as the old version of FLVPlayack.
Since my updated SWC including the newer definition of FLVPlayback is listed first, I would expect the compiler to use that definition first, and indeed it does when I publish from within the IDE using Ctrl+Enter or clicking the Publish Setting's "Publish" button to publish my project. It compiles fine; in particular, the line of code that references the new "version" property does not result in a compiler error, and I'm able to trace it's value at runtime.
On the other hand, if I compile the exact same file using my automated JSFL script, which basically is a single line "fl.publishDocument( filepath_to_same_fla_project_file_open_in_flash, "PUBLISHPROFILENAME" );" where PUBLISHPROFILENAME is "Default" (same as the active publish profile in the same file opened in the Flash IDE), then it throws an error on the line referencing the new "version" property, saying it doesn't exist.
So it seems that fl.publishDocument is looking for class definitions in associated SWC files in a different order than when I click publish from within Flash using the same publish profile, because it seems to be finding the old definition of the class that lacks the "version" property first.
It makes no sense. Any idea why the compiler is behaving this way?