@zwetan_uk This is as a Windows projector.
If I'm in Animate and hit ctrl-Enter, it runs perfectly in the Adobe AIR Debug Launcher that Animate uses.
It has previously compiled fine to a Windows projector, but the last time I did that was perhaps 18 months ago...it's primarily an Android/iOS app. There have been some minor changes to code in that time, but not in the places where it's crashing.
If I comment out the call to the script with Filestream, then the projector boots fine and I can see the stage and see some a text field that I'm writing debug text to (it stops where I've commented out the script call because it can't proceed... but it does not crash). If I leave the call in, I get a flash of the stage and then the projector crashes with no error message... it just vanishes.
a Windows projector is basically a SWF file with the Flash API embedded into a StandaloneFlashPlayer executable
you can not use the AIR API there
everything under the package flash.filesystem, and so FileStream can only be used with the AIR API
to make it work you would need to publish a AIR Windows executable (to use FileStream)
OR
replace the use of FileStream with FileReference and publish a Windows projector executable
(FileReference is under the package flash.net and so available to the Flash API from within a projector)
both use .exe extensions but they don't have access to the same level of API