A company that I support has an application that is written in Haxe that compiles to Flash. The application is a business app that loads data from a server using AMFPHP. I have absolutely no experience with Flash or Haxe, so this is very new to me. The code that I have for the current application consists of two projects, the one involves a compile using MXML, and to the best of my knowledge this is a collection of flex components that get used in the second project. The compile for the first project is as follows:
mxmlc -output …/index.swf Main.mxml
The second project is the main application that imports index.swf. This compiles with Haxe 3.4.7, but does not compile with the latest version of Haxe. When I tried this compile with Haxe 4.1.4 I got errors regarding haxe.remoting.AMFConnection not being found and a whole string of errors about “Field xxx has different property access”.
Here is the build.hxml script that gets used to compile the Haxe to Flash:
-cp Source
-D LOCAL_TEST
-D haxe-boot
-D flash-use-stage
-swf-lib index.swf
-swf-version 9
-swf pdfbuilder.swf
-debug
PDFBuilder
I have tried to do a compile by creating a project using one of the sample projects (DisplayingABitmap) and replacing the code in the Source folder with the code that I am trying to port. But I have not managed to get this to compile yet.
My questions are as follows:
- Will it be possible to do a compile to Adobe AIR with minimal changes to the code?
- Would the functionality of loading data with AMFPHP work in AIR?
- Will the index.swf be able to be used as is, or would changes need to be made to this to work in AIR?
- How would I go about indicating in VSCode that index.swf library must be imported, as there is no build.hxml in my project.