Novaโ„ข

Extensions

ActionScript 3
Abattoir Software
ActionScript 3 & MXML language extension for Panic Nova. LSP powered by Bowler Hat LLC's vscode-as3mxml. Develop apps for Adobe AIR, Adobe Flash Player (and maybe Apache Royale).
Install
2 Installs
This extension is allowed to:
  • Read & Write Files
  • Launch Subprocesses

Readme

ActionScript 3 and MXML for Nova

๐Ÿš€ Work In Progress ๐Ÿš€

This extension brings ActionScript 3 and MXML support to Panic Nova.

The goal was to be use all my old Adobe Flash Build projects and convert them to Nova's workflow. I wanted to be able to build and run projects in Nova without additional setup, just by importing the Flash Builder settings when opening the project. (It's pretty close to it!)

โœจ Features

  • ๐Ÿ–๏ธ Syntax Highlighting

  • ๐Ÿ“ Code Folding

  • ๐Ÿ“š Symbols - Note: Self-closed MXML and children nodes do not show up correctly in the hierarchy.

  • โš ๏ธŽ Issues - Via AS3MXML

  • ๐Ÿงช Language intelligence - Via AS3MXML

  • ๐Ÿ’ก Completions for the following:

  • ActionScript 3

  • MXML - Note: Still a little wonky

  • AIR Descriptor XML - Include descriptions on most of the AIR Descriptors tags!

  • ๐Ÿ“Ž Clips

  • โ–ถ๏ธ Tasks

  • Use Nova's Clean/Build/Run for AIR desktop project, mobile project (currently, only through Desktop simulator), and Flash web based project (using SWFObject from the AIR SDK or a very basic page using Ruffle). Also, limited support for packaging with ANEs.

  • ๐Ÿ“ฆ Exporting AIR Packages

  • AIR, AIRI, Captive bundles, and native installer for Mac should work (untested for submitting to app stores).

  • Android and iOS packaging should work (untested for App Store submission).

โ˜‘๏ธ Todo

  • Launching AIR projects on actual devices - Android and iOS
  • Locale - Current set to use en_US
  • Themes
  • ANE Handling
  • Library - Automatically managing library builds
  • Workers
  • Modules

๐Ÿ“ Notes

For Issues, language intelligence and completions, the LSP used is BowlerHatLLC/vscode-as3mxml V1.22.0

AS3MXML requires an asconfig.json in the project folder. The extension will attempt to auto-generate one. If you have used the VSCode extension, and have one already, you can disable the automatic generation and updating in the configurations or with the prompt when first opening the project.

Cleaning/Building/Running and Export Packaging are done by this extension using binaries from the (Harman) Adobe Air or Flex SDK: - mxmlc for compiling of Flash and AIR project and packaging, - compc is used for compiling libraries - adt is used for running (checking for devices and making certificates)

๐Ÿ“‹ Requirements

ActionScript 3 and MXML for Nova requires the following (besides Nova) to be installed on your Mac:

  • Java (JDK 11+) - AS3MXML requires it, and it also avoids issues with mxmlc returning "Error: null" when using Java 1.8.

  • (Harman) Adobe Air or Flex SDK - Default path is ~/Applications/AIRSDK (but can be changed in the extension settings)

  • Rosetta 2 (for Apple Silicon Macs) - Required to run SDK tools

Optional

These are only needed if you plan on running Flash Player projects:

  • Flash Player (Standalone) - If trying to run Flash projects

  • Ruffle - Can also run Flash projects. NOTE: There may be some additional prompting to allow it to run the projects if you launch it from Nova.

  • Old Chrome/Chromium with PPAPI Flash Player - Version prior to V88 should be able to run in browser

๐Ÿš€ Usage

Open an *.as, or *.mxml and it should work. However, there are a few things that need to be setup to get the full functionality:

SDK Setup

By default, the extension will look to ~/Applications/AIRSDK for the AIR SDK to use. If you need to change that:

  1. Go to Extensions โ†’ Extension Library... then select ActionScript 3's Preferences tab.
  2. Update Default AIR SDK path

You can also set a specific SDK per project under

  1. Go to Project โ†’ Project Settings...
  2. Scroll down to the Compiler โ†’ AIR/Flex SDK version section.

Code Intelligence and Issues

Since the LSP AS3MXML requires requires an asconfig.json for code intelligence, completions, and issues, you will need a file in your project's root. When opening a project you will get prompted:

  • Automatic - If you select this, when project's settings are changed, the extension will modify the asconfig.json. If there is an existing asconfig.json, it will be backed up and timestamped.

  • I'll Maintain it - This will not create or modify an asconfig.json file. Just remember, you need one for code intelligence and issues!

  • Cancel - Skip, but will prompt you every time you open the project.

If the extension handles your asconfig.json, only the options used by this extension are changed. Since the building is not handled by AS3MXML, most of the compling and packaging setting are not modified.

โš™๏ธ Import Flash Builder project

