views:

413

answers:

3

I havent used flash or action script much. I am planning a small project that i'd like to be online via flash but i'd like to reuse the code in my c/c++ projects

Is there a script language i can use? i am thinking lua or python. After googling i found flua which is incomplete and jython. Can i use java in flash? would it be a good idea to use python in java which is ran with flash?

A: 

There's no way to embed Java within a Flash movie. If you're creating a SWF that will display in a browser then you're restricted to Actionscript. You could create a Java applet, load it in the same page, and use javascript to communicate between the two, though I wouldn't recommend that.

If you're using a projector to create an EXE then you may be able to load and use C++ dlls, though I've never attempted this.

Herms
+3  A: 

Have you taken a look at Alchemy?

With Alchemy, Web application developers can now reuse hundreds of millions of lines of existing open source C and C++ client or server-side code on the Flash Platform. Alchemy brings the power of high performance C and C++ libraries to Web applications with minimal degradation on AVM2. The C/C++ code is compiled to ActionScript 3.0 as a SWF or SWC that runs on Adobe Flash Player 10 or Adobe AIR 1.5.

SDX2000
+1  A: 

Have you looked at haxe? http://www.haxe.org

The haxe compiler can produce swf files, javascripts and other, with a language that resembles actionscript or javascript more or less, depending on what language details you care about.

Here's this nice teaser from the haxe site: "Currently in testing, with the right build of haXe from Hugh Sanderson, you can now output your haXe applications to pure C++ source code, complete with makefiles."

But no, i don't know about using java inside a flash. You mean the flash app executing java while it's running? or using java to create a flash app?

DarenW