COMMUNITY

Need expert advice


(nardine zermok) #1

I have a big personal Flash project I would need to migrate in Haxe, but after some research I’m not sure to chose the right things, so here is the description of my project:

  • The whole project is developed on Flash Pro Cs6, with As2 and As3 components and code
  • Uses massively multicast, rtmfp, audio/video classes and GPU stage, with AMS 5.
  • Uses external classes like GASP etc…
    My goal is:
  • not reinvent the wheel, minimize as much as possible recoding
  • not redesign but instead convert the whole graphics from Flash Pro to an haxe UI
  • to let my project to stay alive on future browsers that will cease Flash plugin.
    Thanks

(Philippe) #2

How can you have AS2 and AS3 components? Timeline code and animations is a big problem to migrate, this is likely to require to significantly refactor your UI layer to be more efficiently portable.

Also I’m afraid the networking side is going to be very problematic as there is no Haxe port of the client side AFAIK.

It’s hard to guess without knowing the depth of your project but this kind of port can take many months for a team.


(Allan Dowdeswell) #3

@elsassph There is limited ability for AS2 to talk to AS3 components via LocalConnection. http://blog.gskinner.com/archives/2007/07/swfbridge_easie.html
Not sure if that’s what’s happening here.

@zermok It’s much harder to migrate AS2 to Haxe, but Haxe is likely still your best bet for any Flash migration project. OpenFL will take you far with the assets, and the AS3HX library can help with code conversion. Not sure about the networking. Here’s some links I’ve collected:

WebRTC:

https://flashphoner.com/web-call-server-4-4/

https://www.html5rocks.com/en/tutorials/webrtc/basics/ - tutorial/code

https://webrtc.org/

https://lib.haxe.org/p/peerhx/ -seems very useful

http://peerjs.com/ - for the above

https://github.com/juakob/WebRTC-haxe-guide/blob/master/PeerConnection.hx - not sure if so useful

https://github.com/seibe/Haxe_WebRTC - not sure if useful

http://www.digitalsamba.com/en-US - conferencing

http://lynckia.com/licode/ - server

https://www.wowza.com/products/capabilities/webrtc-streaming-software - rtmfp or webrtc (in future)

https://github.com/DoubangoTelecom/telepresence - open source server

RTMFP:
http://old.haxe.org/doc/flash/peer2peer

http://www.monaserver.ovh/samples.html

http://labs.adobe.com/technologies/cirrus/

https://github.com/OpenRTMFP/ArcusNode - server


(Philippe) #4

Yes you can load AS2 animations but that would mean the situation is even worse :slight_smile: though maybe OpenFl has some runtime SWF capability.

The point is that all these pieces are relatively simple to put together in Flash, but represent a real challenge in Haxe.

Best portability essentially is if your UI is pure Starling for instance. This ports relatively well.


(nardine zermok) #5

elsassphPhilippe
All code is out of the timeline
no starling used, only standard As2 and As3 components and some I created myself.
How developers created any design with Haxe as language if it’s a challenge so?

Allan Dowdeswell
No worry about as2 to as3, everything is working fine, I use indeed my own localconnection class.
The subject is more how to convert all in Haxe, without to worry about the actionscript source code which is working very well after 11 years of debugging.


(nardine zermok) #6

Thanks for your answers,
so for all the graphics should I use openFL? but how to convert it?
all design have single frame, for some I use enterframe to animate it.
is openFL has a Flash Pro like software or should all design must be programmed?
I knew about as3toHx, also I tried to find the as2toHx (yes it exists) but could not find it.
concerning the network protocols, My project does not use only RTMP, but also RTMPT, RTMFP, multicast application and IP level, NetGroup on client and server.
Also all the links above were known to me thanks. Yes, it will certainly take month, but I have no choice if I want to keep my project alive, I’m certainly very upset.


(Philippe) #7

You won’t be able to magically get all that running in Haxe.

There is no equivalent of LocalConnection, no RTMP*, and Haxe or OpenFl can’t interpret a SWF with AS2 or AS3 bytecode, and as3tohx only gets you 80-90% in converting AS3 code to Haxe - a lot of remaining work will be needed.

  • OpenFl only offers a re-implementation of the Flash API and a Startling port to Haxe, which is suitable if you do everything from code.
  • OpenFl has some level of SWF assets support, which can be used from Haxe/OpenFl code,
  • however experience shows that vector-heavy graphics perform very poorly in the browser with OpenFl, so optimisation is necessary unless scenes and graphics are very simple

Generally it sounds like you should follow the discussion in OpenFl’s discord.


(Mike Robinson) #8

Having led similar projects myself in the past, I will stress that you first-and-foremost need to construct a "technical project plan." Gantt-charts and the whole shebang.

First, inventory every asset in your project and make very sure that you have source-code representations of them, especially those old AS2 assets. You probably should plan to convert all of those to AS3.

Then, get a handle on all of those external libraries – what are they, what versions are they, what do they actually do for you, and do you have source-code for them.

The bulk of the project plan is in the research leading up to it – determining, step by step and asset by asset, exactly what this project will have to be when re-mapped to a Haxe context. The two environments are not the same and, even though “helper tools” exist, they are of limited usefulness. You will not be “simply porting” this system, but in some ways re-engineering it.

If you take a month – or more – just to develop this detailed project plan … which you might wish to post here (in part) for “peer review” … it will not be time nor money ill-spent. Quite the opposite: “don’t spend one thin dime ‘writing code,’ except for investigative or proof-of-concept purposes, until you have it, and have just cause to believe it.”


(Allan Dowdeswell) #9

@elsassph and @sundialservices you guys are awesome!

Since nobody has mentioned the Adobe Animate plugin for OpenFL, here I go in case it helps:



(nardine zermok) #10

thanks all for your advice.
openFL plugin sounds good!, but is it working on Flash Pro cs6 too?
it’s a pity there is not already an Haxe Software like animate, Haxe develop looks good for pure coding, but not for design and coding. After passed 11 years on my project believe me, I really don’t want to pass more time on it, especially to reinvent the wheel. And btw I HATE javascript :slight_smile:


(nardine zermok) #11

The most hard to convert in my project will be the network side.
if anyone knows the right migration of Rtmfp server, peer to peer and multicast application/ip level, NetGroup, SharedObject So I’m pretty sure the rest will be ok.


(nardine zermok) #12

Yes, I have all the sources of As2/As3 components but one which is a colorpicker, so it should not be a problem.


(Allan Dowdeswell) #13

According to the plugin page, it is compatible with Animate CC (2014) 14.0 - CC (2019) 19.0. I have not tried this myself, but I sympathize with persons resisting the subscription-software push, as I still use Flash CS5. :slight_smile: There’s a trial for Animate CC which would answer your question pretty quickly.


(Philippe) #14

After passed 11 years on my project believe me, I really don’t want to pass more time on it, especially to reinvent the wheel

From what you described of your project (would you mind, even privately, to share what it is?) I’m afraid you’ll spend another year on it :S

I’m afraid the OpenFl plugin will require Flash CC as AFAIK it’s using a new plugin system.
However OpenFl can transform SWFs directly into usable assets - it may even be able to load simple SWF files as-is.

As Mike said you really must test/POC individually every feature needed for the migration - to be honest don’t expect the UI migration to go well.