BowlerHatLLC / asconfigc

Command line utility that builds ActionScript projects configured with an asconfig.json file.
https://www.npmjs.com/package/asconfigc
Apache License 2.0
18 stars 5 forks source link

Issues with building and running animate based projects #34

Open miltontaylor-panotek opened 1 year ago

miltontaylor-panotek commented 1 year ago

A few little issues with building via Animate:

  1. With an asconfig.json that uses an "animateOptions" section, I can successfully build using this method (i.e. where vscode launches animate) but it leaves Animate open, and the fla file is also in a modified state. Very little hope of any kind of tidy automated builds of a whole bunch of fla's this way?
  2. Cannot launch the compiled swf to play or debug in vscode. Error is "Error launching SWF debug session ... runtime not found for program xyz.swf". Building a non-animate project in vscode works fine however.
  3. vscode flags warnings/errors in the "main" class file that are properties defined for the movieclip inside the fla project. So I can see how vscode can't know about these, but is there a suggested way to suppress these warnings safely?
joshtynjala commented 1 year ago
  1. You're welcome to try to modify the .jsfl files to ensure that they don't modify the document:

    https://github.com/BowlerHatLLC/asconfigc/tree/main/jsfl

  2. It's been a long time since I worked on the Animate feature, but I think the idea was that you would launch Animate's debugger instead of VSCode's. Basically, you'd use VSCode as your editor for .as files, but everything else would go through Animate, including run/debug.

    That being said, it should still be possible to debug in VSCode with a .swf file built in Animate. It sounds like it is launching the .swf file directly. This requires the standalone Flash Player projector executable. While Adobe doesn't have a dedicated download page for this, if you know the URL of the .exe or .app, you can get it.

    If you're actually building an Adobe AIR app, you need to add your AIR application descriptor XML file to your asconfig.json file. Then, the debugger will know to launch with AIR instead of Flash Player.

  3. Again, it's been a long time. However, I think you can define the properties on your class, like public var example:Example;, and Animate will use your existing properties.

miltontaylor-panotek commented 1 year ago

1, Yes that worked! Just had to had fl.quit(false) in the postBuild function.

  1. I will try adding the Air descriptor
  2. Will check that out... unclear to me how Animate doesn't wind up with duplicate property definitions though?
joshtynjala commented 1 year ago
  1. Assuming that it works, Animate is probably specifically looking to see if the property already exists. If it exists, just use that. If not, create the property.