While Flex Builder / Flash Builder are no longer supported by Adobe, this extension allows users to migrate their existing project for use in Panic Nova. If your project contains .actionScriptProperties, .project, and .flexProperies or .flexLibProperies, the extension defaults to prompting you to import the settings:

  • Yes - Converts the Flash Builder project and modify the Nova project's settings.

  • Never - Will not import and won't ask again.

  • Cancel - Will not import, but will ask you next time.

If you want, you can also change this setting in the Extensions โ†’ Settings โ†’ Additional Options... โ†’ Prompt to import Flash Builder projects and disable it.

You can also use the menu option Extensions โ†’ ActionScript 3 โ†’ Import Flash Builder project... to change your project's settings to those used by a Flash Builder project when ever you feel like it.

SDKs

Currently, there is no list of SDKs like Flash Builder, if the import reads the name of the SDK from the Flash Builder project, it will reminded you to update your project's SDK settings:

You can change the SDK by:

  1. Go into your Project โ†’ Project Settings...
  2. Scroll down to the Compiler โ†’ AIR/Flex SDK version.

Additional Notes about project import

The importing may also import may also setup more Tasks than needed, especially if was a mobile project. If you run into building issues like below, it may be that you need to change the Task to a mobile device Task and try building/running. Feel free to remove the desktop AIR task.

Old Flex/AIR SDKs

Prior to AIR SDK 20, some of the executables were still 32bit. Unfortunately, these won't run on anything after Mac OS 10.5. If you are using an older version of an SDK, you will get a warning about this:

  • Understood - The message will pop up every time you open the project
  • Don't Remind Me - This will not show up again, unless you change the SDK that is being used. It will be reset every time you change SDKs.

That doesn't mean it won't still build, but if you try to play or package may fail:

Click on the show reports and if you see something like this:

