Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

joshtynjala/openfl-adobe-flex-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adobe Flex 3 for OpenFL

An Adobe Flex 3 "Hello World" app compiled to JavaScript with the Apache Royale compiler and running on the OpenFL library.

Introduction

This project is a proof of concept that I challenged myself to build. I bootstrapped enough to get this simple application running, and nothing more. In other words, you shouldn't expect the entire framework to be working, nor should you expect that it'll be easy to get a production Flex app running in JS.

To see how the everything is bootstrapped, look at index.template.html and src/Flex3ForOpenFL.as.

Compile Instructions

You will need to download Apache Royale 0.9.9-SNAPSHOT. The 0.9.8 release will not work. I had to fix a couple of compiler issues to make this work, and they will be released in the next version of Royale.

You will also need playerglobal.swc from Adobe. You can download it from Flash Player debug downloads. Place it at royale-asjs/frameworks/projects/libs/player/11.1/playerglobal.swc in the Royale SDK.

If you have Node.js installed, you can run the following command:

npx asconfigc --sdk path/to/royale-asjs

Without Node.js, the following command works for me to compile the project on macOS:

asjsc --debug=true +configname=js --targets=JSRoyale --html-template=index.template.html --source-path+=src --source-path+=flex_sdk_3.0.0.477A/frameworks/projects/framework/src --js-library-path+=\${royalelib}/js/libs/LanguageJS.swc --js-library-path+=\${royalelib}/js/libs/ReflectionJS.swc --js-external-library-path+=\${royalelib}/libs/player/11.1/playerglobal.swc --source-map=true -js-getter-prefix=get_ -js-setter-prefix=set_ -- src/Flex3ForOpenFL.as

On Windows, the command may need some minor tweaks.

The asjsc command is located at royale-asjs/js/bin/asjsc in the Royale SDK. On Windows, you should use asjsc.bat.