Advise - OpenFL/Unity/Phaser/Something Else

Hi, I’m looking for impartial advise about whether OpenFL is the best way forward for me.

I’ve been tasked by my boss to convert all our legacy AS2 flash interactive elearning content so that it runs within a browser (and on mobile devices) without the need of plugins.

I’ve been researching and come up with a shortlist of OpenFL, Unity and Phaser.

The biggest issue for me is that I’m a Designer, that can code a little. So for me Flash was a perfect platform. I could design all my assets, layout everything how I wanted and then just add code.

Unity seems to be a good match for me as I can layout elements on screen and then add the code to them. However I’m worried about the bloat that goes with their webGL. Our customer base are schools, so they don’t have state of the art equipment or internet speed (another reason why flash worked well).

Our content isn’t massively complex (the most basic is simple Math questions), but there is some complex stuff dealing with Algebraic Modelling and Quadratics, but even still a 3d engine seems like overkill.

So, is OpenFL going to be suitable for me, is there anyway to get some sort of visual editor?

Or could someone suggest another platform/sdk?

OpenFL supports using Adobe Animate for assets. You should be able to lay out content in Adobe Animate, in fact, you may even be able to use the original FLAs.

Right now, OpenFL does not support scripting on the timeline in Animate, but you can use movieClip.addFrameScript (frameNumber - 1, function () { ... }) to add scripts to MovieClips.

When you get things working in OpenFL, you will have options for how you deliver it. You can build back to Flash Player, if a computer lab (for example) has Flash installed and works best on those machines.

You can target HTML5 with WebGL in about 100KB (minified, gzipped) using OpenFL, instead of 10MB, like some other approaches to HTML5. This is a big, big difference for mobile clients, not only for the download size, but performance. Mobile browsers don’t tend to like projects that big, I have had many issues with crashes when generating JavaScript like that. OpenFL supports HTML5 canvas, as well as HTML5 DOM as well, which may work better than WebGL, depending on the project you are building.

The “NyanCat” and “SimpleSWFLayout” samples both show how you can you use SWF-based assets in an OpenFL project

openfl create NyanCat
cd NyanCat
openfl test html5
1 Like

thanks for all the info, I’ve looked at the NyanCat example and I think it might work for what we need (couldnt get the SimpleSWFLayout to work - error in command prompt and when running in FD just getting a white screen)

One other question. A big majority of our content relies on the user entering an answer into a input field and clicking a button to check if they have the answer correct. Originally I had been looking at recreating everything with Animate CC using HTML5 Canvas, but input text isn’t supported you have to use DOMElement to link a html input text field and then overlay it over the top - not a major issue if you only have 1 or 2, but unfortunately we have far more than this.

How is this handled in OpenFL?

Input text is supported

This is an older HTML5 project using an OpenFL, but you can see the password field (“komodo”), which is all coming from a SWF. The layout was made in Adobe Animate, and published to a SWF, then OpenFL converted it for HTML5, but retained the functionality of the hierarchy, kept the TextField editable, etc, like you’d expect in Flash :slight_smile:

Impartial advise on OpenFL forum is kind of hard :wink:

But considering your needs, OpenFL sounds like the perfect fit. You can keep most of you Flash stuff and make it work in HTML5 just like @singmajesty said.