This means that ADL is still 32bit, and won't run. If you want to also run from Nova, you will need to update your SDK to AIR 20+. Then you will need to update your app.xml for the namespace, but if it's really old you may need to include a <versionNumber> element (and make sure it's only numbers). Don't worry, the extension should remind you!

Themes Support is Incomplete

Halo Theme issues

NOTE: Currently, when importing from Flash Builder, it will gather information about the theme, but the process of using this information for building with it has not been completed!

There is an option that will allow you to build older Flex 3 projects that require embedding Halo with the build. If you try to build and run into errors that say something like is only supported by type ... with the theme(s), as shown here:

you can go to the project's preferences and check the option:

This will force mxmlc to compile and embed the Halo theme, allowing Flex 4 to set some styles that can only be modified if the halo.swc is compiled with it!

๐Ÿ” Certificates

The extension has the ability to generate certificates for self signing AIR packages using ADL. To create a self-signed certificate: - Go to Extensions โ†’ ActionScript 3 โ†’ Create new Certificate

Nova will then prompt you with several questions and allow you to generate a new self-signing certificate.

If your project or Tasks have certificates, you can store a certificate password in your Keychain: - Go to Extensions โ†’ ActionScript 3 โ†’ Store Certificate Password

If there is more than one certificate, you will get a prompt to select which certificate to store. You must do it one at a time.

To clear the certificate password from your Keychain: - Go to Extensions โ†’ ActionScript 3 โ†’ Clear Certificate Password

If you have stored one or more certificates, then it will prompt to select "All" or a particular certificate to remove.

๐Ÿ“ฆ Export Release Build

This allows you to package AIR projects. Make sure you have your certificate created, if not, then take a look above!

If you have multiple Tasks, and you try to export a release build it will ask which one you want. The extension will also store the last one selected, so it will pick that by default.

Next, it will prompt you for you certificate password, and if it's good, it will ask you if you want to use it just this one time, save it to your Keychain, or use for the session.

Timestamp Errors

One minute it works, next minute it doesn't.

If just testing locally on your own devices, you can just change the project's settings to skip the timestamp or you can supply your own RFC3161-compliant timestamp server URL. Go to

  1. Project โ†’ Project Settings...
  2. Scroll down to the Build Packaging section:

โš™๏ธ Configuration

Remember, there's a ton of configs, and in different places:

  • Global preferences - Open Extensions โ†’ Extension Library... then select ActionScript 3's Preferences tab.

  • Project preferences - You can also configure preferences on a per-project basis in Project โ†’ Project Settings....

  • Task preferences - Tasks also have a bunch of options too! Don't miss out on Project โ†’ Tasks โ†’ Edit Task... or if you click on the Task dropdown and selecting Edit Task... and then selecting the appropriate Task.

โ–ถ๏ธ Tasks

Task play an important role in build/run as well as exporting of packages. There are different ones available, based on how you plan to run and or package your project. Each project can also include multiple Task, so you can easily switch between building one project for multiple devices. The option to Export Release Build will ask which Task to export.

  • AIR - Desktop builds.

  • AIR - Android - Packaging for Android devices.

  • AIR - iOS - Packaging for iOS devices.

  • Flash - Web Builds (supports SWFObject and Ruffle)

If building a Flash project and using the Ruffle template for web, you will need to use Nova's External Preview option to run since Ruffle does not allow the use of file:/// protocol for loading SWFs in a browser.

Also, don't forget that closing the window on Flash Player, it does not quit it so Nova will still think the Task is running. If you go to run again, you may want to Stop so that it will only have one process running, or you can Add if you want to have multiple things open. It's kinda useful if you need to compare your changes.

In the Global preferences setting, you can set up the locations of Flash Player, Ruffle, and a old browser to use for launching if you scroll down to the Flash Player Run/Debug section:

If you edit the Task settings, you can change how to launch it:

  • Library - This can be used to make an Flex library (NOTE: Not fully tested, and needs some more work.)

๐Ÿ’ก Tips and Tricks

Viewing trace() output

  1. Going into Project โ†’ Tasks โ†’ Edit Task...
  2. Select the Task you want.
  3. Scroll all the way to the bottom, change the Task's Open Report drop down to On Run.

Then a window with the output will show up when you run:

Force build before running

  1. Going into Project โ†’ Tasks โ†’ Edit Task....
  2. Expand the Task you want to modify.
  3. Select the Run option.
  4. Then you can check off Build before running.

๐Ÿ† Acknowledgements

This extension uses:

โš–๏ธ Disclaimer

This extension is not affiliated with, endorsed by, or sponsored by Adobe Inc or HARMAN International.

"Adobe", "Flash", "Flash Player", "Flex Builder", "Flash Builder", and "Adobe AIR" are trademarks or registered trademarks of Adobe Inc. in the United States and other countries.


Changelog

Changelog

The format is based on Keep a Changelog 1.1 and this project adheres to Semantic Versioning 2.0.

[0.8.0] - 2025-02-25

Added

  • More work on getting AS3MXML integrated
  • More documentation in README.md
  • Added "Clips" for completion of AS3/MXML content (would have liked to do it through Completions XMLs, but they would not show up properly)
  • Added building and running Flash projects.
  • Added building of Library projects.
  • Prompts to import Flash Builder projects when opening
  • Extension preference, to suppress asking to import Flash Builder project.
  • Checks Flash Builder project for sources file to exclude when building Flash projects
  • Prompts to automatically update an existing asconfig.json file
  • Will generate an asconfig.json file if one is not in the project
  • If there are more than one Task when Exporting Release Build, it will prompt you for which one to build.
  • Add Timestamp option, so you can specify a different RFC3161-compliant timestamp server to use
  • Added options for stand alone Flash Player, Ruffle and an old web browser to use for launching. (Preferably Chrome <88)
  • Added some more modern device options (made Google Sheet https://docs.google.com/spreadsheets/d/1RlsuMwYp-ANTerziv12LxxH47GIsoeeBSdaEUdCDY5E/edit?gid=0#gid=0) to launching simulator
  • Can store or clear stored passwords for certificates from menu
  • Can store certificate password for just the session
  • When exporting a release package, it will verify the password before trying to build the package
  • Adds warning if using an old Flex/AIR SDK
  • Checks the AIR descriptor to see if it matches what's being used to build
  • Added option to force Halo theme for projects (still need work on Themes from FB)

Changed

  • Using AS3MXML V 1.22.0
  • Make Exporting Release rely more on values in Tasks, making them different tasks per device
  • Import Flash Builder handles libraries better (still needs work)
  • Changed images to adhere to Panic's sizing and folder layout
  • Changed this changelog to a format is based on Keep a Changelog, and that this project adheres to Semantic Versioning.

[0.7.2] - 2024-10-06

Changed

  • Got completions working from the completion XMLs.

Added

  • Added completions for AIR Descriptor XMLs.

[0.7.1] - 2024-09-27

Changed

  • Made each Task have it's own build/packaging setting.

[0.7.0] - 2024-07-06

Changed

  • Replaced other XML parser stuff and updated code to use NS3X2J for parsing FlashBuilder's XML files.

[0.6.1] - 2024-02-24

Added

  • Builds projects with ANEs.

Changed

  • Restructured code.

[0.6.0] - 2024-02-22

Added

  • Attempts to get packaging an AIR package.

Changed

  • Replaced syntaxes with regex syntaxes from older version of Nova and modified. Seems to work better.
  • Changed structure of tasks to call functions to handle building and running from Nova.

[0.5.1] - 2024-01-27

Changed

  • Converted configs for Tasks to be part of workspace configs.

[0.5.0] - 2024-01-14

Added

  • Started implementing Tasks to clean/build/run project.

[0.4.1] - 2023-09-16

Changed

  • Minor changes to the AS3 syntax.
  • Added some tests to see if hover and code actions are working.

[0.4.0] - 2023-05-21

Changed

  • Setup configuration for the extension based on that of the VSCode one, even if they don't seem like they will work in Nova (like the SDK picker).
  • Using V1.17.0 of Bowler Hat's AS3MXML language-server.

[0.3.0] - 2023-01-27

Changed

  • No longer using a bash script to start the LSP.

[0.2.0] - 2023-01-12

Changed

  • Using hard coded bash script to start LSP.
  • Warning/Errors pop up now under issues view!
  • Folding of AS3 code blocks and comments working, however, classes and function not properly parsed

[0.1.0] - 2022-12-27

First commit - not working.