user1590042
user1590042

Reputation: 13

How to open a existed flash project in Haxe?

Can any one tell me, how to convert a existed fla or swf to Haxe readable (.hx and .nmml)? I want to deploy it on ios device. and can edit the source code(I know the process of deploying a Haxe project in ios devices, but wanted to know how to create a haxe project with existed flash project).Please suggest me regarding it, Thanks in advance.

Upvotes: 1

Views: 1170

Answers (2)

Jason O'Neil
Jason O'Neil

Reputation: 6008

It's more complicated than merely opening a Flash project and compiling it with Haxe - they are two different languages, and if you're targeting iOS, two different environments.

However, there are similarities between AS3 (flash) and Haxe, so you may be able to copy some of your code across. Here are some useful links:

  • Using AS3 classes in Haxe - includes links to tools which can help automatically convert a ".as" class into a ".hx" class. It's not 100% perfect, but it's better than doing it by hand.

  • Using SWF Assets in NME - Cross Platform - Joshua Granick has a blog post about using compiled SWF assets in Haxe/NME, and it compiles to the C++ targets, including iOS.

Between converting ActionScript classes to Haxe, and using SWF assets, you may be able to make a fair amount of your project run on iPhone. Don't expect it to be a simple click of a button though. If you run into more problems, I recommend asking on the Haxe mailing list or NME Forum.

Upvotes: 0

stroncium
stroncium

Reputation: 1430

First of all, you can't do it.

You can convert as3 code to haxe by some tool. It's easy to write one and I did so some time ago. Also, there is at least one open source tool to do that. I'm not sure how good it is though.

Another thing is your graphics. I'm almost sure you can't convert .fla to graphics you can use on iOS automatically. But we have a framework similar to flash API used to deploy graphics on non-flash platforms, so there probably exists some tool to convert flash vector graphics to a format this framework will understand / rip it from .fla if the framework understands it on it's own. I'd be interested in comments on this issue.

Upvotes: 0

Related Questions