[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

Flash over C++/Java?

Hi,

I'm new to Flash and consider using it to develop a game. Outer skin should be Flash. Can all the logic be handled in Flash? logic involves complex physics...
I actually though the engine should be written in C++, but now I face the issue of how to communicate with the Flash.
I believe XMLSockets/communications to Javascript is not the solution I seek, but that's all I know there is.
So, what non-Flash modules can I embed inside the Flash application?

Thanx,
Elad Hollander.
0
eladho
Asked:
eladho
2 Solutions
 
Dushan De SilvaCommented:
Yes you can handled all logics in Flash.
http://www.kirupa.com/developer/actionscript/index.htm#6
http://www.kirupa.com/forum/forumdisplay.php?s=&forumid=42

If you properly design it no need to use C++ or Java. But if you want you can access those files using flash simple command's like getURL. And if you want you can access C++/Java libraries using "include". Flash action scripting is Object Oriented and its mostly like Java. But not that much difficult. Its very easy. Very user freindly enviroment is there for scripters.
You can read more from www.kirupa.com

BR Dushan
0
 
wings_gauravCommented:
Hi,

You can't embed any modules inside flash. You can obviously delegate to an external module written in C++, VB, JAVA, C# etc.

I can somewhat relate to the problem - have done 3d & physics engines in flash. Upto say 1000 polygons  is max you can squeeze out of flash. So in case your in not that complex then flash has adequate support to program - if performane and very complex models need to be done then delegate.

If you are planning a standalone application then C++ container is the best way forward. The communication can happen directly using com events. Flash script has FSCommand function that can be used to notify the container - be it html, c++, vb, etc. On the other hand all the containers can access/manipulate variables inside the flash movie directly.

Although the above solution is the best in terms of raw performace - you will need to implement it differently over different paltforms - win32, mac, linux etc.

Another slightly unknown way is to hack into LocalConnection object. This object allows flash movies to communicate on a single machine using AMF. Although this is not documented officialy but has been publicly known for sometime. There is c/c++ code avialable that will allow you to use this communication channel to hook up flash with c++.

if you are looking at online/ multi platform implementation then XMLSocket and Java is great. Don't get mislead by the name XMLSocket - it doesn't need to be XML data that you can send on it. You can send any custom format raw data and parse it :)

hope this helps

-wings



0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now